Skip to content

perf(sessions): avoid recloning registry maintenance reads - #160182

Closed
steipete wants to merge 14 commits into
mainfrom
steipete/perf-micro-session-store-read-structured-clone-20260919
Closed

steipete wants to merge 14 commits into
mainfrom
steipete/perf-micro-session-store-read-structured-clone-20260919

Conversation

@steipete

@steipete steipete commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #160510, merged as c23c65947920b7a53d51d39384f3cd1630e3390c at 2026-09-28 17:33 UTC. The merged owner removes both whole-store clones and retains full-entry deletion CAS and live commit authority, with additional snapshot-race coverage. This PR's final head passed all CI before the overlap was detected. Closing this duplicate keeps one implementation on main; the branch and its remaining validated fixture/routing repairs are retained for follow-up. No merge or production deployment was performed from this lane.

What Problem This Solves

Session-registry maintenance deep-copies every session entry on the Gateway thread after its worker read. A deployed allocation sample attributed 770 MB in 30 seconds to that callback. Worker transport already provides owned entries, so the second whole-store copy is unnecessary.

User Impact

Maintenance allocates less memory while preserving preview isolation, pruning, transcript archival, and live commit guards. No configuration, schema, retention, migration, or update behavior changes.

Why This Change Was Made

Consume the owned worker result directly and share pruning between preview and apply. This removes both whole-store structuredClone calls and 15 lines of application code. The generic worker reader already returned its result directly.

CI investigation also produced bounded tooling/fixture repairs: retain Node's existing GC-test ownership for plugin retention tests; keep FaceTime's port claim until helper shutdown; join parent-fork writers before teardown; coordinate fake clocks with real worker I/O; and wait for UI startup before assertions. The CLI broadcast and concurrent native-client stalls remain unexplained; their fixtures gain failure diagnostics without changing deadlines or assertions.

The change reuses existing fixtures and table-driven coverage without adding production test seams, persistent caches, or configuration options.

Evidence

The allocation fixture used 150 entries with an 8 KiB saved prompt each, 20 warmed calls per mode through runSessionRegistryMaintenanceForStore, a 4 KiB sampling interval, and both collected-object flags. Measurements include main-thread worker receipt and maintenance consumption.

Mode Before bytes/read After bytes/read Reduction Extra whole-store clones/read
Preview 3,024,146 1,680,654 44.4% 1 → 0
Apply, no eligible removals 2,985,677 1,659,785 44.4% 1 → 0

Profiled time was 5.06 → 4.01 ms/read for preview and 3.17 → 2.13 ms/read for apply. These used separate leases of the same class after a sync failure; timing is indicative. A same-process 500-entry consumer benchmark measured 2,756,118 → 366,678 bytes/read and 7.09 → 0.22 ms/read. Both preview/apply regression cases failed on the original clone and passed after removal.

All heavy execution used blacksmith-testbox, profile openclaw-check. No local suites, builds, or typechecks, and no production runtime changes/restarts. All thirteen task-owned leases are stopped. Final head a376cd0172e561526a0f63693368ba9a510a47b5 passed CI run 36456785996: 127 successful jobs, 21 intentional skips, zero failures or pending jobs.

Testbox validation and CI repair evidence

The requester retry-clock repair follows @vincentkoc's #160407 (88e3331026a1); its duplicate branch edit and the config-audit watcher edit were removed once byte-identical to main. The changes reuse existing fixtures and table-driven coverage without adding production test seams, persistent caches, or configuration options. The duplicate UI liveness fixture edit was removed after d6aa710c5091 landed on main with the same canonical seed and an additional deterministic delayed-describe check; the PR no longer changes that file. The recovery-admission fixture likewise follows main's 9fe93a204e3b, which observes each failed write and bounds fake timer advancement; our duplicate repair was removed after that overlap became a conflict. Main also supplies the synthetic-build artifact model through #160532 (4902e4ae49a6) and the stronger delayed-startup/sidebar-peer probe in 6b9da9dc0287; their equivalent branch edits were removed. Combining our earlier sidebar hydration wait with main's deliberately held startup would otherwise block that fixture. The same cutover applies to main's owner-keyboard probe (94cbd1335dfb). The measured source-reader optimization is now provided by #160517 (abb37032e7f7) and the related planner improvements in #160531; its duplicate implementation and regression were removed from this PR. Main's d9569745764f also supplies the equivalent heartbeat completion-hook repair; its duplicate was removed after source comparison. Main's e256cbef8ae0 supplies Send readiness for all companion commands and held-module cleanup (113 integrated E2E cases passed); the narrower branch edit was removed. Main's #160410 (93a13da9a036) supplies the complete typed sharing-evidence fixture for avatar rendering; the branch's unproven URL-only hypothesis was removed.

