Skip to content

Expose duplicate state evidence from the generic runner - #700

Merged
flyingrobots merged 4 commits into
mainfrom
task/699-expose-duplicate-state-evidence
Jul 29, 2026
Merged

Expose duplicate state evidence from the generic runner#700
flyingrobots merged 4 commits into
mainfrom
task/699-expose-duplicate-state-evidence

Conversation

@flyingrobots

@flyingrobots flyingrobots commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Expose graph-only application-state roots and typed target-value digests before and after an obstructed duplicate. Report construction fails closed on either mutation.

Validation: cargo xtask pr-preflight --base origin/main; cargo clippy -p xtask --all-targets -- -D warnings; 131 xtask unit tests and 7 runner integration tests pass.

Documentation impact: the public runner contract and canonical Generated Rules/WAL topics now distinguish application state from causal-history evidence.

Closes #699.

Summary by CodeRabbit

  • Documentation

    • Clarified duplicate-operation witness behavior, including application-state roots and typed target-value digests.
    • Documented exclusions for WAL, tick history, receipts, and commit metadata.
    • Updated explanatory wording in the README.
  • Bug Fixes

    • Duplicate-operation reports now fail safely when application state or target values change unexpectedly.
    • Witness data is provided as canonical 32-byte hexadecimal values.
  • Tests

    • Added validation ensuring duplicate witnesses remain consistent and correctly formatted.

@flyingrobots

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@flyingrobots

Copy link
Copy Markdown
Owner Author

@codex review please

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 22b79455-9746-48c0-a8a1-01f761e620a2

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The generic Edict-operation runner now exposes canonical before/after application-state roots and typed target-value digests for duplicate witnesses. It rejects witnesses when either value changes, with unit, integration, and documentation updates.

Changes

Duplicate witness validation

Layer / File(s) Summary
Witness contract and fail-closed validation
xtask/src/run_edict_operation.rs
DuplicateReport stores hexadecimal roots and digests; duplicate_report rejects changes to either pair and has mutation-focused unit coverage.
Duplicate obstruction wiring
xtask/src/run_edict_operation.rs
The runner passes obstruction data and before/after state values to duplicate_report, replacing the previous hidden-mutation tracking path.
End-to-end witness assertions
xtask/tests/run_edict_operation.rs
The durable-run test validates canonical 32-byte hexadecimal fields and unchanged before/after witness values.
Documented witness semantics
CHANGELOG.md, docs/topics/GeneratedRules.md, docs/topics/WAL.md, README.md
Documentation describes graph-only roots, typed target-value digests, excluded metadata, and fail-closed behavior; README text is reformatted.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GenericRunner
  participant EchoApplicationState
  participant duplicate_report
  GenericRunner->>EchoApplicationState: Capture before and after application-state roots
  GenericRunner->>duplicate_report: Pass roots and target-value bytes
  duplicate_report->>duplicate_report: Compute typed target-value digests
  duplicate_report-->>GenericRunner: Emit witness or return validation error
Loading

Possibly related PRs

Suggested labels: tooling

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main change: exposing duplicate state evidence in the generic runner.
Linked Issues check ✅ Passed The PR matches #699: it adds before/after roots and target digests, fails closed on mismatch, and adds a negative runner test.
Out of Scope Changes check ✅ Passed The changes stay within the issue scope; the README, changelog, and docs edits are explanatory updates for the same behavior.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ 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 task/699-expose-duplicate-state-evidence

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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 0990a3cfed

ℹ️ 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".

@flyingrobots
flyingrobots merged commit 63482dc into main Jul 29, 2026
40 checks passed
@flyingrobots
flyingrobots deleted the task/699-expose-duplicate-state-evidence branch July 29, 2026 02:21
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.

Expose duplicate no-mutation evidence from the generic runner

1 participant