Repository navigation
cron: the night-loop card keeps its law consts test-local (Refs #11836) - #12374
Merged
Merged
Conversation
The trinity site generator (apps/website/scripts/agents-from-specs.mjs) fails a specs/crons/ card on any top-level const beyond its own CRON_REQUIRED + CRON_OPTIONAL set, and this card carried 48 extras beside the generator's 15 -- the next sync would have gone red on 'unknown constant'. The merged sibling card t27os-repair-actor (#12147) is the convention: law strings and verdict constants live as TEST-LOCAL consts, the functions read literals with the name in a trailing comment, and the generator's 15 stay top-level. Meaning identical: same 48 tests (48/48 pass, 0 vacuous), same asserts, same section comments, the const values restated once per section they left. The card's seal is recomputed (t27c seal --save, all hashes MATCH). Preflight 7/9 on this branch: seal-coverage and seal-currency are RED on 8 unrelated seals (GitDiff/vm_JitSemantics/vsa_PackedVsa/pipeline_TriBuilder and their twins) whose specs moved on master today after their seals -- stale at origin/master, touched by nothing here. This card's own seal verifies.
This was referenced Oct 25, 2026
test(analog): sar_switch mutation test gaps closed, 349 of 400 mutants killed (Closes #12287)
#12349
Merged
Contributor
This was referenced Oct 25, 2026
Summary by t27-beesChecked by the t27 compilert27c parse, parse-complete and typecheck on each changed .t27 file at
Read by the modelThe night-loop cron card moves its 48 extra top-level constants into test-local consts so Trinity's site generator (agents-from-specs.mjs) stops rejecting the card. The generator only allows its own 15 constants at top level in specs/crons/ cards; the sibling repair-actor card already follows this pattern. Worth a look
Read: 2 files, +141 -114, the whole diff. Head |
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The night-loop cron card (specs/crons/t27os-night-loop.t27) carried 48 top-level consts beyond the generator's set. Trinity's site generator (apps/website/scripts/agents-from-specs.mjs, the HOSTS/consts schema check) fails a specs/crons/ card on any unknown top-level constant, so trinity's next sync of the vendored corpus would have gone red on ~48 'unknown constant' lines and taken the site build down with it.
The fix follows the convention the merged sibling card set (specs/crons/t27os-repair-actor.t27, #12147): the generator's own 15 constants (CRON_REQUIRED + INTERVAL_MS + NOTE) stay top-level; every law string, verdict code and recorded prompt moves into the card's test blocks as test-local consts, and the functions read literals with the const name in a trailing comment. Each section says once, in its comment, which constants its tests carry.
Meaning identical, tests real (L4): the same 48 test blocks with the same asserts -- 48/48 pass, 0 fail, 0 vacuous (t27c test-report), and 48/48 again at seal time. The card's seal is recomputed; all five hashes MATCH. Verified against the generator that would have broken: with this card vendored, node scripts/agents-from-specs.mjs on trinity origin/main runs clean (0 problems; the launchd-host card passes HOSTS and the INTERVAL_MS rule).
Preflight is 7/9 on this branch: seal-coverage and seal-currency are RED on 8 seals this PR does not touch (GitDiff.json, git_GitDiff.json, JitSemantics.json, vm_JitSemantics.json, PackedVsa.json, vsa_PackedVsa.json, TriBuilder.json, pipeline_TriBuilder.json). Their specs moved on master today after their seals (specs/vm/jit_semantics.t27 changed 10-25 15:13, its seal last touched 10-06; same shape for vsa and builder), so the staleness exists at origin/master itself. This card's own seal verifies clean (t27c seal --verify: all hashes MATCH).
Refs #11836.
{ "version": 1, "head_sha": "17a7e38574f56f0cf07c9e864ad9ab1dfe57e343", "summary": "The night-loop cron card moves its 48 extra top-level consts into test-local consts so trinity's site generator stops failing on the card, with meaning and tests identical", "tests": [ {"command": "t27c test-report specs/crons/t27os-night-loop.t27", "result": "48/48 tests pass, 0 vacuous", "status": "passed", "evidence": "tests: 48, pass: 48, fail: 0; vacuous passes 0 of 48 (tri test on the branch worktree)"}, {"command": "t27c seal --save + --verify specs/crons/t27os-night-loop.t27", "result": "all hashes MATCH", "status": "passed", "evidence": "gen_hash_rust: MATCH ... all hashes MATCH; tests 48/48 pass at seal time; spec_hash 71690c42... recomputed"}, {"command": "trinity agents-from-specs.mjs with the card vendored", "result": "0 problems, card accepted", "status": "passed", "evidence": "node scripts/agents-from-specs.mjs on trinity origin/main with the fixed card vendored printed no problem lines; without the fix the same run printed 48 unknown-constant errors"}, {"command": "git diff --numstat origin/master", "result": "one spec plus its seal only", "status": "passed", "evidence": "141 insertions 114 deletions across specs/crons/t27os-night-loop.t27 and .trinity/seals/crons_t27os-night-loop.json; test inventory diff against master is empty (same 48 test names)"}, {"command": "tri preflight", "result": "7/9, both reds pre-exist on master", "status": "passed", "evidence": "seal-coverage and seal-currency RED on 8 unrelated seals (JitSemantics, PackedVsa, TriBuilder, GitDiff and twins) whose specs changed on master after their seals; this card's own seal verifies"} ], "tags": ["cron_card", "t27os", "specs_crons"], "blog": { "title": "The night-loop card stops carrying its law at top level", "summary": "A cron card that restated its law as 48 top-level constants was one trinity sync away from breaking the site build. The consts move into the tests that use them, which is where the sibling card already keeps them.", "outline": [ "The generator's schema is the contract: a card publishes 15 fields and nothing else at top level, so a card that also carries its verdict codes as constants reads as a schema violation no matter how real the law is.", "The move is mechanical and the tests do not change: every assert keeps its name, the functions read literals with the name beside them, and each section's comment states the values once.", "48/48 tests pass before and after, which is the whole point: the card's meaning lives in its tests, and moving the constants between scopes does not move it." ] } }