During CI repair, the original Git-prefilter reduction was superseded by main's native multi-term reader. The subsequent matching-only repair below has also landed independently on main, so neither duplicate remains here. Profiling the actual CI merge then found 42,519 files parsed, including 40,398 that matched none of the requested terms; parsing consumed 29.2 seconds. Term-scoped reads now discard unmatched rows before import parsing and leave them uncached for later full-graph discovery. Default full reads are unchanged. In the original three-file group on the same Testbox, the previously timed-out planner case improved 81.228 → 41.455 seconds (49.0%); all 114 cases passed. The group's overall wall time was dominated by its unrelated process-report sibling and did not improve (149.47 → 153.67 seconds).

  • Baseline tbx_01m3k5zbb5wshpateke7nf5fs5 (run): allocation fixture passed; both copy regressions failed as intended.

  • Candidate tbx_01m3k6swh76hv0dvrbqt762nn4 (run): allocation fixture and maintenance tests passed. Accessor, read-only accessor, entry-reader, registry, restart-recovery, and registry-lifecycle proof passed six files across three shards in 50.06 s. pnpm test src/config/sessions/session-registry-maintenance.test.ts --maxWorkers=1: six cases, 24.052 s wall including cold compilation, 3.925 s test bodies. node scripts/check-changed.mjs passed guards, formatting, types, and dead exports, then hit the inherited UI line cap already fixed by fix(ci): keep chat attachment controls within lint limit #160159 and incorporated into the branch.

  • Retention/port diagnosis: tbx_01m3kbxmsfb540e3pawc4dagwf and tbx_01m3kdb5g13f6f624cj2b7nf9g. The original Bun shard and direct-source probes reproduced retention failures despite full GC, producer-local cleanup, and 32 collections. All nine unchanged cases passed Node. Routing regression failed all three policy rows on old code. Temporary probes were removed.

  • First CI repair tbx_01m3kex9r0z619bp1vkwwpsen5 (run): pnpm test test/scripts/ci-run-node-test-shard.test.ts --maxWorkers=1 passed 179 cases / 4.632 s wall. Original group passed all 532 cases as nine Node + 523 Bun. FaceTime's 18 cases passed 20 standalone runs, and its original 31-file shard passed three times (459 passes, 48 existing skips each). Standalone FaceTime wall: 6.029 s cold, approximately 5.1–5.4 s warm. Matching types/lint passed.

  • Second-pass diagnosis tbx_01m3khbvzjnatywk0jk5h2fnnc (run): reproduced heartbeat admission and planner ownership mismatches. Mobile-pairing original shard passed 456 cases plus 20 focused repetitions; no timer attribution was established. Preflight shard passed 544 cases; its import timeout did not reproduce. Recovery-admission timeouts were observed and later investigated below.

  • Fixture validation tbx_01m3kpatnkkmta5arfhm3kzmka (run): source hashes verified. Focused custody/handoff/update proof passed 51 cases / 22.23 s. Parent-fork's 16 cases passed 20 times (22.254 s first wall, 14–27 s afterward); its original 56-file shard passed three times (657 passes, five existing skips). Original heartbeat and planner shards passed 95 and 131 cases. Five affected typegraphs and scoped lint passed. Single-file pnpm test <file> --maxWorkers=1: heartbeat 40 cases / 75.236 s, update authority 19 / 10.791 s, planner seven / 141.773 s.

  • Actual conflict resolution used base da51d9edccb3; range-diff proved the performance and first repair commits unchanged. Upstream heartbeat, active-Node, planner expectation, and custody diagnostic fixes were retained. tbx_01m3ksahndxsnpybxq7dhppfnw (run) passed all 22 maintenance/parent-fork cases. Updated custody assertions rejected a proposed early-return guard, which was removed. tbx_01m3ksv0qfszs0cxxzh9pxtmd6 (run) then passed all 24 unchanged custody cases and the upstream heartbeat regression, with source hashes verified.

  • Planner/config repair tbx_01m3ktzh0erpmaar5fwx2nbep1 (run): original config job's three groups passed before the fixture repair; that replay alone is not claimed as a fix. Profiling isolated Git's candidate prefilter, and the paired query comparison above proved identical candidates. node scripts/run-vitest.mjs test/scripts/ci-changed-node-test-plan.test.ts test/scripts/test-projects.test.ts passed 2,100 cases. Full planner integration passed seven cases / 210.32 s wall; its timed-out case took 44.399 s. Full config-RPC file passed 81 cases / 139.76 s. Matching types, lint, source guards, and script erasability passed. Whole-file times across leases are not controlled speed comparisons.

  • Final fixtures tbx_01m3kyc5am7p24gxt5w0z7kqst (run): original Gateway-methods group passed 542 cases across 28 files. A temporary bounded CPU workload reproduced the coalescing fixture's mixed-clock deadlock; the same workload passed after clock alignment and was removed. Full coalescing file passed 35 cases / 12.36 s wall on the final patch; six publication-owner cases, including deliberate 7 ms yielding, passed unchanged. Requester-wake passed all 18 cases (67.01 s test duration; 816.25 s wall including the required full runtime build). UI mock-data tests passed 54 cases without browser automation. Original CLI group passed five files / 40 cases; the previously timed-out broadcast case passed in 1.019 s. Recovery diagnostics proved that a delayed first write could miss the fixture's sole clock advance, and that cleanup advanced 30 minutes across live I/O. The corrected fixture observes deferred scheduling and advances only its owned repair timer. Full recovery file passed 11 cases / 31.52 s wall, its retry-owner sibling passed, and the original 32-file group passed 611 cases with seven existing skips (350.07 s test duration).

  • Follow-up repair tbx_01m3m52bpax5v2b6pb9hjtaefc (run): used a detached copy of the actual tested merge 0fa6a101929a after runner queueing. Original planner group passed 114 cases / 149.47 s wall; passing replay was not claimed as a fix. Phase timings attributed 59.4 of 67.6 seconds to exhaustive changed-file planning; reader profiling isolated the unnecessary parsing above. The extended native-reader regression failed on old code for the extra unmatched row. Original heartbeat group passed 303 cases / 418.90 s wall, with the two CI failures replaying at 4.361 / 4.120 s; CI had failed their five-second rendezvous. Moving the same observations into the existing post-confirmation/pre-completion hook preserves every outcome assertion without a timer. Candidate selector suites passed 2,103 cases / 496.91 s wall. pnpm test src/infra/heartbeat-runner.isolated-session-mirror.test.ts --maxWorkers=1 passed eight cases / 72.67 s wall. Candidate original planner group passed all 114 cases / 153.67 s wall, with the previously timed-out case reduced to 41.455 s. All three affected typegraphs (scripts, root script tests, infra tests), scoped lint, line/assertion guards, and script erasability passed. pnpm test test/scripts/test-projects.test.ts --maxWorkers=1 passed 1,778 cases / 84.68 s wall. The isolated merge checkout and temporary profiling files were removed before lease shutdown.

  • Current fixture repair tbx_01m3m9v0ajeryg9crzy1aw8ecz (run): used the exact CI merge 1deb88a7cd67. The original four-file tooling group reproduced both synthetic build-state failures (248 passed, two failed). Main's declaration prerequisite correctly requested another build because the fake successful builder had created no artifacts. A fixture-owned marker now models only the manifest's exact declaration paths, preserving build counts and reader ordering. All seven preparation cases, eight prebuilt-owner cases, and the original 250-case group passed; pnpm test test/scripts/run-vitest-bounded.test.ts --maxWorkers=1 passed 39 cases / 36.06 s wall. The UI corrections preserve assertions while waiting for startup issuance or enabled submission; the owner-facet hydration edit was subsequently superseded by main; the avatar fixture now uses its explicit session URL. UI E2E types and scoped lint passed; no browser automation was run. The original six-file native-client group with observation-only tracing passed 56 cases / 92.50 s wall, including the previously stalled case in 15.549 s. Its original cancellation cause remains unproven, so only failure diagnostics were added. pnpm test extensions/codex/src/app-server/run-attempt-thread-cleanup.test.ts --maxWorkers=1 passed 15 cases / 91.01 s wall including cold compiler preparation. Root-tooling and extension-test typegraphs, scoped lint, formatting, line and assertion guards passed. Temporary diagnostic edits were removed.

