Skip to content

contracts: two immutable-revision downstream integration contracts - #138

Merged
hyperpolymath merged 6 commits into
mainfrom
arena/761bc235-cicd-squabbler
Oct 25, 2026
Merged

hyperpolymath merged 6 commits into
mainfrom
arena/761bc235-cicd-squabbler

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Publishes the two integration contracts the estate's downstream repositories have been missing. Both are consumed by revision id + sha256 manifest, never by a branch, and both ship a conformance suite that counts planned cases, so an unexercised case is a refusal rather than a pass.

contracts/squabble — squabble-contract/1.0.0

  • Read-only surface: fetch, diagnose, verify-satisfied, chains. fight --apply, board and inbox-sweep are out of contract; the consumer audit refuses them.
  • Permissions: six read scopes, plus the administration: read that github.token cannot hold (App / fine-grained PAT). Any *: write is a contract violation and a finding.
  • Pinned install path: action at a 40-hex commit; the binary pinned by sha256 + build-provenance attestation (existing install.sh); the contract pinned by revision + SHASUMS.
  • Three claims kept apart: ruleset-legitimate (done: true), gate-satisfied, and legitimate_green — a commit-bound envelope whose every required check has run passed. verify-satisfied's exit 0 can never certify green: a skipped required check satisfies GitHub with no evidence, and a pending required check is not even an agent item.
  • Negative fixtures for missing, skipped, cancelled, failed, pending, unknown run state, empty requirement set, wrong head SHA, branch-name-as-commit, and evidence-free/clean verdict documents — plus positive controls, so the refusals mean something.
  • 27-case suite: bash contracts/squabble/tests/run-conformance.sh.

contracts/proven-tests — proven-tests-evidence/1.0.0

  • A Rust repo submits real executed evidence as one JSON document produced by bin/collect-evidence.sh from one captured libtest run, gated by bin/verify-evidence. Submitting needs bash, jq, coreutils — not Idris2; the Idris2 0.7.0 + chez + GMP path is documented for building the framework itself.
  • Honest evidence kinds: example / property / proof with the tier evidence each requires (property needs a generator, shrinker, cases_run ≥ 1, failures: 0; proof needs a checker that ran, and ≥ 1 witnessed rung — mirroring List1 Witnessed). Sampling can never claim actually_proven.
  • Coverage derived, never accepted: only executed, passing, finding-free, non-debt records at typed 17×14 coordinates count; a coverage_claim that outruns the derivation is refused. Debt-marked records are excluded entirely (TEST-DOCTRINE B.4).
  • Rules R0–R11 with ids, including R1 (a pass is a run: argv, timestamps, exit status, log digest) and R11 (aggregate exit vs per-test records).
  • Fixtures: 26 evidence documents, 7 recorded-log producer cases, and a minimal downstream Rust fixture (crate + coords + fixtures + pinned workflow).
  • 35-case suite: bash contracts/proven-tests/tests/run-conformance.sh.

Bypass resistance, in both

E-UNPINNED-ACTION, E-MOVING-REF, E-WRITE-PERMISSION, E-MASKED-STEP, E-BYPASS-COMMAND, E-PRIVILEGED-TRIGGER, E-NO-ORACLE — with a good workflow fixture that passes, so the refusals aren't vacuous. The audit is a lint; the real boundary is the read-only token, and the contract says so.

Known limits (stated in the documents, not just here)

  • The Rust fixture crate has not been compiled in this environment (no Rust toolchain). The suites exercise the producer and the gate against recorded libtest logs; the crate is first compiled by its own workflow in whichever repository adopts it. Nothing claims otherwise.
  • Wiring contract-test into CI needs an actions.lock regeneration, which needs gh actions-lock; left as a follow-up. just contract-test runs both suites today (needs only bash + jq).
  • The Proven-Tests side is authored and conformance-tested here but belongs in hyperpolymath/proven-tests-and-benches; contracts/proven-tests/LANDING.adoc is the landing checklist (what to copy, what not to edit, what to record).

Testing

$ bash contracts/squabble/tests/run-conformance.sh
27 passed, 0 failed, 27/27 planned cases ran
conformance: squabble-contract/1.0.0 OK

$ bash contracts/proven-tests/tests/run-conformance.sh
35 passed, 0 failed, 35/35 planned cases ran
conformance: proven-tests-evidence/1.0.0 OK

$ bash contracts/bin/verify-pin.sh squabble 1.0.0
$ bash contracts/bin/verify-pin.sh proven-tests 1.0.0

…racts

Downstream repositories had no stable surface to integrate against: the action
README documented pins, but nothing said which subcommands are in contract, what
"green" means, or when a submitted test-evidence document may be believed.

