Skip to content

claw: criteria.t27 + claw/criteria check -- commands settle the criteria they can (Closes #10549) - #10572

Draft
gHashTag wants to merge 14 commits into
masterfrom
claude/focused-volhard-4b537b
Draft

gHashTag wants to merge 14 commits into
masterfrom
claude/focused-volhard-4b537b

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #10549

claw/criteria settles in CI the Success Criteria a command can settle, so the Queen's reviewer spends a model lane only on the rest.

  • specs/claw/criteria.t27 is the law. It extracts criteria from the linked issues, classifies each as machine, partial or judgment, maps machine clauses to the four allow-listed t27c forms, and writes the report. Lowered to gen/c/claw/criteria.c and sealed: t27c test-report 42/42 pass, 0 FAIL, 0 vacuous, and t27c seal --verify matches, both run on the Railway lab.
  • gate-topology.yml gets two jobs:
    • claw-criteria holds no secret. It fetches the linked issues and runs only the allow-listed commands, after its own path check.
    • claw-criteria-post mints the check-run row's token (checks: write only) and posts one check run.
  • github_surface.t27: the check-run row moves to S_LIVE.
  • Foreign lines shrink:
    • the claw gen-c freshness lines in spec-guards.yml fold into one loop;
    • scripts/gen_w368_lean.py, an unreferenced one-shot wave generator, is dropped.
  • Census moves (both from the two new jobs):
    • shell jobs: 93 -> 95; run: steps end at 328.
    • quiet "named a path but not quiet": 237 -> 242 (237 is master's count after the merge).

Live on this PR

  • claw-criteria ran on this PR and passed: https://github.com/gHashTag/t27/actions/runs/39153257181/job/117751102538
  • claw-criteria-post fails at create-github-app-token: "The level of access for permissions requested are not granted to this installation." The TRI CLAW installation (167308749) does not grant checks: write yet. claw-sarif fails the same way on nearly every PR. Accepting the App's updated permissions on the installation is an owner action. Until then the check run is not posted, so the criterion "claw/criteria appears on at least one real PR" is not met. Since master landed specs/claw/token_shape.t27, the job follows its shape: the token step is continue-on-error, and a failed mint writes the owner's fix to the step summary instead of turning the job red on every pull request (ac8cc96).
  • An earlier commit on this branch broke gate-topology.yml. A run: plain scalar held ": ", so the file did not parse and every gate-topology job was skipped. df7b09f removes the space after each jq key colon, and actionlint is clean.

Share of the 20 most recent issues

The law ran over the bodies of the 20 most recent issues (47 criteria):

kind criteria share
machine 2 4%
partial 4 9%
judgment 41 87%

The share rises as issues name t27c test-report specs/<x>.t27 in backticks, which the issue-shape gate already asks for.

Mutation record

tri mutate spec --file specs/claw/criteria.t27 --jobs 16 --max 2000, run on the Railway lab at da6d254:

mutants killed survived hung unviable
1011 914 (all by a failing test) 83 10 4
  • Before da6d254: 891 killed and 106 survived. Five new tests kill 23 of those survivors:
    • later commands keep their own outcomes;
    • a planned run with no result is "not run";
    • records are read to their last byte;
    • body-line edges;
    • helpers called off-center.
  • A real bug. One survivor showed that <!--> and <!---> opened an HTML comment that hid every criterion after it. In HTML they close themselves. read_body now searches for --> from s + 2.
  • Hung (10) are the mutants that loop forever: 246 ×2, 266, 400, 512, 552, 676 ×2, 842 ×2. A test that never finishes is a failure in CI.
  • Unviable (4) are ret-default on void functions (376, 386, 587, 849), which zig rejects.

Each of the 83 survivors is argued equivalent below. Line numbers are those of this head.

  • Zero field offsets (10): 518, 557, 665, 751, 757, 761, 817, 873, 951, 1111. The mutant turns x * W + F into x * W - F, but F is 0 here: KF_VERB, RF_VERB and CF_ISSUE.

  • Run defaults (5): 765-769. The NO_NUM defaults of a run are read only once RF_SEEN is 1. read_results sets all five fields in the same step that sets RF_SEEN. So writing a default into run 0's slot (nr / RW), or not at all, is never seen.

  • read_results guards (13): 856 ×4, 861 ×2, 862 ×2, 863 ×3, 866 ×2. read_results runs only on a stream that collect has accepted. On such a stream:

    • every record already fits;
    • dec over an empty span is NO_NUM, the same as not calling it;
    • starting the output at e or e - 1 adds only the header's last digit and newline, a line that holds no count key.
  • Bytes at a line's end (34):

    • 594, 597, 599, 613, 615, 618, 633 ×3, 638, 639 ×3, 647, 648 ×2, 651, 653, 657 in read_body;
    • 695 ×2, 699, 704 ×2, 709 ×4, 714, 715 ×2 in collect;
    • 831, 834 in count_line;

    The argument:

    • A scan allowed to touch le meets one of three bytes: the line's \n, the \r of a CRLF line, or the next record's I/X. None of them is a space, tab, #, digit, ., ), ], : or |. At an empty line, t[le - 1] is the previous \n.
    • Starting a body at the header's \n or last digit (704) adds an empty or digit-only line before any heading, outside every section.
    • t1 <= e and t3 <= e only call dec on an empty span.
    • t3 > e and the remaining and/or swap at 715 refuse the same records: when t3 == e, len stays NO_NUM, and NO_NUM is so large that the size check refuses the record too.
    • 611 (s - 2): the two bytes before < are indent, or a \n and the previous line's last byte. Since t[s] is <, no --> can start before s + 2.
  • Helpers (16):

    • 234 and 254: a list word is never empty, so the extra round at a == ll matches nothing.
    • 295 flip: e == s already fails e - s < 11.
    • 302 ×4: a path that passed the .t27 check never has . at e - 1, and a .. pair is caught from either side.
    • 318 ×4: each token is matched exactly (tool, verb, path_ok, --verify), so a looser bound cannot accept more.
    • 331 ×2: a command of more than 4 tokens is refused earlier, and one of fewer than 3 fails path_ok.
    • 368 ×2: dec over an empty span is NO_NUM.
    • 484: every return taken at i == e returns e.
  • Classify and report (5):

    • 534 (Q_NOUT >= 0): a clean clause with no outcome changes nothing in either branch.
    • 1055: when ok is false, the other branch also concludes neutral, and zero issues imply zero criteria.
    • 1104 ×2: the cut moves by less than one row's worth of bytes, inside the 4096-byte ROW_ROOM margin.
    • 1753: a guard in the class_of test helper; every input it gets yields exactly one criterion.

🤖 Generated with Claude Code

gHashTag and others added 6 commits October 19, 2026 00:15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…\n \t (Refs #10549)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The claw gen-c freshness lines fold into one loop and scripts/gen_w368_lean.py,
an unreferenced one-shot wave generator, is dropped so foreign lines shrink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Census moves, both from the two new jobs claw-criteria and
claw-criteria-post in gate-topology.yml: shell jobs 93 -> 95 (and the
run: step counts with them); quiet 'named a path but not quiet'
233 -> 239, the new run: steps naming paths without a quiet shape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag and others added 5 commits October 19, 2026 01:10
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d ': ' in a plain scalar (Refs #10549)

GitHub refused the whole file, so every gate-topology job was skipped on
pull_request and only a zero-job failed push run appeared. The jq object
now writes key:value without the space; actionlint is clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…volhard-4b537b

# Conflicts:
#	tools/census/quiet.txt
…aster (Refs #10549)

Master moved it 233 -> 237; the two claw-criteria jobs of this PR add 6.
Re-blessed with tri census pin --bless on the Railway lab; gate clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…10549)

Five new spec tests aim at the survivors of the mutation run:
later commands keep their own outcomes, a planned run with no result
is not run, records are read to their last byte, body line edges
(table rules with spaces, blank indented lines, ". x", three-digit
lists, SC-7x), and helpers called off-center. 42/42 pass, 0 vacuous,
on the Railway lab.

read_body now looks for "-->" from s + 2, so "<!-->" and "<!--->"
close themselves, as in HTML; before, they opened a comment that hid
every following criterion. gen/c and the seal are regenerated on the lab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 19:37:08 UTC

Summary

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

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=fad12492937a != 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).

This was referenced Oct 18, 2026
@gHashTag
gHashTag force-pushed the claude/focused-volhard-4b537b branch from 6dec679 to da6d254 Compare October 18, 2026 20:21
gHashTag and others added 2 commits October 19, 2026 03:35
…ob, per specs/claw/token_shape.t27 (Refs #10549)

The post job's token step now carries continue-on-error and a failure note
(rules R1 and R2 of the law master landed). The separate secret-presence
step goes: a missing secret fails the same mint and leaves the same note.

Census moves, both from that removed run: step:
- quiet 'named a path but not quiet' 243 -> 242
- shell 'run: steps' 329 -> 328, 'the runner does' 308 -> 307

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 20:48:55 UTC

Summary

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

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=fad12492937a != 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).

This branch has not been deployed

No deployments
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.

claw/criteria: settle command-shaped Success Criteria in CI so the reviewer judges only the rest

1 participant