Repository navigation
ci-gate: fold the tamper guard into CI/gate; retire the template header - #190
hyperpolymath wants to merge 2 commits into
Conversation
The tamper guard's result is now part of the CI/gate verdict. The separate CI/gate-tamper-guard context (added by #163) is no longer published, so no ruleset step exists for the guard. - ci-gate-tamper-status.sh returns a verdict (ok / unapproved + paths / error) to the publisher through a result file; it posts nothing. The guard (ci-gate-tamper-guard.sh) writes its own result file with jq, so an API-supplied file name cannot forge the description. - ci-gate-publish.sh combines it: an unapproved gate-file pull request at the head, or any guard error, turns success or pending into failure ("gate files changed without owner approval: <paths>", clipped to 140). - gate-pr judges its own pull request too (PR_NUMBER augments the listing), so its success cannot overwrite the default branch's failure. - The sweep hands the publisher the pull requests of each head instead of running a second publisher. - Every workflow a repository's profile names is now a gate file (#163 left them out). A file name containing a newline is refused (fail closed). - Template: header retired to a pointer at docs/CI-GATE.adoc; permissions {} with the four grants per job; gate-pr excludes dependabot[bot]; a workflow_dispatch from a non-default ref does nothing; zizmor ignore on workflow_run. Mirrored in the suite's own caller. The rules the header held, and the lock entry note (empty file-level [] entry, never de-onboarded), move to docs/CI-GATE.adoc. - Tests: new cases (each failing on main), a caller-shape check, and the API budget compares main's publisher plus its tamper step with this publisher. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDiMyCm8ZsXCiC5UeBH
|
Review these changes at https://app.gitnotebooks.com/hyperpolymath/proven-cicd-and-workflows/pull/190 |
|
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 10 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. |
… are failure Agrees the job-level grants with the unavailable-pending branch. The REST layer separates a rate limit from other failures but not an outage from a malformed answer, so every guard error other than a rate limit stays failure (fail closed). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDiMyCm8ZsXCiC5UeBH
|
Generated by Claude Code |
|
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. |
## What S1 of the W49 CI programme (design: #189, section 6.1): a read-only evidence extractor. - `scripts/pr-evidence.sh OWNER/REPO PR` writes 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 and `startup_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.json` and `scripts/json-schema-lite.jq` (schema validator for the subset used; no Python, no new dependency). - `tests/pr-evidence.sh` (added to `tests/unit.list`): fake-`gh` controls. ## Evidence | Check | Result | |---|---| | `bash tests/pr-evidence.sh` | 27 groups ok | | `bash tests/unit.sh` | 27 tests run, 0 failed | | `bash tests/smoke.sh` | passed | | `bash tests/inspect-pr-ci.sh` | ok (unchanged) | | Live: extractor on open PRs #188, #189, #190, #191 of this repository | rc 0, all four schema-valid, 0 violations | | Live: #188 | `mergeable_state: blocked`, `changes_requested: true`, all 12 required contexts Pass (matches the NEEDS-REVIEW reading in #189) | | Live: #190, #191 | touch gate files (7 each, reported in `touches_gate_files`); one required context Pending | | `shellcheck` | NOT RUN (not installable in this session) | | Live validation on 3 other fixture repos | NOT RUN: `add_repo` was refused for cicd-squabbler and proven-tests-and-benches; reported to the hub | ## Findings for the design owner 1. **Strong signature is ambiguous in 3.2.** "a non-empty annotation message" counts `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. 2. **Review-thread resolution needs GraphQL.** Unavailable from agent sessions; recorded as `null` plus the reason, never as zero. The verdict's NEEDS-REVIEW arm on unresolved threads cannot fire from such a record. 3. **Producer map (Appendix A step 9) is not computed by the extractor**; `--producers FILE` accepts it, and profile entries give a producer workflow for their own contexts. Without it `Phantom` and `TriggerGap` are 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.com/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_count` and `pull.owner_acts` added to the schema; tests 28 groups ok. Finding 1 above is superseded by that revision. --- _Generated by [Claude Code](https://claude.ai/code)_ --------- Co-authored-by: Claude <noreply@anthropic.com>



Why
Owner rulings of 2026-11-30: the tamper guard becomes part of the
CI/gateverdict (so no ruleset change is ever needed for it), and the long prose header oftemplates/ci-gate-caller.ymlis retired in favour ofdocs/CI-GATE.adoc.What
scripts/ci-gate-tamper-status.shnow RETURNS a verdict (ok/unapproved+ paths /error) through a result file and posts nothing. The guard writes its own result file with jq, so an API-supplied file name cannot forge the description.scripts/ci-gate-publish.shcombines it: an unapproved gate-file PR at the head, or any guard error, turnssuccess/pendingintofailure(gate files changed without owner approval: <paths>, clipped to 140). NoCI/gate-tamper-guardstatus is posted any more.gate-prjudges its own PR too (PR_NUMBERaugments the listing), so its success cannot overwrite the default branch's failure.workflowis now a gate file. A changed file name with a newline is refused.permissions: {}+ four grants per job;gate-prexcludesdependabot[bot]; a non-default-refworkflow_dispatchdoes nothing;# zizmor: ignore[dangerous-triggers]with its reason. Mirrored in the suite's own caller. The rules the header held, and the lock note (empty file-level[]entry, never de-onboarded), moved todocs/CI-GATE.adoc.Limits
The
gate-prpath is PR-controlled: a malicious same-repo PR can edit it and post any status. This is the same residual hole as before; only the A3 signedestate-gatecloses it.docs/CI-GATE.adocsays so.Tests
tests/ci-gate.sh746,tests/ci-gate-tamper-guard.sh192,tests/ci-gate-api.sh96,tests/ci-gate-caller.sh200,tests/ci-gate-api-budget.shafter <= before in every scenario. jq 1.7 only (1.6, 1.7.1, 1.8.1 not fetched). Go yq v4.44.3, actionlint 1.7.7 (only the four knownjob.workflow_*false positives onci-gate.yml).Generated by Claude Code