Skip to content

feat(ci): PARTIAL P7-CACHE-21: node cache restore over carrier A only - #493

Open
acamarata wants to merge 2 commits into
mainfrom
crunch-hand/p7-cache-21
Open

acamarata wants to merge 2 commits into
mainfrom
crunch-hand/p7-cache-21

Conversation

@acamarata

@acamarata acamarata commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

PARTIAL: carrier A (ssh) done; carrier B (agent pull) NOT done because internal/coordinator/agentapi is outside write_scope. Ticket P7-CACHE-21 stays open.

P7-CACHE-21, hand-finished after the automated worker escalated.

Delivered (carrier A, ssh stdio):

  • Coordinator pushes the lease's planned restore blobs (digest, chunk{stream: cache}); node answers offset. Held copy = no chunk frames; corrupt copy is discarded and fetched again; a flipped byte fails the re-hash, node resets to 0, blob is sent again (bounded).
  • Session routes inbound digest/chunk to a per-lease feed (only for leases with restore blobs on a carrier that delivers them); cmd/agent cacheBefore fills the read-through copies before the job; a failed fetch is a cold miss that binds nothing.
  • Restore gate: digest outside the plan, stale epoch, attempt no longer leased/running, or cancelled request is refused with a cache.remote.refused audit row. Completed entries are written to cache_locality.

NOT delivered: carrier B (agent pull). internal/coordinator/agentapi rejects upstream offset frames and has no way to push digest/chunk on the control stream; both edits are outside write_scope. The node session offers no feed on carrier B, so it degrades to a cold miss with no wait. TestRemoteCacheRestoreAgent pins that degrade path only; it does not prove restore on B. Needs a follow-up with agentapi in scope.

Verify: remote/session/transport race tests pass; the three TestRemoteCacheRestore* integration tests pass via go-test-ran.py; architecture, TestCodeRegistry, parity-with-core (47 cases) pass; no forbidden addresses in the diff. internal/run had one load-flaky failure (TestStatusNotPostedForPartialCancelledOrOutsideConfig) that passes alone. Reviews (adversarial, security) not run.

…7-CACHE-21)

Coordinator pushes the lease's planned restore blobs as digest and chunk
frames; the node session routes them to the cache Before hook, which
answers offset, re-hashes and publishes a read-through copy. Held copies
cost no chunk frames, a corrupt copy or a flipped byte is discarded and
sent again, a failed fetch degrades to a cold miss. Refusals are audited.
Carrier B (agent pull) is not covered: agentapi cannot yet carry the
frames and is outside this ticket's write scope.
@acamarata acamarata changed the title feat(ci): restore a node cache from the coordinator over carrier A (P7-CACHE-21) feat(ci): PARTIAL P7-CACHE-21: node cache restore over carrier A only Oct 26, 2026

This branch has not been deployed

No deployments
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