Repository navigation
feat(state): prepare incognito ACP ownership (P6, inactive) - #164727
Conversation
Preserve shared ACP metadata persistence and sequencing while preparing actor entry commands, transaction-local controller guards, board snapshots, and shared idle-pin lifetime. Keep production host-owned until P7 and document the remaining synchronous SDK and caller cutover requirements. Validation: 44 tests passed with one platform skip on isolated Linux; four pre-fix negative controls reproduced missing pins, grant reentrancy, and revoked-policy persistence. Changed-file checks, database-worker ratchet, zero-cycle checks, and Codex review through P2 passed. T1 remains 915; no new environment names.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 4, 2026, 3:09 AM ET / 07:09 UTC (Revision 9). ClawSweeper reviewWhat this changesPrepare private-session workers to coordinate external coding-agent metadata, controller authorization, Board approval snapshots, and database lifetime without activating production routing. Merge readiness✅ Ready for maintainer review This PR remains useful: current main lacks the prepared ACP composition, and the related Doctor migration does not replace it. The earlier canonical-storage finding is resolved; no actionable correctness or security findings remain. Priority: P2 Review scores
Verification
How this fits togetherIncognito sessions keep conversation entries in volatile agent storage, while ACP metadata for external coding agents belongs to shared state. This preparation coordinates those owners and carries current authorization through asynchronous reads and writes. flowchart TD
A[Private session request] --> B[Retained session worker]
B --> C[Current session and authorization facts]
C --> D[Canonical entry mutation]
D --> E[Shared ACP metadata worker]
E --> F[Confirmed publication]
C --> G[Controller and Board assessment]
G --> H[Currentness check after waits]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +473, Tests +526, Docs +66, Other +6. Total +1071 across 20 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain this staged composition and complete the documented caller and synchronous-contract cutover before activating worker-owned incognito routing. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR prepares an inactive internal capability rather than reporting a current user-facing defect; its worker-boundary failure scenarios are explicitly covered. Is this the best way to solve the issue? Yes: composing the existing entry and shared metadata owners preserves sequencing and avoids a competing persistence implementation or premature activation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5f656752e404. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Merge current main to consume the Doctor-owned ACP migration contract. Keep P6 inactive, remove retired runtime legacy-key and cleanup calls, consolidate ACP composition in its existing mutation owner, and complete the compiled wrapper dependency inventory. Preserve entry-before-metadata ordering and update the focused sequence proof.
Merge main to include its suppression-inventory fix. Expose ACP operations through the inactive actor borrow, retaining the full lazy-load and operation promise before any await. Extend the nested-grant regression to both ACP methods; the unguarded binding fails this control. Document intentional model-mock isolation without expanding its baseline. Production incognito routing remains native until P7.
Merge main CI ratchet fixes and move shared ACP input/result shapes into a leaf contract. Remove static implementation-type cycles while preserving lazy runtime loading inside actor custody. Production incognito routing remains inactive and released Plugin SDK call signatures remain compatible.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…#164727) Preserve shared ACP metadata persistence and sequencing while preparing actor entry commands, transaction-local controller guards, board snapshots, and shared idle-pin lifetime. Keep production host-owned until P7 and document the remaining synchronous SDK and caller cutover requirements. Validation: 44 tests passed with one platform skip on isolated Linux; four pre-fix negative controls reproduced missing pins, grant reentrancy, and revoked-policy persistence. Changed-file checks, database-worker ratchet, zero-cycle checks, and Codex review through P2 passed. T1 remains 915; no new environment names.
What Problem This Solves
The staged incognito worker needs ACP metadata composition and shared authorization/lifetime checks before the complete runtime cutover can proceed.
User Impact
There is no user-visible activation in this PR. P6 remains inactive, and production incognito routing stays host-owned until P7. Shared ACP metadata persistence and retention remain unchanged. This adds no schema, durability, retention, configuration, environment variable, worker service, or update behavior change.
Why This Change Was Made
ACP reuses the existing entry kernel and shared metadata worker. The actor borrow exposes lazy ACP operations and retains the promise covering the entire import and operation before yielding, so close joins accepted work and grant callbacks cannot reenter the actor. Canonical entry changes commit before shared metadata publication; Doctor owns legacy-key repair. Compact actor receipts own publication.
Controller grants consume typed transaction-local facts. Board assessments retain an entry and revision fence across policy/reviewer waits. The existing shared-state idle pin remains held through actor loss, accepted work, and failed cleanup until native settlement. Nested grants preserve their outer fence. A shared leaf contract keeps actor and ACP types independent of their implementation modules.
Released SDK audit: the official
v2026.9.8→04d9659a44c4b4349157bf8fbf917919c45b8fd1comparison ischecked, with acknowledgement digest99450184(full digest994501847d622d2ebdff6d0f9e23a71112cb45ce5b781b03ce1089715ef74ab6). It records the full development-line SDK changes: 1 entrypoint added, 8 removed, and 2,316 affected exports. These totals include earlier changes on main. This PR’s changed actor, worker, and lifecycle callables are internal. The released ACP readers, manager facade, and runtime session-creation signatures remain compatible with v2026.9.8; no new compatibility/deprecation record is needed. Only tests invoke the prepared actor ACP/controller/Board routes. The worker-access reference records the remaining P7 cutover and deprecated synchronous contracts. Complete awaited SessionManager and BoardStore routing remains an activation prerequisite.Grant audit: the touched ACP currentness chain uses retained identity/admission witnesses; controller fallback reads committed in-memory sharing/publication state. No retained other-owner host-SQL exception was identified in these touched grants. Native incognito control joins remain part of the documented P7 audit.
Related work: #162920 is incorporated, and this PR follows its Doctor-owned canonical ACP design. #160851 overlaps the test routing inventory; its independent changes are preserved.
Evidence
Candidate
04d9659a44c4b4349157bf8fbf917919c45b8fd1incorporates main’s preview and native formatter repairs. Both integrations preserve the reviewed P6 patch exactly. The final released-SDK report is complete, and exact-head CI attempt 1 passed with no failed or cancelled jobs. ClawSweeper completed its review of this head with no code or security findings; its remaining SDK-report prerequisite is fulfilled by the recorded comparison above.6663bac175fcba157a8064646b0e2ef2add7396e: production and test types, formatting, ratchets, all unused-export scans, core/script lint, database ownership, and the remaining guards. Runtime value cycles and static Madge cycles are both 0; the compiled-wrapper inventory passes. The P6 production modules and test cases are byte-identical after integration; wrapper and test-routing inventories preserve main’s additions. Codex autoreview is scoped-clean through P2; its complete P6 patch remains identical after integration.4b3a0b58completed with only the UI test type error and its aggregate gate failing. The identicalmcp-app-bridge.cursor.test.ts:13TS2559 is independently recorded on scheduled main CI, in untouched UI files. Main subsequently fixed that fixture in42b9aee33a7b03, and final-head CI passes the test-type gate. Skipped jobs are not claimed as passing coverage.Original-head proof and test-cost context
The original f1cfb3c candidate had 44 passing cases and one platform skip on isolated Linux AWS Crabbox (154.65s command wall; 110.67s suite wall). Its four negative controls reproduced missing lifetime pins, nested-grant fencing, and revoked-policy persistence. These results are historical, not final-head proof.
Original single-file timings with
pnpm test <file> --maxWorkers=1: actor owner 308.56s; actor sessions/controller/Board 164.96s; ACP actor 408.80s. Cold compiled-worker preparation dominated the loaded-host runs. These cases require real worker/SQLite ownership, native settlement and loss; mocks cannot establish those boundaries. Current CI timings and final isolated results will be recorded before landing.