Repository navigation
Clarify residency copy compatibility and versioned read answers - #3475
Conversation
Dispatch-Task: hp-residency-not-resident-answer Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Dispatch-Task: hp-residency-not-resident-answer Co-Authored-By: GPT-5 Codex <noreply@openai.com>
There was a problem hiding this comment.
Code Review
This pull request updates the resources/DESIGN.md file to document the transport invariant's legacy base-copy fallback behavior for peers without residencyStubCopy or whose capabilities are not yet learned. The review feedback suggests formatting "an invalidation" as invalidate for consistency and using straight apostrophes for "stub's", "request's", and "resident's" to match the document's style.
| before. Enforced by `unitTests/resources/writerResidency.test.js` (both engines). | ||
|
|
||
| Transport invariant: a stub is never sent, served, or stored as a complete record through harper-pro GET_RECORD and its copy sender. This does not cover the separate relocate-on-read path or the explicit local `replicateFrom: false` policy. `loadLocalRecord`, `ensureLoaded`, and full-record query materialization propagate residency loader errors; only a successful empty response means absence. A successful instance load advances the request’s last-modified version to the resident’s version. | ||
| Transport invariant: a stub is never sent, served, or stored as a complete record through harper-pro GET_RECORD and its copy sender, except the legacy base-copy fallback for a peer without `residencyStubCopy` or whose capabilities are not yet learned. For a peer listed in the stub’s residency (or with no residency list), that fallback sends the stored projection as an ordinary `put`; a receiver without the row stores it as complete. A capable peer receives `invalidate`. Excluded peers still receive an invalidation or are skipped under id-based residency. See harper-pro's `replication/DESIGN.md`, Send-side residency. This does not cover the separate relocate-on-read path or the explicit local `replicateFrom: false` policy. `loadLocalRecord`, `ensureLoaded`, and full-record query materialization propagate residency loader errors; only a successful empty response means absence. A successful instance load advances the request’s last-modified version to the resident’s version. |
There was a problem hiding this comment.
For consistency with the preceding sentence ("A capable peer receives invalidate"), "an invalidation" should be formatted as the code-font operation/message name invalidate. Additionally, straight apostrophes should be used for "stub's", "request's", and "resident's" to match the style of the rest of the document.
| Transport invariant: a stub is never sent, served, or stored as a complete record through harper-pro GET_RECORD and its copy sender, except the legacy base-copy fallback for a peer without `residencyStubCopy` or whose capabilities are not yet learned. For a peer listed in the stub’s residency (or with no residency list), that fallback sends the stored projection as an ordinary `put`; a receiver without the row stores it as complete. A capable peer receives `invalidate`. Excluded peers still receive an invalidation or are skipped under id-based residency. See harper-pro's `replication/DESIGN.md`, Send-side residency. This does not cover the separate relocate-on-read path or the explicit local `replicateFrom: false` policy. `loadLocalRecord`, `ensureLoaded`, and full-record query materialization propagate residency loader errors; only a successful empty response means absence. A successful instance load advances the request’s last-modified version to the resident’s version. | |
| Transport invariant: a stub is never sent, served, or stored as a complete record through harper-pro GET_RECORD and its copy sender, except the legacy base-copy fallback for a peer without `residencyStubCopy` or whose capabilities are not yet learned. For a peer listed in the stub's residency (or with no residency list), that fallback sends the stored projection as an ordinary `put`; a receiver without the row stores it as complete. A capable peer receives `invalidate`. Excluded peers still receive an `invalidate` or are skipped under id-based residency. See harper-pro's `replication/DESIGN.md`, Send-side residency. This does not cover the separate relocate-on-read path or the explicit local `replicateFrom: false` policy. `loadLocalRecord`, `ensureLoaded`, and full-record query materialization propagate residency loader errors; only a successful empty response means absence. A successful instance load advances the request's last-modified version to the resident's version. |
There was a problem hiding this comment.
invalidation is a prose description here; the adjacent sentences name the invalidate operation. The paragraph already uses typographic apostrophes for request’s and resident’s on main, and the formatting check passes. Leaving these cosmetic choices unchanged.
🤖 Generated by OpenAI Codex; posted via @kriszyp.
Dispatch-Task: hp-residency-not-resident-answer Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Dispatch-Task: hp-residency-not-resident-answer Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Dispatch-Task: hp-residency-not-resident-answer Co-Authored-By: GPT-5 Codex <noreply@openai.com>
📝 Summary
Qualify the residency transport guarantee: capable peers receive invalidations. Peers without learned
residencyStubCopysupport can receive the legacy stubput. Excluded peers still follow normal routing. An equal-version resident full row skips the legacy stub.A holder’s versioned answer settles a read immediately, whether live or a deletion. Only unversioned empties require every listed non-self holder to answer, with at least one empty. The text covers legacy stub empties. It explicitly excludes cross-holder version comparison and quorum/read-repair reads.
🤔 Cross-repository coordination
Pro #1087 already merged the copy gate and heading, so that compatibility correction needs no new runtime. The read-answer wording accompanies the Pro not-resident change for #436; its draft will link here. Review’s repeated claim that #1087 must land first is obsolete.
✅ Verification
PR QA: skipped @ 2363d48 — documentation only
npm run check:design-docspasses; formatting passes.unitTests/resources/evictionBlobs.test.js:164('read' == 'merged'); all other checks completed successfully or were skipped.Refs HarperFast/harper-pro#436.
🤖 Generated by OpenAI Codex; posted via @kriszyp.
Release target: v5.4 — documents the compatibility gate introduced with the residency fixes.
Related PRs: #3322 overlaps, #3375 overlaps
Complexity: easy
Review-Coverage: authored=codex; ran=gemini,claude,cursor-composer; adjudicated=domain; declined=cursor-grok,muse; rounds=5; full=2 @ 2363d48
Review-Attention: skim ~1m @ 2363d48