Skip to content

fix: undo cold-session compaction CPU and latency regressions - #199561

Merged
RomneyDa merged 4 commits into
mainfrom
openclaw/revert-compaction-196550
Nov 15, 2026
Merged

RomneyDa merged 4 commits into
mainfrom
openclaw/revert-compaction-196550

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes the cold-session compaction CPU and latency regressions introduced by #196550 by reverting that change.

User Impact

Restores the prior in-process compaction path. This deliberately gives up the reverted implementation’s worker-offload and burst-workload benefits in favor of the cold workload that dominates this deployment. No schema, configuration, or transcript-format migration is introduced.

Why This Change Was Made

Reverts squash commit c9ee2646f8c6a8869a2a1ae7629e7615204cf9fc at @vincentkoc’s request after the measured cold-workload regressions. Preserves subsequent context-reader batching and PostgreSQL fallback, shared reader-lane and pressure-lifecycle changes, and unrelated later-main fixes. Removes the dependent test/entry registrations for modules deleted by the revert.

Requested by @vincentkoc. Original implementation by @RomneyDa; cc @RomneyDa.

Work sessions

Linked for team reference; these sessions aren’t public.

Evidence

Current candidate — main integration and focused validation

  • Current published head: 382045388fd8612132c04aa7b305db0c10781aa6; reviewed tree: 2bc6eff35dab0e1063bdca3809f6b47162cbcd2e. Signed merge commit 67be181c268bdaf652bb458c48d7d4435985a245 integrates pinned main 8f9bd10825ff371258be39c9a033df0ce361fa60 with prior head a8fd279d114d45c27609f90e87f1d73604885d55. The publisher’s subsequent metadata commit has no tree delta.
  • Resolved the three fix(worker-runtime): reserve a class-0 lane for access checks #199564 conflicts by keeping the retired compaction-source module deleted and the request runner at its reader owner, while preserving main’s request-options object, explicit trajectory timeout, transport-only pointRead stripping/forwarding, and reserved-lane dispatch. All 214 unrelated-main paths and 76 nonoverlapping rollback paths were verified unchanged against their respective parents.
  • Focused batches passed separately: reader factory 20, worker lanes 29, sharing preparation 44, pool preparation 33, and wrapper inventory 1 (22 other wrapper tests unselected). These are separate batch counts, not a pooled unique-test total. Sharing/pool contracts include saturated-pool point-read admission and rejection of host callbacks.
  • Four-file format/lint, staged line-cap/max-lines/assertion guards against pinned main, production core types, matching sessions/gateway/infra/tooling test type graphs, and diff checks passed in the qualified private Node 26 environment with clear environment, proxy inheritance disabled, network disabled, default heaps, 2 CPUs/8 GiB and zero swap. Root and workspace dependency manifests and private install metadata were unchanged.
  • A supplemental actual-reader-factory probe verifies the explicit timeout object/signal and transport-only pointRead true/undefined cases. Its first fixture incorrectly expected an empty environment although the existing capture owner supplies a state directory; that failed receipt is retained. A separate corrected fixture with an explicit valid synthetic storage environment passed the exact assertions. No product or tracked-test change weakened the contract.
  • Fresh independent integration review, hands-on review, and the supported full-candidate local review against the pinned main commit found no actionable findings; the latter completed all seven passes over the full 82-path product delta. The signed merge commit used normal hooks without overrides; documented merge-operation hook early returns do not replace the separately completed focused guards.
  • Both exact current-pair canonical source-performance runtime builds and the two original native cold qualifications passed using committed workload f292067c3edd57b778ccfcfd313e3e37075ca89b. The declared recovery1 comparison is now terminal: 10/10 observations native-valid and comparison-controller exit 0. These are scoped runtime builds, not full public-package/declaration proof. Exact-head Build workflow 43708537631 also passed. Full public-package/declaration proof and live PostgreSQL remain unrun.
  • Exact-head test workflow 43708537753 remains failed: all 121 jobs were accounted for (91 success, 27 skipped, 3 failed including the aggregate gate). CI tested merge 709d8e308274c32f233bcd66088234b31062d4fc, parents pinned main 8f9bd10825ff371258be39c9a033df0ce361fa60 and PR head 382045388fd8612132c04aa7b305db0c10781aa6, tree 2bc6eff35dab0e1063bdca3809f6b47162cbcd2e. The pinned 8f9 main baseline, through the canonical wrapper, reproduced the reset assertion at line 630: executionStarted false→true with status:error (one failed case, 27 unselected—not a green test or collector). Four Talk cancellation cases have matching signatures on scheduled main 43704054063. These failures are attributed to baseline, not repaired or waived here; neither the native unknown-by-job-name classification nor the failed gate is relabeled green. Security, dependency and enforced-review requirements remain independent.
  • Current-head native workspace qualification, review initialization, main/PR checkouts, PR-head guard and review-artifact validation completed for exact 382045388fd8612132c04aa7b305db0c10781aa6, with recommendation NEEDS DISCUSSION and tests recorded as failed. The recorded tests.preExistingCi binds workflow 43708537753, attempt 1, and that exact head; the native unknown classification and failed CI remain retained, not green. This review-artifact operation reused an existing frozen dependency entry without installation, lifecycle generation or product execution. The superseded a8fd review remains preserved. Native preparation, inherited-failure admission and explicit owner acceptance of the adverse metrics remain pending; no READY FOR /prepare-pr is claimed.

