Skip to content

Add retained evidence boundary posture#648

Merged
flyingrobots merged 6 commits into
mainfrom
feature/retained-evidence-boundary-posture
Jul 10, 2026
Merged

Add retained evidence boundary posture#648
flyingrobots merged 6 commits into
mainfrom
feature/retained-evidence-boundary-posture

Conversation

@flyingrobots

@flyingrobots flyingrobots commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add RetainedEvidenceBoundaryPosture as the observer-facing posture surface above local retained byte references.
  • Split retained evidence boundary state across layer, origin, proof strength, access, completeness, and typed obstruction axes.
  • Preserve missing-retention semantics for true missing coordinates/content while modeling redaction and unsupported evidence kinds separately.
  • Bind obstruction contract evidence into boundary posture ids so contract evidence cannot alias at the boundary.

Validation

  • cargo test -p warp-core --test retained_evidence_ref_tests
  • cargo check
  • cargo fmt --all -- --check
  • git diff --check
  • pre-commit hook: cargo clippy -p warp-core --lib, cargo check -p warp-core, markdownlint
  • pre-push hook: cargo fmt --all -- --check, cargo test -p warp-core --lib, cargo check -p warp-core --quiet, cargo test -p warp-core --test retained_evidence_ref_tests, Prettier markdown check

Summary by CodeRabbit

  • New Features

    • Added retained-evidence boundary posture tracking across layer, origin, proof strength, access, and completeness.
    • Added support for identifying available, redacted, missing, and unsupported evidence states.
    • Added stable posture identifiers and reveal-availability checks.
    • Expanded public access to retained-evidence posture types.
  • Bug Fixes

    • Improved distinction between unavailable, obstructed, redacted, and semantically different evidence.
  • Tests

    • Added regression coverage for posture identity, obstruction handling, citation, and reveal behavior.
  • Documentation

    • Updated the unreleased changelog with the new retained-evidence capability.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@flyingrobots, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d5e90a8c-06e2-4364-bf79-023b532165ec

📥 Commits

Reviewing files that changed from the base of the PR and between d57e2df and 65d8835.

📒 Files selected for processing (2)
  • crates/warp-core/src/retained_evidence.rs
  • crates/warp-core/tests/retained_evidence_ref_tests.rs
📝 Walkthrough

Walkthrough

Adds public retained-evidence posture facets and RetainedEvidenceBoundaryPosture to warp-core, including obstruction-aware constructors, deterministic identity hashing, reveal gating, re-exports, changelog documentation, and regression tests.

Changes

Retained evidence posture

Layer / File(s) Summary
Posture facets and public API
crates/warp-core/src/retained_evidence.rs, crates/warp-core/src/lib.rs, CHANGELOG.md
Adds posture enums with stable tags, exposes the new retained-evidence types, and documents the new boundary posture API.
Boundary posture construction and identity
crates/warp-core/src/retained_evidence.rs
Adds constructors that derive completeness and contract obstructions, hashes posture and obstruction identity deterministically, and grants reveal only for complete revealable references without obstruction.
Boundary posture regression coverage
crates/warp-core/tests/retained_evidence_ref_tests.rs
Tests posture distinctions, obstruction classification, semantic identity hashing, and reveal behavior for citation-only and revealable states.

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

Possibly related PRs

  • flyingrobots/echo#380: Modifies the retained-evidence posture model and related reading and observation surfaces.
🚥 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 clearly summarizes the main change: adding the retained evidence boundary posture.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/retained-evidence-boundary-posture

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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 177031fec5

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

Comment thread crates/warp-core/src/retained_evidence.rs Outdated
Comment thread crates/warp-core/src/retained_evidence.rs
@flyingrobots

Copy link
Copy Markdown
Owner Author

@codex Code Lawyer audit for PR #648, commit 177031fe.

Severity File Lines Issue Required mitigation
P2 crates/warp-core/src/retained_evidence.rs 420-436 available_with_access(...) accepts obstructing access states such as Unsupported, AuthorityBlocked, and KeyUnavailable, then emits Complete with obstruction: None. That lets blocked/unsupported evidence masquerade as complete support. Restrict this constructor to citation/revealable access only, or replace it with constructors/validation that map obstructing access to non-complete/obstructed posture plus typed obstruction. Add a regression test that an obstructing access cannot produce complete available posture.
P2 crates/warp-core/src/retained_evidence.rs 563-568 grants_reveal() does not require reference.is_some(). Because the posture fields are public, manual construction can set reference: None, Revealable, Complete, and no obstruction, granting reveal with no retained descriptor. Add self.reference.is_some() to the reveal predicate or otherwise enforce the invariant. Add a regression test for a revealable/complete/no-obstruction posture with no reference.