Fresh independent Codex review is scoped-clean at P0–P2 for the performance change and every retained repair. All five affected typegraphs, scoped core/UI lint, and source guards passed. The final clock-restoration edit passed its Gateway-methods typegraph and lint again. pnpm test src/cli/help-exit.process.test.ts --maxWorkers=1 passed 29 cases / 85.48 s wall (82.80 s Vitest duration, including worker-output preparation). All temporary profiling, CPU-load, and phase-marker source changes have been removed. Native sync failures required lease replacement; dependencies were installed once per missing installation with pnpm install --frozen-lockfile. Some successful commands had a subsequent runner-portal notification timeout; command results and cleanup were verified independently.

Hosted failures: initial runs 36383928843 and 36394427021 exposed the earlier fixture/tooling issues; 36410783370 was cancelled after direct proof rejected the custody guard. Run 36412090209 exposed config/planner failures and the mixed-clock cleanup cascade. Run 36418675948 exposed UI fixture liveness, requester fake-time/worker-I/O, CLI broadcast timeout, and recovery-admission failures. Head f46483cf52f0 could not attach CI because its duplicate UI fixture change conflicted with the upstream fix; removing that duplicate resolves the overlap without rebasing. The resulting head received run 36431230399: 128 jobs passed; the two substantive failures were the planner inventory deadline and heartbeat delivery-confirmation fixture deadlines, investigated and repaired above. The aggregate gate also failed. Run 36440190003 then exposed the synthetic declaration-state fixture, five UI fixture scenarios across four jobs, and an intermittent native-client cleanup timeout; one extension-package-boundary job was cancelled. Those findings and their proof limits are recorded above. No workflow reruns or proof-only pushes were used.

