feat(harness): persist delegation ownership [Agent Map 12/15] - #831
Conversation
Review — PR #831 (round 1)No confidentiality issues: the changeset, JSDoc, comments and test fixtures are provider-neutral and name no company, customer, tracker or host. Three findings below. 1.
|
6766473 to
662edab
Compare
92b36da to
e2471dc
Compare
Review — PR #831 (round 2, follow-up)Delta since Resolved: round-1 #2 (changeset now 1. Round-1 #1 fixed only on the exit edge — the entry edge still corrupts (correctness)
Nit
Verdict: request changes — one half of round-1 #1 remains, same failure mode, opposite direction. |
662edab to
74884b1
Compare
e2471dc to
58fb5cf
Compare
Primary change type
Problem and motivation
Concurrent delegation and retries need one durable reservation and ownership record, including defined capacity, replay, release, and recovery behavior.
Summary and scope
Add the delegation request codec and atomic state machine for bindings, reserved session IDs, fenced claims, context/delivery epochs, bounded history, and dormant release.
Keep unfinished private cleanup proof after receipt expiration until the exact child is closed. Clear completed spawn claims and use locale-independent release-key ordering for stable durable replay.
How this increment fits
The complete delegation store is independently testable. Private child lifecycle arrives in part 13 and public delegation activates in part 14.
Stack and review boundary
58fb5cfe70f892f1301b6e4c222311b12b333bcc; 4,354 changed lines across 7 files, counting additions and deletions including tests.fix/studio-onboarding-followups.Related work
Agent Map checkpoint SAP-3147; relevant work SAP-3151. This packaging follows the maintainer-approved 15-PR split.
Validation
Root checks ran against
e2471dcb2d0075328a60926750459275e8bd6312. The final head changes only README terminology or commit ancestry; a complete tracked-file comparison confirms identical executable source and build inputs. The terminology gate was rerun on58fb5cfe70f892f1301b6e4c222311b12b333bcc.Tests and documentation
Regression coverage: Reservations, capacity, fenced claims, lifecycle transitions, replay, stable release digests, retained cleanup proof, expiration, and compaction.
See part 15 for integrated browser, native CLI, and Mac journey validation. The checks above were run independently on this PR’s own commit.
Linux tests run with ordinary user filesystem permissions; the sandbox's extra ambient capabilities are dropped. Hosted CI and automated review are separate from these recorded local results.
Compatibility and release impact
.changeset/durable-delegation-state.mdSecurity
AI assistance
Checklist