Repository navigation
feat(ci): PR evidence extractor, schema and controls (S1) - #192
Conversation
|
Review these changes at https://app.gitnotebooks.com/hyperpolymath/proven-cicd-and-workflows/pull/192 |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
scripts/pr-evidence.sh collects the replayable evidence record of design section 3.2 for one pull request through the gate's REST layer (conditional reads, Link paging, bounded back-off). docs/design/pr-verdict holds the JSON Schema; scripts/json-schema-lite.jq validates it without Python. tests/pr-evidence.sh drives a fake gh through startup_failure, zero-job runs, billing, 304, pagination, null mergeable, fail-closed reads, read-only calls and the validator's own negative controls. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDjgxz1iRFdu63KxE1K
A signature is strong only when the run reports a failing-test count n > 0 and exactly n distinct identities were found; annotations alone are weak. failed_count joins the schema; the controls gain an incomplete-count case. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDjgxz1iRFdu63KxE1K
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDjgxz1iRFdu63KxE1K
c057cf5 to
eef3453
Compare
|
## What S2 of the W49 CI programme (design: #189, section 6.1). Stacked on #192 (S1): the base is the S1 branch and retargets when #192 merges. 55 golden fixtures in `docs/design/pr-verdict/fixtures/`, one per verdict arm, per `BrokenCause`, per Infra kind and per section 3.6 property witness or counter-example. Each is a complete `proven/pr-evidence/v1` record plus the verdict section 3.3 assigns. They are generated (`gen-fixtures.jq`, `gen-fixtures.sh`) and the test fails if a committed file differs from the generator. Expected values are hand-written from section 3.3; there is deliberately no second implementation. squabble-core's conformance test (S3) is what will confirm or refute them. ## Evidence | Check | Result | |---|---| | `bash tests/pr-verdict-fixtures.sh` | 12 groups ok: 55 fixtures; generator equality; every fixture and its evidence schema-valid; arms, causes, Infra kinds, derivation steps 1-9 and properties 1,2,3,5,6,7 covered; expected values consistent with evidence; controls shown able to fail | | `bash tests/unit.sh` | 28 tests run, 0 failed | | Corpus run through the verdict function | NOT RUN (S3 does not exist yet). The expected verdicts are unverified against any implementation. | | Property 4 (replay) | not a fixture matter; belongs to the archive test | ## Ambiguities in the design found while writing the corpus (to resolve before S3) 1. Several owner acts in step 7 ("a question to the owner in the PR's latest steward note", "a ruleset, secret, tag or settings change named in the PR") have no field in the evidence record; only draft and gate-file label are derivable. No fixtures for them. 2. If `review_threads` is `null` (unreadable) and the ruleset requires resolution, 3.3 does not say what happens. No fixture. 3. `CI-BROKEN { cause, checks }` has a single cause, but different required checks can have different causes. Fixtures avoid mixing; proposal: report the cause of the first matching clause in the order listed in step 4. 4. NEEDS-REVIEW `ReviewBlocker` values are not enumerated; the corpus uses `changes-requested`, `unresolved-threads`, `approvals-missing`, `blocked-unexplained`. SUPERSEDED reasons used: `head-already-landed`, `empty-diff`, `newer-duplicate`, `base-branch-gone`, `base-not-default-or-release`, `bump-superseded`. 5. Step 3 with a head `Fail` and an `Absent` base tip is neither introduced nor inherited; the corpus follows the doc (falls to `NeverOnBase`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01J4QvDjgxz1iRFdu63KxE1K **Update (after architect 7208a2e and hub provisional rulings):** signatures are now complete-set (failed_count == identities; subset inheritance); new fixtures for complete-subset inherited, new test in red check, count != identities, generic-annotation weak, first-clause cause order, threads-unknown, named owner act. Still unverified against any verdict implementation (S3). --- _Generated by [Claude Code](https://claude.ai/code)_ --------- Co-authored-by: Claude <noreply@anthropic.com>



What
S1 of the W49 CI programme (design: #189, section 6.1): a read-only evidence extractor.
scripts/pr-evidence.sh OWNER/REPO PRwrites one replayable evidence record (proven/pr-evidence/v1) for a pull request: head, base-tip, merge-base and nearest-completed-base observations per required context, workflow runs (including zero-job andstartup_failure), masked failure signatures (strong or weak), mergeability, reviews, ruleset and profile required set, superseded inputs. It derives no verdict.docs/design/pr-verdict/evidence.schema.jsonandscripts/json-schema-lite.jq(schema validator for the subset used; no Python, no new dependency).tests/pr-evidence.sh(added totests/unit.list): fake-ghcontrols.Evidence
bash tests/pr-evidence.shbash tests/unit.shbash tests/smoke.shbash tests/inspect-pr-ci.shmergeable_state: blocked,changes_requested: true, all 12 required contexts Pass (matches the NEEDS-REVIEW reading in #189)touches_gate_files); one required context Pendingshellcheckadd_repowas refused for cicd-squabbler and proven-tests-and-benches; reported to the hubFindings for the design owner
Process completed with exit code 1., which every failed step emits, so any two red checks would have "equal strong signatures" and be treated as inherited (breaks property 3 / 3.8). Implemented: boilerplate (exit code N,The operation was canceled) is never an identity. Please confirm.nullplus the reason, never as zero. The verdict's NEEDS-REVIEW arm on unresolved threads cannot fire from such a record.--producers FILEaccepts it, and profile entries give a producer workflow for their own contexts. Without itPhantomandTriggerGapare not derivable from the record. Follow-up work package.Not in this PR
S2 fixtures follow as a separate PR. No gate file, ruleset or workflow is touched.
🤖 Generated with Claude Code
https://claude.ai/code/session_01J4QvDjgxz1iRFdu63KxE1K
Update: signature strength now follows 7208a2e (complete failing-test set: reported count n > 0 and exactly n identities; annotations alone weak);
failed_countandpull.owner_actsadded to the schema; tests 28 groups ok. Finding 1 above is superseded by that revision.Generated by Claude Code