HOLD — @vincentkoc’s informed, explicit acceptance of the current adverse tradeoffs is still required, together with the current-head native workflow and supported CI admission. The 09:02 revert/land direction and the older V1 memory question are not acceptance or a waiver of these current results. No auto-merge is enabled.

A worse metric needs the owner's explicit acceptance in the PR.

— Performance skill, pinned current head, §4 Land

V2 infrastructure recovery — preserved declaration and final disposition

The original V2 comparison on main 8f9bd10825ff371258be39c9a033df0ce361fa60 versus revert 382045388fd8612132c04aa7b305db0c10781aa6 was interrupted: six observations completed; original slot 7 started but was noneligible, stopping after confirmed seed shutdown before any recorded successful import or measured RPC; three original slots were unattempted. Its journal and all evidence remain preserved as incomplete, not completed or pooled into another cohort. Controller-loss root cause remains unresolved. The exact stale owned container was removed only after its recorded process was absent and ownership matched; partial session state was not reused.

Before inspecting any original-prefix CPU/RSS values for recovery selection, the full replacement order and protocol were frozen: ten fresh observations, five serial main→revert pairs, with fresh state and tags, the same exact source pair, unchanged twelve-blob committed workload f292067c3edd57b778ccfcfd313e3e37075ca89b, image, private builds, default product heaps (including canonical 512/16 MiB database-worker limits), model-work counts, metric formulas/windows and the cold-proof rule below. Both original V2 qualifications were explicitly reused with their original receipt/build/protocol bindings, not rerun, relabeled or pooled. An independent recovery-integrity review found no supported original-journal resume and no selective-resampling basis.

That single prospectively declared recovery1 cohort completed 10/10 with controller exit 0. Each observation completed the real seed → stopped native import → restart → sessions.compact → same-physical-session 8192-byte follow-up → canonical cleanup flow, with two successful 250 ms agent-summary requests and zero utility-summary requests. Independent numeric/native audit found no discrepancy in the 15 metrics/ratios or the 10 current native flows; its binding/cleanup checks also covered the original six complete flows and two reused qualifications (18 complete flows total, not 18 acceptance samples).

Total disclosed V2 acceptance work is 16 complete observations, one interrupted/noneligible observation, and three unattempted original slots. The two original qualifications are separate and reused—not new or pooled observations. The original six form the separate n=3-per-arm prefix below. No better-cohort selection, pooling, correction factors, fabricated passed predecessor, or open-ended repeat-until-green occurred. The completion is native/numeric evidence, not performance, memory, CI or landing acceptance.

V2 recovery1 current-source results — n=5 per arm

Main is 8f9bd10825ff371258be39c9a033df0ce361fa60; revert is 382045388fd8612132c04aa7b305db0c10781aa6. Each cell shows median / nearest-rank p95 [min–max]; p95 is the maximum at n=5. Percentages compare revert with main, rounded for display. Reused qualifications and the original incomplete prefix are excluded.

Metric Main median / p95 [min–max] Revert median / p95 [min–max] Change median / p95
Compaction RPC, ms 2531.98 / 2548.11 [2445.82–2548.11] 1813.98 / 1885.02 [1776.99–1885.02] −28.357% / −26.023%
Whole-process CPU, ms 4847.99 / 5346.22 [4668.63–5346.22] 3576.31 / 3883.93 [3463.24–3883.93] −26.231% / −27.352%
Main-thread CPU, ms 660.42 / 675.63 [634.22–675.63] 1080.24 / 1084.09 [1070.34–1084.09] +63.569% / +60.456%
RPC-bracket sampled RSS, MiB 1643.38 / 1675.24 [1581.96–1675.24] 1646.92 / 1676.61 [1616.94–1676.61] +0.21559% / +0.08184%
Lifecycle sampled RSS, MiB 1931.66 / 1955.85 [1854.67–1955.85] 1898.09 / 1930.68 [1879.19–1930.68] −1.73810% / −1.28681%
RPC-bracket sampled main heap, MiB 321.37 / 322.39 [294.52–322.39] 361.07 / 401.71 [333.99–401.71] +12.354% / +24.605%
Lifecycle sampled main heap, MiB 378.65 / 395.81 [331.90–395.81] 430.39 / 449.04 [405.29–449.04] +13.662% / +13.447%
8192-byte follow-up, ms 1998 / 2008 [1978–2008] 1999 / 2063 [1973–2063] +0.050% / +2.739%