The separate subagent-suppression predicate still reads a full entry: its current session/run/recovery authority requires extending the existing prepared-facts owner before that read can be removed safely. No post-deployment allocation profile is claimed. The CLI 100-second stall, the native-client concurrent-turn stall, and earlier nonreproduced mobile/preflight failures remain documented uncertainties. The retained cold-startup UI fixture passed normal hosted E2E on the final head; this task ran no browser automation. The sidebar and owner-keyboard fixtures follow upstream browser proof: six cases / 49.08 s wall and two files / 12 cases / 23.99 s wall respectively. The superseding upstream UI fixture commit records 11 E2E and 29 unit cases passing; this task used no browser automation.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 28, 2026 05:54
@steipete
steipete enabled auto-merge (squash) September 28, 2026 05:59
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 28, 2026, 1:22 PM ET / 17:22 UTC (Revision 11).

ClawSweeper review

What this changes

The branch removes redundant copying during cron-session maintenance and adjusts CI routing, test cleanup, diagnostics, and a Control UI startup fixture.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep this PR open. Current main still performs the extra session-store copy, and the submitted performance evidence supports the change. GitHub reports the exact head as conflicted, and the retained Control UI browser case still needs validation on an integrated head.

Priority: P2
Reviewed head: a376cd0172e561526a0f63693368ba9a510a47b5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The optimization is focused and well measured, with integration conflict and one browser fixture validation still outstanding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR records Testbox before/after allocation and behavior runs through the changed session-maintenance function with SQLite worker reads, including preview and apply results. The retained Control UI fixture has separate browser-coverage work; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR records Testbox before/after allocation and behavior runs through the changed session-maintenance function with SQLite worker reads, including preview and apply results. The retained Control UI fixture has separate browser-coverage work; no stored-data contract changes.
Evidence reviewed 8 items Current main still copies the store: Both preview and apply call structuredClone after the worker read, so the central optimization remains absent from current main.
Introduced optimization: The pinned introduced diff prunes the assembled worker result directly and retains the guarded lifecycle mutation for apply.
Reader ownership: The session reader obtains entries from its worker and keeps the reader-current assertion through the maintenance consumer.
Findings None None.
Security None None.

