Repository navigation
feat(governance): red-main attribution and intent-first review (RFC #6435 B, C). Principle VIII. - #6652
Conversation
…s verdict. Principle VIII. The tracking issue named the commit and the failing tests, but deciding fix-forward vs revert still meant looking up which PR the commit came from and whether main was already red before it. The issue now carries both: the commit's source PR and author, and how it compares with the parent's full-suite run. A green parent makes this the first red commit. A red parent is compared test by test against the failed list filed for it, so a test failing here but not there is named as starting at this commit, and only an identical set says "look earlier". When the parent's list cannot be found or either list is capped, the verdict says both halves instead of guessing. A cancelled parent run is skipped, and a direct push names no PR rather than an unmerged one. It also points at the #4703 flake umbrella and says the revert stays a human call, so a flake does not revert good work. Each lookup degrades to "unknown" rather than blocking the issue. Exercised by running the step's script against real main commits through read-only gh api calls: 37fbdbc (#6413) is the first red commit; d3ab349 (#6199) names fm_tone_presentation_contract, icom_family_test and hl2_tci_signaling_test as starting there; 68ccf45 (#6619) and 933f2fd (#6621) name the tests each added to an already-red main; the same failed set as the parent says "look earlier"; a capped list falls back to the two-sided wording. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012U8wmr3AQGVrmQLp2zNBwa
…king for interior defense. Principle VII. The PR template gains an Intent section: what will be true after the merge and what is out of scope. /pr-review starts step 2 from it and checks it against the linked issue before reading hunks, so a correct diff for the wrong goal is caught first; the report carries an Intent line. The adversarial stance gains its second limit: requests for validation inside code that Principle VII says may "treat parsed values as sound", or for abstraction the stated intent does not need, are nits at most unless the reviewer can name the input that reaches the interior unvalidated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…Principle VIII.
The parent comparison parsed whatever the Failed line held. A build failure
on either side ("none (the Build step failed)") read as a test named `none`,
so the issue claimed `none` started at this commit. A run whose failed list
was "unknown" parsed to no names, so the issue said "the same failures, look
earlier". Both now fall back to the two-sided wording, as a missing parent
entry or a list capped at 25 names already did.
Exercised with the step's script against 68ccf45 through read-only gh api
calls: before this change, "none (…)" gave "`none` failed here and not there"
and "unknown" gave "look earlier". With it, both give the two-sided wording.
The six earlier cases (37fbdbc, d3ab349, 68ccf45, 933f2fd, same set,
capped list) are unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012U8wmr3AQGVrmQLp2zNBwa
|
How #6652 handles the review feedback on #6436 for items B and C. #6436's other findings are about item A, which is out of this PR and being redesigned on #6435. Item B (red-main attribution,
Item C (intent-first review, PR template and No reviewer raised a defect. K5PTB: "C is complete and correct". aethersdr-agent: "B and C I found nothing to fix in". rfoust: "implemented coherently". The commit is carried over unchanged. Process
Not exercised: the issue write itself, which only runs on a red main. |
ten9876
left a comment
There was a problem hiding this comment.
Issue fit / intent: This implements approved RFC #6435 items B and C: identify newly failing tests on a red main and start reviews from stated intent. The four historical examples reproduce correctly, and the earlier direct-push, cancellation and unknown/build-list cases are handled. Two remaining cases can still produce a definite but incorrect attribution, so item B is only partially complete. Item C is coherent; item A is correctly excluded.
Scope
| File/group | Claimed by RFC/body? | Verdict |
|---|---|---|
.github/workflows/full-suite.yml |
B: attribution and read permissions | In scope; findings below |
.github/PULL_REQUEST_TEMPLATE.md |
C: Intent section | In scope |
.claude/skills/pr-review/SKILL.md |
C: intent-first and trusted-interior guidance | In scope |
All three files and commits are explained. The October 13 author dates are the disclosed B/C commits carried over from #6436; the third commit fixes incomplete-list handling. All signatures verify. The maintainer explicitly approved B/C in RFC comment 6315384675. No TX-gate, runtime source, unrelated policy or CHANGELOG changes.
Blockers
-
[P2] Compare the report for the selected parent run —
.github/workflows/full-suite.yml:354–357,:370–380.doneselects a workflow run, butfailedAt(p7)returns the first report containing that commit's short SHA, without checking the run linked in the verdict. A parent can have multiple runs with different failure sets. Issue ordering is by most recently updated, so a later run of another commit can move an older signature's issue ahead of the selected parent's report.Reproduced with two distinct, correctly fingerprinted issue buckets, each containing only its own signature: an older parent run failed
alpha_test; the selected/latest parent run failedbeta_test; a subsequent main run repeated alpha and updated its issue. With current failures beta, the actual script linked the beta parent run but printed “beta_testfailed here and not there: those start at this commit.” Reversing the entries also made the “same failures” verdict describe a different set from the linked parent run. No edited or mixed-fingerprint issue was needed.Tie the archived list to the selected run and attempt, or use the existing unknown/incomplete-list fallback when matching reports are ambiguous. Matching only the shortened commit is insufficient. Preserve this multiple-run/multiple-issue case in a regression test.
-
[P2] A nonempty
FAILEDsummary is not necessarily a complete list —.github/workflows/full-suite.yml:384–385, using the producer at:257. Real CTest output can containILLEGALandNUMERICAL; the existing producer drops both. With a parent failingold_test, and the current run failing that test plus two new crashing tests, the newlisted()guard accepts the remainingold_test (Failed)as complete and prints “with the same failures — look earlier.” The new failures are absent from the attribution even though CTest's full summary and fingerprint contain them.A local socket-free CTest fixture produced exactly:
old_test (Failed) new_sigill_test (ILLEGAL) new_sigfpe_test (NUMERICAL)Feeding the production-extracted summary to the actual issue script reproduced the false verdict. Including the omitted statuses made the script name both new tests correctly. At minimum, the producer needs this replacement for those demonstrated cases:
allfailed=$(sed -n '/^The following tests FAILED:/,$p' full-suite.log | grep -oE '[A-Za-z0-9_.-]+ \((Failed|Timeout|Subprocess aborted|Not Run|SEGFAULT|ILLEGAL|NUMERICAL|Child aborted)[^)]*\)' | sort)More generally, only assert completeness when the comparison data preserves every failed name from the CTest summary; the existing all-name extraction used for the fingerprint is another available source. Test an existing ordinary failure plus a newly crashing test, so a partial nonempty list cannot silently pass this guard.
Nits (non-blocking)
.github/workflows/full-suite.yml:395: “the same failures” also covers a strict subset of the parent's failures. Parent{a,b}and current{a}reproduce that wording. No current failure is incorrectly cleared in this case, but “no newly failing tests” would accurately describe the branch and match the PR's intent..github/workflows/full-suite.yml:345–395: the substantial comparison logic has manual test evidence but no committed regression harness in this PR. Keep the demonstrated edge cases in repeatable socket-free coverage so later changes can verify them without live issue writes; no synthetic firmware peer is needed.
Verification and attempts to break it
- Executed the actual extracted issue-step JavaScript with local API stubs, capturing both create and sticky-comment bodies. Green parent, added failures, equal/subset sets, missing/capped/build/unknown lists on either side, cancelled runs, direct pushes and lookup exceptions behaved as described, apart from the subset wording. The two production-shaped repeated-run cases above did not survive.
- Independently fetched read-only GitHub records and replayed all four historical examples through the actual script:
37fbdbcidentifies the first red commit;d3ab349,68ccf459fand933f2fdeename exactly the new failures claimed in the body. No GitHub write endpoint was called. - The real CTest crash fixture and recognized-new-failure positive control distinguish the incomplete-list defect from a general script failure. The proposed status extension was checked in a disposable parsing probe; repository sources remain unchanged.
- Workflow YAML parses. Strict engine-boundary, touchpoint-manifest, capability-record and command-plane checks pass with identical per-file output on base
6bac6a08and head7995b921. No baseline or manifest changes. Optional automated review skill unavailable; independent direct audits performed. - Static Checks and CodeQL are green; Linux, Windows and macOS CI are still running at this check. Main remains
6bac6a08(04:28:28Z), older than the exact-head CI/Static run creation at 12:03:45Z, so no stale-main gap was observed. These filtered checks do not establish a full-suite pass.
No application/bridge session was needed because there are no runtime source changes. No hardware, transmit operation, real issue write or workflow dispatch was exercised. The live issue-writing step remains untested, as disclosed in the body.
Recommendation: Request changes. Bind comparisons to the correct parent run and preserve all failed tests before making a definite attribution, then rerun the focused cases. This is a COMMENT review because the authenticated account is also the PR author, so GitHub does not allow a self-request-changes event.
…h every failed test. Principle VIII. The parent's failed list was the first tracking-issue entry naming the parent commit's short SHA. A commit can have several full-suite runs with different failures, and issues are listed by last update, so the list could come from a different run than the one the verdict links. The list is now the entry whose Run line names that run's id. Two distinct lists for one run (a re-run attempt) are ambiguous and fall back to the two-sided wording. The extract step's failed list kept only the CTest statuses it named, so a test that died with ILLEGAL or NUMERICAL was dropped. A run failing an old test plus two new crashes then read as complete, and as nothing new. The list now takes every `N - name (status)` line of CTest's FAILED summary, the same anchor the fingerprint uses. A red parent with no new failures now says "nothing fails here that passed there", which is also true when fewer tests fail than at the parent. tools/test_full_suite_attribution.mjs runs the issue step's script from the workflow against stubbed GitHub data, and the producer line against a CTest summary, in Static checks. Its 18 cases cover green and red parents, added, equal and fewer failures, capped, build-failure and unknown lists on either side, a parent with two runs whose older entry sits in the fresher issue, two lists for one run, cancelled and unfinished parent runs, merged and unmerged source PRs, throwing lookups, and crashing tests. Against the previous commit it fails 6 of 18. Matching a fixed run id fails the two-run case, and accepting the first of several lists fails the re-run case. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012U8wmr3AQGVrmQLp2zNBwa
|
Reply to review 5599459747. Everything is fixed in 1. Compare against the parent run the verdict links (
2. A nonempty
Nit: subset wording. Fixed. With no new failures the verdict says "red at parent …, and nothing fails here that passed there — look earlier". It's correct for an equal set and for a subset; case Nit: committed regression coverage. Added as
Still unexercised: the live issue write, which only runs on a red main. |
Summary
Implements items B and C of RFC #6435. Item A, the transmit-path acknowledgement, is being reworked in the RFC and stays out of this PR. B and C are in separate commits.
Red-main attribution (Principle VIII). The
full-suite.ymltracking issue now gives:ILLEGAL,NUMERICAL) can no longer make a partial list look complete.This adds
actions: readandpull-requests: readto the workflow's permissions.A new Static checks step,
node tools/test_full_suite_attribution.mjs, runs the issue step's script against stubbed GitHub data, plus the failed-list producer against a CTest summary.Intent-first review (Principle VII).
/pr-reviewchecks it against the linked issue before reading the code.Part of #6435. Supersedes the B and C commits of #6436.
Intent
After this merges:
Out of scope:
Constitution principle honored
Test plan
node tools/test_full_suite_attribution.mjs: 18/18.githubstubbed by read-onlygh apicalls:37fbdbc(feat(gui): Radio Setup is a CanonWindow workspace, with a UX pass over every page. Principle VIII. #6413): green parent, so it is the first red commit.d3ab349(refactor(aetherd): route remaining slice and transmit model controls #6199): namesfm_tone_presentation_contract,icom_family_testandhl2_tci_signaling_testas starting there. feat(governance): route review by what a diff does — TX-path ack, red-main attribution, intent-first review (RFC #6435) #6436's version said "look earlier" here.68ccf459f(refactor(aetherd): consolidate M4 desktop utilities #6619): namesshow_tx_in_waterfall_client_flag_testandtransmit_seam_drop_notice_test.933f2fdee(refactor(aetherd): type slice lifecycle and split routing. Principle VI. #6621): nameshl2_tci_signaling_test.full-suite.ymlandstatic-checks.ymlparse as YAML.Checklist
docs/COMMIT-SIGNING.md)src/changes/pr-review. NoCHANGELOG.mdentry.🤖 Generated with Claude Code
https://claude.ai/code/session_012U8wmr3AQGVrmQLp2zNBwa