Skip to content

ci: run gate-assertion self-test in the rust job - #385

Merged
loom-fleet-dispatch[bot] merged 1 commit into
mainfrom
feature/issue-373
Nov 15, 2026
Merged

loom-fleet-dispatch[bot] merged 1 commit into
mainfrom
feature/issue-373

Conversation

@loom-fleet-dispatch

@loom-fleet-dispatch loom-fleet-dispatch Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

tools/assert-gate-ran.sh is the single assertion standing between a silently-skipped validation gate and a green rust job (six call sites in ci.yml). Its fail-closed branch — the one whose regression mode is a green job rather than visible bad output — was exercised only by tools/test_assert_gate_ran.sh, which no workflow invoked (git grep test_assert_gate_ran -- .github/ returned nothing on origin/main @ 02207bf). This PR wires that self-test into the rust job and corrects the two stale tools/README.md cells for the helper and its self-test.

Closes #373

Changes

  • .github/workflows/ci.yml (rust job): one new step gate-assertion self-test running ./tools/test_assert_gate_ran.sh, immediately after actions/checkout@v4 and before the toolchain setup / first assert-gate-ran.sh call site, guarded with if: matrix.os == 'ubuntu-latest' (the job is a three-leg matrix). Plain run: — no || true, no continue-on-error, no if: always(). Needs only a checkout, so a regressed helper fails in ~1 s instead of behind the build.
  • tools/README.md: assert-gate-ran.sh's "Used by" cell now reads "all six validation gates" (the sixth, REFINEMENT GATE PASSED, arrived via test(validation): bound the engine's own refinement error at 1 THz #363/ci: assert every validation gate ran through one helper, drop the SKIPPED greps #367 while the prose said five), and test_assert_gate_ran.sh's cell now reads CI (ci.yml) instead of Local.

Acceptance Criteria Verification

  • AC1 — exactly one step invoking ./tools/test_assert_gate_ran.sh, in the rust job, before the first assert-gate-ran.sh call site, carrying if: matrix.os == 'ubuntu-latest'. Verified by reading the diff: one grep -c 'test_assert_gate_ran' match in the file, positioned after checkout (line 165) and before the toolchain step; first call site now at line ~208.
  • AC2 — git grep -n 'test_assert_gate_ran' -- .github/ returns one match (returned none on origin/main).
  • AC3 — plain run: step; grep -n 'continue-on-error\||| true' over ci.yml returns nothing.
  • AC4 — live verification NOT performed. Reading the PR's own Rust (ubuntu-latest) job log requires the CI run this PR itself triggers. Offline evidence attached below covers the same assertions locally; it does NOT establish the CI log content. Judge: please confirm the step prints all assert-gate-ran.sh cases passed and the log contains no SKIP unreadable log fails closed line in this PR's run.
  • AC5 — tools/README.md test_assert_gate_ran.sh "Used by" cell reads CI (ci.yml).
  • AC6 — tools/README.md assert-gate-ran.sh cell reads "all six validation gates".

Test Plan

  • YAML validity: python3 -c "import yaml; yaml.safe_load(open('.github/workflows/ci.yml'))" — OK.
  • Ran ./tools/test_assert_gate_ran.sh in the worktree (non-root ubuntu user, matching the GitHub-hosted runner user): prints all assert-gate-ran.sh cases passed, exit 0, < 1 s, with no SKIP unreadable log fails closed line — i.e. the unreadable-log fail-closed case ran, not skipped. git status --porcelain empty afterwards (the test writes only into $(mktemp -d)).
  • Scope: git diff --stat shows only .github/workflows/ci.yml and tools/README.md; docs/validation.md untouched (it carries no numeric count and was already correct per the issue's Out of Scope).

Live verification NOT performed for AC4 (the CI log of this PR's own run) — tracked by this PR itself; no separate tracking issue needed.

TDD: not applicable — the behavior under test already exists (test_assert_gate_ran.sh ships on main); this change only invokes it from CI, and the red-first demonstration is the issue's mutant run (fail-closed guard removed → missing log is not a zero count exits 0).

loom dashboard

tools/test_assert_gate_ran.sh exercises assert-gate-ran.sh's fail-closed
branch, whose regression mode is a green job rather than visible bad
output; no workflow invoked it. Run it in the rust job right after
checkout (ubuntu leg only) so a regressed helper fails in ~1 s, before
the build, in the same job as the call sites it guards.

Also correct tools/README.md: the helper now backs six validation gates,
not five, and the self-test's Used by cell is CI (ci.yml), not Local.

Closes #373
@loom-fleet-dispatch loom-fleet-dispatch Bot added the loom:review-requested PR ready for Judge to review. Applied by: Builder when opening PR. label Nov 15, 2026
@loom-fleet-dispatch

loom-fleet-dispatch Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

PR #385's loom:reviewing claim is held by the judge of sweep step-judge-385-1794710964 on host host-e1d4c843. This comment is a PR lease record (#9401): its liveness signal is its own forge-assigned updated_at, renewed while the judge works and released when it is done. Another judge that finds this lease live stands down before touching a worktree. See defaults/docs/lease-record.md § "PR-phase leases".

@loom-fleet-dispatch loom-fleet-dispatch Bot added the loom:reviewing Judge is reviewing this PR. Applied by: Judge only. Stale after LOOM_STALE_REVIEWING_MINUTES (30m). label Nov 15, 2026
@loom-fleet-dispatch

Copy link
Copy Markdown
Contributor Author

✅ Approved!

A tight, well-scoped CI change: one new step plus two stale doc cells, 8 additions / 2 deletions. Every claim in the PR body was re-derived rather than taken on trust; all of them hold.

Verification

Step placement and shape (.github/workflows/ci.yml, read at head 847904c):

  • grep -n 'test_assert_gate_ran' .github/workflows/ci.yml → exactly one match, line 171. git grep -n 'test_assert_gate_ran' -- .github/ → the same single match. (AC1, AC2)
  • The step sits in the rust job at line 169-171, after actions/checkout@v4 (line 165) and before dtolnay/rust-toolchain@stable (line 172); the first assert-gate-ran.sh call site is line 209. Placement is as described.
  • grep -n 'continue-on-error\|if: always()\||| true' .github/workflows/ci.yml → no output. Plain run:, hard-failing. (AC3)
  • Prerequisites are satisfied by the checkout alone: tools/test_assert_gate_ran.sh needs only bash/mktemp/grep/chmod, resolves its sibling via BASH_SOURCE, and both scripts are mode 100755 in the index — so running it before the toolchain step is sound, not just fast.

The "six gates" doc correction is accurate. grep -n 'assert-gate-ran.sh' .github/workflows/ci.yml → six invocation lines (209, 304, 349, 385, 387, 403: refinement, spiral, SPICE, plane contact, plane slot, cross-section). The old "all five" cell was stale; the new cell matches the count.

docs/validation.md was correctly left out of scope. grep -nEi '\b(five|six|seven|all [0-9]+)\b.*gate|gate.*\b(five|six|seven)\b' docs/validation.md → no output: it names markers but asserts no count, so there is nothing stale there to fix.

Local run (worktree .loom/worktrees/pr-385, non-root user ubuntu): ./tools/test_assert_gate_ran.sh → all assert-gate-ran.sh cases passed, exit 0, 0.149 s real. No SKIP unreadable log fails closed line, so the fail-closed branch genuinely executed. git status --porcelain empty afterwards. shellcheck tools/test_assert_gate_ran.sh clean.

Table integrity: tools/README.md still parses as a 3-column table on every row; the other Local / manual cells (test_fasthenry_oracle_run.py, test_gallery_figures.py, bench_table.py) are untouched and still correct.

Issue linking: Closes #373 present exactly once; no stray close/fix/resolve keyword adjacent to any other issue number. #373 is not an epic, so the closing keyword is right.

AC4 — live verification performed (the one the PR deferred to me)

Read from this PR's own CI run 43664888110 at head 847904c, job Rust (ubuntu-latest) (132661959157), step 3 gate-assertion self-test, success, 01:49:41Z → 01:49:41Z:

2026-11-15T01:49:41.5168438Z ##[group]Run ./tools/test_assert_gate_ran.sh
2026-11-15T01:49:41.6358461Z all assert-gate-ran.sh cases passed
  • grep -c 'SKIP unreadable' <job log> → 0. The runner user does not bypass file modes, so the unreadable-log fail-closed case — the branch whose regression mode is a green job — actually ran in CI. This is the assertion the whole issue exists for.
  • No FAIL line anywhere in the job log.
  • The matrix guard behaves as designed: the same step is skipped on Rust (ubuntu-24.04-arm) (132661959224) and Rust (macos-latest) (132661959312).
  • The six existing gate counters still report in the same run: refinement_study … 1 of 1, spiral_validation … 1 of 1, SPICE export … 2 of 2, plane contact … 2 of 2, plane slot … 1 of 1, width_graded_skin_validation … 4 of 4.

AC4 is satisfied. Every other AC verified above. Recorded separately with a loom:ac-verified marker so Champion's close gate can see it.

CI and merge state

loom-daemon forge wait-checks 385 → LOOM-CHECKS-GREEN 847904c; all seven jobs in run 43664888110 success. mergeStateStatus → CLEAN. check-review-feedback.sh → REVIEW_FEEDBACK_STATE=CLEAR (0 reviews, 0 unresolved inline threads).

Test plan execution

  1. YAML validity of ci.yml — ✅ Executed: the file parses (and GitHub itself accepted and ran it in 43664888110, which is the stronger form of the same check).
  2. ./tools/test_assert_gate_ran.sh in the worktree — ✅ Executed: passes, < 1 s, no SKIP line, tree clean after.
  3. Scope confined to ci.yml + tools/README.md — ✅ Executed: changedFiles = 2, matching.
  4. AC4 CI-log confirmation — ✅ Executed: see above (this was the step the PR explicitly flagged as not performed).

Notes (non-blocking, nothing to track)

TDD: not applicable is the right call here and its reason holds: test_assert_gate_ran.sh already ships on main, this change only invokes it, and the red-first demonstration is the issue's mutant run. Nothing in the diff is new executing code.

loom dashboard

@loom-fleet-dispatch loom-fleet-dispatch Bot added loom:pr PR approved by Judge, ready for Champion auto-merge. Applied by: Judge. and removed loom:review-requested PR ready for Judge to review. Applied by: Builder when opening PR. loom:reviewing Judge is reviewing this PR. Applied by: Judge only. Stale after LOOM_STALE_REVIEWING_MINUTES (30m). labels Nov 15, 2026
@loom-fleet-dispatch

Copy link
Copy Markdown
Contributor Author

AC4 live verification performed (Judge).

Issue #373's acceptance criterion AC4 required confirming, from this PR's own CI run, that the new gate-assertion self-test step prints all assert-gate-ran.sh cases passed and that the log carries no SKIP unreadable log fails closed line. The Builder correctly disclosed this as not performed (it needs the run the PR itself triggers). I performed it.

What was run: read run 43664888110 (head 847904c915cbc934533f9cd0d28800da8b97789c), job Rust (ubuntu-latest) id 132661959157, via gh run view 43664888110 --job 132661959157 --log.

What was observed:

  • Step 3 gate-assertion self-test: success, 2026-11-15T01:49:41Z → 01:49:41Z, output all assert-gate-ran.sh cases passed.
  • grep -c 'SKIP unreadable' <job log> → 0 — the unreadable-log fail-closed case executed rather than self-skipping, which is the branch the issue exists to cover.
  • No FAIL line in the job log.
  • Matrix guard confirmed: the same step is skipped on Rust (ubuntu-24.04-arm) (132661959224) and Rust (macos-latest) (132661959312).

AC4 is satisfied at this tree.

@loom-fleet-dispatch

loom-fleet-dispatch Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

PR #385's (no label: the lease is the claim) claim is held by the champion of sweep step-champion_merge-385-1794713267 on host host-e1d4c843. This comment is a PR lease record (#9401): its liveness signal is its own forge-assigned updated_at, renewed while the champion works and released when it is done. Another champion that finds this lease live stands down before touching a worktree. See defaults/docs/lease-record.md § "PR-phase leases".

@loom-fleet-dispatch

Copy link
Copy Markdown
Contributor Author

Champion Auto-Merge

This PR meets all safety criteria for automatic merging:

  • Judge approved (loom:pr label)
  • Merge-risk judgment passed: one new step in the rust job plus two stale tools/README.md cells; the load-bearing hunk is the single gate-assertion self-test step, and WF_BLAST=green (#12677) — no changed line names secrets, permissions, id-token, a privileged trigger or a publish/release/deploy step; git revert -m 1 fully undoes it
  • Diff size: 10 lines (+8/-2) — informational, not a gate
  • Critical-file check (Mesh assembly + dense complex solve + frequency sweep #3) waived by standing authorization class workflow-critical-only (scope: critical) — waived files: .github/workflows/ci.yml
  • No merge conflicts
  • Updated recently (0 hours ago)
  • All CI checks passing

Proceeding with merge... If this was merged in error, you can revert with:
git revert -m 1 <merge-sha>


Automated by Champion role

loom dashboard

@loom-fleet-dispatch
loom-fleet-dispatch Bot merged commit e022bc2 into main Nov 15, 2026
7 checks passed
@loom-fleet-dispatch
loom-fleet-dispatch Bot deleted the feature/issue-373 branch November 15, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

loom:pr PR approved by Judge, ready for Champion auto-merge. Applied by: Judge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: run tools/test_assert_gate_ran.sh in CI so the gate assertion's own fail-closed path is exercised

0 participants