How this fits together

Cron-session maintenance reads per-agent session entries through a SQLite worker, identifies expired runs, and either previews pruning or commits removals with lifecycle guards. Tests and CI fixtures exercise that path and adjacent Gateway, plugin, CLI, and Control UI behavior.

flowchart LR
  A[Cron maintenance request] --> B[SQLite worker read]
  B --> C[Owned session entries]
  C --> D{Preview or apply}
  D --> E[Pruning summary]
  D --> F[Guarded removal and archive]
  F --> E
Loading

Before merge

  • Resolve merge risk (P1) - GitHub reports this exact head as conflicted with its base. The resulting composition with current main, including CI test selection, has not been validated.
  • Resolve merge risk (P1) - The retained cold-start Control UI test change has not run in a browser on an integrated head.
  • Complete next step (P2) - Resolve the reported merge conflict and validate the retained cold-start Control UI browser case on the integrated head.
Agent review details

Security

None.

PR surface

Source -15, Tests +24, Other +1. Total +10 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 1 8 23 -15
Tests 8 107 83 +24
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 10 116 106 +10

Review metrics

Metric Value Why it matters
Measured allocation per maintenance read 44.4% lower in preview and apply The PR records before/after measurements through the changed production maintenance function.

Merge-risk options

Maintainer options:

  1. Integrate and validate (recommended)
    Resolve the conflict while retaining current-main fixes, then verify the Node test route and cold-start browser case on the integrated head.

Technical review

Best possible solution:

Use the worker-owned entries for preview and apply pruning while preserving lifecycle commit guards and transcript archival; retain only fixture repairs that current main does not already provide.

Do we have a high-confidence way to reproduce the issue?

Yes. Current-main source still clones the whole assembled store in both modes, and the PR records a focused before/after allocation path; this read-only review did not rerun it.

Is this the best way to solve the issue?

Yes. Consuming the worker-owned result removes the redundant copy within the existing maintenance owner while retaining the guarded removal path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 20021ebe9b7a.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a measured, bounded session-maintenance performance improvement rather than an urgent user-facing regression.
  • merge-risk: 🚨 automation: The branch changes Node-versus-Bun test routing, and the exact integrated CI selection is unresolved while the head is conflicted.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR records Testbox before/after allocation and behavior runs through the changed session-maintenance function with SQLite worker reads, including preview and apply results. The retained Control UI fixture has separate browser-coverage work; no stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR records Testbox before/after allocation and behavior runs through the changed session-maintenance function with SQLite worker reads, including preview and apply results. The retained Control UI fixture has separate browser-coverage work; no stored-data contract changes.

Evidence

