Repository navigation
Derive live claim research status - #39
Conversation
📝 WalkthroughWalkthroughAdds versioned polarity-aware fidelity contracts and a live, integrity-checked claim research status read model. The status is exposed through shared CLI and MCP verification paths, with protected publication-ingestion validation and updated schemas, tests, and implementation documentation. ChangesClaim research status
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related issues
Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant CLI
participant MCP
participant Application
participant Store
participant CAS
CLI->>Application: Request claim status by exact claim identity
MCP->>Application: Request claim_status by exact claim identity
Application->>Store: Capture current claim and evidence basis
Store->>CAS: Read and validate canonical artifacts
CAS-->>Store: Fidelity and authority artifacts
Store-->>Application: Bounded replay basis
Application->>Store: Recheck basis
Store-->>Application: Stable basis or integrity error
Application-->>CLI: Research status snapshot
Application-->>MCP: Research status snapshot
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b80a702902
ℹ️ 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.
🧹 Nitpick comments (1)
src/domain/fidelity.rs (1)
155-171: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winAdd an exact-match parser test for
VersionedFidelityReviewReport#[serde(untagged)]relies on the v1 structs’#[serde(deny_unknown_fields)]to keep v2-shaped payloads from falling back to v1 and droppingreviewed_source_relation. The request wrapper already has this invariant covered; the report wrapper should too.🤖 Prompt for 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. In `@src/domain/fidelity.rs` around lines 155 - 171, The report wrapper lacks coverage ensuring v2-shaped JSON is parsed as VersionedFidelityReviewReport::V2 rather than falling back to V1 and dropping reviewed_source_relation. Add an exact-match parser test for VersionedFidelityReviewReport using a v2 payload, and assert the parsed value equals the expected V2 report; follow the existing request-wrapper invariant test.
🤖 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.
Nitpick comments:
In `@src/domain/fidelity.rs`:
- Around line 155-171: The report wrapper lacks coverage ensuring v2-shaped JSON
is parsed as VersionedFidelityReviewReport::V2 rather than falling back to V1
and dropping reviewed_source_relation. Add an exact-match parser test for
VersionedFidelityReviewReport using a v2 payload, and assert the parsed value
equals the expected V2 report; follow the existing request-wrapper invariant
test.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 44cb1080-f81e-4a06-839b-05f79d8299e3
📒 Files selected for processing (19)
docs/decisions/ADR-0008-live-polarity-aware-claim-research-status.mddocs/dev-diary/0036-truth-is-the-intersection.mddocs/dev-diary/README.mddocs/implementation/RELEASE_CHECKLIST.mddocs/implementation/STATUS.mddocs/trust/FIDELITY.mdschemas/fidelity/fidelity-review-report-2.schema.jsonschemas/fidelity/fidelity-review-request-2.schema.jsonschemas/research/claim-research-status-1.schema.jsonscripts/publication-ingest.shsrc/app.rssrc/cli/mod.rssrc/domain/fidelity.rssrc/domain/mod.rssrc/domain/research_status.rssrc/mcp/mod.rssrc/store/mod.rstests/mcp_stdio.rstests/phase1_cli.rs
|
Addressed the CodeRabbit parser-coverage note in 849dce0. The versioned parser test now constructs a complete fidelity_review_report/2 value, parses it through VersionedFidelityReviewReport, and asserts exact equality with the V2 variant, preventing any silent fallback to V1. The targeted regression test passes locally. |
Outcome
Derive one exact claim version's live research status from independently revalidated statement fidelity and protected formal authority. No caller can set or persist proved/disproved.
Trust boundary
Local evidence
Remaining protected gate
After merge, the protected publication workflow must retain a real open status after authority and a proved/disproved status only after a separate verified v2 fidelity review. Issue #38 remains open until that exact merged-tree artifact is independently audited.
Refs #38
Summary by CodeRabbit
New Features
Documentation