Repository navigation
specs(functions): real tests for 9 function cards, analytics to crm (Closes #8242) - #8243
Merged
Merged
Conversation
…loses #8242) Each card held no test block and passed vacuously (0 runtime asserts) under both the reference and t27b. The tests hold each card to the schema of specs/functions/README.md and the rules its generator enforces: - ID is <domain>-<object>-<verb> with DOMAIN from the vocabulary; - TRIGGER event: EVENT set, CRON "", and the canonical EVENT names the same three parts as ID; TRIGGER cron: a five-field CRON, no EVENT, no LEGACY_EVENTS; - ON_FAILURE, PROBE_RESULT, CONTROL and every SIDE_EFFECTS value come from their vocabularies, no side effect twice; - SAFE_PROBE agrees with PROBE_RESULT; SERVICE is file:line. client-telemetry-daily and club-invoice-abandoned-watch break the ID grammar (see #7911) and check only the DOMAIN vocabulary and ID's shape. t27c test-report: 4 or 5 tests per card, 0 vacuous. t27b test --check: all pass, 45 to 82 runtime asserts. Sealed (seal --save, then --verify). docs/reports/t27b_expectations.json: `bless` of scripts/tri_loop/t27b.py over lab run ff1f4ae with this branch's t27b verdicts for the 9 specs, composed onto master's ledger with only these rows: pass_vacuous -> pass. Closes #8242 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
This was referenced Oct 9, 2026
Merged
Merged
gHashTag
enabled auto-merge (squash)
October 9, 2026 16:55
This was referenced Oct 9, 2026
Merged
…loses #8242) specs/functions/content-scripts-generate.t27 conflicted: master (#8023) moved SERVICE to line 49 and extended NOTE. Resolved from master's side: master's card with this branch's appended tests unchanged after it. The tests still pass (t27c test-report 5/5, 0 vacuous; t27b 5/5, 65 runtime asserts). The 9 seals are re-saved with master's t27c 0.5.2 (seal --save, then --verify: all hashes MATCH). The ledger merged cleanly: master's rows and this branch's 9. Closes #8242 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
gHashTag
added a commit
that referenced
this pull request
Oct 9, 2026
#8283) (#8288) Each card held no test block and passed vacuously (0 runtime asserts) under both the reference and t27b. The same tests as #8243 hold each card to the schema of specs/functions/README.md: ID is <domain>-<object>-<verb>; an event function's canonical EVENT names the same three parts as ID and it has no CRON; a cron function has a five-field CRON and no EVENT; the fields come from their vocabularies; SAFE_PROBE agrees with PROBE_RESULT; SERVICE is file:line. With #8243, every function card now carries a test. robokassa-unclaimed-watch and ton-pending-watch have DOMAIN "money", outside the README's vocabulary (see #7911), and skip the DOMAIN test. reels-loop-generate's tests run on the card as #8023 left it. t27c test-report: 4 or 5 tests per card, 0 vacuous. t27b test --check: all pass, 23 to 67 runtime asserts. Sealed with master's t27c 0.5.2 (seal --save, then --verify). docs/reports/t27b_expectations.json: `bless` of scripts/tri_loop/t27b.py over lab run 6c5ad4b with this branch's t27b verdicts for the 9 specs, composed onto master's ledger with only these rows: pass_vacuous -> pass. Closes #8283 Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
13 tasks
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.
Closes #8242. Part of #6063 (t27b coverage), which is item C10 of #6488.
What changes
Nine function cards of
specs/functionshad no test block. They passed vacuously (0 runtime asserts) under the reference and under t27b, and broke L4 TESTABILITY. Each now carries tests that hold it to the schema ofspecs/functions/README.mdand to the rules its generator enforces:id_is_domain_object_verbIDis<domain>-<object>-<verb>: it opens withDOMAINand a-,DOMAINis in the README's vocabulary, the rest is lower-case wordsan_event_function_has_an_event_and_no_cronTRIGGERevent:EVENTis set andCRONis""; the canonicalEVENTnames the same three parts asID(<domain>/<object>.<verb>against<domain>-<object>-<verb>: one/and the last.stand whereIDhas a-)a_cron_function_has_a_cron_and_no_eventTRIGGERcron:CRONis a five-field cron expression,EVENTis"",LEGACY_EVENTSis emptyfields_come_from_their_vocabulariesKIND,REPO,TZas the schema states;ON_FAILURE,PROBE_RESULT,CONTROLand everySIDE_EFFECTSvalue from their vocabularies; no side effect twiceno_probe_was_sent/the_probe_sent_is_json_and_was_answeredSAFE_PROBEagrees withPROBE_RESULT:""meansskipped(ornot-deployedwithGUARDunknown); a JSON object meansCOMPLETEDorFAILED-at-guard, and a probe stopped at a guard names that guardservice_is_file_and_lineSERVICEisfile:lineclient-telemetry-dailyandclub-invoice-abandoned-watchbreak theIDgrammar (see #7911), so they getdomain_is_in_the_vocabularyinstead ofid_is_domain_object_verb. No test restates a constant on its own: each relates fields, or a field to the vocabulary or grammar the README states, and walks strings with avarindex, so its asserts are runtime asserts. TheEVENT/IDrelation holds on all 24 event cards of the directory, not only these.Specs changed (all
specs/functions/<name>.t27):analytics-sales-adviseanalytics-skills-detectbroadcast-message-sendclient-telemetry-dailyclub-invoice-abandoned-watchcontent-detailed-script-generatecontent-scenario-clips-generatecontent-scripts-generatecrm-proactive-sweept27c test-report <spec>on the t27c lab (zig 0.16.0): every test passes, 0 vacuous.t27b test <spec> --checkon the t27b lab (aarch64 under qemu).t27c seal --save, then--verify: all hashes MATCH. The seal files are new.Mutants
Hand mutants of the constants, run under
t27c test-report:KIND,REPOorTZchanged;ON_FAILURE,PROBE_RESULTorCONTROLoutside its vocabulary; a side effect outside the list or listed twice;SERVICEwithout its line or with a letter in it;DOMAINoutside the vocabulary,IDwith a capital, its domain part drifted or no verb; anEVENTthat drifts fromIDor joins its parts with-; an event function with aCRONorTRIGGERcron; a cron function with anEVENT, withLEGACY_EVENTS, with a six-fieldCRONor a letter in it, orTRIGGERevent; a probe payload with no answer, an answer with no payload, a payload that is not a JSON object, a sent payload markedskipped, a guard failure withGUARDnone.On these cards: 187 applied, 187 killed; 2 more did not apply (a repeated side effect on a card with one side effect). None survived.
Skipped
None in this directory: with the batch before or after it, every function card of
specs/functionscarries a test.Superseded, not duplicated: see #6733, an open PR of an earlier attempt that adds a test to 7 of these cards. Its tests restate each constant (
assert TRIGGER == "cron",assert STEPS[0] == "load-owners"), and its integer asserts (RETRIES == 1) are comptime, so they execute no runtime assert. This lane rules out restated constants. This PR does not reuse them.Ledger
docs/reports/t27b_expectations.json: the rows of these specs move frompass_vacuoustopass; nothing else changes. They come fromblessinscripts/tri_loop/t27b.py(whattri t27b ratchet --blessruns) over the lab run of master named in the commit, with this branch's t27b verdicts for these specs, composed onto master's ledger with only these rows.Gates
On the t27c lab, from master's
gen/c/policy/own_language.c, withlefthook.yml's one-line C main:check_all()overorigin/master:tools/policy/foreign-exceptions.txt,--andgit diff --name-status origin/master...HEAD: exit 0.check_budget()overgit diff --numstat --no-renames origin/master...HEAD: exit 0. No foreign line is added.t27b lab: signed receipts (#7686)
Head 6c5ad4b (this branch), requested with a fresh 32-byte challenge, against base 293f3a0, the newest master ancestor the lab has a receipt for (the merge-base 94bae69, #8221, has none). Both are signed runs of the deployed lab.
/work/t27c-master corpus-receipt compare BASE HEAD --challenge-head <mine>, from/work/t27on the t27b lab (theinput/output/verdict changedlines left out):Exit 3, IMPROVED_ONLY. The PR head fd90f8e is 6c5ad4b with master merged in from master's side twice: #8023 changed
content-scripts-generate.t27, so master's card carries the appended tests unchanged (reference 5/5, 0 vacuous; t27b 5/5, 65 runtime asserts), and the 9 seals were re-saved with master's t27c 0.5.2. The 13specs/cronsrows are #8221's, the one master commit between the base and the merge-base.The 9 function cards move from
pass_vacuoustopass(the other 13 of the +22 are #8221's); none regresses.Generated with Claude Code