contracts/squabble — squabble-contract/1.0.0
  * read-only invocation surface (fetch, diagnose, verify-satisfied, chains);
    fight --apply / board / inbox-sweep are out of contract and the consumer
    audit refuses them
  * required GitHub permissions (six reads, plus the administration: read that
    github.token cannot hold), and the write-search refusal
  * machine-readable gate / verdict / envelope / verdict-verdict schemas and
    deterministic output
  * exit semantics, and the decision procedure for legitimate_green: a
    commit-bound envelope whose EVERY required check has run "passed".
    verify-satisfied's exit 0 is ruleset-legitimate — a skipped required check
    satisfies GitHub and carries no evidence, and a pending required check is
    not even an agent item — so it can never certify green.
  * bin/legitimate-green (the oracle), bin/bind-gate, and
    bin/audit-consumer-workflow.sh (E-UNPINNED-ACTION, E-WRITE-PERMISSION,
    E-MASKED-STEP, E-BYPASS-COMMAND, ...)
  * negative fixtures for missing, skipped, cancelled, failed, pending,
    unknown-state, empty-requirement-set, replayed-at-another-head and
    branch-name-as-commit; positive controls so the refusals mean something
  * 27-case conformance suite

contracts/proven-tests — proven-tests-evidence/1.0.0
  * how a Rust repository submits real executed-test evidence, without Idris2:
    one JSON document, produced by bin/collect-evidence.sh from one captured
    libtest run, gated by bin/verify-evidence
  * example / property / proof evidence told apart by kind with the tier
    evidence each requires; sampling cannot claim actually_proven
  * coverage derived only from executed, passing, non-debt records at typed
    coordinates (17x14), with a typed taxonomy pinned in the revision; a
    coverage_claim that outruns the derivation is refused
  * rules R0-R11 with ids, including R1 (a pass is a run: timestamps, argv,
    exit status, log digest) and R11 (aggregate exit vs per-test records)
  * toolchain: submitter needs bash/jq/coreutils; the Idris2 0.7.0 + chez + GMP
    path documented for building the framework itself
  * 26 evidence fixtures, 7 recorded-log producer cases, minimal downstream
    Rust fixture with coords, fixtures and a pinned workflow
  * 35-case conformance suite

Both contracts pin by revision id + sha256 SHASUMS manifest (bin/verify-pin.sh),
never by a branch, and both suites count planned cases so an unexercised case is
a refusal rather than a pass. Neither tool writes, merges, re-runs or overrides.

Known limits, stated in the documents: the Rust fixture crate has not been
compiled here (no Rust toolchain in this environment), so the suites exercise
the producer and gate against recorded logs; and wiring contract-test into CI
needs an actions.lock regeneration, which is left to a follow-up.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-25T19:38:07.398391Z
We couldn’t complete this review. Comment @codex review to try again.
e1c7942 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 102 files, which is 2 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b196fcb0-41ff-4ab4-bfae-cbc6c41dd267
Commits

Reviewing files that changed from the base of the PR and between 541ab9b and f0da507.

