Repository navigation
feat(keep): add an optional ReferenceStore content adapter - #770
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (8)
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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Code Lawyer inspection at
Guarded Docker evidence at The imported shared test source retains its owning Rust 1.90 formatting; only recursive formatting of that external module is skipped in the Rust 1.96 experiment. An earlier formatting failure and shell-runner syntax failure are explicitly excluded from defect RED evidence. Coverage limits: missing chunks and malformed records use real public Keep APIs with the same quarantine helper, rather than injecting corruption into inaccessible upstream tables. Power loss, production cutover, persisted bindings, Windows runtime and original study measurements are not claimed. The canonical boundary, README and changelog describe that exact posture. Merge eligibility remains pending current-head independent agy approval and hosted checks. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de67e83b88
ℹ️ 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".
Independent Adversarial Review: PR #770 (
|
| Operation / Visible Behavior | Experimental Keep Path | Production Echo CAS Parallel Path | Parity & Invariant Verification |
|---|---|---|---|
| Backend Construction & Caps | reference_adapter.rs:43-58: KeepReferenceAdapter::new(physical_bytes, object_bytes, objects, layout_entries) |
memory.rs:32-34: MemoryTier::new() / DiskTier::open(path) |
Production memory backend has unbounded advisory limits by default; Keep adapter requires explicit limits for physical payload, per-object size, object count, and layout entries. Validates LayoutEntryLimit::new before allocating. |
| Expected Ingestion Staging | physical_content.rs:171-184: StagedContent::read_expected |
physical_content.rs:171-184: StagedContent::read_expected |
Shared type: Preflights expected_length > byte_limit before reading source; reads into PrivateContentBuffer; seals BLAKE3 hash and length. |
| Content Publication | reference_adapter.rs:102-152: KeepReferenceAdapter::publish_content |
physical_content.rs:336-342 (MemoryTier) & 370-375 (DiskTier) |
Preflights object-size and object-count caps. Computes same-source IdentityBinding from sealed bytes; verifies Echo identity and length. Checks duplicate binding equality. Stages and commits to Keep ReferenceStore. Validates commit receipt against target and layout ID before registering private binding. |
| Immutable View Borrow | reference_adapter.rs:99-101: KeepReferenceView<'a>(&'a KeepReferenceAdapter) |
physical_content.rs:333-335 (MemoryContentView) & 367-369 (DiskContentView) |
Borrows underlying store immutably (&self); lifetime bounded to store borrow. |
| Reconstruction & Quarantine | reference_adapter.rs:64-95: KeepReferenceView::reconstruct |
physical_content.rs:316-329 (MemoryContentView) & 347-363 (DiskContentView) |
All backends delegate to reconstruct_quarantined. Checks destination atomic promotion support and destination byte limit. Preflights binding. Calls Keep store reconstruct. Verifies Keep receipt target, layout ID, and byte count. Shared quarantine re-hashes BLAKE3 before destination.promote. |
| Missing Content Handling | reference_adapter.rs:70-74: Unbound target returns CapabilityUnavailable |
physical_content.rs:322-325 (MemoryTier) & 355-357 (DiskTier) |
Parity verified: Missing/unbound items refuse with ContentError::CapabilityUnavailable. No authenticated absence claim is manufactured. Bound items whose Keep store lost state return operational ContentError::Backend(ReconstructionError::BlobMissing). |
| Receipt Posture | physical_content.rs:135-161: ContentReceipt |
physical_content.rs:135-161: ContentReceipt |
Exact parity: All receipts return establishes_durability() == false and establishes_complete_view() == false. |
3. Merge & Git History Audit
Commit Graph Verification
- Merge Base:
bb20c57345374f476fa938789294a0890341eadd(git merge-base bb20c573 de67e83bconfirmed). - Commit Count: Exactly 1 commit between base and head (
de67e83b88b99af5f963bd9ce8276efdc27b903a). - Merge Commits in PR: 0. The branch is a clean linear fast-forward on top of mainline
bb20c573.
Audit of Merged Ancestors & Integrated Invariants
- PR feat(keep): verify the experimental Echo content identity bridge #768 (
bb20c57345374f476fa938789294a0890341eadd, K01 - Issue Prove the Echo and Keep content identity bridge #759):- Parents:
2056c95f(main) and64b3a42d(feat/keep-identity-bridge). - Introduced Invariants: Bounded dual-identity stream hashing (
IdentityBinding::from_source), private Keep coordinate redaction from Debug, isolated packageexperiments/echo-keeppinned to Keep3165890e9291cfb5fe10e81a9d7cd151f3e59464, and dependency boundary enforcement. - PR feat(keep): add an optional ReferenceStore content adapter #770 Integration: Fully honored.
IdentityBindingis reused unmodified; Keep coordinates remain strictly private; Keep pin is unchanged inCargo.toml.
- Parents:
- PR feat(cas): verify complete objects before atomic output promotion #769 (
2056c95fb891125cbfcc8405e438542e020b7f4c, K02 - Issue Add the Echo physical-content port and existing CAS adapters #760):- Parents: Preceding main commit and
7802d898(feat/physical-content-port). - Introduced Invariants: Complete-object physical-content port (
echo_cas::physical_content),StagedContent,reconstruct_quarantined, atomic destination promotion, and shared backend-neutral conformance suite (tests/common/physical_content.rs). - PR feat(keep): add an optional ReferenceStore content adapter #770 Integration: Fully honored.
KeepReferenceAdapterimplementsPhysicalContentBackend;KeepReferenceViewimplementsPhysicalContentView;common::conformanceis run againstKeepReferenceAdapterinreference_adapter/tests.rs:30-34.
- Parents: Preceding main commit and
4. Claim and Numeric Verification
Independent Manifest Verification
- Retained Manifest: [
retained evidence: k03-final-gate-v3.manifest.json] - Base Head Recorded in Manifest:
bb20c57345374f476fa938789294a0890341eadd - Total Files Recorded in Manifest: 979
- Independent Hash Comparison against Candidate Tree:
- Computed SHA-256 for all 979 files against
the reviewed checkout. - Mismatches: 0
- Missing files: 0
- Result: 100% exact match across all 979 files.
- Computed SHA-256 for all 979 files against
Test Count Claims vs. Raw Logs
-
6 Default Tests (Package:
echo-keep-experimental, default features):- Verified in [
k03-final-gate-v3.log:5-13]. All 6 passed:tests::complete_binding_budget_preflight_does_not_read_sourcetests::binding_debug_keeps_backend_coordinates_privatetests::identity_reader_stops_at_one_overlength_probetests::interrupted_short_source_retries_but_failed_source_returns_no_bindingtests::substitution_and_length_mismatch_refusetests::pinned_vectors_bind_distinct_laws_and_reconstructed_bytes
- Verified in [
-
12 Feature-Enabled Tests (Package:
echo-keep-experimental,--features reference-adapter):- Verified in [
k03-final-gate-v3.log:24-38]. Exactly 12 passed:- 6 identity tests above, plus:
-
reference_adapter::tests::interrupted_ingress_retries_before_explicit_publication
-
reference_adapter::tests::losing_the_store_or_recreating_the_adapter_refuses_without_a_receipt
-
reference_adapter::tests::private_coordinate_substitutions_never_promote_output
-
reference_adapter::tests::real_keep_missing_chunks_and_malformed_layouts_stay_quarantined
-
reference_adapter::tests::publication_limits_leave_existing_objects_readable
-
reference_adapter::tests::keep_and_existing_memory_share_the_exact_contract
- Verified in [
-
36 Root CAS Tests (Package:
echo-casunder Rust 1.90.0):- Verified in [
k03-final-gate-v3.log:50-106]:-
src/lib.rs(memory tier): 17 passed -
tests/disk_tier.rs: 4 passed -
tests/physical_content.rs: 5 passed -
tests/semantic_retention.rs: 10 passed - Total:
$17 + 4 + 5 + 10 = \mathbf{36}$ passed.
-
- Verified in [
-
25 Package MSRVs Matching Policy:
- Verified in [
k03-final-gate-v3.log:122] and checked againstscripts/rust-msrv-policy.tsv:8-32(exactly 25 package entries).
- Verified in [
History of Gate Runs (v1, v2, v3)
k03-final-gate.log(v1 failure): Rust 1.96cargo fmt --checkfailed oncrates/echo-cas/tests/common/physical_content.rsbecause the 1.96 formatter formatted the imported 1.90 shared source differently. Fixed by annotatingmod common;with#[rustfmt::skip]inexperiments/echo-keep/src/reference_adapter/tests.rs:9. Confirmed: This was a formatting runner boundary, not a defect RED claim.k03-final-gate-v2.log(v2 failure): Tests completed green, but runner failed at line 119 (sh: 17: Syntax error: redirection unexpected) due to a Bash here-string executed undersh.k03-final-gate-v3.log(v3 pass): Runner syntax corrected; all steps exited with code 0.
Resource Usage Accounting
Verified against [k03-final-gate-v3.result.json] and [k03-final-gate-v3.launch.json]:
- Build Cache:
13,366,132,955bytes (budget:21,474,836,480bytes / 20 GiB) — Passed (62.2% of budget). - Data Storage:
4,267,811,035bytes (budget:4,294,967,296bytes / 4 GiB) — Passed (99.4% of budget). - Logs:
19,172,996bytes (budget:134,217,728bytes / 128 MiB) — Passed (14.3% of budget). - Host Free Space:
724,038,213,632bytes (> 50 GiB floor) — Passed. - VM Free Space:
688,110,047,232bytes (> 50 GiB floor) — Passed.
5. Constants, Buffers, and Limits Trace
- Keep Revision Pin:
- Pinned SHA:
3165890e9291cfb5fe10e81a9d7cd151f3e59464 - Verified across:
experiments/echo-keep/Cargo.toml:22,experiments/echo-keep/README.md:6,docs/architecture/echo-keep-physical-content-boundary.md:9, andscripts/tests/keep_deny_policy_test.py:19.
- Pinned SHA:
- Buffer and Staging Limits:
IdentityBindingread buffer:8192bytes ([0_u8; 8192]inexperiments/echo-keep/src/lib.rs:67). Documented at line 58.- Overlength probe:
remaining.saturating_add(1)inlib.rs:70. Verified inidentity_reader_stops_at_one_overlength_probe(stops after 1 byte past allowance). - Test harness adapter capacity:
1_048_576bytes (1 MiB) intests.rs:24. Matches Keep's largest golden fixture (1_048_576bytes) documented inREADME.md:10. - Layout Entry Limit: Bound to Keep's
PROTOCOL_MAXIMUM(1_048_576entries). Checked inreference_adapter.rs:50. Tested intests.rs:81-84withu32::MAX, correctly rejecting withContentError::ResourceLimit.
- CI Execution Timeout:
timeout-minutes: 10in.github/workflows/echo-keep-experimental.yml:14.
6. State Machines, Error Propagation, and Refusal Invariants
State Transitions Traced
- Interrupted Ingress Retries:
IdentityBinding::from_sourceretries onio::ErrorKind::Interrupted. Tested and proven intests.rs:131-145andtests.rs:186-210.
- Atomic Destination Promotion & Quarantine:
reconstruct_quarantinedwrites candidate bytes intoPrivateContentBuffer.- If an overlength write occurs,
PrivateContentBuffer::writeflagsidentity_failure = true, returningContentError::Mismatch. - If allocation limit is reached, it flags
resource_failure = true, returningContentError::ResourceLimit. - On error,
destination.promoteis bypassed; the destination visible buffer remains identical to its prior state.
- Repeated Publication Idempotence:
- When an object is re-published at the object-count limit,
reference_adapter.rs:110checks!self.bindings.contains_key(&target.hash) && self.bindings.len() >= self.object_count. Existing keys bypass the count limit. Lines 120–126 confirm identity equality before staging. Verified inreference_adapter/tests.rs:59-60.
- When an object is re-published at the object-count limit,
- Refusal without Silent Fallback:
- Missing Keep store state returns operational
ContentError::Backend(ReconstructionError::BlobMissing). - Unbound targets return
ContentError::CapabilityUnavailable. - No fallback to
MemoryTierorDiskTieroccurs under any condition.
- Missing Keep store state returns operational
7. Repository Standards & Pre-PR Gate Conformance
- SPDX Headers: Validated across all modified files; Apache-2.0 and UCAL headers match
scripts/ensure_spdx.shrules. - Git Rules: No amend commits, no rebases, no force pushes.
- Documentation Standards (
docs/DOCUMENTATION_STANDARDS.md):- Canonical ownership:
docs/architecture/echo-keep-physical-content-boundary.mdupdated at lines 6–12 and 122–132 to state the current accepted posture of the experimental adapter and explicit lack of production adoption. - Prose formatting: One physical line per paragraph maintained in newly introduced sections.
- CHANGELOG:
CHANGELOG.mdupdated under[Unreleased] -> Added. - Issue Scope: PR feat(keep): add an optional ReferenceStore content adapter #770 explicitly references closing Add an experimental Keep ReferenceStore adapter #761 only.
- Canonical ownership:
8. Execution State of Validation Checks
In accordance with review protocols requiring transparent accounting of validation execution:
- Inspected Only:
- All source files, Git commit tree, and PR metadata.
- Manifest [
k03-final-gate-v3.manifest.json] (all 979 file hashes compared via read-only local hash verification). - Retained execution logs:
k03-final-gate-v3.log,k03-final-gate-v2.log,k03-final-gate.log. - Retained launch and result files:
k03-final-gate-v3.launch.json,k03-final-gate-v3.result.json. - Live GitHub PR state and issue dependencies via
ghCLI. - Pinned Keep commit in
/Users/j/git/keepvia read-onlygit -C /Users/j/git/keep show.
- Executed Directly by Reviewer:
- None. No compiler builds, test suites, or Docker commands were run during this review (strict compliance with read-only review constraints).
- Skipped / Unavailable:
- Live process-death recovery tests, host Windows tests, and hardware power-loss verification (unavailable; explicitly excluded from PR claims).
9. Mandatory Verification Checklist
- Every code path traced (file:line to file:line):
- Constructor:
reference_adapter.rs:43-58$\rightarrow$ memory.rs:32-34 - Staging:
physical_content.rs:171-184$\rightarrow$ physical_content.rs:171-184 - Publication:
reference_adapter.rs:102-152$\rightarrow$ physical_content.rs:336-342 - Reconstruction:
reference_adapter.rs:64-95$\rightarrow$ physical_content.rs:316-329 - Quarantine:
physical_content.rs:234-257(shared across all adapters)
- Constructor:
- Every merge audited (SHA and integration invariants):
- Base commit:
bb20c57345374f476fa938789294a0890341eadd(PR feat(keep): verify the experimental Echo content identity bridge #768) - Ancestor commit:
2056c95fb891125cbfcc8405e438542e020b7f4c(PR feat(cas): verify complete objects before atomic output promotion #769) - Head commit:
de67e83b88b99af5f963bd9ce8276efdc27b903a(PR feat(keep): add an optional ReferenceStore content adapter #770) - Zero intermediate merge commits; all invariants from feat(keep): verify the experimental Echo content identity bridge #768 and feat(cas): verify complete objects before atomic output promotion #769 preserved intact.
- Base commit:
- Every constant and claim checked against evidence:
- Keep pin
3165890e9291cfb5fe10e81a9d7cd151f3e59464verified against Keep repository. - Read buffer
8192bytes and 1-byte overlength probe verified inlib.rs:58-70. - Maximum layout entries
1_048_576verified against Keep'sPROTOCOL_MAXIMUM. - Largest test fixture 1 MiB (
1_048_576bytes) verified intests.rs:26.
- Keep pin
- Every doc and evidence figure checked:
- Candidate tree: 979 files checked; 0 mismatches against
k03-final-gate-v3.manifest.json. - Test suites: 6 default, 12 feature, 36 root CAS tests verified in
k03-final-gate-v3.log. - MSRV policy: 25 package entries verified against
rust-msrv-policy.tsv. - Resource usage: Build 13.37 GB, Data 4.27 GB, Logs 19.17 MB verified against
k03-final-gate-v3.result.json.
- Candidate tree: 979 files checked; 0 mismatches against
- Explicit coverage gaps recorded:
- In-memory volatile only (process death drops bindings); no restart durability.
- Chunk corruption and missing chunk tests use Keep public methods, not private table mutation.
- No Windows, power-loss, or benchmark evidence claimed.
APPROVE
|
Current-head merge gate at Two review-language qualifications do not change code: private binding fields and All acceptance checks for #761 pass under the experimental, volatile ReferenceStore posture. Required protections remain in force; user authorization already covers the ordinary merge. |
|
Confirmed late review finding (P2): Acceptance: a real lost-store reconstruction must return an operational error while preserving prior visible bytes, with no Keep coordinate accessible through Display, Debug, downcast or the public source chain. Apply one shared adapter-owned opaque failure wrapper to identity, staging, publication and reconstruction. Retain original causes privately and leave Echo ingress/destination I/O errors unchanged. Obtain fresh current-head review and validation before merge. @codex |
|
Fixed P2 private coordinate/type exposure in
|
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Fresh Adversarial Review: Pull Request #770 (
|
| Operation / Behavior | Experimental Keep Path | Production Echo CAS Parallel Path | Parity & Invariant Verification |
|---|---|---|---|
| Backend Construction & Caps | reference_adapter.rs:45-60: KeepReferenceAdapter::new(physical_bytes, object_bytes, objects, layout_entries) |
memory.rs:32-34: MemoryTier::new() / DiskTier::open(path) |
Keep adapter requires explicit caps for physical payload, per-object size, object count, and layout entries. Validates LayoutEntryLimit::new before allocating. |
| Expected Ingestion Staging | physical_content.rs:171-184: StagedContent::read_expected |
physical_content.rs:171-184: StagedContent::read_expected |
Shared type: Preflights expected_length > byte_limit before reading source; reads into PrivateContentBuffer; seals BLAKE3 hash and length. |
| Content Publication | reference_adapter.rs:104-148: KeepReferenceAdapter::publish_content |
physical_content.rs:336-342 (MemoryTier) & 370-375 (DiskTier) |
Preflights object-size and object-count caps. Computes same-source IdentityBinding; verifies Echo identity and length. Checks duplicate binding equality. Stages and commits to Keep ReferenceStore. Validates commit receipt against target and layout ID before registering private binding. |
| Immutable View Borrow | reference_adapter.rs:100-103: KeepReferenceView<'a>(&'a KeepReferenceAdapter) |
physical_content.rs:333-335 (MemoryContentView) & 367-369 (DiskContentView) |
Borrows underlying store immutably (&self); lifetime bounded to store borrow. |
| Reconstruction & Quarantine | reference_adapter.rs:65-97: KeepReferenceView::reconstruct |
physical_content.rs:315-329 (MemoryContentView) & 346-363 (DiskContentView) |
All backends delegate to reconstruct_quarantined. Checks destination atomic promotion support and destination byte limit. Preflights binding. Calls Keep store reconstruct. Verifies Keep receipt target, layout ID, and byte count. Shared quarantine re-hashes BLAKE3 before promotion. |
| Missing Content Handling | reference_adapter.rs:72-76: Unbound target returns CapabilityUnavailable |
physical_content.rs:322-325 (MemoryTier) & 355-357 (DiskTier) |
Parity verified: Missing/unbound items refuse with ContentError::CapabilityUnavailable. Bound items whose Keep store lost state return operational ContentError::Backend(Box<BackendFailure>). |
| Receipt Posture | physical_content.rs:135-161: ContentReceipt |
physical_content.rs:135-161: ContentReceipt |
Exact parity: All receipts return establishes_durability() == false and establishes_complete_view() == false. |
4. Merge & Git History Audit
Commit Graph Verification
- Merge Base:
bb20c57345374f476fa938789294a0890341eadd(git merge-base bb20c573 a3725747confirmed). - PR Commits: Exactly 2 standard commits on top of base
bb20c573:de67e83b88b99af5f963bd9ce8276efdc27b903a:feat(keep): add an optional ReferenceStore content adaptera37257474c1759ae1b9971199300844f1e909d2d:fix(keep): hide upstream coordinates behind adapter-owned errors
- Merge Commits in PR Branch: 0. The branch is a clean linear chain.
Audit of Merged Ancestors & Integrated Invariants
- PR feat(keep): verify the experimental Echo content identity bridge #768 (
bb20c573, K01 - Issue Prove the Echo and Keep content identity bridge #759):- Merged
feat/keep-identity-bridgeintomain. - Introduced: Bounded dual-identity stream hashing (
IdentityBinding), private Keep coordinate redaction from Debug, isolated workspaceexperiments/echo-keeppinned to Keep3165890e9291cfb5fe10e81a9d7cd151f3e59464, and dependency boundary enforcement. - Preserved in PR feat(keep): add an optional ReferenceStore content adapter #770:
IdentityBindingis reused unmodified; Keep coordinates remain strictly private; Keep pin is unchanged.
- Merged
- PR feat(cas): verify complete objects before atomic output promotion #769 (
2056c95f, K02 - Issue Add the Echo physical-content port and existing CAS adapters #760):- Merged
feat/physical-content-portintomain. - Introduced: Complete-object physical-content port (
echo_cas::physical_content),StagedContent,reconstruct_quarantined, atomic destination promotion, and shared backend-neutral conformance suite (tests/common/physical_content.rs). - Preserved in PR feat(keep): add an optional ReferenceStore content adapter #770:
KeepReferenceAdapterimplementsPhysicalContentBackend;KeepReferenceViewimplementsPhysicalContentView;common::conformanceis run againstKeepReferenceAdapterinreference_adapter/tests.rs:30-34.
- Merged
5. Constants, Buffers, and Limits Evidence Trace
- Keep Revision Pin:
- Pinned SHA:
3165890e9291cfb5fe10e81a9d7cd151f3e59464 - Verified across:
experiments/echo-keep/Cargo.toml:26,experiments/echo-keep/README.md:6,docs/architecture/echo-keep-physical-content-boundary.md:9, and/Users/j/git/keeporigin/main.
- Pinned SHA:
- Buffer and Staging Limits:
IdentityBindingread buffer:8192bytes ([0_u8; 8192]inexperiments/echo-keep/src/lib.rs:67).- Overlength probe:
remaining.saturating_add(1)inlib.rs:70. Verified byidentity_reader_stops_at_one_overlength_probe. - Test harness adapter capacity:
1_048_576bytes (1 MiB) inreference_adapter/tests.rs:24. Matches Keep's largest golden fixture (1_048_576bytes). - Layout Entry Limit: Bounded to Keep's
PROTOCOL_MAXIMUM(1_048_576entries). Tested inreference_adapter/tests.rs:81-84withu32::MAX, correctly rejecting withContentError::ResourceLimit.
- CI Execution Timeout:
timeout-minutes: 10in.github/workflows/echo-keep-experimental.yml:14.
6. Numeric Claims vs. Raw Retained Evidence
Candidate Manifest Verification
- Manifest:
retained evidence: k03-private-error-green.manifest.json - Base/Head Recorded:
de67e83b88b99af5f963bd9ce8276efdc27b903awith dirty working tree matching the exact 5 files committed ina3725747. - File Count: Exactly 979 files.
- Candidate Tree Hash Verification: All 979 files in
the reviewed checkoutata3725747were independently hashed (SHA-256).- Missing files: 0
- Hash mismatches: 0
- Match rate: 100% (979 / 979)
Test Count Claims vs. Raw Logs (k03-private-error-green.log)
-
6 Default Tests (
echo-keep-experimental, default features):- Verified lines 6–14: all 6 passed (
complete_binding_budget_preflight_does_not_read_source,identity_reader_stops_at_one_overlength_probe,binding_debug_keeps_backend_coordinates_private,interrupted_short_source_retries_but_failed_source_returns_no_binding,substitution_and_length_mismatch_refuse,pinned_vectors_bind_distinct_laws_and_reconstructed_bytes).
- Verified lines 6–14: all 6 passed (
-
13 Feature-Enabled Tests (
echo-keep-experimental,--features reference-adapter):- Verified lines 26–41: exactly 13 passed (6 identity tests above + 7 adapter tests):
reference_adapter::tests::losing_the_store_or_recreating_the_adapter_refuses_without_a_receiptreference_adapter::tests::interrupted_ingress_retries_before_explicit_publicationreference_adapter::tests::real_keep_missing_chunks_and_malformed_layouts_stay_quarantinedreference_adapter::tests::private_coordinate_substitutions_never_promote_outputreference_adapter::tests::publication_limits_leave_existing_objects_readablereference_adapter::tests::upstream_error_types_and_coordinates_remain_privatereference_adapter::tests::keep_and_existing_memory_share_the_exact_contract
- Verified lines 26–41: exactly 13 passed (6 identity tests above + 7 adapter tests):
-
36 Root CAS Tests (
echo-cas, Rust 1.90.0):- Verified lines 54–110:
-
src/lib.rs(memory tier): 17 passed -
tests/disk_tier.rs: 4 passed -
tests/physical_content.rs: 5 passed -
tests/semantic_retention.rs: 10 passed - Total:
$17 + 4 + 5 + 10 = \mathbf{36}$ passed.
-
- Verified lines 54–110:
-
25 Package MSRVs:
- Verified line 126 and matched against
scripts/rust-msrv-policy.tsv(exactly 25 entries).
- Verified line 126 and matched against
Resource Budget & Free Space Accounting
Verified against k03-private-error-green.result.json and k03-private-error-green.launch.json:
- Build Cache:
13,367,787,664bytes (budget:21,474,836,480bytes / 20 GiB) — Passed (62.2% of budget). - Data Storage:
4,269,428,880bytes (budget:4,294,967,296bytes / 4 GiB) — Passed (99.4% of budget). - Logs:
19,263,177bytes (budget:134,217,728bytes / 128 MiB) — Passed (14.4% of budget). - Host Free Space:
722,641,600,512bytes (~673.0 GiB > 50 GiB floor) — Passed. - VM Free Space:
686,833,393,664bytes (~639.7 GiB > 50 GiB floor) — Passed.
Hosted CI Rollup
- Live GitHub checks for PR 770 at
a3725747:- Total checks: 43 successful, 0 failing, 0 pending, 0 cancelled, 0 skipped.
mergeStateStatus:CLEAN;mergeable:MERGEABLE.
7. State Machines, Error Propagation, and Refusal Invariants
- Interrupted Ingress Retries:
IdentityBinding::from_sourceretries onio::ErrorKind::Interruptedwithout consuming extra quota. Proven intests::interrupted_short_source_retries_but_failed_source_returns_no_bindingandreference_adapter::tests::interrupted_ingress_retries_before_explicit_publication.
- Atomic Destination Promotion & Quarantine:
reconstruct_quarantinedwrites candidate bytes intoPrivateContentBuffer.- On overlength write,
PrivateContentBuffer::writeflagsidentity_failure = true, returningContentError::Mismatch. - On allocation failure, it flags
resource_failure = true, returningContentError::ResourceLimit. - On any error,
destination.promoteis bypassed; the destination visible buffer remains identical to its prior state.
- Repeated Publication Idempotence:
- When an object is re-published at the object-count limit,
reference_adapter.rs:112checks!self.bindings.contains_key(&target.hash) && self.bindings.len() >= self.object_count. Existing keys bypass the count limit. Identity equality is confirmed before staging. Verified inreference_adapter/tests.rs:59-60.
- When an object is re-published at the object-count limit,
- Refusal without Silent Fallback:
- Missing Keep store state returns operational
ContentError::Backend(Box<BackendFailure>). - Unbound targets return
ContentError::CapabilityUnavailable. - No fallback to
MemoryTierorDiskTieroccurs under any condition.
- Missing Keep store state returns operational
8. Repository Standards & Pre-PR Gate Conformance
- SPDX Headers: Validated on all modified files (
Apache-2.0/Apache-2.0 OR LicenseRef-MIND-UCAL-1.0). - Git Rules: Zero amend commits, zero rebases, zero force pushes.
- Documentation Standards (
docs/DOCUMENTATION_STANDARDS.md):- Canonical ownership:
docs/architecture/echo-keep-physical-content-boundary.mdupdated at lines 9, 125–130 to reflect the experimental adapter, private error posture, and lack of production adoption. - Prose formatting: One physical line per paragraph strictly maintained.
- CHANGELOG:
CHANGELOG.mdupdated under[Unreleased] -> Added. - Issue Scope: PR feat(keep): add an optional ReferenceStore content adapter #770 explicitly references closing Add an experimental Keep ReferenceStore adapter #761 only.
- Canonical ownership:
9. Execution State of Validation Checks
- Inspected Only:
- Source code, Git objects, and PR metadata at
a3725747. - Manifest
k03-private-error-green.manifest.json(all 979 files verified via SHA-256). - Retained execution logs:
k03-private-error-green.log,k03-private-error-red.log,k03-final-gate-v3.log. - Retained launch and result files:
k03-private-error-green.launch.json,k03-private-error-green.result.json. - Live GitHub PR state, checks rollup, and review threads via
ghCLI. - Pinned Keep commit in
/Users/j/git/keepvia read-onlygit -C /Users/j/git/keep show origin/main:<path>.
- Source code, Git objects, and PR metadata at
- Executed Directly by Reviewer:
- None. In accordance with read-only review rules, no host compiler builds, test suites, or Docker containers were run.
- Skipped / Unavailable:
- Live process-death recovery tests, host Windows tests, and hardware power-loss verification (unavailable; explicitly excluded from PR claims).
10. Mandatory Verification Checklist
- Every code path traced (file:line to file:line):
- Constructor:
reference_adapter.rs:45-60$\rightarrow$ memory.rs:32-34 - Staging:
physical_content.rs:171-184$\rightarrow$ physical_content.rs:171-184 - Publication:
reference_adapter.rs:104-148$\rightarrow$ physical_content.rs:336-342 - Reconstruction:
reference_adapter.rs:65-97$\rightarrow$ physical_content.rs:315-329 - Quarantine:
physical_content.rs:234-257(shared across all backends) - Backend Failure Wrapper:
reference_adapter.rs:172-197
- Constructor:
- Every merge audited (SHA and integration invariants):
- Base commit:
bb20c57345374f476fa938789294a0890341eadd(PR feat(keep): verify the experimental Echo content identity bridge #768) - Ancestor commit:
2056c95fb891125cbfcc8405e438542e020b7f4c(PR feat(cas): verify complete objects before atomic output promotion #769) - Head commit:
a37257474c1759ae1b9971199300844f1e909d2d(PR feat(keep): add an optional ReferenceStore content adapter #770) - Zero intermediate merge commits; all invariants from feat(keep): verify the experimental Echo content identity bridge #768 and feat(cas): verify complete objects before atomic output promotion #769 preserved intact.
- Base commit:
- Every constant and claim checked against evidence:
- Keep pin
3165890e9291cfb5fe10e81a9d7cd151f3e59464verified against Keep repository. - Read buffer
8192bytes and 1-byte overlength probe verified inlib.rs:67-70. - Maximum layout entries
1_048_576verified against Keep'sPROTOCOL_MAXIMUM. - Largest test fixture 1 MiB (
1_048_576bytes) verified inreference_adapter/tests.rs:24.
- Keep pin
- Every doc and evidence figure checked:
- Candidate tree: 979 files checked; 0 mismatches against
k03-private-error-green.manifest.json. - Test suites: 6 default, 13 feature, 36 root CAS tests verified in
k03-private-error-green.log. - MSRV policy: 25 package entries verified against
rust-msrv-policy.tsv. - Resource usage: Build 13.37 GB, Data 4.27 GB, Logs 19.26 MB verified against
k03-private-error-green.result.json.
- Candidate tree: 979 files checked; 0 mismatches against
- Explicit coverage gaps recorded:
- In-memory volatile only (process death drops bindings); no restart durability.
- Chunk corruption and missing chunk tests use Keep public methods, not private table mutation.
- No Windows, power-loss, or benchmark evidence claimed.
APPROVE
|
Final Code Lawyer gate at The new independent agy review says APPROVE with a complete checklist for this exact head. I read the entire report; no actionable findings remain. The earlier approval is historical and superseded. Read-only reviewer inspection is separate from the author's executed Docker evidence. Hosted checks are green and the single addressed thread is resolved. Volatile ReferenceStore support, default-off integration, no fallback and no durability/production-adoption claim remain the acceptance boundary. User-authorized ordinary merge is eligible subject to the final live gate check. |
Adds a disabled-by-default Keep ReferenceStore backend through Echo's complete-object physical-content port. Publication verifies both independent identities on sealed bytes and validates the Keep commit receipt; reconstruction checks private bindings and the Keep receipt before independently sealing Echo bytes and atomically promoting the destination.
Backend errors retain their concrete upstream causes privately behind adapter-owned sanitized formatting and source/downcast boundaries. Echo ingress and destination I/O behavior stays compatible.
The isolated Rust 1.96 package preserves the root Rust 1.90 CAS graph and all existing consumers. Explicit physical-payload, object-size, object-count and layout-entry limits bound supported work. The adapter and bindings are volatile; receipts establish no restart durability, authenticated absence, retention or durable generation. There is no implicit fallback or production cutover.
Closes #761. Prerequisites #759 and #760 are merged in #768 and #769.
Validation: guarded Docker, six default identity tests, 13 feature-enabled tests, 36 existing CAS tests, strict all-feature/all-target Clippy, formatting, dependency graph, inherited policy, audit-lockfile mocks, MSRV and SPDX checks passed. The same backend-neutral conformance source is used by Keep, MemoryTier and DiskTier. Actual upstream missing-chunk and malformed-layout refusals use public Keep APIs through the same quarantine helper; they do not inject private upstream chunk corruption. No physical power-loss or study timing evidence is claimed.
Documentation accuracy gate: the canonical physical-content boundary, experimental README/package posture and changelog now describe the implemented optional adapter and its volatile limits. Relevant README/GUIDE/docs entrances were checked; no production-adoption claim was introduced.
Current-head Code Lawyer and independent agy review plus hosted checks are required before merge. Local retained evidence:
k03-private-error-greensource manifest, launch contract, raw log and result. Earlier attempts recorded a formatter boundary failure and shell syntax failure; neither is counted as a RED behavior witness.Late P2 finding:
k03-private-error-redselected one lost-store test and failed on the parent downcast exposure. The current regression and all surrounding gates pass after a372574. The first agy approval is superseded; a fresh current-head review is required.