Repository navigation
refactor(sessions): read bundled currentness checks in workers - #169646
Merged
Merged
Conversation
…t1cut-s1-currentcheck
Contributor
|
🦞👀 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. |
Contributor
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 13, 2026
…law#169646) Migrate bundled currentness callers to worker-backed source preparation and carry owner authority to real effects. Deprecate the synchronous SDK API and remove duplicate preparation and completion checks. Preserve queued delivery retries on transient preparation failures while terminally rejecting retired callers at the final handoff. Document accepted preparation edges, SQL attribution, and retained compatibility paths in the PR.
This was referenced Oct 13, 2026
scribe-dandelion-cult
added a commit
to karmaterminal/openclaw
that referenced
this pull request
Oct 20, 2026
First-parent upstream f956a18..9d9761d (openclaw#169879 database worker ownership docs, UI retired render adapters, openclaw#169884 macOS discovery). No conflicts; the one file both sides touched (agent-schema-history.md, upstream reworded the snapshot paragraph) keeps our schema-27 rows and section byte-for-byte. Stops before openclaw#169646 (fp#722), which is step 69 on its own. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
scribe-dandelion-cult
added a commit
to karmaterminal/openclaw
that referenced
this pull request
Oct 20, 2026
…absorb: step 69 openclaw#169646 "read bundled currentness checks in workers", isolated as its own step. Source-execution scopes now wrap the effects (runWithAgentToolSourceExecutionScope / runWithBoundAgentToolSourceExecution Scope), and the final source checks move to the effect boundary. Conflicts: - agent-tools.before-tool-call.wrapper.ts: upstream's bound source scope and effect-boundary checks around the invocation; kept our continuation diagnostic trace context around the forwarded execute inside it. - subagent-spawn.ts: upstream's scope wraps on initial session, attachment materialization (with our continuation patch/admission fields, mount-path hint and redacted continuation errors) and upstream's recordSubagentSessionSetup call after our continuation launch fields. Imports follow both sides' moves. - subagent-spawn-child-launch.ts (fork helper holding launchChildRun): ported upstream's dispatch scope around callNativeSubagentGateway. - subagent-spawn-lifecycle.ts (upstream's new recordSubagentSessionSetup): records the creation state event only; Home is notified after acceptance (H1, notifyHomeOfAcceptedSubagentSession), so the fork's duplicate recordSubagentSessionCreated is retired. - session-accessor.sqlite-entry.ts: took upstream's patchNative form and re-inserted our afterPersistInTransaction hook at the same point. - worker inventory regenerated. Focused: 51 spawn/wrapper/recipient-authority/session-created files, 50 executed, 581 tests; one red (launch-key gateway test) is step-66 test drift, fixed in the next commit; production-boundary skipped behind it (rerun). Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
scribe-dandelion-cult
added a commit
to karmaterminal/openclaw
that referenced
this pull request
Oct 20, 2026
…tachment limits (Gate 2.7 batch 3 A) Brings 97b1f2b onto the step-69 head. Plain spawns get upstream's inline-attachment caps and whitespace-tolerant base64 again; only continuation delegate snapshots keep the uncapped path, now named continuationDelegateSnapshot (was redactContinuationErrorDetails). Conflict: subagent-spawn.ts materialize call — kept step 69's runWithAgentToolSourceExecutionScope wrapper (openclaw#169646) with the renamed field. Proof at the merge: tsgo core 0; the branch's 42 focused files (spawn, attachments, continue-delegate, delegate-flow, inline-attachments) 42 executed / 743 tests green. On the branch itself (97b1f2b) the Docker workspace-isolation e2e fails only because this host has no openclaw-sandbox:bookworm-slim image (provisioning error before the test body; environment, not product). Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
scribe-dandelion-cult
added a commit
to karmaterminal/openclaw
that referenced
this pull request
Oct 20, 2026
1. command-queue.ts: the step-71 line-cap trim (578de4c) turned the bare re-export of waitForCommandLaneIdle into `export ... from`, which adds a static-export edge next to the static import. project84-owned-topology pins that edge to one static import (06c373d, "lane waiters below their assemblers"), so the contract has been red since step 71; the step-72 focused sweep caught it. The re-export is the imported binding again. To stay inside the file's 702-line cap, command-queue.lane-idle.ts now exposes one notify helper: notifyCommandLaneIdleWaiters(lane) wakes one lane, and with no lane (only resetAllLanes) every lane, as notifyAllCommandLaneIdleWaiters did. The import fits on one line; command-queue.ts drops to 699 counted lines. Waiter behavior unchanged. 2. subagent-spawn.ts: the step-69 merge (8baca31) took it from 697 to 701 counted lines (cap 700). Upstream's openclaw#169646 scope wraps grew the file while upstream removed imports the fork had already moved out, so upstream itself stays at 700. The two pass-through contract types are now re-exported on one line instead of two identity aliases: 700. Proof: project84-owned-topology 9/9; command-queue cancellation, capacity-groups, lane-idle, publish-transaction and main suites 66/66 (6 files, 75 tests, 0 failed). tsgo:core 0, 32/32 test-shard graphs 0, oxlint clean, import cycles 0; line-cap ratchet lists neither file. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 26, 2026
zozo123
added a commit
to zozo123/openclaw
that referenced
this pull request
Oct 31, 2026
…nfig owners Current main retired swarm-scheduler.test-support in favor of the native lifecycle observer, requires prepared runtime config before spawnSubagentDirect, and removed the duplicate post-dispatch source recheck (openclaw#169646). Update the bounded launch fixtures accordingly; behavior under test is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Bundled consumers still reached synchronous session readers through currentness callbacks and retained completion snapshots. The snapshots could also reject a run after its own successful write. Durable bundled callers now prepare source facts through the existing session workers, carry the owner's receipts to effects, and validate live authority at dispatch or commit.
This completes the lane after merged #169608 (status/typed creation reads) and #169659 (chat leaf validation). Final head: 8bbc1b1; integrated main: 90c03ae.
Ownership and compatibility
captureSessionEntryCurrentCheckAsyncreads selected entry fields and conversation alternatives in one reader-worker snapshot. Completion bookkeeping uses its live host claim; effects prepare current worker-owned facts and preserve the existing writer's commit validation. Source metadata propagates through filesystem, command/process, spawn, delivery, node and worker adapters. Successful effects usecheckAfter: falseso their own write receipt cannot retroactively fail them.The node integration retains main's awaited durable approval before the existing source scope. The final node identity, pairing, policy, cancellation, deadline and source checks remain at dispatch. The source scope ends before waiting for a node reply. Cross-store worker commits enter the same existing effect scope. Slack fallback looks up conversation predicates and DM parents in the selected live publisher's store.
The old synchronous SDK currentness API is deprecated with a runtime warning and an async replacement. Bundled callers have migrated. Native incognito and deprecated external SDK/opaque transaction paths retain their compatibility implementation. There is no new database, cache, worker, generation, fencing, schema or retention mechanism.
Removed checks and accepted edges
Credential, approval, command/tool, native wire and cross-user disclosure checks remain at their real effects.
T1 result
Across the original 17 lane files, raw T1 expressions are 46 → 42. These are source expressions in mixed kernels, not runtime statements. Ordinary durable bundled paths use the actor or existing worker operations; the shared kernels remain honestly classified mixed.
The residual audit groups are currentness/Goal/reset/ACP/creation (11), archive/conversation (17), and active transcript/rewrite/compaction (14). Retained reachability is deprecated/warned SDK and opaque synchronous transactions, excluded native incognito, offline import/repair/reset, or named final user-data effect guards.
conversation-registry.tsretains its one shared primitive for those contracts. This PR does not claim raw T1 zero. The inventory and worker-access documentation record the paths and retirement boundary.Final repository inventory: 626 files / 2,384 call expressions; T1 496, T1-compat 2, T2 404, T3 261, worker 1,221. No dialect or T1 baseline was raised.
Live SQL evidence
The shared harness used immutable baseline
9c54108f9f20aand combined candidate22bf8aa966027. Later changes repair types, fixtures, cold authority boundaries and the main integration; this is not a measurement of the final SHA. No SQL or performance saving is claimed for this API cutover.The original pair was duration-skewed (candidate warmed window 114.302s versus 18.806s). Warmed medians were SQL 294.5 [291–340] → 357.5 [344–514] and requests 81 [79–95] → 100 [95–128]. It also returned retryable
UNAVAILABLEformentions.dismiss; it was not an entirely passing harness run. Two diagnostic candidate attempts subsequently timed out during connection before any turn.The final entire-workload recheck passed every RPC, all 13 turns, child completion, cron, compaction and shutdown. The baseline had additional cache-decision logging, so timing and controlled-speedup conclusions are not valid. The table describes one run per side and ten warmed turns, as permitted by RELAXED TESTING v6.
The RAW TURN INCREASE recheck has lower whole-workload statements, requests and all five shared-family totals. Extra warm snapshots are a Memory corpus cycle and a first-turn registry request executed in the warm window. The recorded admission misses follow real Memory commits by 11.52ms and 4.27ms. The original C05 admission and one replacement turn-01 writer miss still lack a recorded rejection reason; they are individual attribution limits, not declared proven noise. Their families add no whole-workload work. Extra MAIN statements are unchanged scheduled GitHub OAuth maintenance.
Warmed operation totals remain transcript hydration 240 statements/20 requests, anchors 110/10, entry patch commit 370/60 and patch preparation 60/30. Row facts change 270/54 → 255/51. Lifecycle projection 120/10 → 133/10 is one existing tracker initialization batch, without another lifecycle request. The active-path projection is absent from these chat requests because they carry no expected-leaf parameter.
Evidence
Two real delivery defects found during CI were repaired. Pre-enqueue authority became stale after the queue's own receipt and could delete a retry on a transient preparation failure. A retired caller rejected during async handoff could also leave a replayable queue entry. Preparation now occurs at handoff; its error is captured, the existing one final authority assertion runs, and then the error is rethrown or dispatch proceeds. Cross-store commits likewise preserve source authority through the existing effect scope. The node expiry tests also caught a real ordering defect: the authority callback can publish a deadline abort, so its existing final check must run before the signal check. The final commit reorders those two checks, preventing cancellation bookkeeping for an undispatched request; no new check or read was added.
6ba95d(physical requester retry 16,490ms; unchanged requester after cleanup 15,184ms; revision requester after cleanup 12,520ms). Vitest reports 3 passed/16 skipped in 290.45s. The wrapper later received SIGINT during cleanup, exit130; this is passing assertion evidence, not a successful whole command.6ba95din job 114772222762, 534ms.51d62ee3in job 114767320999, 2662ms/2398ms.8bbc1b1, job 114823242081 passes type-aware lint (zero warnings/errors), the SDK surface check, and all 92 tests across four files (85 Gateway tests and seven runtime-api guardrails). Both deadline cases and durable dispatch allowed/denied/revoked cases pass. The test command took 62.81s.1aec560in run 38251170153. Its completed static jobs remain the proof for those unchanged inputs; the superseded whole run was cancelled after collecting them. The subsequent8bbc1b1commit only reorders existing final node checks; the focused final-head lint and tests are reported above. Knip is qualified by the inherited UI findings below. Basic changed-file oxfmt, oxlint and diff checks pass. Older interrupted/cancelled jobs are not passing coverage.51d62ee3in run 38236081663. SDK API diff passes fromf61bbd1668c5toa4393bd6a462(ack9eae0857, artifact 11738973587). The runtime-api guardrail actually executed and passed in job114749036603.At exact final head
8bbc1b1, all seven Security High jobs pass in CodeQL run 38252475379, all nine executed Critical Quality jobs pass in run 38252475337, and Security Review passes. The current PR-context job intentionally skips the MEMBER author under the workflow condition; the earlier failed event used the old body. OpenGrep retains only the unchanged-helper finding described below.Codex autoreview rounds1 and2 completed with no accepted outstanding P0/P1 finding. The second review used immutable source
025d1d8f176daand noted limited unchanged-helper context. Later CI-driven repairs and conflict resolutions received direct source inspection; no third routine review was run. Tests that only pinned retired preparation checks were deleted.Inherited failures and integration limits
All seven
server.agent-input-authority.test.tsfailures are independently reproduced on exact baseline1248e1eaa663874ec2546c05068bed758f688667in run 38244536981, job 114795040015: four delayed native/peer replies reportSession communication state changed before admission., and three directed-send policy cases reportSend ended before input staging. These are executed assertions (7 failed/8 skipped), not setup failures. The test and communication-admission owner are unchanged here. The redundant broad baseline run was cancelled after this proof.Final production Knip reports two UI files and six UI exports in job 114817898575. All eight are byte-unchanged from integrated main
90c03ae5. The independent all-exports scan at exact1aec560reports only four of those same UI exports and no session/worker findings in job 114818395234, 122.57s. The final guard-order change does not alter imports, declarations or exports. The X typed-hook allowlist failure was reproduced on clean mainfe79a0ff62afatboundary-invariants.test.ts:369with the same extraextensions/x/src/work-origin.ts; this PR changes neither input. Inherited failures are recorded in the campaign red-main inbox for their owners.The known OpenGrep hit is the unchanged
withCodexAppServerGitConfighelper attransport-stdio.ts:120(GIT_CONFIG_PARAMETERS); its trusted Git configuration handling predates this PR. No scanner rule or source suppression was changed.Other inherited executed failures are catalog readiness in three session-creation, five voice-creation and six HTTP-history cases (identical creation signatures on main run 38242205565); the unchanged agents restart-required fixture; the missing-
rgfixture; and the unchanged non-isolated runner fixture after main stopped emitting provenance notifications on database open. An unchanged node-host plugin abort fixture also expires its one-second wait; that path does not call the Gateway registry changed here. Its sole timing cause was not independently reproduced. These are failures, not passing checks, and their evidence is recorded for the red-main owners.Final diff against integrated main: 163 files, +3,617 / −2,314; tests/support +612 / −347; production/docs +3,005 / −1,967. No update/Doctor/schema migration/plugin loading/service lifecycle change; no published-driver update cell applies. The aggregate worker type file was over its lint limit on integrated main; current-entry wire contracts were moved unchanged into the worker-read contract module and row-backfill into its existing request module. The first relocation introduced a type-import cycle; the corrective commit restores the current-entry domain module’s original dependencies. Basic lint passes; the final CI graph check is reported above. The final native Codex request boundary was personally checked against sibling
app-server/src/message_processor.rsandapp-server/src/request_processors/turn_processor.rs.