Repository navigation
Add controlled publication ingestion - #34
Conversation
📝 WalkthroughWalkthroughAdds a non-authoritative publication staging and controlled ingestion pipeline with immutable SQLite records, strict attestation validation, CLI/MCP operations, workflow integration, CAS integrity checks, and updated publication authority documentation. ChangesPublication ingestion workflow
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Workflow
participant CLI
participant Application
participant Store
participant GitHubCLI
Workflow->>CLI: stage publication candidate
CLI->>Application: submit report, closure, and bundle
Application->>Store: register immutable stage
Workflow->>CLI: ingest staged hashes
CLI->>Application: request controlled ingestion
Application->>Store: reload and validate stage
Application->>GitHubCLI: run bounded pinned verifier
GitHubCLI-->>Application: return attestation JSON
Application->>Store: register ingestion receipt
Store-->>Workflow: return ingestion outcome
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59fb473bd3
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/implementation/RELEASE_CHECKLIST.md`:
- Line 52: Distinguish the canonical CAS verification record from the separate
idempotency-keyed SQLite ingestion receipt, using their exact names
consistently. Update docs/implementation/RELEASE_CHECKLIST.md at line 52 and
docs/implementation/STATUS.md at lines 195-196 so “attestation receipt” and
“publication_attestation_verification/1 receipt” no longer conflate these
outputs; explicitly identify each artifact according to its role.
In `@docs/trust/PUBLICATION_AUTHORITY.md`:
- Around line 140-144: Clarify the distinction between implemented workflow
capability and observed merged-main evidence across
docs/trust/PUBLICATION_AUTHORITY.md:140-144,
docs/implementation/RELEASE_CHECKLIST.md:52, and
docs/implementation/STATUS.md:195-201. Update the claims so
PUBLICATION_AUTHORITY.md does not state that protected main has demonstrated
retained staged/ingested evidence unless the checklist and status confirm it;
otherwise explicitly label the passage as capability while preserving the
pending merged-main evidence status in the sibling documents.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3ea414ce-7102-47e0-bb91-ec348ec1be38
📒 Files selected for processing (23)
.github/workflows/ci.yml.github/workflows/publication.ymldocs/implementation/RELEASE_CHECKLIST.mddocs/implementation/STATUS.mddocs/trust/PUBLICATION_AUTHORITY.mdmcl.toml.examplemigrations/0010_publication_ingestion.sqlschemas/publication/publication-attestation-verification-1.schema.jsonschemas/publication/publication-stage-1.schema.jsonscripts/publication-attestation-verify.shscripts/publication-ingest.shsrc/app.rssrc/cli/mod.rssrc/config.rssrc/domain/mod.rssrc/domain/publication.rssrc/lib.rssrc/mcp/mod.rssrc/publication_attestation.rssrc/store/mod.rssrc/verifier/mod.rstests/mcp_stdio.rstests/phase1_cli.rs
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Merged-main controlled-ingestion evidencePR #34 merged as
Downloaded byte audit:
The audit recomputed the canonical stage and verification-record hashes; checked all 71 retained files; matched every one of the 25 exact, ordered closure roles by path, byte size, and SHA-256; confirmed the The closed attestation result contains exactly one result, report subject, source dependency, and verified attestation. Its certificate and SLSA fields bind repository ID All 18 retained |
Summary
Advances #21 with a controlled, permanently non-authoritative bridge from protected publication artifacts into durable MathOS state.
publication_stage/1quarantine registration for the exact report, retained closure, Sigstore bundle, and all 25 fixed retained roles.publication_attestation_verification/1record, then atomically registers the separate SQLitePublicationIngestionReceiptSnapshotand logical stage/actor idempotency result while rechecking the current formalization head.mainworkflow and exercises the staged-CAS barrier in pull-request CI.The PR deliberately does not create authoritative proof/refutation evidence or derived mathematical status.
Change class
Select one:
Affected trust boundary: publication provenance verification, CAS quarantine integrity, immutable SQLite ingestion state, idempotency, and protected-workflow handoff.
TDD evidence
Red evidence: no retained red-run transcript is available, so that checkbox remains open. The acceptance and adversarial obligations are preserved as committed tests.
Green evidence: missing/altered staged CAS, stale head, retry-key rebinding, unknown verifier fields, multiple results, wrong subjects and certificate/run/immutable-ID bindings, invalid timestamp counts, unpinned binaries, timeout, output overflow, stderr, and caller-authored verification records fail closed.
Commands and results:
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo test --all-targets- 114 Rust test cases passedgit diff --checkpassed29720847015passed Linux Rust, Windows Rust, real storage, pinned Lean plus staged-CAS barrier, and legacy Python jobsMathematical verification
Verifier and result: PR CI proves the non-authoritative candidate and quarantine barriers. The exact protected attestation challenge and retained ingestion evidence must be observed on merged
main; authority remains unavailable until the next atomic replay gate exists.Provenance and licensing
Provenance references: the committed publication policy pins the official GitHub CLI release archive and executable hashes, immutable GitHub repository/owner IDs, protected workflow and ref, Lean toolchain, SLSA predicate, and action commits. No third-party binary is vendored; the workflow downloads the official release and verifies it before use. This slice changes neither MathCorpus nor RL export behavior.
Risk and recovery
Known limitations: the production verifier pin is Linux-amd64 only; Windows can stage and test rejection but cannot ingest. CAS and SQLite are separate media, so downstream use must replay the full application closure. Every stage, attestation-verification record, and ingestion receipt remains
authoritative:false.Rollback or recovery plan: revert the workflow and application entry points if necessary. Migration 0010 only adds immutable tables and triggers and may remain inert; do not delete retained evidence. Replay fails closed if CAS bytes are missing or altered.
Follow-up work: build the atomic authority gate that application-replays a current
PublicationIngestionReceiptSnapshotand its bound CAS closure, requires apassedreport plus current fidelity, and creates typed proof/refutation evidence without trusting table presence.Review readiness