Repository navigation
refactor(sessions): compose incognito steering, visibility, trajectory and project authority (P7n, inactive) - #166265
Conversation
|
🦞👀 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. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
The history suite retains two private actors and then opens shared ACP state. Eight-CPU CI hosts permit only two broker workers, so the new ACP visibility case exhausts fixture capacity before its assertions. Declare the three-slot test topology using the existing sibling-suite hardware mock; production limits and assertions stay unchanged.
|
Codex review: blocked before merge. Reviewed October 7, 2026, 3:41 AM ET / 07:41 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch connects incognito session steering, history visibility, Memory selection, trajectory recording, and project checks to the existing worker owner, and reduces redundant SQLite statements. Merge readiness⛔ Blocked before merge - 1 item remains The distinct contribution remains useful and is absent from current main. No actionable correctness or security finding remains, and the previous confidence-only checklist does not establish a blocker. Likely related people: steipete and Galin Iliev, as routing candidates. Priority: P2 Review scores
Verification
How this fits togetherIncognito sessions hold private conversation state in a process-local database. Captured worker bindings carry that state and its live authority into history responses, Memory selection, trajectory writes, and project checkout checks. flowchart TD
A[Session request] --> B[Captured incognito binding]
B --> C[Worker session owner]
C --> D[Current authority and snapshot checks]
D --> E[History and Memory results]
D --> F[Trajectory commit receipts]
D --> G[Project checkout guard]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Preserve this inactive composition and perform activation, native-route retirement, and update qualification together in the coordinated follow-up. Do we have a high-confidence way to reproduce the issue? Not applicable to the internal composition request; the captured evidence includes failing-before regressions and paired workload measurements, but this read-only review executed no tests. Is this the best way to solve the issue? Yes. The patch composes the existing worker and authority owners, preserves native routes until atomic activation, and avoids new persistence or configuration surfaces. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a2e44be9f830. 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
History |
Integrate current main database admission and session liveness changes without activating P7n. The merge is conflict-free. Focused actor, project, server-close, worker build graph and import-closure suites pass; full P2 autoreview is clean.
Merge main 0288eb1, including the upstream MCP security repair, without activating incognito actor acquisition. The P7n delta merges without conflicts; fresh P2 review has no actionable findings.
* refactor(browser): share output-write settlement test setup * chore: incorporate qualified main for browser test validation Co-authored-by: Vincent Koc <[email protected]>
* refactor: deslop small cross-cutting cleanups Combine the l422 schema-mirror, l425 derivable-state, l419 async-callback, and l420 SDK-helper cleanups. Preserve runtime behavior and existing public contracts. * refactor: retain Buzz polling and prune Matrix assertion ratchet Drop the Buzz sleep-helper substitution after its queue test failed on the bundle and passed on clean main. Keep the test unchanged. Regenerate the exact shrink-only Matrix assertion baseline after removing the redundant cast.
…ured (#164506) Only warn that tools.exec.pathPrepend is ignored for host=node when the operator actually configured pathPrepend; the Gateway-local CLI shim merged into the exec config no longer triggers a false warning on every node exec result. Effective PATH and env are unchanged. Closes #164505. Co-authored-by: Ayaan Zaidi <[email protected]>
#162689) Make deferred dashboard title work wait for the turn to be released before acquiring session admission, so the first Control UI message after a session reset no longer fails with a rollover drain timeout. Genuine competing session work still serializes rollover, and the guarded title writer still targets the same session identity. Closes #162420. Co-authored-by: Cursor <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
…er (#164726) Identify DuckDuckGo web_search requests as openclaw-duckduckgo/<version> instead of a spoofed desktop Chrome User-Agent, which DuckDuckGo answered with an HTTP 202 bot challenge and surfaced as provider_error. Fixes #164471. Co-authored-by: Krrish <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
fdcbcf5 (#165432) added a Vitest helper with a production-looking probe filename. Its only consumers are the two static cold-import tests. Rename it to the existing test-support convention and update both imports, keeping its contents identical and retaining full-tree dead-code auditing. Validation: Linux Testbox cold-import tests 2/2; pnpm deadcode:full; changed lint, boundary lint, both test type graphs, all 27 core test graphs, source contracts, and P2 review. Whole Gateway core ran 623 files: 615 passed, 6 skipped, and 2 had 16 host-broker failures reproduced on unchanged 8fffeca. check-changed also exposed seven pre-existing auth-runtime namespace exports, reproduced on that baseline. All remaining checks ran; whole-core lint's sole error is the unchanged session-organizer runtime's 734/700 line count, independently confirmed on identical baseline bytes. No assertion, lint rule, or dead-code check was weakened.
* test(ui): make screenshot rasterization reproducible Use CPU tile rasterization while retaining GPU composition and browser capabilities. GPU rasterization kept different fractional-edge pixels after otherwise identical layouts and modal reopen histories. Add --disable-gpu-rasterization in both shared suite launch orders and document the capture contract, retaining caller arguments and full-tile rasterization. The audited A/B sample has 25 fixed launches with zero RGBA or PNG-byte mismatches and 13 interleaved controls that reproduce the noise. Validation: UI production/test typechecks, scoped lint and formatting, 20 lifecycle tests, 31 focused E2E tests, and independent Codex review. Refs #165353. * refactor(ui): share the E2E suite browser launch options Both server/browser launch orders now call one helper, so the capture determinism flags cannot drift between them. Behavior is unchanged.
Carry the session owner's stored failure or timeout diagnosis into recovered subagent completion. The old mapping replaced useful failure details with a synchronization message, or discarded timeout details altogether. Preserve existing freshness, ownership, terminal classification, and missing diagnosis behavior. Cover both outcomes through the isolated durable store and worker-backed reconciliation path. (cherry picked from commit 39e441a4f1d4103beb30ef5ba42138154083f875) Co-authored-by: Peter Steinberger <[email protected]>
) List the sandbox host listener (gateway port + 1 unless mcp.apps.sandboxPort is set) among the derived ports to keep apart when running multiple Gateways. Co-authored-by: Ayaan Zaidi <[email protected]>
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
Merge current main and resolve the runtime-probe overlap with #166265. Keep main's single SQLite version/capability query for unqualified runtimes, and retain process/runtime-bound admission reuse for workers. Publish the inherited fact only after the probe database closes successfully. No public signatures, stored formats, schemas, or environment names change. The combined probe and inherited-fact owner suites pass all 88 cases.
…y and project authority (P7n, inactive) (openclaw#166265) Complete the inactive incognito compositions for steering, history visibility, Memory selection, trajectory recording, and project checkout authority. Preserve live authority checks, acknowledged commit settlement, and unknown-outcome refusal. Production incognito acquisition remains host-owned until the separate atomic activation. Remove redundant trajectory reads, empty invalid-retention transactions, and SQLite admission setup statements while retaining fresh quarantine decisions, foreign-commit checks, and the existing timeout and retention policies. No schema, stored-format, configuration-default, or released API change is introduced. Paired real chat workloads reduce median all-thread warmed work from 2454.1 to 2379.7 statements per turn, with no measured phase increase. Validated with 30 focused files, production and all 27 core test-type shards, Madge, Knip, the SDK comparison, and successful exact-head CI.
What Problem This Solves
Completes the inactive incognito actor compositions needed before ownership can switch atomically: steering facts, history visibility and Memory selection, trajectory persistence, and project checkout authority. Landing validation also removes redundant SQL observed in the real chat-turn workload.
User Impact
Production incognito acquisition remains host-owned, with every native selection arm retained. Activation is a separate atomic change. There is no schema, retention-policy, durability, permission, or configuration change, and no new
OPENCLAW_*names relative to integrated main.The measured all-thread warmed-turn median falls from 2454.1 to 2379.7 statements (−74.4/turn). Every named phase and all ten individual warmed positions decrease. Gateway MAIN remains 28.0 statements/turn; these are total execution-count improvements, not uninstrumented latency claims.
Why This Change Was Made
The missing operations compose through explicit actor bindings in production-imported owners. History prepares visibility from actor and shared ACP facts, preserves absence claims, and retains typed ended semantics for old handles. Memory and conversation-binding reads use the captured actor. Trajectory writes settle acknowledged commits and never replay unknown outcomes. Project listing and checkout deletion retain actor roster and snapshot authority through consuming work and the final filesystem guard.
The SQL corrections remove an empty durable/native transaction for an already-invalid retention selection, fuse append sequence and byte-window reads, and reuse the existing native local-mutation witness. Valid selections still revalidate under the writer lock, foreign commits still use
data_version, and actor changing commands retain commit receipts. Native initialization reads version and extension capability together. Quarantine readers and writers set the existing 5000 ms timeout through the constructor, retaining every fresh schema, quarantine, and generation check.Main was integrated through merge commits, including the upstream MCP SDK security fix from #166217 (
c39d9b0692db). The final integration is4e5cc5a909ce0ad948b10fc98a16b89b865a6880, incorporating mainfcb147dccc1c7afce7e3fb4fff740cf8a79b6590and its schema-admission, executor-lifetime, maintenance-lease, and history-paging updates. No dependency changes were authored here; the source-map audit fix also came from main.Evidence
Candidate:
4e5cc5a909ce0ad948b10fc98a16b89b865a6880. The original58e6e5e2528582f38c980dac8810e5e87cd6a054had coordinator approval. Each subsequent production correction and the final integrated delta received independent P2 review with no actionable findings.pnpm test <files> --maxWorkers=1, wall time 390.3 s. This includes the actor/history/Memory/project boundaries, trajectory and SQLite regressions, runtime-process build graph, import closures, and eight integration suites for the newer admission and integrity owners. Hosted CI seconds remain pending.pnpm deadcode:knippassed in 54.6 s without exceptions.c14d9244is acknowledged: 130 reachable identities across 23 entrypoints, zero direct export changes, and no entrypoint additions/removals. Its 13 unique declaration records retain the previously audited private changes; two updated contexts contain main's history cursor/anchor additions on both sides.v2026.10.1-beta.1andv2026.9.8and is not an SDK/runtime callable. Its optional internalrefreshmarker appears through aReturnType<typeof deleteTrajectoryRuntimeRetention>closure whose output is unchanged. No compatibility shim or deprecation record is needed for that internal marker. Main's optional preparation argument retains its own released-call-form test and compatibility record.SQL measurement
Same Hetzner ccx33 host; main
fcb147dccc1cversus candidate4e5cc5a909ce; fixed B,C,C,B,B,C order; three fresh fixtures per revision; unchanged shared harness; immutable source-mapped builds. All samples are retained. Every phase and warmed-position median meets the no-increase requirement.Warmed per-turn samples: main 2446.1/2455.3/2454.1, candidate 2379.7/2370.4/2381.4; paired deltas −66.4/−84.9/−72.7. Whole-run medians are 46521 → 45411 (−1110 statements). All six workloads and all 12 MAIN/worker calibrations passed (8 native calls, 2 prepares, 7 successful statements, zero calibration failures). Minimum pre-run CPU idle was 99.94%; Node 24.21.0 and SQLite 3.53.4 were used throughout. Source/build/map receipts matched before every cell. The complete evidence archive is downloaded and hash-verified (SHA-256
50a922c19879d7db62d3c8b048b4d81f5267b1087125c47e5d341f63392512a6). The owned lease was stopped before expiry; provider inspection confirms released, cleanup complete, no host remaining.The canonical harness counts successful native statements and reports failed executions separately. Baseline cell 5 recorded one audit-prune
BEGIN IMMEDIATElock-contention event during shutdown; candidate cells had zero SQL failures. The unchanged audit writer intentionally fails fast at timeout zero and retries: this same prune subsequently acquired its transaction, ran pruning, and committed. Gateway shutdown was clean, with no audit/drop/cleanup error or leaked fixture child. That event and the summarizer's original overly strict assertion are retained; no sample was excluded or rerun.Earlier failed cohorts and regression proof
The first integrated cohort, main
0288eb1f3692versus9f6b85827eae, failed: first-turn median 6902 → 6909 (+7) and warmed all-thread median 2955.7 → 2958.6 (+2.9/turn). Other decreases did not offset those increases. Traces identified repeated invalidated retention attempts and the redundant append read.The second cohort at
3a8e92c5263fimproved warmed median 2960.6 → 2953.8 (−6.8/turn) and first turn 6899 → 6881 (−18), but still failed the strict phase gate: boot +1, compaction +7, and warmed positions 6/9/10 +3/+4/+1. All 181 tests across 16 files passed in 160.47 s. Delivery recovery and Memory-export cold-open work crossed phase boundaries; those observations were retained as attribution, not a waiver. They led to the admission setup reductions.The
2dbe0bd3f27fcohort was superseded when newly landed main changes affected the measured owners. Its completed baseline cell is retained; no candidate cell started. The final refreshed cohort's initial source transfer failed on Git DNS before any cells; verified existing Git objects on the same lease resolved that transport failure. Neither event selected favorable samples or changed the workload.The original CI history fixture needs two retained private actors plus a shared-state worker. It now declares the three-slot hardware topology, following the existing lifecycle-suite precedent. Production limits and cross-actor assertions remain unchanged. Controlled eight-CPU reproduction failed 5/5 on the original PR, passed 5/5 on the merge base, and passed 5/5 after the correction.
The retention/append regressions failed on their pre-fix source for the intended statement-budget violations. The corrected five-file suite passed 71 tests in 600.63 s including compilation/cleanup; the three new retention cases took 0.673 s combined and the strengthened byte-window case 0.889 s. Existing coverage retains UTF-8 budgets in UTF-16 stores, oversized events, discarded prefixes, rollback, foreign writes, acknowledged settlement, and unknown-outcome refusal.
The admission correction passed 116 tests across six files in 298.51 s. Its real-SQLite timeout/freshness regression took 0.061 s; before the fix it observed timeout zero at all four opens, while the probe-budget cases observed two queries instead of one. Node 26.10 and Bun 1.4.2 independently confirmed the constructor applies 5000 ms. Both performance correction groups passed full changed-file gates, types, lint, dead-export scans, and import-cycle checks before the final integration.
Review
ClawSweeper completed its exact-head review at 2026-10-07 07:21:59Z, with no actionable findings and no security findings. It accepted the prior fixture-capacity correction. Its
needs-humanverdict retains confidence/config/data-model checklist items from an incomplete file list (unknown-truncated-pull-files). Maintainer disposition: the full paginated 314-file GitHub list exactly matches its older reported main based9813e348976; incorporated mainfcb147dccc1cis an ancestor of current main, and the actual reviewed PR delta is 50 files. Full source and SDK review confirm no schema, persisted-format, retention-policy, config-default, or incompatible released callable change; no migration is required by this inactive prerequisite. Exact-head CI run 37586123399 completed successfully, and the requiredopenclaw/ci-gatechecks are successful. The old security-fast red was the upstream MCP advisory; security is not waived. Old fail-fast/label checks recorded GitHub timeout/HTTP 500 responses, and the PR context heading was corrected.Boundary tests prove zero caller-thread SQL for the newly composed actor operations. Existing synchronous worktree-registry and durable session-reference probes at
src/gateway/server-methods/projects.ts:360andsrc/gateway/server-methods/projects.ts:365remain follow-up debt outside worker transaction grants. No new host SQL is added in grants. Related inactive prerequisites: #165885, #165895, #165890, #165901. The cleanup overlap #162433 is closed; no restructuring was adopted. Native deletion, activation, and the published-driver × candidate update cell remain for the atomic follow-up. Release-note context stays here;CHANGELOG.mdis release-owned.