Whole-process CPU median/p95 improved 26.231%/27.352%, and RPC improved 28.357%/26.023%, but this is not an overall performance-acceptance verdict. RPC-bracket RSS worsened +0.21559%/+0.08184%. Main-heap p95 worsened +24.605%, a material >20% stop, with median +12.354%; lifecycle main heap worsened +13.662%/+13.447%. Follow-up median/p95 worsened +0.05005%/+2.739%. Main-thread CPU rose +63.569%/+60.456% as work returned in-process; intentional placement is not an accepted exception.

All adverse paired cells are retained too: pair 3 main heap +29.9683%, pair 1 lifecycle main heap +29.6727%, and pair 1/pair 3 lifecycle RSS +2.06698%/+4.09818%, despite improved aggregate lifecycle RSS. These movements remain unaccepted—not zero, noise, immaterial, “within spread,” or waived.

The sampler requested 100 ms intervals; observed maximum gaps were 309 ms across RPC brackets and 384 ms across the lifecycle. Memory maxima are sampled observations, not instantaneous peaks. No host-load correction or other adjustment is applied. This is fresh-process cold proof for one retained long01 generation, not broad-corpus or real-summary-quality proof.

V2 topology-only worker/transfer observations — n=5 per arm

These seven metrics have different execution-topology coverage. Worker heap/parse/thread-CPU reductions are not total-runtime improvements, and must not be summed with the main isolate. Main-thread parsing was unobserved on both arms. Missing observations are unavailable, not zero; the hydration baseline zeros below were actually observed. Formats and p95 convention match the main table.

Metric Main median / p95 [min–max] Revert median / p95 [min–max] Change median / p95
Observed worker heap, MiB 94.60 / 94.87 [93.61–94.87] 41.81 / 42.22 [40.45–42.22] −55.801% / −55.493%
Primary-worker parsed bytes 32038331 / 32038331 [32038331–32038331] 15390899 / 15390899 [15390899–15390899] −51.961% / −51.961%
Primary-worker parse count 5506 / 5506 [5506–5506] 3028 / 3028 [3028–3028] −45.005% / −45.005%
Primary-worker thread CPU, ms 1248.349 / 1263.351 [1236.659–1263.351] 255.837 / 265.121 [254.378–265.121] −79.506% / −79.014%
Observed hydration-transfer bytes 0 / 0 [0–0] 16244057 / 16244057 [16244057–16244057] n/a (zero baseline) / n/a (zero baseline)
Observed hydration-transfer events 0 / 0 [0–0] 4862 / 4862 [4862–4862] n/a (zero baseline) / n/a (zero baseline)
Observed worker-thread count 2 / 2 [2–2] 1 / 1 [1–1] −50.000% / −50.000%

Recorded V8 heap-size limits were 4,496,293,888 bytes for the main isolate and 562,036,736 bytes for the primary worker. These observed V8 limits are distinct from the canonical worker configuration of 512 MiB old generation / 16 MiB young generation; they are not interchangeable heap settings or summed runtime usage.

Original incomplete V2 prefix — six complete observations, n=3 per arm; separate and unpooled

This is the original completed prefix, not a full passed ten-observation cohort. Original slot 7 was started/noneligible and three original slots were unattempted; neither contributes a metric sample. Each arm has n=3, with median / nearest-rank p95 [min–max]; p95 is the maximum at n=3. Every adverse cell remains visible and unaccepted, including RPC RSS median +3.43914%, lifecycle RSS median +1.00476%, main-heap p95 +22.939%, and follow-up p95 +0.049%. This prefix was not pooled with recovery1 or selected instead of it.

Metric Main median / p95 [min–max] Revert median / p95 [min–max] Change median / p95
Compaction RPC, ms 2484.22 / 2493.55 [2460.80–2493.55] 1888.46 / 1914.58 [1838.78–1914.58] −23.982% / −23.218%
Whole-process CPU, ms 4730.23 / 4834.26 [4724.63–4834.26] 3833.50 / 3962.77 [3666.07–3962.77] −18.957% / −18.027%
Main-thread CPU, ms 626.97 / 667.61 [587.79–667.61] 1104.89 / 1111.28 [1041.99–1111.28] +76.228% / +66.457%
RPC-bracket sampled RSS, MiB 1601.05 / 1717.99 [1597.20–1717.99] 1656.12 / 1659.14 [1646.42–1659.14] +3.43914% / −3.42537%
Lifecycle sampled RSS, MiB 1884.39 / 1991.67 [1874.15–1991.67] 1903.33 / 1918.16 [1902.19–1918.16] +1.00476% / −3.69096%
RPC-bracket sampled main heap, MiB 313.22 / 326.11 [296.79–326.11] 352.15 / 400.92 [345.36–400.92] +12.428% / +22.939%
Lifecycle sampled main heap, MiB 385.83 / 394.23 [378.45–394.23] 432.86 / 450.22 [414.47–450.22] +12.191% / +14.203%
8192-byte follow-up, ms 2024 / 2032 [1986–2032] 1995 / 2033 [1987–2033] −1.433% / +0.049%

For topology context only, the prefix observed worker heap median/p95 was 93.731/94.271→42.635/43.608 MiB; primary-worker parsed bytes 32,037,591→15,390,639 and parse counts 5,506→3,028; primary-worker CPU median/p95 1,246.340/1,265.066→255.316/256.786 ms; observed worker-thread count 2→1. Hydration transfer increased from actually observed 0 to 16,243,887 bytes and 4,862 events. Those are n=3-per-arm worker/transfer observations, not total parsing, total heap or total-runtime claims; main parsing remained unobserved.

V2 audit bindings and limits

Independent audit checked the actual twelve committed workload Git blobs and recorded source/build/protocol bindings, numerical aggregates/ratios, and native flow/cleanup contracts, with no discrepancy. It relied on the original bound receipts/metadata for fixture/assets/full source/dist; those complete inputs were not freshly rehashed by this audit. No raw fixtures, transcripts, messages, session identifiers or credentials are published here.

  • Workload: f292067c3edd57b778ccfcfd313e3e37075ca89b
  • Complete aggregate SHA256: e07c1ac2382ca39b874d85169ef61545bfc6d543d0bf49e8d2e6ce4d88be4a1a
  • Independent audit SHA256: b0cb92b70106e26f5c6cff967f65818c92768568313e75ecffee28251c9c8a10
  • Independent analysis SHA256: 84f16ef8908821f892b28365b296cda4ec580458c8fd0b1449c81c75271996d6
  • Coordinating raw-audit SHA256: ae7dc04c8ad5d719f730959c81059b30a229c692bd4d3be10d35e7e5cce0228f

V1 PRIOR-HEAD evidence only — not current-head proof

The retained V1 build and cold comparison below cover main 33a1413e7be437ab03e46c9dcabc1590693a8c67 versus prior revert head a8fd279d114d45c27609f90e87f1d73604885d55 only. They do not validate current main 8f9bd10825ff371258be39c9a033df0ce361fa60 or current PR head 382045388fd8612132c04aa7b305db0c10781aa6. Historical source, qualifications, observations and adverse cells are preserved unchanged.

  • Focused batches passed separately: core 109, agent-rest 79, flow 214, request-budget 9; these are batch counts, not a pooled unique-test total. Deadcode contracts: 31 passed.
  • Reader tests: 5 passed. All five refusal cases passed after correcting inherited proxy settings in the isolated test environment, without changing product networking guards or fixtures. Three selected SSRF negative controls passed; 47 other cases were not selected.
  • The initial commit attempt exposed the staged line cap (700 → 891 counted lines). A minimal pure context-helper extraction and real type narrowing then passed that same mandatory check, staged max-lines and assertion safety, targeted lint/type graphs, and all 58 affected tests across five existing files. Both baseline files matched that main; no allowance or suppression was added. The authoritative handler/finalizer and testing interface were byte-identical to the reviewed rollback.
  • The V1 independent integration, hands-on and supported full-candidate local reviews found no actionable findings. The original ordinary commit passed normal hooks, including the canonical formatter over all 60 changed extant source files and staged freshness checks, without changing its reviewed tree.
  • V1 canonical source-performance runtime builds passed for main 33a1413e7be437ab03e46c9dcabc1590693a8c67 and prior revert a8fd279d114d45c27609f90e87f1d73604885d55, using the same qualified Node 24 image, default heaps, 8 CPUs/16 GiB, no swap, network disabled, proxy inheritance disabled, and private exact-lock dependencies. These were scoped runtime builds, not full public-package or declaration proof. Passing build workflow 43706189448 also covered that prior a8fd head only.
  • V1 cold proof used one committed common harness/mock/native importer/observer at 9f7c72a10880c30acf9fa83a169b0bb4aa514d0e on those V1 runtime heads. Two cold qualifications passed separately and were not pooled. All 10 acceptance observations (five serial interleaved main→revert pairs) completed with native validation, real sessions.compact success, unchanged physical session identity, the subsequent 8192-byte reply, matched successful model work (two successful agent requests with 250 ms mock delay), and cleanup. All negative cells were retained. An independent numeric/native audit reproduced all 15 metrics/ratios and all 10 native bindings, cleanup outcomes, matched model work, and the two separate qualifications without discrepancy. None of this is new-head performance acceptance.