No additional Markdown, export-surface, formatting, or whitespace violations found in this pass. CI is green, but merge remains locked until these two invariant leaks are fixed or explicitly waived.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Testing

  • cargo test -p warp-core --test retained_evidence_ref_tests
  • cargo check
  • git diff --check
  • cargo fmt --all -- --check

Committed changes on the current branch with commit 693b7c3 (fix(warp-core): guard retained evidence reveal invariants) and created a PR titled “Fix retained evidence boundary reveal invariants.”

View task →

@flyingrobots

Copy link
Copy Markdown
Owner Author

Activity Summary — Code Lawyer Execution

# Severity Source File Commit Outcome
1 P2 PR crates/warp-core/src/retained_evidence.rs ce89f5ef Fixed available_with_access(...) so obstructing access states produce Obstructed posture with typed admission obstruction instead of Complete/unobstructed support. Regression added: obstructing_available_access_does_not_claim_complete_support. Thread resolved.
2 P2 PR crates/warp-core/src/retained_evidence.rs d57e2df0 Fixed grants_reveal() to require a retained reference before granting byte revelation. Regression added: revealable_boundary_posture_without_reference_does_not_grant_reveal. Thread resolved.

Validation:

  • RED witnesses failed before each fix.
  • cargo test -p warp-core --test retained_evidence_ref_tests passed: 17 tests.
  • cargo check passed.
  • cargo fmt --all -- --check passed.
  • git diff --check origin/main...HEAD passed.
  • Commit hooks passed for both commits: format, cargo clippy -p warp-core --lib, cargo check -p warp-core.
  • Pre-push hook passed: format, cargo check -p warp-core --quiet, retained-evidence integration tests.

@codex please confirm the two retained-evidence boundary invariant fixes are now structurally sound.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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 `@crates/warp-core/tests/retained_evidence_ref_tests.rs`:
- Around line 513-515: Rename the local variable `content_hash` in
`retained_content_hash_does_not_identify_semantic_evidence` to a distinct name,
such as `retained_hash`, and update all references within the test while keeping
the `content_hash(...)` helper unshadowed.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c333ec80-8c97-49f7-9154-d2288ef4511a

📥 Commits

Reviewing files that changed from the base of the PR and between 1d8e206 and d57e2df.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • crates/warp-core/src/lib.rs
  • crates/warp-core/src/retained_evidence.rs
  • crates/warp-core/tests/retained_evidence_ref_tests.rs

Comment thread crates/warp-core/tests/retained_evidence_ref_tests.rs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d57e2df022

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

Comment thread crates/warp-core/src/retained_evidence.rs Outdated
Comment thread crates/warp-core/src/retained_evidence.rs Outdated
@flyingrobots

Copy link
Copy Markdown
Owner Author

Activity Summary — Follow-up Review Threads

# Severity Source File Thread Commit Outcome
1 P2 Codex crates/warp-core/src/retained_evidence.rs PRRT_kwDOQH8Wr86P5ftx b6251994 Redacted retained evidence now carries a typed non-missing admission obstruction bound to the retained ref. Regression extended in redacted_retained_evidence_is_not_missing_content. Thread resolved.
2 P2 Codex crates/warp-core/src/retained_evidence.rs PRRT_kwDOQH8Wr86P5fts bd6f3b0f grants_reveal() now requires the retained ref coordinate to match the posture coordinate. Regression added: revealable_boundary_posture_requires_reference_coordinate_match. Thread resolved.
3 P5 CodeRabbit crates/warp-core/tests/retained_evidence_ref_tests.rs PRRT_kwDOQH8Wr86P5dDX 65d88357 Renamed the local content_hash binding in the added semantic-evidence test to shared_hash to avoid helper shadowing. Thread resolved.

Validation:

  • RED witnesses failed before both P2 fixes.
  • CodeRabbit shadowing pre/post witness used exact rg pattern for the reviewed added line.
  • cargo test -p warp-core --test retained_evidence_ref_tests passed: 18 tests.
  • cargo check passed.
  • cargo fmt --all -- --check passed.
  • git diff --check origin/main...HEAD passed.
  • Commit hooks passed for all three commits.
  • Pre-push hook passed: format, cargo check -p warp-core --quiet, retained-evidence integration tests.

@codex please re-check PR #648 for any remaining retained-evidence boundary invariant or test-style issues.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 65d8835729

ℹ️ 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 ebe8b6f into main Jul 10, 2026
36 checks passed
@flyingrobots flyingrobots deleted the feature/retained-evidence-boundary-posture branch July 10, 2026 14:42
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