Skip to content

Clarify residency copy compatibility and versioned read answers - #3475

Merged
kriszyp merged 5 commits into
mainfrom
docs/residency-copy-capability
Oct 23, 2026
Merged

kriszyp merged 5 commits into
mainfrom
docs/residency-copy-capability

Conversation

@kriszyp

@kriszyp kriszyp commented Oct 23, 2026 •

Copy link
Copy Markdown
Member
An engineer documents different stub delivery for older and capable peers

📝 Summary

Qualify the residency transport guarantee: capable peers receive invalidations. Peers without learned residencyStubCopy support can receive the legacy stub put. 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-docs passes; formatting passes.
  • Documentation only; no runtime behavior changes or end-to-end route.
  • Prior-head CI: Linux unit jobs on Node 22/24/26 fail on both this PR and current main. The Node 24 logs match at 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

kriszyp and others added 2 commits October 23, 2026 05:56
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>
@kriszyp kriszyp added this to the v5.4 milestone Oct 23, 2026

@gemini-code-assist gemini-code-assist 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.

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.

Comment thread resources/DESIGN.md Outdated
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.

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.

medium

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.

Suggested change
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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

kriszyp and others added 3 commits October 23, 2026 08:49
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>
@kriszyp kriszyp changed the title Document the legacy-peer exception to residency stub copy guarantees Clarify residency copy compatibility and versioned read answers Oct 23, 2026
@kriszyp
kriszyp marked this pull request as ready for review October 23, 2026 16:03
@kriszyp
kriszyp merged commit 26dbc36 into main Oct 23, 2026
47 of 50 checks passed
@kriszyp
kriszyp deleted the docs/residency-copy-capability branch October 23, 2026 16:03
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