V1 PRIOR-HEAD cold results — one retained long01 generation

Each V1 arm has n=5 acceptance observations. Cells show median / nearest-rank p95 [min–max]; at n=5, p95 is the maximum. Percentages compare the V1 revert with V1 main. Qualifications are excluded. No raw samples or private conversation data are published here.

Metric Main median / p95 [range] Revert median / p95 [range] Change median / p95
Compaction RPC, ms 2491.30 / 2587.65 [2435.02–2587.65] 1802.27 / 1834.94 [1762.41–1834.94] −27.66% / −29.09%
Whole-process CPU, ms 4914.59 / 4988.61 [4668.77–4988.61] 3473.40 / 3768.88 [3347.30–3768.88] −29.32% / −24.45%
Main-thread CPU, ms 667.22 / 712.25 [647.06–712.25] 1043.61 / 1118.16 [1016.26–1118.16] +56.41% / +56.99%
Observed RSS, MiB 1741.13 / 1752.89 [1663.50–1752.89] 1753.43 / 1775.68 [1724.37–1775.68] +0.71% / +1.30%
Cold observed RSS, MiB 1996.46 / 2030.45 [1885.69–2030.45] 2019.26 / 2022.65 [1947.73–2022.65] +1.14% / −0.38%
Observed main-isolate heap, MiB 312.90 / 317.69 [297.14–317.69] 355.85 / 364.97 [328.80–364.97] +13.72% / +14.88%
Cold observed main-isolate heap, MiB 372.77 / 393.59 [369.64–393.59] 412.42 / 445.72 [404.47–445.72] +10.64% / +13.24%
Follow-up reply, ms 1987 / 2011 [1982–2011] 1969 / 1996 [1967–1996] −0.91% / −0.75%

V1 whole-process CPU and RPC improved, but this is not an overall or current-head performance-acceptance verdict. V1 main-thread CPU increased as work returned in-process; that placement tradeoff is reported, not hidden. Adverse memory changes are not labeled zero, noise, immaterial, or waived. Heap figures cover the observed main isolate only, not a sum of all worker heaps. Worker observations are topology-limited; the measured utility summary-model request count was zero, while missing worker metrics remain unavailable rather than zero. This V1 fresh-process cold proof covers one retained generation, not a broad corpus or real-summary quality.

V1 memory maxima are sampled observations, not instantaneous peaks: the observer requested 100 ms sampling, but actual gaps reached 352 ms. The fifth pair’s observed main and cold main-isolate heap increases exceeded 20%; those adverse cells remain retained and unaccepted, not a waiver of the process-CPU/RPC criterion.

Cold-proof rule, declared before execution

Use one common committed harness, mock, native importer, and observer on both exact runtime heads, with an identical qualified image, default heaps, no swap, and fresh private state. Run two separately recorded cold qualifications, then five serial interleaved main→revert pairs (10 observations) for the retained long01 generation. Require real sessions.compact success, unchanged physical session identity, the subsequent 8192-byte reply, matched successful model work, cleanup, and actual main-thread and process clocks. Report every CPU, RPC, RSS, and observed heap median/p95 with sample counts and spread; missing worker metrics are unavailable, not zero. Retain negative samples and stop for native-integrity/setup failure. No >=20% CPU/RPC median or p95 regression is accepted; adverse memory results remain unaccepted pending review. This is fresh-process cold proof for one retained generation, not broad-corpus or real-summary-quality proof.

Worked on by

