Repository navigation
refactor(sessions): wire incognito history and Memory paths to the actor (P7j, inactive) - #165548
Conversation
Retain the original actor through deferred reconciliation, usage reports and parent forks. Keep production routing host-owned for the atomic activation follow-up, with no schema, retention or durability change.
Integrate main without rebasing. Retain the actor across reconciliation while refreshing pending inventory and framing sources for each resumed planning pass. A real-worker regression reproduces the stale projection after a rewrite between finalization and the yield acknowledgement. Keep the existing scheduler policy and consolidate repeated test observers without reducing coverage.
Preserve both inactive actor compositions and the existing P7f1 documentation anchor. The introduced production delta is unchanged from the reviewed scheduler-yield repair; shared actor, pending-input, side-data, and import checks pass.
Retain actor ownership through history and Memory consumption, validation, and cleanup. Keep production routing host-owned for atomic P7 activation. Integrate the P7f2 reconciliation dependency and preserve per-session read fences and destination fork authority.
Resolve the wrapper inventory and extracted session-facts contract against P7f2. Retain both actors paths and remove the inherited stale line-cap exception.
Apply the type-only extraction from main commit 439cde7. Keep watcher behavior and state ownership unchanged.
Move the unchanged deletion selection and settlement capture out of the actor transport. Keep the actor within its line cap after prerequisite integration without changing authorization or callback order.
|
🦞👀 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: blocked before merge. Reviewed October 5, 2026, 9:09 AM ET / 13:09 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch connects incognito session history and Memory readers to their captured worker actor, preserving authorization and ownership through asynchronous consumption while leaving ordinary production routing unchanged. Merge readiness⛔ Blocked before merge - 2 items remain This remains useful inactive wiring absent from current main. No introduced correctness or security defect was found, and the previous migration blocker is unsupported by the diff. Priority: P2 Review scores
Verification
How this fits togetherIncognito sessions keep transcripts in a process-local database owned by a worker actor. History and Memory readers consume those transcripts to produce chat pages, previews, search results, and indexing inputs. flowchart TD
A[History and Memory requests] --> B[Captured session and actor]
B --> C[Current authority checks]
C --> D[Worker transcript reads]
D --> E[History and Memory projection]
E --> F[Snapshot and authority revalidation]
F --> G[Authorized results]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +915, Tests +835, Docs +32, Other +2. Total +1784 across 44 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep this composition inactive until the separate atomic cutover, preserving released SDK signatures and current authority checks throughout acquisition, consumption, and cleanup. Do we have a high-confidence way to reproduce the issue? Not applicable: this is inactive ownership wiring rather than a reported current-main failure; inspected boundary regressions cover the changed contracts, but no tests were executed during review. Is this the best way to solve the issue? Yes: explicit actor sources reuse existing worker kernels and shared admission owners while typed facades preserve the released plugin contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d9335e959f48. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Keep the released Memory SDK reader arguments and synchronous observer contract while host internals accept inactive actor sources. Record the supported compatibility boundary and add exact signature type coverage. Merge main without rebasing to incorporate canonical unused-export and source-ratchet repairs. P2 review is clean. Production types pass; focused runtime and remaining type checks continue. The inherited main Madge cycle and agent.wait expectation failure remain independently attributed.
Merge main without rebasing and retain the shared incognito binding, admission and context-reader owners from P7h1. Preserve Memory observer and corpus behavior, migrate the removed binding helper's callers, and remove duplicate authorization logic and obsolete wrapper inventory. Main also supplies the agent.wait normalized-result fixture repair. P2 review is clean and production types and Gateway boundary checks pass.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…tor (P7j, inactive) (openclaw#165548) * refactor(sessions): compose incognito history and manager reads * refactor(sessions): compose inactive incognito compute and fork paths Retain the original actor through deferred reconciliation, usage reports and parent forks. Keep production routing host-owned for the atomic activation follow-up, with no schema, retention or durability change. * test(sessions): scope incognito compute fixture actors * refactor(sessions): keep compute claims with their scope * fix(skills): reuse watcher type leaf to clear inherited cycle Apply the type-only extraction from main commit e79415d. Keep watcher behavior and state ownership unchanged. * refactor(sessions): keep lifecycle settlement with its contract Move the unchanged deletion selection and settlement capture out of the actor transport. Keep the actor within its line cap after prerequisite integration without changing authorization or callback order.
What Problem This Solves
The inactive incognito actor needs to serve the remaining history and Memory acquisition paths before the atomic activation can switch production routing without losing the original database owner or current permission checks.
User Impact
P7j remains inactive: ordinary production routing is unchanged. There is no schema, stored-format, retention, durability, expiry, configuration, environment-name, or update change. Native routes remain until the separately reviewed atomic cutover.
Why This Change Was Made
Wire explicit actor sources through history RPC/HTTP/SSE, preview, branch, search, and Memory facades. Reuse existing worker kernels, retain the actor through asynchronous consumers and cleanup, and revalidate snapshots and current authority before disclosure. Memory observers receive original messages; ordinary indexing retains its reduced projection. Corpus grants authorize every selected session.
Session read revisions advance only for sessions named by committed writes, preserving sibling pagination. Equal-key cross-actor forks select permission checks by physical database owner. Search retains the deferred store-wide reconciliation owner from #165217.
Integration with landed #165525 preserves its shared actor binding, admission, and generic context-reader owners. Retired binding callers are migrated, duplicate authorization logic is removed, and the compiled-wrapper inventory follows the surviving runtime imports. Related overlap includes #165151 and incidental #162433; no other PR branch was modified.
The released SDK check against
v2026.9.8found three reachable readers inopenclaw/plugin-sdk/memory-core-host-engine-sessions:buildSessionEntry,listSessionTranscriptCorpusEntriesForAgent, andreadSessionResetRecallCutoff. Typed SDK facades retain their exact released argument lists, Promise results, and synchronous observer contract while host-only actor sources remain internal. The activememory-session-released-signaturescompatibility record, documentation, and type test preserve this supported boundary without deprecation warnings.Evidence
Current reviewed candidate:
916e6b82014c10c1276d76c941ef5a9741b67627, incorporating main223f6e441ecb9bb80bbd80d885997a8ecc7270dbwith merge commits, without rebasing.--maxWorkers=1; 1395.33s wall, including compiled-worker preparation. Covers history/Memory/lifecycle/pending-history actors, both P7f1 model-context regressions, SessionManager binding/close ownership, Codex SDK/history adapters, runtime build graph, history/get-reply import closure, and the repairedagent.waitfixture.223f6e441ecb→916e6b82014c; 2101.38s wall, digestb1bf2115. No added/removed entrypoints or direct export-declaration changes; 168 transitive changes audited with no released-callable incompatibility. The private-local Memory subpath is excluded from this public report and is covered separately by the released-tag comparison and exact signature tests.21901766c534is included in the CI-tested merge; current baseline2fec39f57319independently passes with zero cycles in 211.95s, and exact-head CIcheck-guardspasses.The two P7f1 patterns were rechecked: a delayed validation reply must not accept a stale snapshot, and an awaited consumer must retain its original owner through settlement. Grant callbacks consume actor-held facts without adding host SQL. The new Memory suite is in the host-owned project; existing and indirect history, SessionManager, close-order, and import-boundary suites were exercised. The real-worker fixtures are required to prove grants, revocation, asynchronous settlement, transport error identity, and rollback; helper-only tests cannot establish those contracts. Exact-head CI run 37313377765 completed with 95 successful jobs and 23 skipped, no failures or cancellations. Its 59 successful Node test execution steps total 14,407 CI seconds; this is the selected Node campaign cost, not a per-file estimate.
Earlier proof remains historical: full build with declarations passed at
c80210374913in 1159.58s; original-head SDK comparison500c95aaa373→a1c247199830completed locally in 1632.54s. The original Linux SDK attempt exited after an unsettled top-level await atnative-declaration-subprocess.mts:134in 114.70s. Both revision renderers were active, so the original failing revision and compiler-exit cause remain unknown. A diagnostic probe reproduced this warning when a compiler exits during an in-flight request; the original exit cause remains unknown. This is not claimed to be proven inherited or repaired by a passing replay.Failure attribution and main repairs
The initial CI run 37304788542 failed in Madge and the
server-plugins.test.tslegacy completed-status fixture. The latter failed identically in five full-file runs on main5449de6efa13and five on the first integrated PR tree, each with 66 passing tests and that one failure. Main's normalization cleanup introduced the stale fixture, and main repair223f6e441ecbis now integrated; the final focused run passes it.The earlier Madge cycle was introduced by main
1b7d11db6a98through the deferred-migration type import in the shared-state operation registry. Main fix21901766c534extracts the contract into a leaf. Current CI verifies mergeab838af9a15eb1ee9a326eff8b400c66c9fc0b0d, with ordered parents main2fec39f57319and candidate916e6b82014c; its guard job passes. No inherited-failure admin exception is needed.The original seven unused exports already have main repairs (
9a892fb6f903,2795ad9d0e03,904a3acddbad), now integrated. The ingress-queue line limit was repaired by2d3a5c7bbced. The other two original line-limit failures were independently reproduced from exact main5449de6efa13blobs: transcript-worker types 703/700 and authorization test 1067/1000. No baselines, assertions, or ignores were relaxed.ClawSweeper completed candidate-head review at
2026-10-05T13:09:13.549Zwith no correctness or security findings. Its request to finish the candidate-bound SDK report is now satisfied above. Its rendered migration checkbox conflicts with its explicit conclusion that no stored-data migration is introduced; Memory hash/timestamp extraction preserves serialized bytes and session revisions are process-local. An update cell is inapplicable to this inactive wiring.