Repository navigation
Conversation
Merge durable, published, and live registry rows before restoring only the final selected owners. Preserve prompt bytes and live lifecycle precedence while removing duplicate payload copies from turn-context preparation.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@clawsweeper review Please review the final selected-row hydration order, live ownership vetoes, and unchanged prompt output on f1bf598. Focused tests and independent Codex autoreview are clean; synthetic A/A/candidate measurements are in the PR body. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR restores subagent payloads after merging durable, published, and live rows, avoiding restoration of rows that are immediately replaced. Example: The retained run has a 1,400-character task and a compact live replacement labeled "current live label".
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR removes redundant payload restoration while preserving selection, live ownership vetoes, and payload provenance; no actionable correctness or security findings were found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe registry read owner combines persisted payloads with current publications and live lifecycle facts, then supplies selected full records to prompt rendering, registration, and descendant readers. flowchart TD
A[Durable registry rows] --> D[Merge selected records]
B[Committed publications] --> D
C[Live registry overrides] --> D
D --> E[Restore surviving payloads]
E --> F[Prepared read consumers]
F --> G[Subagent prompt context]
Technical reviewBest possible solution: Keep hydration in the existing registry read owner and apply it once to each surviving selected record. Do we have a high-confidence way to reproduce the issue? The original merge code restores compact durable records before restoring their live replacements, making duplicate work source-reproducible; no target code was executed during this read-only review. Is this the best way to solve the issue? The change removes work at its existing owner without adding state or changing selection contracts, and the focused regression protects both restoration count and returned content. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f02d9dc27259. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +18, Other +123. Total +141 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 21, 2026, 5:10 AM ET / 10:10 UTC. |
|
Merged via squash.
|
…3044 * origin/main: fix(ci): decouple boundary fixture from timing inventory (#203026) fix(ci): shard capable compatibility UI targets (#203042) perf(agents): restore selected subagent payloads once (#203039) fix: keep standalone context from completing QA tool steps perf(sessions): reuse sealed ownership for context projections (#203040) refactor(hooks): separate event predicates from hook registry (#203017) fix(ci): align update export audits with their consumers (#203030) fix: keep cold baseline checks within the existing heap limit
* feat: open shared sessions in their source Control UI * feat: open shared sessions in their source Control UI OpenClaw-Publication: a3826b6b-5899-8ff2-a1b5-84961c64219f * Merge remote-tracking branch 'origin/main' into land/open-original-203044 * origin/main: fix(ci): decouple boundary fixture from timing inventory (#203026) fix(ci): shard capable compatibility UI targets (#203042) perf(agents): restore selected subagent payloads once (#203039) fix: keep standalone context from completing QA tool steps perf(sessions): reuse sealed ownership for context projections (#203040) refactor(hooks): separate event predicates from hook registry (#203017) fix(ci): align update export audits with their consumers (#203030) fix: keep cold baseline checks within the existing heap limit * fix(session-share): accept the runtime config snapshot in the source link resolver The stored-session link resolver took a mutable config, so the plugin's readonly runtime snapshot failed production and test typechecks. Accept the snapshot type. Document the real Open original setup: allow the link command on the receiver Gateway, set the source Control UI origin, reinstall the source node with all three commands, then approve the widened surface. Move the section ahead of Security boundary and add a troubleshooting entry. Assert through the Gateway catalog list that a provider-supplied link survives streamed and final rows, and drop the menu unit test the browser fixture covers. * Merge remote-tracking branch 'origin/main' into land/open-original-203044 * origin/main: refactor(test): remove duplicate token startup wait case (#203087) fix: keep Plugin SDK declarations within the build limit fix(ci): remove unused hook type exports (#203074) fix(test): exercise the sign-in callback path guard (#203075) refactor(tts): separate caption eligibility from text helpers (#203068) test: reuse worker preload options (#203058) refactor(test): share Bun native-policy test launcher (#203064) fix(cron): a chat-created automation's failure notice reaches that chat (#203056) refactor(test): remove duplicate claw origin rejection case (#203067) refactor(channels): move chunk-mode lookup to streaming readers (#203047) refactor: separate skill queries from workspace discovery (#203045) fix: resume new chat turns in retained tasks after a restart refactor: separate usage pricing preparation from formatting (#203043) fix: avoid repeated filesystem probes before agent turns (#203057) perf(agents): preserve sealed history during endpoint compaction (#203037) fix(test): give deferred identity fixtures read scope (#203053) refactor(test): remove redundant channel catalog facade (#203052) refactor(cli): isolate daemon port presentation (#203020) refactor(cron): isolate CLI input parsing (#203031) * chore(plugin-sdk): record the approved session-discussion surface growth Open original adds two exports to openclaw/plugin-sdk/session-discussion: the stored-session Control UI path resolver and the session path parser. Raise the public export and callable budgets by two for them. Use neutral fixtures for the rejected-origin and rejected-query URL tests so the fixtures do not resemble credentials; the same rejections are covered. Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Merge durable, published, and live registry rows before restoring only the final selected owners. Preserve prompt bytes and live lifecycle precedence while removing duplicate payload copies from turn-context preparation.
* feat: open shared sessions in their source Control UI * feat: open shared sessions in their source Control UI OpenClaw-Publication: a3826b6b-5899-8ff2-a1b5-84961c64219f * Merge remote-tracking branch 'origin/main' into land/open-original-203044 * origin/main: fix(ci): decouple boundary fixture from timing inventory (openclaw#203026) fix(ci): shard capable compatibility UI targets (openclaw#203042) perf(agents): restore selected subagent payloads once (openclaw#203039) fix: keep standalone context from completing QA tool steps perf(sessions): reuse sealed ownership for context projections (openclaw#203040) refactor(hooks): separate event predicates from hook registry (openclaw#203017) fix(ci): align update export audits with their consumers (openclaw#203030) fix: keep cold baseline checks within the existing heap limit * fix(session-share): accept the runtime config snapshot in the source link resolver The stored-session link resolver took a mutable config, so the plugin's readonly runtime snapshot failed production and test typechecks. Accept the snapshot type. Document the real Open original setup: allow the link command on the receiver Gateway, set the source Control UI origin, reinstall the source node with all three commands, then approve the widened surface. Move the section ahead of Security boundary and add a troubleshooting entry. Assert through the Gateway catalog list that a provider-supplied link survives streamed and final rows, and drop the menu unit test the browser fixture covers. * Merge remote-tracking branch 'origin/main' into land/open-original-203044 * origin/main: refactor(test): remove duplicate token startup wait case (openclaw#203087) fix: keep Plugin SDK declarations within the build limit fix(ci): remove unused hook type exports (openclaw#203074) fix(test): exercise the sign-in callback path guard (openclaw#203075) refactor(tts): separate caption eligibility from text helpers (openclaw#203068) test: reuse worker preload options (openclaw#203058) refactor(test): share Bun native-policy test launcher (openclaw#203064) fix(cron): a chat-created automation's failure notice reaches that chat (openclaw#203056) refactor(test): remove duplicate claw origin rejection case (openclaw#203067) refactor(channels): move chunk-mode lookup to streaming readers (openclaw#203047) refactor: separate skill queries from workspace discovery (openclaw#203045) fix: resume new chat turns in retained tasks after a restart refactor: separate usage pricing preparation from formatting (openclaw#203043) fix: avoid repeated filesystem probes before agent turns (openclaw#203057) perf(agents): preserve sealed history during endpoint compaction (openclaw#203037) fix(test): give deferred identity fixtures read scope (openclaw#203053) refactor(test): remove redundant channel catalog facade (openclaw#203052) refactor(cli): isolate daemon port presentation (openclaw#203020) refactor(cron): isolate CLI input parsing (openclaw#203031) * chore(plugin-sdk): record the approved session-discussion surface growth Open original adds two exports to openclaw/plugin-sdk/session-discussion: the stored-session Control UI path resolver and the session path parser. Raise the public export and callable budgets by two for them. Use neutral fixtures for the rejected-origin and rejected-query URL tests so the fixtures do not resemble credentials; the same rejections are covered. Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: vincentkoc <[email protected]>
What Problem This Solves
Preparing a turn's subagent context restores retained payloads for durable registry rows and then restores their live replacements again. The first restored object is immediately discarded, adding allocation and CPU work to every affected turn.
User Impact
Subagent prompt content stays identical while registry reads allocate less. There are no configuration, schema, retention, permissions, or API changes.
Why This Change Was Made
The existing registry read owner now finishes merging durable facts, publications, and live overrides before restoring the final selected rows. This removes duplicate restoration while retaining live ownership vetoes and payload provenance. Production LOC is net zero (9 added, 9 removed); regression coverage adds 18 lines and the reproducible synthetic workload is 123 lines. No cache is added.
The turn-context renderer needs task text, pending results, and yielded-child dependencies, so a session-key-only read cannot preserve its output. This change keeps that read contract and removes the redundant work inside its owner.
Evidence
The prepared-read regression fails on the original code with two payload restorations for one final live row and passes after the fix with one. Full task text and current live metadata are preserved. All 104 focused tests pass across registry reads, refresh/accounting, prompt rendering, memory, and prompt-prefix stability (135.42 seconds wrapper wall).
Measurement acceptance was recorded before the campaign: identical prompt bytes, lower allocation beyond A/A variation, fewer restorations, and no 20% or greater wall/CPU regression. The committed workload exercises the actual turn-context renderer with 700 synthetic SQLite rows, a 100-level requester chain, 60 suspended results, 4 KiB tasks, and 8 KiB result payloads. Five serial A1/A2/B rounds reverse arm order on alternating rounds; each sample uses 50 warm timing calls and 20 allocation calls. Setup/imports are excluded. Main-thread sampled allocation includes objects collected by minor and major GC. The affected path does not scan workspaces or agent-session databases. This is owner-level synthetic proof, not whole-Gateway throughput.
Allocation falls 7.96% against the combined baseline median (25,209,802 → 23,203,560 bytes). A/A allocation medians differ 0.63%; all candidate allocation samples are below every baseline sample. Combined main-thread CPU medians are 14.997 → 13.988 ms; wall medians are 36.150 → 37.114 ms (+2.7%). Host load ranged 14.23–34.61, and timing spread is substantial: no latency or statistically established CPU improvement is claimed. No median/p95 metric crosses the predeclared 20% regression threshold.
First-read observations are separate: A1/A2/B wall medians 476.5/509.5/535.0 ms and main-thread CPU 28.367/32.805/32.332 ms. These include lazy owner setup and are noisy observations, not a cold-start improvement claim. Across all 15 samples, the prompt SHA-256 is
4e22de8c9c6a51a2ec0c75695f08c297c2248c24795885cd322a380d3dcb7bae.Reproduce with
node --expose-gc --import ./scripts/tsx.mjs scripts/perf/subagent-prompt-snapshot.ts <arm> [cpu-profile-path]in baseline and candidate checkouts, using the same workload file. Five A1/A2/B rounds, reversed on alternate rounds; Node 26.12.1 on macOS. Allocation excludes worker heaps; main-thread CPU excludes worker CPU. Worker/read scope is unchanged.Independent Codex autoreview of the full local candidate against
4c7701017b653, including snapshot/memory/payload owner context, is scoped-clean through P2 with no actionable findings.pnpm check:changed --stagedran all selected gates. Core and test typechecks, production lint, format, boundary guards and import cycles passed. Benchmark type/lint issues were corrected and both affected checks pass. The remaining dead-export findings are inherited CLI-update issues introduced byb229b2664537d/ #200578:exposeGlobalPackageThroughRelease,resolveGitReleaseCheckout, andwriteGitUpdateResultFixture. The same three findings reproduce withpnpm deadcode:exportson the exact main parent4c7701017b653; this is a main validation regression, not ignored noise. Final Codex autoreview after the benchmark-only correction is scoped-clean through P2. No Control UI import reaches the changed production owner.Exact-head CI run 44892652133, attempt 2 passed. Attempt 1 hit the 60-second no-output watchdog before any assertion result in
server-runtime-services.correlated-recovery.test.ts; all six tests then passed locally with the same limit. One diagnosed startup-stall retry of failed jobs passed on the unchanged head, with no timeout or test changes. ClawSweeper final-head review reports zero findings and no open items.