8000 Prepare canonical publication requests by Mnehmos · Pull Request #30 · Mnehmos/MathOS · GitHub
[go: up one dir, main page]

Skip to content

Prepare canonical publication requests - #30

Merged
Mnehmos merged 1 commit into
mainfrom
feat/publication-request-preparation
Jul 20, 2026
Merged

Mnehmos merged 1 commit into
mainfrom
feat/publication-request-preparation

Conversation

@Mnehmos
@Mnehmos Mnehmos commented Jul 20, 2026 •
Copy link
Copy Markdown
Owner

What changed

  • prepare a canonical publication_request/1 from one current formalization and exact diagnostic, proof-closure, and axiom-audit evidence
  • derive environment, module, declaration, policy, and request hashes internally from revalidated CAS-backed records
  • bind proof versus refutation to typed formalization polarity while preserving read compatibility for older formalizations
  • register generated request artifacts transactionally with current-head and operation-scoped idempotency checks
  • expose the same non-authoritative preparation service through reviewed CLI and MCP surfaces
  • document the trust boundary and remaining Phase 3 work

Why

Issue #21 needs a trustworthy handoff from canonical application state to the protected publication workflow. This slice creates that handoff without allowing a caller, local worker, diagnostic, or request artifact to manufacture authoritative mathematical evidence.

Impact

Operators can now use mcl verify prepare-publication or MCP prepare_publication to create or dry-run an exact private CAS request artifact. The artifact remains explicitly non-authoritative. Protected candidate execution, attestation ingestion, authoritative evidence creation, and derived truth status remain separate future slices.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace --all-targets (92 default Rust tests)
  • real Lean 4.32 lifecycle integration
  • PYTHONPATH=src PYTHONWARNINGS=error::ResourceWarning python -m unittest discover -s tests -v (39 tests)
  • git diff --check
  • independent quality and security review, including stale-head, idempotency, polarity, caller-authority, and CAS-substitution cases

Advances #21.

Summary by CodeRabbit

  • New Features

    • Added CLI and MCP support for preparing non-authoritative publication requests from verified evidence.
    • Added proof/refutation outcome selection with strict validation.
    • Added optional claim polarity support for formalizations.
    • Added dry-run, idempotent retries, integrity checks, and stale-version protection.
  • Bug Fixes

    • Requests with missing, mismatched, corrupted, or caller-supplied authority data are now rejected consistently.
  • Documentation

    • Expanded publication policy, authority boundaries, implementation status, and release checklist guidance.
  • Tests

    • Added coverage for CLI, MCP, restart, retry, integrity, and failure scenarios.

@coderabbitai
coderabbitai Bot commented Jul 20, 2026 •
Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8f680968-edd2-4dbc-9979-af576a7c5e31

📥 Commits

Reviewing files that changed from the base of the PR and between 824ad46 and 1dbcab2.

📒 Files selected for processing (12)
  • docs/implementation/RELEASE_CHECKLIST.md
  • docs/implementation/STATUS.md
  • docs/trust/PUBLICATION_AUTHORITY.md
  • schemas/formalization/formalization-1.schema.json
  • src/app.rs
  • src/cli/mod.rs
  • src/domain/publication.rs
  • src/domain/schemas.rs
  • src/mcp/mod.rs
  • src/store/mod.rs
  • tests/lean_worker.rs
  • tests/mcp_stdio.rs

📝 Walkthrough

Walkthrough

This change adds canonical publication-request preparation with typed claim polarity, strict evidence validation, head-bound idempotent artifact registration, CLI/MCP actions, and integration coverage for dry runs, retries, invalid evidence, corruption, and stale subjects.

Changes

Publication request preparation

Layer / File(s) Summary
Publication contracts and typed inputs
schemas/formalization/formalization-1.schema.json, src/domain/schemas.rs, src/domain/publication.rs
Adds typed claim_polarity, closed publication outcome parsing, committed policy loading, and related validation tests.
Canonical evidence validation and request derivation
src/app.rs
Adds application-level preparation of deterministic, non-authoritative publication requests from the current formalization and accepted evidence chain.
Head-bound artifact registration
src/store/mod.rs
Adds publication artifact registration with exact metadata binding, current-head checks, compatible idempotent retries, and stale/conflict rejection.
CLI and MCP preparation actions
src/cli/mod.rs, src/mcp/mod.rs
Exposes publication preparation through CLI and MCP, including required fields, outcome parsing, capability discovery, and incompatible-field rejection.
End-to-end validation and documentation
tests/lean_worker.rs, tests/mcp_stdio.rs, docs/implementation/*, docs/trust/PUBLICATION_AUTHORITY.md
Covers publication success and failure paths and documents the preparation, evidence, authority, and validation contracts.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related issues

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/publication-request-preparation

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.

@Mnehmos
Mnehmos marked this pull request as ready for review July 20, 2026 02:05
@Mnehmos
Mnehmos merged commit da33431 into main Jul 20, 2026
5 of 6 checks passed
@Mnehmos
Mnehmos deleted the feat/publication-request-preparation branch July 20, 2026 02:05
@Mnehmos
Mnehmos commented Jul 20, 2026
Copy link
Copy Markdown
Owner Author

Post-merge evidence for the exact merged tree:

  • merge commit: da33431a1061bb3f05db7a7d2473f1fb5b8059f2
  • tree: 620f2a3060290ffe37fb3051ff604fa4433679af
  • main CI: https://github.com/Mnehmos/MathOS/actions/runs/29711916515 (all five jobs passed)
  • publication run: https://github.com/Mnehmos/MathOS/actions/runs/29711916501
  • publication job: 88257002282
  • retained artifact: 8449114011
  • artifact archive digest: sha256:3f8b0567519521a29d302ab6dd4f229c59ce2d823ddbf144db01d07458e0fd31
  • smoke report SHA-256: b6edcfc92ed622e847444629ce2b38c1f20afb7b9e065bb75a65bdaa69cb3af9
  • canonical report content SHA-256: 43859d5dac0eb406c39b9dfd08862a8b874bf9102de6fec79d1c36b821864778
  • Sigstore bundle SHA-256: 58013a04bb8f10aac04d55402e605fc169c90abf11fcc22211e98fcbba23d759
  • raw verifier output SHA-256: 541b74172ae4c12f2ce2b31ce2330917a090214c0f1358a3795fcf15f8d99eb0
  • constrained verification record SHA-256: afdef248f30dd3b5d26ba7a342b9bba2a1e569a69fcf62145ee722c1cfd4e40a
  • smoke Lean module SHA-256: 7ac95b59d3c3ca102fc8893117b440477beaa057caa9162683406e9d0f04b4d8

The downloaded record binds one attestation and one transparency timestamp to the exact protected workflow, commit, ref, and report subject. Both the smoke report and constrained verification record still state authoritative: false; this is infrastructure evidence, not proof authority.

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

0