What I checked:

  • Current main still copies the store: Both preview and apply call structuredClone after the worker read, so the central optimization remains absent from current main. (src/config/sessions/session-registry-maintenance.ts:130, 20021ebe9b7a)
  • Introduced optimization: The pinned introduced diff prunes the assembled worker result directly and retains the guarded lifecycle mutation for apply. (src/config/sessions/session-registry-maintenance.ts:125, a376cd0172e5)
  • Reader ownership: The session reader obtains entries from its worker and keeps the reader-current assertion through the maintenance consumer. (src/config/sessions/session-entry-read-runtime.ts:510, a376cd0172e5)
  • Behavior and allocation proof: The PR body, verified against its captured SHA-256, reports before/after Testbox runs through the production maintenance function: 44.4% fewer measured bytes per read in both preview and apply, with the original copy regressions failing before and passing after. This review did not execute those runs.
  • Integration state: GitHub reports mergeable=false and mergeable_state=dirty for the exact reviewed head and pinned base; no pinned test-merge tree was available. (a376cd0172e5)
  • Prior review continuity: The prior review requested conflict resolution and three browser cases. The current head retains only one changed Control UI browser file; that file is unchanged from the prior reviewed head, and the PR body says browser automation was not run for this retained change. (ui/src/e2e/chat-flow.navigation-presentation.e2e.test.ts:94, a376cd0172e5)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • SunnyShu: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Heming Zeng: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Run the retained cold-start chat case in the browser harness after resolving the conflict.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-28T10:33:24.911Z sha 9368032 :: blocked before merge. :: none
  • reviewed 2026-09-28T10:45:11.841Z sha 5e3eabf :: blocked before merge. :: none
  • reviewed 2026-09-28T10:57:47.603Z sha 1047f44 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T12:04:36.848Z sha 3cce879 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T13:55:59.706Z sha 29ccd16 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T15:06:51.256Z sha cb92897 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T16:27:28.926Z sha 31297f9 :: blocked before merge. :: none
  • reviewed 2026-09-28T16:41:37.433Z sha db07848 :: blocked before merge. :: none

@steipete
steipete force-pushed the steipete/perf-micro-session-store-read-structured-clone-20260919 branch from 06f933b to 200e9c3 Compare September 28, 2026 07:56
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts plugin: facetime FaceTime plugin labels Sep 28, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: M and removed size: S labels Sep 28, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Sep 28, 2026
Refuse retained version-3 custody before inspecting mutable stored rows. Join parent-fork database writers before teardown and await successor admission before creating the heartbeat replacement.

Reuse the active-Node fixture repair from 8b549de and the selected-tooling-owner assertion from 5362ba0. Existing assertions, storage validation, and test counts remain intact.

Validated focused regressions, original shard replays, five type graphs, and scoped lint on Blacksmith Testbox. Independent review found no actionable P0-P2 issues.
@steipete
steipete force-pushed the steipete/perf-micro-session-store-read-structured-clone-20260919 branch from 9368032 to 5e3eabf Compare September 28, 2026 10:37
@openclaw-barnacle openclaw-barnacle Bot added size: S and removed cli CLI command changes size: M labels Sep 28, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 28, 2026
Remove the early refusal added during CI repair. Main now carries fa90c83, which corrects the stale custody assertions to require the existing stored-row incompatibility diagnostic. Keep that owner and its assertions intact.

All 24 custody cases and the upstream heartbeat admission regression pass on Blacksmith Testbox with exact source hashes verified. Independent review found no actionable P0-P2 findings.
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 28, 2026
@clawsweeper clawsweeper Bot added the rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. label Sep 28, 2026
Remove containing literal patterns already covered by shorter patterns from Git candidate filtering. Keep native per-term source facts and caches unchanged, and preserve embedded-newline pattern inputs. The same 2,116 candidates take 842 patterns instead of 2,897; a paired Testbox comparison measured 22.34 to 8.80 seconds.

Disable independent file notifications only in the manually seeded approved-operation audit table. Managed reads, preflight, activation, and journal assertions remain real.

Blacksmith Testbox passed 2,100 planner compatibility tests, all seven integration cases, all 81 config-RPC cases, targeted typechecks, lint, and source guards. Fresh independent review found no actionable P0-P2 issues.
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Sep 28, 2026
Align session publication clocks, join requester retry I/O, and observe deferred
recovery scheduling before advancing its owned timer. Seed progress liveness
consistently and preserve CLI child output for the unreproduced timeout.

Validated on Blacksmith Testbox tbx_01m3kyc5am7p24gxt5w0z7kqst:
focused suites, original CI groups, five typegraphs, scoped lint and guards.
Independent review found no actionable P0-P2 findings.

Co-authored-by: Vincent Koc <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui cli CLI command changes agents Agent runtime and tooling size: M and removed size: S labels Sep 28, 2026
…ures

Filter term-scoped source reads before import parsing while preserving full
reads and leaving unmatched files uncached for later graph discovery. The
planner case improved from 81.228 to 41.455 seconds in the same Testbox group.
Remove the old substring reduction superseded by the native source reader.

Observe heartbeat awareness inside the existing delivery-completion hook,
preserving confirmation-before-completion ordering without a five-second
fixture rendezvous.

Blacksmith Testbox tbx_01m3m52bpax5v2b6pb9hjtaefc: regression rejected old
reader, 2103 selector cases passed, eight heartbeat cases passed, original
114-case planner group passed, and scoped types/lint/guards passed.
Independent P0-P2 review found no actionable issues.
Publish synthetic declaration readiness only after the fake AI builder succeeds
and seed it for prebuilt fixtures. Keep existing build and reader assertions.

Wait for startup issuance, canonical roster hydration, and enabled submission
before testing UI behavior. Give the avatar fixture its explicit session URL.
Record timeout ownership and RPC methods on native-client fixture failure;
the intermittent stall was not reproduced and is not claimed fixed.

Blacksmith Testbox tbx_01m3m9v0ajeryg9crzy1aw8ecz: original declaration
failures reproduced; 250-case tooling group, 39-case file, 56-case native
group, and 15-case file passed. Types, lint, guards, and independent P0-P2
review passed. Browser execution remains with ordinary hosted CI.
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 28, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the agents Agent runtime and tooling label Sep 28, 2026
@steipete steipete closed this Sep 28, 2026
auto-merge was automatically disabled September 28, 2026 17:55

Pull request was closed

steipete added a commit that referenced this pull request Sep 28, 2026
Recover the focused clock repair from f46483c (#160182), whose
performance work was superseded while this validated fixture fix remained
unmerged. Fake debounce timers and real publication budgets could deadlock
the held-generation drain and cascade through the rest of the CI shard.
Bind the fixture's performance clock to fake Date and restore it before the
real-I/O case and at test completion. Production budgets and assertions stay
unchanged.

Validation: a finite CPU workload reproduces the original test/hook timeout
on CI's pinned Bun and passes both churn variants after the repair. The
normal owner/sibling suites pass 41 cases; the original CI selection passes
452 cases across 27 files. Complete changed checks and independent Codex
P0-P2 review pass. Testbox proof: run 36476506157.

Related: #160508, #160182
Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
Recover the focused clock repair from f46483c (openclaw#160182), whose
performance work was superseded while this validated fixture fix remained
unmerged. Fake debounce timers and real publication budgets could deadlock
the held-generation drain and cascade through the rest of the CI shard.
Bind the fixture's performance clock to fake Date and restore it before the
real-I/O case and at test completion. Production budgets and assertions stay
unchanged.

Validation: a finite CPU workload reproduces the original test/hook timeout
on CI's pinned Bun and passes both churn variants after the repair. The
normal owner/sibling suites pass 41 cases; the original CI selection passes
452 cases across 27 files. Complete changed checks and independent Codex
P0-P2 review pass. Testbox proof: run 36476506157.

Related: openclaw#160508, openclaw#160182
Co-authored-by: Vincent Koc <[email protected]>
@RomneyDa
RomneyDa deleted the steipete/perf-micro-session-store-read-structured-clone-20260919 branch October 22, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui cli CLI command changes extensions: codex gateway Gateway runtime merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. plugin: facetime FaceTime plugin proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant