ci: unblock the queue — add the missing #5766 receipt, and stop repo-wide audits failing innocent PRs (#5786)

* docs(changelog): add the missing release-note receipt for #5766

`scripts/release/check-feature-release-notes.sh` requires every issue-linked
`feat:` commit in the release range to leave a durable changelog receipt.
79ed88f377 ("feat(config): bind catalog and route resolution (#5766)")
landed without one, so `scripts/release/check-versions.sh` now exits 1 on
plain main:

  $ git worktree add --detach wt origin/main   # 6ea10032f9
  $ ./scripts/release/check-versions.sh
  ::error::Feature commit 79ed88f377 references #5766, but no release-note
  receipt exists in CHANGELOG.md docs/CHANGELOG_ARCHIVE.md.
  exit=1

"Version drift" is a required status check, so this failed every pull request
opened or re-run against current main, not just the one that surfaced it.

The entry says plainly that #5766 is additive plumbing with no call-site or
user-visible change, rather than inventing a user-facing feature to satisfy
the gate. `crates/tui/CHANGELOG.md` is regenerated with
`./scripts/sync-changelog.sh` so the slice check passes too.

After this commit `./scripts/release/check-versions.sh` exits 0:
  Feature release-note receipts OK: 47 linked issue reference(s) checked.
  Version state OK: workspace=0.9.11, npm=0.9.11, npm-binary=0.9.11.

Signed-off-by: CodeWhale Bot <[email protected]>

* ci: stop repo-wide and history-wide audits from failing innocent PRs

A required per-PR check should assert a property of the change. Five of ours
assert a property of the whole repository or of already-merged history, so a
branch fails for debt it did not add and the fix is rebasing rather than
editing code. That is how the queue got stuck, and it trains people to read a
red check as noise.

Demoted to advisory on `pull_request` only, still blocking on pushes to main:

  - Check dead-code budget          (absolute #[allow(dead_code)] total)
  - Check runtime-contract budget
  - Check persistence-backlog budget
  - Check harvested contributor credit

check-versions.sh keeps every tree-state check blocking everywhere. Only its
two range audits -- check 12 (feature release-note receipts) and check 7
(contributor credit), both scanning previous-tag..HEAD -- become advisory, and
only for the per-PR CI job, via a new --range-audit-advisory flag. Every
release path still runs them blocking: release-candidate.yml, auto-tag.yml,
release.yml, and prepare-release.sh. Combining the new flag with
--require-dated-release is refused outright so publication can never skip them.

Measured on the merge of origin/main + pr/5740, a tree with the real missing
#5766 receipt:

  $ ./scripts/release/check-versions.sh                          # exit 1
  ::error::Feature commit 79ed88f377 references #5766, but no
  release-note receipt exists in CHANGELOG.md docs/CHANGELOG_ARCHIVE.md.

  $ ./scripts/release/check-versions.sh --range-audit-advisory   # exit 0
  ::warning::Missing feature release-note receipt(s) above. Advisory here
  because this audits already-merged commits in v0.9.10..HEAD, not this change.
  Version state OK: workspace=0.9.11, npm=0.9.11, npm-binary=0.9.11.

actionlint is clean on the edited workflow.

Signed-off-by: CodeWhale Bot <[email protected]>
Entire-Checkpoint: 01M1D74JXS2F91WDY9DSKQ787E

* fix(tui): silence clippy::explicit_counter_loop in the startup mark

rust 1.98's clippy added `explicit_counter_loop` coverage for this shape, and
CI's `dtolnay/rust-toolchain@master` picked it up. `Lint` is a required check,
so main is currently red on it and every pull request inherits the failure:

  error: the variable `x` is used as a loop counter
     --> crates/tui/src/tui/mark.rs:182:9
      |
  182 |         for glyph in line.chars() {
      |         help: consider using: `for (x, glyph) in (x0..).zip(line.chars())`
      = note: `-D clippy::explicit-counter-loop` implied by `-D warnings`
  error: could not compile `codewhale-tui` (lib) due to 1 previous error

Applied clippy's own suggestion. Behaviour is identical: `x` still starts at
`x0` and advances one cell per glyph, and the `x >= area.right()` break still
stops the row at the viewport edge -- `zip` only advances as far as
`line.chars()` yields, so the open-ended range cannot run away.

Signed-off-by: CodeWhale Bot <[email protected]>
Entire-Checkpoint: 01M1D7F82ZEN4JVYBN0W1YDPRX

---------

Signed-off-by: CodeWhale Bot <[email protected]>
Co-authored-by: CodeWhale Bot <[email protected]>
This commit is contained in:
Hunter BownandCodeWhale Bot authored and GitHub committed 2026-08-31 19:29:15 -07:00
1 parent e50a86e737
commit 62b861e01a
5 files changed
+78 -13

No files matched your search

+26 -1
View File
@@ -196,7 +196,12 @@ jobs:
with:
node-version: 20
- name: Check version drift
run: ./scripts/release/check-versions.sh
# Checks 7 and 12 audit the previous-tag..HEAD commit range, not this
# tree, so a receipt another merge forgot reddens every open PR. They
# report here and block on every release path (release-candidate.yml,
# auto-tag.yml, release.yml, prepare-release.sh), which is where a
# missing receipt actually matters.
run: ./scripts/release/check-versions.sh --range-audit-advisory
- name: Check OHOS dependency graph
run: ./scripts/release/check-ohos-deps.sh
- name: Check release helper contracts
@@ -382,6 +387,11 @@ jobs:
# refusing to let the `#[allow(dead_code)]` total rise (#4785).
- name: Check dead-code budget
if: needs.changes.outputs.heavy == 'true'
# Advisory on pull requests: this asserts a whole-repo property, so a
# branch can fail it for debt it inherited rather than added, and the
# fix would be rebasing instead of editing code. It stays blocking on
# pushes to main, where the number is actually actionable.
continue-on-error: ${{ github.event_name == 'pull_request' }}
run: python3 scripts/check-dead-code-budget.py
- name: Test runtime-contract measurement harness
if: needs.changes.outputs.heavy == 'true'
@@ -403,6 +413,11 @@ jobs:
# the measurement script runs only locked, ignored Rust metric tests.
- name: Check runtime-contract budget
if: needs.changes.outputs.heavy == 'true'
# Advisory on pull requests: this asserts a whole-repo property, so a
# branch can fail it for debt it inherited rather than added, and the
# fix would be rebasing instead of editing code. It stays blocking on
# pushes to main, where the number is actually actionable.
continue-on-error: ${{ github.event_name == 'pull_request' }}
run: python3 scripts/check-runtime-contract-budget.py
# Provider-free paused-consumer measurement of the production
# persistence request channel. RSS is sampled only on macOS; every host
@@ -414,6 +429,11 @@ jobs:
python3 scripts/test_check_persistence_backlog_budget.py
- name: Check persistence-backlog budget
if: needs.changes.outputs.heavy == 'true'
# Advisory on pull requests: this asserts a whole-repo property, so a
# branch can fail it for debt it inherited rather than added, and the
# fix would be rebasing instead of editing code. It stays blocking on
# pushes to main, where the number is actually actionable.
continue-on-error: ${{ github.event_name == 'pull_request' }}
run: python3 scripts/check-persistence-backlog-budget.py
- name: Check README translations stay in sync
if: github.event_name != 'schedule'
@@ -432,6 +452,11 @@ jobs:
run: node web/scripts/check-locales.mjs
- name: Check harvested contributor credit
if: github.event_name != 'schedule'
# Advisory on pull requests: this asserts a whole-repo property, so a
# branch can fail it for debt it inherited rather than added, and the
# fix would be rebasing instead of editing code. It stays blocking on
# pushes to main, where the number is actually actionable.
continue-on-error: ${{ github.event_name == 'pull_request' }}
shell: bash
env:
EVENT_NAME: ${{ github.event_name }}
+10
View File
@@ -36,6 +36,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Internal: `codewhale-config` gains `RouteAuthoritySnapshot`, one immutable
authority that owns a compiled provider catalog together with the route
resolver projected from it, so a picker, a readiness view, and an execution
path can no longer resolve against different catalog snapshots without a
type-level signal. Resolution still goes through the sole resolver; the
returned receipt distinguishes an exact catalog row, a custom-endpoint route
whose provider facts are deliberately not reused, and an allowed
pass-through route with no catalog row. All state is secret-free. No call
site changed and no user-visible behaviour changed yet (#5766).
- Computer session records now count only time a provider actually accepted the
session as active, at per-second granularity. Idle, queued, stopped, and
teardown time are excluded, and a session whose allocation does not match a
+10
View File
@@ -36,6 +36,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Internal: `codewhale-config` gains `RouteAuthoritySnapshot`, one immutable
authority that owns a compiled provider catalog together with the route
resolver projected from it, so a picker, a readiness view, and an execution
path can no longer resolve against different catalog snapshots without a
type-level signal. Resolution still goes through the sole resolver; the
returned receipt distinguishes an exact catalog row, a custom-endpoint route
whose provider facts are deliberately not reused, and an allowed
pass-through route with no catalog row. All state is secret-free. No call
site changed and no user-visible behaviour changed yet (#5766).
- Computer session records now count only time a provider actually accepted the
session as active, at per-second granularity. Idle, queued, stopped, and
teardown time are excluded, and a session whose allocation does not match a
+1 -3
View File
@@ -178,8 +178,7 @@ pub fn render_fluke(
break;
}
// Skip blanks rather than pad: they must not erase the field behind.
let mut x = x0;
for glyph in line.chars() {
for (x, glyph) in (x0..).zip(line.chars()) {
if x >= area.right() {
break;
}
@@ -189,7 +188,6 @@ pub fn render_fluke(
cell.set_symbol(&glyph.to_string());
cell.set_style(Style::default().fg(color));
}
x += 1;
}
}
Rect::new(x0, area.y, cols, row_count)
+31 -9
View File
@@ -28,12 +28,26 @@
set -euo pipefail
require_dated_release=0
if [[ "${1:-}" == "--require-dated-release" ]]; then
require_dated_release=1
shift
fi
if [[ "$#" -ne 0 ]]; then
echo "Usage: $0 [--require-dated-release]" >&2
# Checks 7 and 12 audit a *commit range* (previous tag..HEAD), not the working
# tree. Debt left by an already-merged commit therefore reddens this gate for
# every unrelated open pull request, and the PR that gets blamed is innocent.
# The per-PR CI job passes --range-audit-advisory so that class of failure
# reports without blocking; every release path (release-candidate.yml,
# auto-tag.yml, release.yml, prepare-release.sh) still runs them blocking, so
# nothing can be published without its receipt.
range_audit_advisory=0
while [[ "$#" -gt 0 ]]; do
case "$1" in
--require-dated-release) require_dated_release=1; shift ;;
--range-audit-advisory) range_audit_advisory=1; shift ;;
*)
echo "Usage: $0 [--require-dated-release] [--range-audit-advisory]" >&2
exit 2
;;
esac
done
if [[ "${require_dated_release}" == "1" && "${range_audit_advisory}" == "1" ]]; then
echo "::error::--range-audit-advisory must not be combined with --require-dated-release; publication requires the range audit to block." >&2
exit 2
fi
@@ -200,15 +214,23 @@ if [[ -n "${previous_tag}" ]]; then
fi
if git rev-parse -q --verify "refs/tags/${previous_tag}" >/dev/null; then
if ! ./scripts/release/check-feature-release-notes.sh "${previous_tag}" HEAD; then
fail=1
if [[ "${range_audit_advisory}" == "1" ]]; then
echo "::warning::Missing feature release-note receipt(s) above. Advisory here because this audits already-merged commits in ${previous_tag}..HEAD, not this change. It blocks every release path; fix it before the next release." >&2
else
fail=1
fi
fi
while IFS= read -r line; do
[[ -z "${line}" ]] && continue
handle="$(sed -E 's#.*github.com/([^)/]+).*#\1#' <<<"${line}")"
if [[ -n "${handle}" && "${handle}" != "${line}" ]]; then
if ! grep -Fq "github.com/${handle}" <<<"${credit_sections}" && ! grep -Fq "@${handle}" <<<"${credit_sections}"; then
echo "::error::README.md adds contributor @${handle}, but CHANGELOG.md ${workspace_version} or [Unreleased] does not mention that credit." >&2
fail=1
if [[ "${range_audit_advisory}" == "1" ]]; then
echo "::warning::README.md adds contributor @${handle}, but CHANGELOG.md ${workspace_version} or [Unreleased] does not mention that credit. Advisory here; blocking on every release path." >&2
else
echo "::error::README.md adds contributor @${handle}, but CHANGELOG.md ${workspace_version} or [Unreleased] does not mention that credit." >&2
fail=1
fi
fi
fi
done < <(