Files ignored due to path filters: 1
  • .github/workflows/actions.lock is excluded by !**/*.lock
Files selected for processing: 102
  • .github/workflows/governance.yml
  • .github/workflows/hypatia-scan.yml
  • .github/workflows/lock-sync-gate.yml
  • .github/workflows/mirror.yml
  • .github/workflows/rust-ci.yml
  • .github/workflows/scorecard.yml
  • .github/workflows/secret-scanner.yml
  • .github/workflows/standards-pipeline.yml
  • .machine_readable/root-allow.txt
  • Justfile
  • README.adoc
  • contracts/README.adoc
  • contracts/bin/make-shasums.sh
  • contracts/bin/verify-pin.sh
  • contracts/proven-tests/EVIDENCE-CONTRACT.adoc
  • contracts/proven-tests/LANDING.adoc
  • contracts/proven-tests/REVISION
  • contracts/proven-tests/SHASUMS
  • contracts/proven-tests/bin/collect-evidence.sh
  • contracts/proven-tests/bin/verify-evidence
  • contracts/proven-tests/downstream-rust-fixture/.github/workflows/proven-evidence.yml
  • contracts/proven-tests/downstream-rust-fixture/.proven/coords.json
  • contracts/proven-tests/downstream-rust-fixture/Cargo.toml
  • contracts/proven-tests/downstream-rust-fixture/README.adoc
  • contracts/proven-tests/downstream-rust-fixture/src/lib.rs
  • contracts/proven-tests/downstream-rust-fixture/tests/fixtures/empty_slice.txt
  • contracts/proven-tests/downstream-rust-fixture/tests/fixtures/inverted_pair.txt
  • contracts/proven-tests/downstream-rust-fixture/tests/fixtures/sorted_pair.txt
  • contracts/proven-tests/downstream-rust-fixture/tests/fixtures/unstable_pair.txt
  • contracts/proven-tests/downstream-rust-fixture/tests/ordering.rs
  • contracts/proven-tests/fixtures/coords/ordering.json
  • contracts/proven-tests/fixtures/coords/partial.json
  • contracts/proven-tests/fixtures/expectations.json
  • contracts/proven-tests/fixtures/invalid/actually-proven-from-example.json
  • contracts/proven-tests/fixtures/invalid/counts-lie.json
  • contracts/proven-tests/fixtures/invalid/coverage-inflated.json
  • contracts/proven-tests/fixtures/invalid/duplicate-ids.json
  • contracts/proven-tests/fixtures/invalid/failing-test-claims-green.json
  • contracts/proven-tests/fixtures/invalid/future-major.json
  • contracts/proven-tests/fixtures/invalid/no-fixtures.json
  • contracts/proven-tests/fixtures/invalid/noop-command.json
  • contracts/proven-tests/fixtures/invalid/pass-no-output-digest.json
  • contracts/proven-tests/fixtures/invalid/pass-nonzero-exit.json
  • contracts/proven-tests/fixtures/invalid/pass-without-execution.json
  • contracts/proven-tests/fixtures/invalid/proof-no-rungs.json
  • contracts/proven-tests/fixtures/invalid/proof-not-checked.json
  • contracts/proven-tests/fixtures/invalid/property-no-shrinker.json
  • contracts/proven-tests/fixtures/invalid/property-zero-cases.json
  • contracts/proven-tests/fixtures/invalid/run-consistency.json
  • contracts/proven-tests/fixtures/invalid/skip-counted-as-pass.json
  • contracts/proven-tests/fixtures/invalid/skip-unlabelled.json
  • contracts/proven-tests/fixtures/invalid/stale-commit.json
  • contracts/proven-tests/fixtures/invalid/timestamps-inverted.json
  • contracts/proven-tests/fixtures/invalid/unknown-coordinate.json
  • contracts/proven-tests/fixtures/libtest/clean.txt
  • contracts/proven-tests/fixtures/libtest/empty.txt
  • contracts/proven-tests/fixtures/libtest/summary-mismatch.txt
  • contracts/proven-tests/fixtures/libtest/with-failure.txt
  • contracts/proven-tests/fixtures/libtest/with-ignored.txt
  • contracts/proven-tests/fixtures/valid/debt-excluded.json
  • contracts/proven-tests/fixtures/valid/property-and-proof.json
  • contracts/proven-tests/fixtures/valid/rust-example-pass.json
  • contracts/proven-tests/schema/coords-v1.schema.json
  • contracts/proven-tests/schema/evidence-v1.schema.json
  • contracts/proven-tests/taxonomy-v1.json
  • contracts/proven-tests/tests/run-conformance.sh
  • contracts/squabble/CONTRACT.adoc
  • contracts/squabble/REVISION
  • contracts/squabble/SHASUMS
  • contracts/squabble/bin/audit-consumer-workflow.sh
  • contracts/squabble/bin/bind-gate
  • contracts/squabble/bin/legitimate-green
  • contracts/squabble/fixtures/consumer-workflow/bad-bypass.yml
  • contracts/squabble/fixtures/consumer-workflow/bad-masked-step.yml
  • contracts/squabble/fixtures/consumer-workflow/bad-moving-ref.yml
  • contracts/squabble/fixtures/consumer-workflow/bad-no-oracle.yml
  • contracts/squabble/fixtures/consumer-workflow/bad-unpinned-action.yml
  • contracts/squabble/fixtures/consumer-workflow/bad-write-permission.yml
  • contracts/squabble/fixtures/consumer-workflow/good-readonly.yml
  • contracts/squabble/fixtures/envelope/all-passed.bad-subject.bound.json
  • contracts/squabble/fixtures/envelope/all-passed.wrong-head.bound.json
  • contracts/squabble/fixtures/expectations.json
  • contracts/squabble/fixtures/gate/all-passed.bound.json
  • contracts/squabble/fixtures/gate/all-passed.unbound.json
  • contracts/squabble/fixtures/gate/no-required-checks.bound.json
  • contracts/squabble/fixtures/gate/passed-and-skipped.bound.json
  • contracts/squabble/fixtures/gate/required-cancelled.bound.json
  • contracts/squabble/fixtures/gate/required-failed.bound.json
  • contracts/squabble/fixtures/gate/required-missing.bound.json
  • contracts/squabble/fixtures/gate/required-pending.bound.json
  • contracts/squabble/fixtures/gate/required-skipped.bound.json
  • contracts/squabble/fixtures/gate/single-passed.bound.json
  • contracts/squabble/fixtures/gate/unknown-run-state.bound.json
  • contracts/squabble/fixtures/verdict/done-clean.json
  • contracts/squabble/fixtures/verdict/done-with-skipped.json
  • contracts/squabble/fixtures/verdict/not-done.json
  • contracts/squabble/schema/envelope.schema.json
  • contracts/squabble/schema/gate.schema.json
  • contracts/squabble/schema/legitimate-green.schema.json
  • contracts/squabble/schema/verdict.schema.json
  • contracts/squabble/tests/run-conformance.sh
  • docs/README.adoc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Arena Agent and others added 4 commits October 25, 2026 19:39
The root-shape gate failed on the new top-level entry. contracts/ is a
published component, not documentation: a consumer clones this tree at a pinned
commit and runs contracts/bin/ from it, so the path is part of the contract's
surface and moving it would break every downstream pin. Added with the same
justification-comment style the allowlist already uses for the other declared
entries.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The estate's reusable CI gates moved from the hyperpolymath user account to the
metadatastician organization. Every workflow that called them by the old name
stopped starting: GitHub could not resolve the reference at plan time, so the
runs have zero jobs, and the run is even labelled with its own file path instead
of its `name:` field.

Evidence, from this repository's own run history:

  run 39700543957 (2026-10-22, before the move)
    name: "Secret Scanner"
    referenced_workflows: [hyperpolymath/standards/.../secret-scanner-reusable.yml@75bd5994]

  run 40227232833 (2026-10-25, main, after the move)
    name: ".github/workflows/secret-scanner.yml"
    referenced_workflows: []            <- the reusable was never resolved

Thirteen runs across five workflows (secret-scanner, hypatia-scan, governance,
rust-ci, standards-pipeline) were dead this way, all with jobs=0. Because a run
that creates no jobs also creates no check run, `gh pr checks` still showed 25
passing and nothing failing - the failure this repository's crates/squabble-core
gate names MissingCause::DeadActionPin.

The move is a transfer, not a rename: repo_id 1116521501 is unchanged, owner_id
goes 6759885 -> 297579217, and the new owner's own description is "Canon for the
hyperpolymath estate ... the reusable CI gates that enforce them". The reusables'
content was diffed old -> new: 34 changed lines in secret-scanner-reusable.yml
(the estate gitleaks baseline is now staged only for consumers without their own
.gitleaks.toml, per echidnabot#185) and no change to any `permissions:` block in
any of the seven reusables - so the callee-subset-of-caller constraint that makes
a caller fail at plan time is still satisfied.

  metadatastician/standards@75bd5994 -> @8e48b1ca (main, 2026-10-24)

Actions lock: hand-edited, because `gh actions-lock` cannot be installed in this
environment (its release asset host is not reachable from the sandbox). The edit
follows the generator's own shape: the seven workflows: entries re-pointed, the
superseded dependencies: records for 75bd5994 and 427eb35c removed, a record
added for the new pin with owner_id/repo_id taken from the API, and the closure
re-derived from the callee files themselves rather than from memory - which is
what surfaced two action bumps carried in with the move
(dtolnay/rust-toolchain@e2a55d2 -> 683b588c, ossf/scorecard-action@2d114668 ->
fa7117db, the latter getting a new record) and the one nested standards ref that
ci-pipeline.yml@8e48b1ca still pins under the old owner (d55304a0, record added).
Verified with a clause-for-clause port of scripts/check-lock-sync.sh (clauses 1-4
incl. transitive closure), which was itself first validated by passing on the
pre-change tree; scripts/check-lock-sync.sh needs gawk, which is not installed
here, so CI remains the authority.

Known limit, disclosed rather than papered over: ci-pipeline.yml at the new pin
still nests metadatastician/standards@d55304a0 internally, so standards-pipeline.yml
may remain unresolvable until upstream re-points its own internal refs. That is
upstream's edit, not ours.

hyperpolymath/smtp-notify-action is untouched: it still lives under the same
account and did not move.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…efore merge)

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Result recorded in the PR, not in the tree: a same-owner reusable call from this
repository resolves and creates 5 jobs, while the cross-owner call to
metadatastician/standards creates none - so the remaining block is cross-owner
resolution, not the pin, not permissions, and not the callee's contract.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Add Carrot credits or activate Agent usage billing to use Autofix

@hyperpolymath
hyperpolymath merged commit 9039cc1 into main Oct 25, 2026
27 checks passed
@hyperpolymath
hyperpolymath deleted the arena/761bc235-cicd-squabbler branch October 25, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant