Skip to content

fix(t27b): regenerate steward.c so is_pass knows pass_ct; the ledger test asks is_pass (Refs #12751) - #13097

Merged
cursor[bot] merged 2 commits into
masterfrom
lane/passct-steward-repair
Nov 9, 2026
Merged

cursor[bot] merged 2 commits into
masterfrom
lane/passct-steward-repair

Conversation

@gHashTag

@gHashTag gHashTag commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Two parts, both needed. The commit message carries the same text.

What was wrong

  • specs/tri/t27b/steward.t27 already counts pass_ct as a pass (is_pass: v == 12, added by hosting: pass_ct joins the verdict vocabulary -- the words, the steward, the rules mirror (Refs #5980) #12792).
  • The committed gen/c/tri/t27b/steward.c was not regenerated after that edit. The spec and the seal agree; only the committed file lagged.
  • scripts/tri_loop/t27b_rules.py compiles and calls that C, so every consumer read is_pass(pass_ct) = false.
  • scripts/ci/test_a_t27b_spec_cannot_move_silently.py also kept its own success list ("pass", "pass_vacuous") for the blocker-and-reason check. The five pass_ct rows of the ledger (blocker "", as bless writes them) failed it.

The change

  1. gen/c/tri/t27b/steward.c, regenerated from the spec with t27c gen-c specs/tri/t27b/steward.t27, no hand edit.
    • The output hashes to d1941f3b..., the gen_hash_c already recorded in .trinity/seals/t27b_T27bSteward.json.
    • t27c seal specs/tri/t27b/steward.t27 --verify: all hashes MATCH. The seal is not re-saved.
  2. The test now skips the blocker-and-reason check for rows the spec's is_pass counts as a pass, read through t27b_rules.
    • The cap line is unchanged: it still counts by the two-string tuple, as ledger_counts in bless does, 140 == 140.
    • Foreign lines: +3 / -3, net zero.

Controls (one test file, run by hand)

Tree Result
regenerated C + patched test, real ledger all ok, rc 0
negative: a blocked row with blocker "" FAIL on the blocker line, rc 1
negative: a pass_ct row changed to blocked, blocker "" FAIL on the blocker line, rc 1
stale C + patched test FAIL on the blocker line, rc 1
regenerated C + original test FAIL on the blocker line, rc 1

Local hooks: pre-commit and pre-push passed (foreign-budget, own-language, secret-gate).

The cap, unchanged

  • 140 / 140: the test's cap line and tri t27b ratchet --bless both count every row outside ("pass", "pass_vacuous"): 133 blocked + 1 codegen + 1 mismatch + 5 pass_ct.
  • 135 at cap 140: what tri t27b ratchet should count on this tree, because it asks the regenerated is_pass.
    • This is derived from the ledger and the code; the ratchet was not executed here (it needs a corpus run).
    • The t27b-native CI job runs it.
  • The cap is not raised or lowered.
  • The slack of 5 is not room to add non-pass rows: the test's cap line is an exact equality by the tuple.
  • ledger_counts and bless in scripts/tri_loop/t27b.py still use the tuple. Aligning them with is_pass is a separate decision and is not in this PR.

Not in this PR

Refs #12751
Refs #12867

🤖 Generated with Claude Code


Note

Low Risk
CI/test alignment plus regenerated steward C from an already-sealed spec; no auth, data, or ratchet cap logic changes in this diff.

Overview
Regenerates gen/c/tri/t27b/steward.c from specs/tri/t27b/steward.t27 so generated is_pass treats pass_ct as a pass again, matching the seal and unblocking t27b_rules.is_pass.

The committed-ledger section of scripts/ci/test_a_t27b_spec_cannot_move_silently.py now calls t27b_rules.is_pass when enforcing blocker/reason on non-pass rows, so pass_ct ledger entries no longer fail that check. The cap assertion still uses the existing ("pass", "pass_vacuous") tuple.

Reviewed by Cursor Bugbot for commit 6d563c8. Bugbot is set up for automated code reviews on this repo. Configure here.

…test asks is_pass (Refs #12751)

Two parts, both needed.

1. gen/c/tri/t27b/steward.c was not regenerated when #12792 (37ca933)
   added `if (v == 12) { return true; }` (pass_ct) to is_pass in
   specs/tri/t27b/steward.t27. scripts/tri_loop/t27b_rules.py compiles and
   calls this C, so every consumer read is_pass(pass_ct) = false.
   Regenerated with: t27c gen-c specs/tri/t27b/steward.t27 > gen/c/tri/t27b/steward.c
   The output hashes d1941f3b..., the gen_hash_c already recorded in
   .trinity/seals/t27b_T27bSteward.json (spec_hash 8fa40d90... unchanged),
   so the seal is not re-saved. No hand edit of the generated file.

2. scripts/ci/test_a_t27b_spec_cannot_move_silently.py kept its own success
   list ("pass", "pass_vacuous") for the blocker-and-reason check, so the
   five pass_ct rows of the committed ledger (blocker "", as bless writes
   them) failed it. The check now skips the rows the spec's is_pass counts
   as a pass, read through t27b_rules. The cap check is unchanged: it still
   counts by the tuple, as bless (ledger_counts) does, 140 == 140.
   Foreign lines: +3 / -3 (net zero; the text/real lines are merged to pay
   for the import line).

Controls (python3 3.14.6, one test file):
  regen C + patched test, real ledger      all ok, rc 0
  neg: blocked row with blocker ""         FAIL blocker line, rc 1
  neg: pass_ct row -> blocked, blocker ""  FAIL blocker line, rc 1
  stale C + patched test                   FAIL blocker line, rc 1
  regen C + original test                  FAIL blocker line, rc 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag gHashTag added the no-auto-merge Opt out of the issue gate's default squash auto-merge (issue-gate.yml) label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-11-02 07:05:14 UTC

Summary

Status Count
Total Open PRs 46
PRs with Failing Checks 43
PRs with All Checks Green 3
READY 3
FAILING 43
PENDING 0
NO CHECKS YET 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e75b498e5e79 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

gHashTag added a commit that referenced this pull request Nov 2, 2026
…d elsewhere (Refs #12877)

Head 59a386a leaves one red of four: loop-tools-tracked (run 41415969492,
job 125179777508). Three checks say it is not this branch's, and section 12c
records each with the command that reads it:

  the branch touches neither docs/reports/t27b_expectations.json nor
  scripts/tri_loop/ -- the diff against the merge-base prints nothing;

  loop-tools-gate is `failure` on master's last four runs, back to 2026-10-27;
  it runs on master only when its own paths move, so 10-31 is the newest;

  the repair is green in its own lane: on PR #13097 the same check PASSES,
  run 41403967388, job 125141715680.

So the case is diagnosed and fixed where it belongs, and a copy of that fix
here would be a second home for one truth.

One number corrected while it is cheap: the dashboard bot's comment reads
"30 failing / 37 total" for this PR. Counted at that same head, the check-runs
API gives 4 failure, 29 success, 4 cancelled, 4 skipped -- 41 runs, 4 red. The
bot sampled a run that had barely started; the direct count is what 12b uses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Nov 2, 2026
…r's (Refs #12877)

Section 12c was written while two checks were still running and reported one
red where the finished set is four. Section 12d corrects it, and the correction
runs one way only: with everything finished, none of the four belongs to this
branch. Each is quoted from master's own words rather than asserted:

  type names        ledger 141, observed 142, + ParsedCommand NEW conflict --
                    the same two lines master's own run prints;
  coverage          one stale seal, policy_PolicyOwnLanguage.json, named in
                    master's failure too;
  spec-guards       the same seal, all four gen_hashes with sealed vs current;
  loop-tools        unchanged from 12c, and green in #13097.

Two facts close it. The Cell rename held: the ratchet observed 143 names with
Cell in the tree and observes 142 now, listing only ParsedCommand, which is
#13059/#13087's -- the arithmetic matches master. And the seal is out of reach
from here: the diff against the merge-base over specs/policy/ and
.trinity/seals/ prints nothing, so this branch changed neither the spec nor any
seal, and its repair already exists as PR #13096.

The two review comments in the same event are the dashboard bot's PR-level
comments, with no inline thread and nothing asked of this branch, so nothing
was replied to. Their counts (30 of 34, then 28 of 33, four minutes apart) are
two more mid-run snapshots of the kind 12c already corrected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Nov 2, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0d9ae29. Configure here.

Comment thread gen/c/tri/t27b/steward.c
}
if ((v == 12)) {
return true;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stable pass_ct rows flag unexpected pass

High Severity

Making is_pass true for pass_ct (code 12) causes entry_code to mark a still-pass_ct ledger row as an unexpected pass. entry_code only treats want == 0 or want == 1 as a pass expectation, so want 12 falls through to is_pass(got) and returns unexpected pass. The ratchet would go red on the five existing pass_ct rows even when the run is unchanged, and re-blessing still stores t27b: pass_ct, so it cannot clear the finding.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0d9ae29. Configure here.

Co-authored-by: Dmitrii Vasilev <gHashTag@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-11-09 21:18:34 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 48
PRs with All Checks Green 2
READY 0
FAILING 48
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 48 + 0 + 0 = 48, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b882be1e4933 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@cursor
cursor Bot merged commit c6efd04 into master Nov 9, 2026
44 of 51 checks passed
@cursor
cursor Bot deleted the lane/passct-steward-repair branch November 9, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-auto-merge Opt out of the issue gate's default squash auto-merge (issue-gate.yml)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants