Skip to content

slice(#1941 PR A): bind analysis and verification artifacts to repository, revision, schema, and content identities #1977

Closed

Description

@EffortlessSteven

Parents

Scope — one provenance-validation PR

Before any movement or receipt is computed, validate that every input artifact is a RIPR-produced, schema-compatible artifact from the intended repository/input lineage.

Required artifact identity

Each accepted analysis/verify input must expose or be wrapped by producer-owned metadata covering at least:

artifact kind and schema version
producer/tool version
repository/root identity
base and analyzed revision identities
analysis input identity
snapshot/complete-evidence identity where applicable
content SHA-256 of the canonical artifact bytes
creation command/profile

The command may accept historical revisions intentionally. It must not pretend a historical artifact is current. Compare the artifact's declared revision with the actual repository state selected by the invocation and return a typed mismatch/disclosure.

Required validation

  • Parse through the canonical artifact schema, not generic serde_json::Value acceptance.
  • Reject unsupported major/schema versions visibly.
  • Recompute and compare content commitments.
  • Validate repository/root identity and revision existence.
  • Validate before/after comparability: same repository and compatible lineage/input contract.
  • Detect swapped, duplicated, truncated, hand-authored, or internally inconsistent artifacts.
  • Do not require the squash commit SHA to equal a PR head; record PR-revision evidence and repository compatibility separately where applicable.

Required outcomes

valid_current
valid_historical_comparable
valid_historical_noncurrent
incomparable_repository
incomparable_lineage
schema_unsupported
content_mismatch
revision_unavailable
producer_untrusted_or_unknown

No invalid input may reach movement calculation or receipt issuance.

Required tests

  • valid current before/after pair;
  • valid historical adjacent pair;
  • different repositories with same seam ID;
  • fabricated JSON with plausible fields;
  • changed bytes after digest;
  • unsupported schema/protocol;
  • declared revision missing or from another root;
  • before/after reversed or non-comparable lineage;
  • PR head versus later compatible main/squash identity;
  • dirty worktree disclosure without silently including unsaved changes.

Acceptance criteria

  • ripr agent verify and receipt inputs are schema-typed and content-committed;
  • repository/revision mismatch cannot silently produce movement;
  • historical evidence remains inspectable with an honest currentness/comparability state;
  • fabricated caller input cannot become a valid RIPR artifact merely by matching field names;
  • error output is typed and provides a bounded regeneration route;
  • no signing secret or centralized remote service is required.

Proof

cargo test -p ripr agent_verify -- --test-threads=1
cargo test -p ripr receipt -- --test-threads=1
cargo test -p ripr --test cli_smoke agent -- --test-threads=1
cargo xtask check-output-contracts
cargo xtask check-fixture-contracts
cargo xtask check-traceability
cargo xtask check-pr
git diff --check

Non-goals

This slice does not execute tests, sign receipts, claim runtime verification, or change merge doctrine. It establishes trustworthy input identity only.

Activity

  1. added
    status/needs-work
    on Jul 19, 2026
  2. coderabbitai commented on Jul 19, 2026

    @coderabbitai
    🔗 Related PRs

    #1670 - perf(review-comments): emit bounded phase receipts [merged]
    #1671 - fix(lsp): retain full analysis input identity [merged]
    #1691 - specs(ripr): materialize first RIPR-SPEC v2 requirement [open]
    #1714 - audit(goals): add fail-closed authority audit framework [merged]
    #1827 - feat(receipt): add current_head to receipt JSON output [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false
    

    💬 Have feedback or questions? Drop into our discord!

  3. EffortlessSteven commented on Jul 22, 2026

    @EffortlessSteven
    MemberAuthor

    Implemented in draft PR #2203 at exact head dc06f1c. The slice adds producer-owned repo-exposure identity, bounded input/snapshot/command/profile metadata, exact-byte SHA-256 commitment, root/HEAD/worktree validation, before/after base and input comparability checks, and adversarial CLI coverage. Proven non-claims: no runtime command execution, receipt binding, signing, replay protection, gate authority, or release qualification. Workspace-wide tests remain blocked by the six TypeScript rerun failures reproduced on clean origin/main; no artifact-slice failure was observed.

  4. EffortlessSteven commented on Jul 22, 2026

    @EffortlessSteven
    MemberAuthor

    Follow-up commit 1404501 aligns producer-version fixtures/docs with current ripr 0.10.0. The PR head is now 14045019b6d8e6cf8e40b7c0c141520d31f12c43; focused agent/CLI and output-contract proof was rerun after the update.

  5. EffortlessSteven commented on Jul 22, 2026

    @EffortlessSteven
    MemberAuthor

    Source-of-truth CI identified and the first remediation landed in commit 927cc242b5a31e449165cae1ff8320f26a41f6fd: the accepted spec now links the canonical support-tier ledger. Local cargo xtask check-support-tiers and check-spec-format pass. PR #2203 is now at this exact head.

  6. EffortlessSteven commented on Jul 22, 2026

    @EffortlessSteven
    MemberAuthor

    Correction to the previous comment: the exact commit and current PR head are 927cc24.

  7. EffortlessSteven commented on Jul 22, 2026

    @EffortlessSteven
    MemberAuthor

    Acceptance hardening landed in commit 9bae973. RepoExposureDocument.seams is now typed with required seam identity/kind/file/line/grip fields and rejects malformed seam records before movement. The PR head is this exact SHA; focused check, clippy, agent/CLI tests, and diff checks pass locally.

  8. EffortlessSteven commented on Jul 22, 2026

    @EffortlessSteven
    MemberAuthor

    Exact-head CI found and the local fix is now landed in b4caba9. The historical artifact fixture now sets repository-local Git identity before its second commit. Local historical control, all 16 CLI agent tests, clippy, and diff checks pass. PR #2203 has been updated and CI is rerunning at this SHA.

  9. EffortlessSteven commented on Jul 22, 2026

    @EffortlessSteven
    MemberAuthor

    Exact-head CI at 12760d6 exposed one additional policy gap: the new bounded git provenance probes were not yet listed in policy/process_allowlist.txt. The two-line owner/reason entry is now committed and pushed. Local check-process-policy and the exact policy façade regression test pass; CI is rerunning at this SHA. PR #2203 remains draft and unmerged.

  10. EffortlessSteven commented on Jul 22, 2026

    @EffortlessSteven
    MemberAuthor

    Exact-head required Rust gates are now green at 12760d6. Coverage, JUnit, Source of Truth, Security, PR Plan, and routed selection also pass. The routed job is still completing advisory reports/PR evidence, and ub-review remains in progress; PR #2203 stays draft until those contexts are terminal.

  11. EffortlessSteven commented on Jul 22, 2026

    @EffortlessSteven
    MemberAuthor

    UB review has passed at exact head 12760d6. Required Rust gates, advisory reports, Coverage, JUnit, Source of Truth, Security, PR Plan, and routing also pass. The only remaining live check is the hosted routed job's PR-evidence step; PR #2203 remains draft and unmerged.

  12. EffortlessSteven commented on Jul 22, 2026

    @EffortlessSteven
    MemberAuthor

    This slice is implemented and merged as PR #2203, final head 12760d6, merge commit f0f32dc. The merged work binds repo-exposure artifacts to producer/version and repository revision identity, validates historical fixture identity, and records the bounded artifact provenance contract. Remaining receipt/verify composition work stays under #1941 and the later execution lane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/needs-work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions