Repository navigation
refactor(sessions): compose pending input and collaboration on the incognito actor (P7e, inactive) - #165151
Conversation
Prepare P7e actor-backed pending-input, collaboration and ACP lifecycle composition while keeping production incognito storage host-owned. Preserve FIFO custody, live authority, acknowledged publication, and actionable synchronous refusals. No schema or update behavior change; atomic activation owns native-route deletion.
|
🦞👀 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, 9:48 PM ET / October 5, 2026, 01:48 UTC (Revision 10). ClawSweeper reviewWhat this changesThe PR prepares worker-backed incognito session operations for queued inputs, collaboration, and guarded channel-binding cleanup while preserving existing production routing. Merge readiness✅ Ready for maintainer review Keep open: this remains a distinct, useful prerequisite missing from current main. Both prior findings are resolved, the history integration is coherent, and no new blocking patch defect was identified. Priority: P2 Review scores
Verification
How this fits togetherIncognito sessions hold temporary conversation state in an in-memory database. The per-agent worker actor serializes operations, checks live authority, and publishes confirmed changes to session and channel consumers. flowchart TD
A[Queued inputs and collaboration] --> B[Captured incognito session]
B --> C[Worker actor FIFO]
C --> D[Live authority checks]
D --> E[Existing SQLite kernels]
E --> F[Confirmed commit receipt]
F --> G[Session publications]
G --> H[Channel binding cleanup]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +760, Tests +957, Docs +48, Other +5. Total +1770 across 46 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Complete this inactive composition using the existing actor and persistence owners, with production activation and native-route removal kept in their separately reviewed stage. Do we have a high-confidence way to reproduce the issue? Not applicable to the central refactor. The previously identified defects have concrete real-worker negative controls and repaired-path results recorded in the matching PR body. Is this the best way to solve the issue? Yes: the patch composes existing kernels and owners, preserves production defaults, and keeps confirmed publication independent of later authority loss. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against eded1a387b79. 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 (9 earlier review cycles; latest 8 shown)
|
Merge current main to resolve the additive PR-wrapper inventory conflict. Retain both dependency entries and keep production incognito routing host-owned. Publish collaboration results from confirmed settlement before authority disclosure. Invalidate committed receipt targets when the ordinary reply is lost, without replay or duplicate catch-path publication. Add failing-before/passing-after worker regressions for authority revocation and lost replies. Validation: P2 autoreview scoped-clean; 15 collaboration/pending-input tests passed; five indirect test projects passed in 507.34s. Released SDK signatures remain compatible.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Merge current main including 402af0b, which admits the public-sharing native fixture before foreign writes invalidate its row certification. The four original assertions fail in five standalone runs on both the PR and its merge base and in two hourly main runs; the integrated file now passes all nine tests. The PR delta remains patch-identical (f57d01649e2011a515886532ee7b753ea7b60082). Focused public-sharing, transcript SDK, pending-input, collaboration, and ACP verification passed 48 tests in 329.96s; fresh P2 autoreview is scoped-clean. The unchanged transcript SDK CI refusal passed five runs per revision and one authorized single-job rerun; its original cause remains unconfirmed.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Check the captured binding authority before invoking a transcript-recovered pending-input callback, matching ordinary staging while retaining the existing actor and caller checks. Extend the real-worker binding test to seed an existing transcript message, verify the recovered identity and allowed execution, and then reject binding-only revocation before the callback. The recovered case fails before the guard; all 9 pending-input tests pass afterward in 145.67s. Targeted lint and fresh P2 autoreview passed. Released signatures and persistence formats are unchanged.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Merge main after the inactive history and SessionManager prerequisite landed. Preserve its synchronous history publication callback within the actor FIFO, retain the pending-input methods, and keep both documentation sections. The PR-added and removed text remains identical across all 46 files. Validation: 89 tests across seven pending-input, collaboration, history, SessionManager, runtime-build-graph, and wrapper files passed in 233.34s with --maxWorkers=1. Formatting and P2 autoreview passed.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…cognito actor (P7e, inactive) (openclaw#165151) * refactor(sessions): compose incognito pending input and collaboration Prepare P7e actor-backed pending-input, collaboration and ACP lifecycle composition while keeping production incognito storage host-owned. Preserve FIFO custody, live authority, acknowledged publication, and actionable synchronous refusals. No schema or update behavior change; atomic activation owns native-route deletion. * refactor(sessions): expose worker-safe incognito ACP preparation * refactor(sessions): make incognito callback contracts explicit * fix(sessions): fence recovered incognito input execution Check the captured binding authority before invoking a transcript-recovered pending-input callback, matching ordinary staging while retaining the existing actor and caller checks. Extend the real-worker binding test to seed an existing transcript message, verify the recovered identity and allowed execution, and then reject binding-only revocation before the callback. The recovered case fails before the guard; all 9 pending-input tests pass afterward in 145.67s. Targeted lint and fresh P2 autoreview passed. Released signatures and persistence formats are unchanged.
What Problem This Solves
The incognito actor still lacked pending-input staging and collaboration composition needed for the eventual atomic activation. ACP lifecycle catches could also turn a future synchronous-access refusal into missing metadata or successful cleanup.
Why This Change Was Made
Compose the existing pending-input read/stage/completion/finish kernels on the captured actor, keeping host custody, FIFO ordering, synchronous worker transactions, live transaction/commit grants, and publication from confirmed commit receipts. Pending execution also rechecks its captured actor reference and binding authority at use time. Add suggestion operations and compose membership, owner, participant, and category facades.
The worker-safe
actor.acp.prepareEntryReadcapability captures configuration provenance and physical shared-database identity before yielding. Prepared ACP cleanup retains the original actor snapshot and shared metadata publication fence through Discord/Telegram binding persistence; typed refusals propagate while acknowledged deletion remains published.Confirmed collaboration writes also publish during settlement before result-disclosure authority checks; lost replies invalidate the committed targets from the native receipt without replaying the write.
Production routing stays host-owned. Native routes are retained for the atomic activation. No schema, retention, durability, permission, configuration, or updater change is introduced. Error helpers stay on the existing private bundled ACP facade; released ACP signatures remain unchanged.
User Impact
No user-visible change. This inactive P7e prerequisite follows #164869, #164883, and #164819. At the original reviewed head
a12faf198c6eb3428a713e2010120861407c8294, global T1 remains 895 → 895 against base6636dd6709bdbace1b6b72c3a86ff664bbdec244; no inventory reclassification and 0 new OPENCLAW_ names*. Production delta: +938/−210, net +728 (1,148 changed lines across 34 production files), below the work-order cap.Related overlapping work: #165134 (now merged and integrated), #164922, #164989, #162433, and the incogp7f, incogcell, sessauthtail A/B/C, and nativepatchtail lanes. Hunks remain scoped to this prerequisite; later landing resolves any overlap against main.
Evidence
Landing candidate:
d229fbb7ba2c610e2478714b94cc2ef381821a56. It merges mainea00cb30c6611dafb186a959cb90ff5bf83d2b5fafter sibling #165134 landed during admission; no merge request was sent by the refused attempt. Its earlier parent integration30975205a31729c1af2ca9495ebba5b9bdd89e5cincorporated main382c987dbe1c7ee08634ef72e752085ed7639d2ewithout rebasing. The first integration retained both conflicting wrapper dependency entries; the second was conflict-free and includes the independently landed public-sharing fixture fix402af0b8d28. The PR diff was unchanged across that second integration (stable patch IDf57d01649e2011a515886532ee7b753ea7b60082).Fixed the ClawSweeper P2 publication finding. Real-worker regressions for post-commit authority revocation and lost replies both fail before the repair with missing notifications; both pass afterward, without write replay or caller SQL.
Collaboration and pending-input suites: 15 tests passed, 115.48s command wall time with
--maxWorkers=1. The two new regression cases failed for the intended missing-notification assertion before the fix (68.35s).Standalone changed test file:
pnpm test src/config/sessions/session-sharing-store.incognito.test.ts --maxWorkers=1passed 7 tests in 88.91s command wall time (33.98s Vitest duration). The real actor/broker contract requires compiled worker startup; the test cases themselves use the shared suite actor and no timers or sleeps.Worker-routing audit found no missing host-owner test assignments. All 12 selected indirect/import/wrapper files passed, across five projects in 507.34s with
--maxWorkers=1, including runtime-process build graph, PR wrapper inventory, get-reply and history import boundaries, native incognito custody, durable collaboration, ACP reads, and incognito SessionManager.Fresh Codex autoreview through P2: scoped-clean on the integrated candidate; no actionable findings. Released-signature source audit against v2026.9.8 found no breaking sync/async, parameter, or export change introduced by this PR. The existing one-argument ACP SDK facade/type test remains intact; actor settlement callbacks are internal.
The original PR-context check failed because the body used
Problemrather than the requiredWhat Problem This Solvesheading. This body corrects the template. A local targeted lint attempt was blocked before analysis by a pre-existing artifact lock; the lock was preserved for its owner. The fresh CI checkout passed production types, test types, core lint, and all extension lint shards on the prior candidate7e7b7f68f353in CI run 37241401078. The completed local SDK report is retained for the patch-identical main integration; main changed neither the SDK facade/package manifests nor the touched actor interfaces. It comparedb48245c41428→7e7b7f68f353: 0 entrypoints added/removed, 0 direct export changes, 128 reachable changes from the internal actor/preparation declarations. Digest:c3377812b536cd517b577e18329b7cfd2315ecf2132965ddcd9f298883be2c53.ClawSweeper revision 2 completed on
7e7b7f68f353with no actionable correctness or security findings, confirming the prior publication finding is resolved; its remaining SDK-report request is satisfied above.CI
37241401078attempt 1 on7e7b7f68f353had two failed test shards: public-sharing fixtures reproduce the same four canonical-admission failures seen on main run37237005799and already fixed by main commit402af0b8d28; all five standalone PR runs and all five baseline runs reproduced the same 4 failures / 5 passes. The fix is now integrated, and all nine tests pass. The transcript SDK idempotency case reportsAgentDatabaseRegistryChangedError. Five standalone file runs passed on this PR and five passed on merge baseb48245c41428(12 tests each,--maxWorkers=1); the seven stack-owner/test files are unchanged, and neither of the two latest completed hourly main runs reports this failure. It remains unattributed; passing replays are not a fix. The single authorized SDK-shard rerun passed. Its cause remains unconfirmed; no further rerun or admin exception has been used.After the final main integration, 48 focused tests passed across 5 files in 329.96s with
--maxWorkers=1: public sharing, transcript SDK, collaboration, pending-input, and ACP. A fresh P2 autoreview of the integrated candidate is scoped-clean. That integration had clean P2 review; its CI findings are recorded below.Prior-head CI
37244872278exposed inherited host-broker fixture failures from main cleanup change989bd3f055fa(fix(sessions): session cleanup leaves GitHub publication receipts behind for workspace-free sessions #163833). Exact boot, Doctor, compaction, and hidden-session failures also occur on hourly main run37244005373at this PR's integration base382c987dbe1. Source/owner blob comparisons and five-run controls are being retained; no admin bypass has been submitted.The materialization job's raw-INSERT
database is lockedfailure remains unattributed. Three attempted full-file replays hit the unrelated 65-agent stress deadline and cleanup fallout; those are not counted as lock reproductions. Five runs of the exact CI-failingprojects out prompt snapshotscase passed on both PR and main baseline, singly with--maxWorkers=1. The single authorized rerun passed that lock-error case, but failed the distinct 65-agent handle-cap case at its 120s deadline. That timeout also occurs in local full-file attempts; the extra Linux comparison was stopped while queued after the new head completed CI without a materialization failure. No Linux tests executed; no passing full-file replay or timeout fix is claimed.Fixed ClawSweeper revision 5 in
4aaf2bda1f9: transcript-recovered receipts now perform the same captured binding-authority check as fresh staging. The table-driven real actor test seeds a transcript message, asserts the recovered receipt uses its committed message ID, allows execution with current binding authority, and then rejects binding-only revocation before invoking the callback. The recovered case failed before the fix; the full pending-input file now passes 9 tests in 145.67s command wall time (33.18s Vitest). Targeted type-aware lint and fresh P2 autoreview are clean. This adds no released signature or declaration change, so the SDK report remains applicable. ClawSweeper revision 7 completed on this exact head at 2026-10-05T01:07:13Z with no actionable correctness or security findings, confirming both prior findings are resolved.Prior candidate CI 37249751431 attempt 1 completed with 93 successful jobs, 20 skipped, five inherited failed test jobs and the downstream aggregate, with no cancellations. Four jobs reproduce the broker-admission fixture clusters above; all seven affected files failed identically in five PR and five baseline runs, and sixteen owner/test blobs remain unchanged through the actual tested main parent
c5012333049eand mergec559f62d3b00.The fifth root failure is the Windows declaration fixture (
write-unified-entry-dts, canonical-group reuse). Main76922aba447(fix: private QA builds omit CLI diagnostic companions #165200) added a helper import without copying that helper into the synthetic fixture. Five full-file runs on mainc5012333049eand five on tested mergec559f62d3b00each produced exactly 1 identical failure and 10 passes. Eleven source/dependency blobs match; module loading fails before PR runtime code. Latest inspected maine91a3163956has no repair. The prior native attempt reached merge verification but aborted before dispatch when refactor(sessions): compose history and SessionManager reads on the incognito actor (P7f1, inactive) #165134 made the branch conflicting. Its operation lock was recovered by its exact token. This historical attribution does not substitute for new-head CI; no job on that head was rerun.Sibling integration
d229fbb7ba2cpreserves P7f1’sonReadpublication within the history FIFO, P7e’s pending-input methods, and both documentation sections. All 46 files have identical PR-added/removed text versus the earlier candidate (normalized edit digest10dd76876ab31448876d08a1feb1e0f144e3f90075f8dad189c86dc02a004db1). No new released signature or routing change is introduced; the historical SDK report remains applicable to this delta, without claiming a new merged-head report.The combined candidate passed 89 tests across seven files in 233.34s command wall time,
--maxWorkers=1: pending inputs, collaboration, actor history, incognito SessionManager, manager context snapshots, runtime-process build graph, and eager wrapper closure. Formatting and fresh P2 autoreview are clean. ClawSweeper revision 10 completed on this head at 2026-10-05T01:48:58Z with no actionable correctness or security findings.Current-head CI 37252633344 attempt 1 completed with 82 successful jobs, 22 skipped, five failed test jobs and the downstream aggregate, with no cancellations. Four root jobs repeat the independently qualified broker-fixture failures; all sixteen failure inputs remain unchanged in tested main
eded1a387b79, tested mergeb0c702d24893, and this head.The fifth root is
github-shared-publication-read.test.ts: maina2affcf76e93(fix: stuck publication error after worktree cleanup; compact Publish PR card #165219) intentionally changed unavailable/replaced worktree discovery to no current publication, while this untouched test still expects an owner-unavailable error. The full file already reproduces the identical null-versus-rejection failure on both exact main and CI merge, with 31 other cases passing. All five full-file controls on main and all five on the tested merge reproduced that exact single failure, with 31 other cases passing each time. Thirteen source/dependency blobs match; latest inspected main09abaaf0db1ehas no repair. The native inherited-failure admin evidence is complete. No current-head job was rerun.Original reviewed-head proof (a12faf1)
--maxWorkers=1. The original swallowing catch was restored temporarily as a negative control: both refusal regressions failed as intended (82.75s); the fix was restored.--maxWorkers=1. After the ACP capability adjustment, all 12 ACP tests plus the shared-registry/import and wrapper suites passed again: 52 tests in 12 files, 621.31s wall,--maxWorkers=1.TMPDIRand passed in 1,149.78s: 0 entrypoints added/removed, 0 direct exported-declaration changes, and 127 reachable changes across internal actor/preparation declaration records. Digest:dd644e09d4479dee5e512b91c0d2312106f9220fd23dbf50c222dae06a874b94.--maxWorkers=1. Command:pnpm test src/state/openclaw-agent-execution-incognito.acp.test.ts src/state/openclaw-agent-execution-incognito.pending-input.test.ts src/config/sessions/session-sharing-store.incognito.test.ts --maxWorkers=1. Final targeted core lint passed in 50.48s; full core lint also passed.node scripts/check-changed.mjs --base 6636dd6709bdbace1b6b72c3a86ff664bbdec244passed on Blacksmith Testbox in 2,071.52s. The receiver verified sourcea12faf198c6eb3428a713e2010120861407c8294and tree0d854be68287fcd324d94f03e28a12fa08e392c6before execution.pnpm buildpassed in 504.72s. Blacksmith Testbox run, leasetbx_01m44cjshxhmp74ptkp6bk42f1, completed and stopped. The wrapper reported command exit 0; its backing Actions step can appear cancelled during delegated lease cleanup.Local SDK-boundary declaration preparation exceeded its five-minute tooling timeout; the final full check and build completed on Testbox. The successful build reports a non-blocking startup-JS size warning: 365.0 KiB gzip versus 364.7 KiB.
The inactive routes do not constitute production activation proof; native-route deletion and the published-driver incognito update cell remain with their respective follow-up lanes. GitHub CI wall time is not yet observed.