roboclaw-bot and others added 2 commits November 15, 2026 10:09
Revert c9ee264 (#196550) at
Vincent Koc's request because its cold-path cost is not acceptable.
Preserve subsequent context-reader, resource-lifecycle, and test-entry fixes.

Keep preserved-turn selection and bounded context rendering in a pure sibling
module so the restored safeguard meets the existing line-cap guard. Replace
three optional-field casts with union/object narrowing; retain the original
handler, provider/auth flow, quality loop, and testing API. Both guard baseline
files remain identical to main; no additional allowances are introduced.

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
Worked on by:
- @RomneyDa
- @vincentkoc
- @jalehman

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
OpenClaw-Publication: 5ab97875-08a2-43e2-9723-cfd4e48959d7
@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling size: XL labels Nov 15, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 15, 2026
@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head a8fd279d114d45c27609f90e87f1d73604885d55, but the PR head is now 382045388fd8612132c04aa7b305db0c10781aa6. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-15T10:29:17.929Z sha a8fd279 :: needs maintainer review before merge. :: none

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 15, 2026 10:52
roboclaw-bot and others added 2 commits November 15, 2026 11:20
Merge main 8f9bd10 to resolve the
three conflicts introduced by #199564. Keep the retired compaction-source
module deleted and the request runner owned by the reader factory.
Preserve main's options object, explicit trajectory timeout, transport-only
pointRead classification, reserved-lane dispatch, and unrelated changes.

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
Worked on by:
- @RomneyDa
- @vincentkoc
- @jalehman

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
OpenClaw-Publication: 36e1aee0-d4ac-42bb-a8d4-db6626b2644b
@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 15, 2026
@RomneyDa
RomneyDa merged commit a4cc2ad into main Nov 15, 2026
215 of 219 checks passed
@RomneyDa
RomneyDa deleted the openclaw/revert-compaction-196550 branch November 15, 2026 21:02
RomneyDa added a commit that referenced this pull request Nov 16, 2026
(cherry picked from commit a4cc2ad)

Adapt to the narrower #196550 backport 87508f0. Remove its retired
bounded-source readers, workers, registrations and preparation paths, without
importing main-only compaction features. Preserve beta.4 PostgreSQL snapshot
projection, read-only contracts and canonical-reader qualification binding.
Keep branch-context projection and summary-budget responsibilities in their
existing sibling modules; preserve the shared truncation marker test contract.

Proof: original core 71 passing tests and 54 passing infra tests retained;
missing marker import repaired and affected safeguard/compaction files rerun
61/61 passing. All 38 touched TypeScript files pass targeted lint and formatting;
retired references and staged diff checked. Local independent review unavailable
(missing ClawSweeper checkout and codex executable), skipped under explicit
release-owner authorization; remote qualification remains required.

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 16, 2026
Remove two redundant compaction casts and its now-stale max-lines allowance.
Compare encoded cleanup paths so the Windows regression checks actual JSON logs.
Evaluate the macOS package matrix for diagnostic and release-gate requests
instead of retaining the pre-backport static-matrix expectation.

These are focused adaptations of #199561, #195409 and #198989, diagnosed by
stable-profile FRV 43794859705 on the frozen beta.4-based candidate.

Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 16, 2026
…aw#199561)

* revert(compaction): restore array-based compaction

Revert 63f3cc9 (openclaw#196550) at
Vincent Koc's request because its cold-path cost is not acceptable.
Preserve subsequent context-reader, resource-lifecycle, and test-entry fixes.

Keep preserved-turn selection and bounded context rendering in a pure sibling
module so the restored safeguard meets the existing line-cap guard. Replace
three optional-field casts with union/object narrowing; retain the original
handler, provider/auth flow, quality loop, and testing API. Both guard baseline
files remain identical to main; no additional allowances are introduced.

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>

* fix: undo cold-session compaction CPU and latency regressions

Worked on by:
- @RomneyDa
- @vincentkoc
- @jalehman

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
OpenClaw-Publication: 5ab97875-08a2-43e2-9723-cfd4e48959d7

* Publish openclaw/revert-compaction-196550

Worked on by:
- @RomneyDa
- @vincentkoc
- @jalehman

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
OpenClaw-Publication: 36e1aee0-d4ac-42bb-a8d4-db6626b2644b

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
maplel pushed a commit to maplel/openclaw that referenced this pull request Nov 24, 2026
)

* fix(plugins): portable plugin-state keys for PostgreSQL

Use an exclusive SQL lower bound for Doctor pagination instead of a NUL-suffixed cursor. Reject new NUL keys in test-only plugin-state fixtures while retaining legacy SQLite adoption reads.

Add real PostgreSQL Doctor regression coverage and register it in conformance and database-worker lanes. Refs openclaw#184862 openclaw#188642.

* test: account for rebased plugin-state coverage

* test(clickclack): import legacy revocations before adoption

(cherry picked from commit 395cac7)

Release adaptation: Only exclusive SQL lower bound in kernel and Doctor pagination; preserve legacy SQLite keys and public validation. Regression exercises real Doctor paging and inspected executed SQL bindings; no NUL-key fixture policy, schema or unrelated tests.

Follow-up dispositions: 8253356 fix: preserve child results after source lifecycle changes (openclaw#202708); f3f89c7 fix: show saved child results when completion delivery fails (openclaw#202664); c45faa8 fix: align CI tests with admitted tool calls (openclaw#202655); 5c9389a fix: make channels add report required plugin install failures (openclaw#202091); 52b9188 fix: show hosted model details in `models list` without a Gateway (openclaw#202490); d248a76 fix: show an outcome when kept child chats return no answer (openclaw#202423); 5148804 fix(discord): check a queued message's access again when its turn starts (openclaw#202330); 2470d62 fix: let setup use account models with a fresh catalog (openclaw#202019); 9fa0b92 fix: let PostgreSQL Gateways start with plugin-backed secrets (openclaw#201063); c180824 fix(plugins): Talk and plugin-loading requests fail on PostgreSQL Gateways (openclaw#201976); cb5cfb2 fix: keep a doubtful killed-update recovery on the repair path (openclaw#201361); 17c5fb0 fix(state): PostgreSQL state created before Template bootstrap deferral is refused as schema drift (openclaw#197425); b5c1277 fix: let resumed parents collect children stopped by restart (openclaw#201460); f920a7e chore(postgres): qualify cron completion during graceful shutdown (openclaw#201246); 1680f54 fix(openai): new ChatGPT subscription models missing until an OpenClaw release (openclaw#201130); 0d8820a fix(media): image descriptions use the ChatGPT OAuth route when OpenAI has no API key (openclaw#199299); ee3e16e test(agents): trim and fold low-value regression suites (openclaw#198916); b8029b4 test(agents): qualify PostgreSQL simple-completion acquisition (openclaw#200956); 703c82d fix(sessions): record queued input end causes and recover them across crashes (openclaw#200533); 23fca1a fix: let the next update continue after a killed update when nothing is left to repair (openclaw#200680); d565e17 fix(ci): retire deleted session fork test from inventory (openclaw#200611); 4cf12c6 chore(postgres): qualify prompt refresh and rebalance CI (openclaw#200488); d460273 fix(templates): release earlier Template-managed agents (openclaw#200303); ff75829 fix(update): --no-restart update fails when the Gateway restarts itself during Doctor's stop (openclaw#200181); 0b2ad60 chore(postgres): cover compaction watched-session prompts (openclaw#200117); b90c573 test: consolidate redundant coverage (198795 recut) (openclaw#198943); a042363 test: consolidate redundant coverage (198793, part 2) (openclaw#198936); 9bfad2b test: consolidate suites while retaining recovery owners (openclaw#198933); 4e9812c test: consolidate redundant coverage (198789, part 2) (openclaw#198932); 90814f5 fix(subagents): stops a finished sub-agent's chat being deleted before its parent reads the result; 799bc0b fix(ci): stabilize hourly fixtures and retire unused exports (openclaw#199851); e4a3093 perf(update): replace the candidate canary with a runtime contract check (openclaw#198268); a4cc2ad fix: undo cold-session compaction CPU and latency regressions (openclaw#199561); 55fec79 fix(agents): stop divergent mid-turn overflow recovery (openclaw#199636); 2c4413a fix: reduce Gateway stalls under filesystem pressure (openclaw#197510); 37d977f fix: output reducers are skipped in headless and Code Mode runs (openclaw#199434); c9ee264 fix(compaction): concurrent sessions wait for each other's summaries during compaction (openclaw#196550); 2471ddc feat: let agents review generated images before delivery (openclaw#198227); 21f7dc6 fix(github): publication fails with PostgreSQL session or state stores (openclaw#193749); 63d9e57 fix(ci): new PostgreSQL suites are omitted from conformance (openclaw#198390); 466a4b6 fix(telegram): steered answers quote the wrong input (openclaw#178124); 87b6f52 fix(delivery): resend routed Telegram finals after an ambiguous network failure (openclaw#192779); 68a839b fix: isolate held agent databases until explicit restoration (openclaw#198180); cff99b2 fix(agents): keep provider history append-only across runs (openclaw#197874); 8a328bf feat: add an opt-in usage-ranked tool index (openclaw#197128); 097e648 fix(ci): plan only executable infra tests (openclaw#197911); 76385fd fix(models): discovered models become "Unknown model" after restart or an ended sign-in (openclaw#197784); 89d4177 fix(plugin-state): guarded calls fail until Gateway restart after an unknown write outcome (openclaw#197790); baca36e fix(sessions): commit selected invitations with original messages (openclaw#184512); 699e538 fix(sessions): drain passive notices on sessions_send resumes; d6ded18 chore(ci): drop retired test-lines allocation records (2/3) (openclaw#197656); e0dd020 fix(agents): collect process results at suspended-run capacity; 4897740 feat(auth): preserve delegated OCE user profiles and permissions (openclaw#196856); 7197ce1 feat(templates): install bundled plugins through native management (openclaw#196349); 9c6ee9b feat: let Template automations start paused for onboarding (openclaw#196323); 79a6214 fix(message): retain local final replies in conversation history (openclaw#187795); caa978c feat(templates): open durable chat before verified setup (openclaw#196392); 78e73aa fix(sessions): cold PostgreSQL conversations fail after idle readers close (openclaw#189991); b6ed907 perf(sessions): persist active transcript facts for hydration (openclaw#193682); 1595dd2 feat(plugins): reauthorize accepted session work (openclaw#176886); b43ad0a fix(models): avoid reloading plugins on catalog refresh (openclaw#193903); 0947d02 fix(ci): avoid unrelated PostgreSQL runs and admit owned tests (openclaw#193870); 428ca7d feat(openclaw-id): add Gateway membership authority and publication behind the Labs flag (openclaw#192335); c718583 fix(update): repair refuses forever after a verified update fails a later step (openclaw#193132); 3f64174 fix: deliver background replies after a reload retires the turn registry (openclaw#193130); 982f3b1 fix(imessage): report Automation failures after Gateway updates (openclaw#186117); 31b28e9 fix(agents): wait for a peer OAuth refresh before failing request auth (openclaw#192906); cf50d4a feat(storage): support read-only PostgreSQL standby inspection (openclaw#192645); 82fd4e6 fix(agents): retain stale session target refusal reasons (openclaw#192681); 8ac4e19 fix(worktrees): reserve capacity on PostgreSQL (openclaw#192537); 718b349 fix: reduce session startup stalls under storage contention; 08f4a19 refactor(skills): move Skill Workshop into its bundled plugin (openclaw#192471); 837402a fix(clawrouter): keep upstream credit failures off the shared key (openclaw#192575); f38495f fix(plugins): reject late routing from canceled runs (openclaw#192492); dc5d61a improve(sessions): reduce unnecessary maintenance query rows (openclaw#192023); c4bf0dc fix(sessions): avoid extra maintenance scans for embedded archives (openclaw#184507); e44b3d6 fix(team-reports): recover after database connection loss (openclaw#192020); 991fb33 fix(logbook): recover after database connection loss (openclaw#192011); e6d0d2e fix(test): include omitted PostgreSQL conformance suites (openclaw#191962); da5ff0f fix(codex): reject native hooks from a previous run (openclaw#191788); 09f0b0b feat(plugins): add skill usage runtime for plugins (openclaw#191661); 00b2ff4 fix: parent sessions miss child approvals with a custom session store (openclaw#189827); be44b10 fix: stop completed session writes retaining request data (openclaw#191197); d40aa7c fix(sessions): replay creation requests across Gateway restarts (openclaw#190862); d894035 fix: await Doctor shared-state repair preparation (openclaw#190875); b515cc7 feat: fork threaded conversations with Telegram support (openclaw#190783); def6349 feat(plugins): plugins can run a hidden forked turn of a session with their own tools (openclaw#190950); d983e34 feat(plugins): plugin commands can continue the agent with a replacement prompt, on every channel (openclaw#190908); ea3f0b8 fix(ci): provision Node test prerequisites and retain Baseten routing (openclaw#191050); 29503e1 fix(update): Gateway stays stopped after the updater process dies mid-update (openclaw#188497); fc8c2d0 fix(update): preserve unfinished handoff artifacts (openclaw#190571); 7c26e8c fix(ci): cover PostgreSQL managed update handoffs (openclaw#190336); 4913d41 fix(ci): prevent truncated PostgreSQL target listings (openclaw#189509); 8925f62 fix(gateway): start restored PostgreSQL homes on the first attempt (openclaw#190291); 177fe32 feat(models): preserve inference capabilities in opt-in catalog v3 (openclaw#189678); 7faf32d feat: retain repository disk authority through recovery (openclaw#189106); a658df3 feat(database): capture externally quiesced SQLite migrations; 0f9e7f7 feat(database): capture exact SQLite migration capsules; 4fb684e feat(backup): add PostgreSQL local companion checkpoints; c89a101 fix(doctor): migrate auth profiles on PostgreSQL stores (openclaw#189639); 799de09 fix(ci): split oversized workspace and setup files (openclaw#189356); 21ee847 fix(acp): keep completed run conversations resumable (openclaw#189273); fce0e56 perf(sessions): open cold history without restoring archives (schema 39) (openclaw#188397)

Validation: Baseline1 NUL-binding assertion failure/21passing; candidate22/22passes (188693-green.log). Real SQLite Doctor path and generated SQL proved; no native PostgreSQL server execution claimed.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 0895146d8c1493146f5c6461eee0b10c329bdd1e)
(cherry picked from commit f8ccaa70bc9773d6bbb569bc0e275eee0c544ead)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime P2 Normal backlog priority with limited blast radius. scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants