Skip to content

fix: backport release-critical update and session repairs - #163074

Merged
RomneyDa merged 34 commits into
release/2026.9.8from
release-prep/2026.9.8-expanded-backports
Oct 2, 2026
Merged

RomneyDa merged 34 commits into
release/2026.9.8from
release-prep/2026.9.8-expanded-backports

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The 2026.9.8 release candidate was missing confirmed update, Windows copy, performance, memory, and delegated-work fixes that landed after the release branch cut.

User Impact

2026.9.8 avoids known update rehearsal/copy failures, excessive state-worker and Codex fleet memory, slow memory-sync shutdown, repeated session/redaction work, unbounded shell snapshot caching, delegated sessions that stop silently or deliver replies twice, and macOS npm updates that reject the standard /var directory alias.

Why This Change Was Made

Backports the applicable release fixes from #161003, #162076, #162231, #162352, #162403, #162387, #162616, #162810, #162967, #162227, #162567, and the direct Codex fleet-memory follow-up #163129.

The #162227 and #162567 session changes were adapted to the older release-branch owners because later main-only APIs do not exist here. The cumulative audit found and fixed one real adaptation gap: key-only callers now retain the resolved requester session ID and lifecycle revision, matching upstream incarnation fencing without restoring the retired DM-to-main remap. It also restored the publication-authority regression that the adaptation had accidentally removed.

Three candidates are intentionally excluded:

CHANGELOG.md is intentionally unchanged because the release workflow regenerates it after the product set freezes. The config documentation baseline is included because the delegated-work migration changes the canonical schema.

Full Release Validation Diagnostic Drain

The failed FRV parent is https://github.com/openclaw/openclaw/actions/runs/36926596622.

  • Two extension-runner shards failed during Vitest worker cleanup after their tests passed; these were tooling failures.
  • The plugin-security job used a frozen tooling SHA that predates the existing 2026.9.8 policy mapping.
  • First-hop/published-survivor failures came from a frozen harness requiring baseline-package-identity.json for generic flows. Main fixed that harness in 8ae1e870c1a and 99567a65b7c; the next canonical release-ci/ transport inherits it.
  • Both macOS packaged-upgrade lanes exposed a real product defect: executor authority canonicalized /var/folders/... to /private/var/folders/..., while activation compared and recorded raw paths. This PR canonicalizes the complete activation boundary while preserving authority and custody checks. Main is fixed separately by fix(update): canonicalize package activation paths #163086.

Cumulative Release Risk

This is not a low-risk one-line hotfix. The release branch also contains the previously merged #162931, #162959, and #162981 backport groups, plus the later GPT-6.1 Sol and llama.cpp Windows-runtime changes. The highest interaction risk is the updater/SQLite group and the adapted session/subagent cutover. The GPT provider and llama Windows changes landed after the prior FRV, so only a fresh exact-final-SHA FRV can qualify the complete release.

The exact final validation must cover the update first hop and survivor paths, all Linux/Windows/macOS install and upgrade cells, packaged Windows llama startup, GPT provider discovery/request routing, and delayed/nested/restarted subagent completion without duplicate delivery. Telegram and Matrix live coverage remains explicitly waived by release policy; this PR does not treat those waivers as positive proof.

Evidence

  • Session continuation/publication: 3 publication-authority tests and all 9 admission tests passed on dcf14386338; the key-only case fails without the restored incarnation fallback.
  • Redaction: 124 focused pattern, ordering, reentrancy, text, and structured-property tests passed.
  • Codex fleet memory: the upstream stop, request-lifetime, homes, backoff, and listing-cache suites passed 41/41 in 172.95s. The upstream isolated 739-agent proof showed zero activation-spawned app-server processes versus 16 before the fix.
  • Existing session owner proof: 117 A2A/session tests and 78 migration tests passed on the preceding exact heads; the final changes do not touch those owners outside the fenced continuation repair.
  • Windows/package swap: 27 swap tests passed; the test(update): fix the Windows backup-rename regression on native Windows #162352 fixture repair preserves native filesystem behavior while injecting only backup-rename policy.
  • Changed gate against pinned PR base 0ea96bc2c594: formatting, line/max-line/assertion ratchets, package-lock/dependency guards, generated baselines, SDK exports/budget, and doctor contracts passed. The sole remaining local red is the date-based plugin compatibility-expiry gate, which also fails unchanged current source with the same overdue records.
  • git diff --check passed.
  • AutoReview P0-P2 was scoped-clean for the final session-authority amendment. The exact fix(codex): avoid startup app-server bursts for idle agents #163129 backport was already reviewed and proven upstream.

Update behavior: the installed updater still runs first. Candidate-side changes consume existing update markers, use native Git directory copies where supported, avoid duplicate SQLite rehearsal copies, retry transient Windows rename locks, retain SQLite workers across package replacement, and canonicalize equivalent POSIX directory aliases before sealing recovery ownership without introducing a new refusal path.

Canonical Full Release Validation follows merge. The release workflow intentionally refuses a pre-merge PR head because a regular release Code SHA must be an ancestor of the canonical release/2026.9.8 branch; a noncanonical direct dispatch would not be reusable release evidence.

steipete and others added 10 commits October 1, 2026 14:55
…RSS) (#161003)

* fix(state): keep the state read worker out of the update write graph

Move reconciliation inspection and candidate selection into a read-only
module shared by the state reader and reconciliation writer. The standalone
reader disables code splitting, so its former write-side import also
bundled dynamic failure-fact/Doctor imports and the Gateway runtime.

At release tip 56fb887, the built worker was 52,186,708 bytes with
9,768 esbuild inputs. After this split it is 3,491,598 bytes with 1,025
inputs, measured with packages external for both input graphs.

Keep the read queries, eligibility checks, and transactional reconciliation
bodies unchanged. The full build and 95 focused tests pass.

* test(state): keep standalone workers out of the Gateway server graph

Bundle each standalone entry with esbuild and reject transitive Gateway server, flow, wizard, in-process dispatch, and update-write inputs. Restoring the release-tip reader import and writer exports fails only the state reader with 682 forbidden inputs; the fixed graph passes all nine entries.

Validation: pnpm test test/scripts/runtime-process-build-graph.test.ts --maxWorkers=1 (3.67s wall, 0.678s Vitest); negative control 3.732s wall. oxfmt, oxlint, and independent review pass.
(cherry picked from commit f2715ed)
Resolve read-only worker launches through the running updater's retained
generation. Keep session reuse generation-aware and join child work before
retiring its runtime files. This protects future self-updates; an already
loaded 2026.9.6 driver retains its first-hop limitation.

Refs #161865

(cherry picked from commit f59e979)
)

On Windows the managed update swap renamed the live package tree to its backup location once; a transient EPERM/EBUSY/EACCES from an antivirus, indexer, or Scheduled Task handle failed the swap and rolled the update back. The filesystem owner of the swap now retries those codes with bounded backoff (16 attempts), records each retry, re-checks package identity and update authority between attempts, and reports a named failure after the bound. POSIX behavior is unchanged.

Refs #162027

(cherry picked from commit b5555b0)
* fix: avoid duplicating SQLite snapshots during update rehearsal

* test: target final snapshot publication in race hooks

* test: exercise staging cleanup after snapshot transfer

* docs: describe row-preserving update rehearsals

(cherry picked from commit c77a055)
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 1129326)
* fix(state): retain publication leases while Gateway drains

* perf(state): preserve normal publication close scheduling

(cherry picked from commit defb7cf)
…daction scans (#162810)

Reduce repeated session-publication allocations and redaction prefilter scans at their lifecycle owners, preserving live recipient authority and byte-identical redaction.

Validated with Node 24 and fork Bun tests, authority negative controls, fixture differential checks, pinned AWS kernel and three-round load benchmarks, a clean post-rebase spot quartet, and green exact-head CI.

(cherry picked from commit 4e4e315)
snapshotCache in src/agents/shell-snapshot.ts was a process-wide Map that retained one entry per distinct cwd/environment key for the Gateway's lifetime, so long-running Gateways with many sessions grew without bound. The owner now reuses the existing LRU cache with a documented 128-entry limit; the active key stays cached and a miss recomputes. At 201k synthetic keys RSS fell from 265 MiB to 232 MiB and live heap from 74 MiB to 6 MiB.

Closes #162582

(cherry picked from commit 24baf01)
@clawsweeper

clawsweeper Bot commented Oct 1, 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 docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts commands Command implementations agents Agent runtime and tooling size: XL labels Oct 1, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 2, 2026, 2:41 AM ET / 06:41 UTC (Revision 24).

ClawSweeper review

What this changes

Backports update, SQLite worker, memory, redaction, and delegated-session repairs into the 2026.9.8 release branch, with migration documentation and regression coverage.

Merge readiness

⛔ Blocked before merge - 1 item remains

This remains a useful release-branch backport. The prior compatibility concern is resolved by maintainer acceptance and matching upgrade evidence; the latest fixture repairs introduce no blocking finding.

Priority: P1
Reviewed head: c30800016a7bf26cbd354952649b9412261f3203

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A sound release backport with applicable upstream runtime evidence, resolved compatibility acceptance, and successful exact-head CI.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The MEMBER-authored PR is exempt from ordinary contributor proof. Upstream native catalog and published-updater evidence support their named scenarios; the byte-identical silence migration preserves group settings, and snapshot changes preserve existing state rather than introduce a stored format. No unresolved authority-chain violation was identified; complete release qualification remains post-merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from ordinary contributor proof. Upstream native catalog and published-updater evidence support their named scenarios; the byte-identical silence migration preserves group settings, and snapshot changes preserve existing state rather than introduce a stored format. No unresolved authority-chain violation was identified; complete release qualification remains post-merge.
Evidence reviewed 11 items Pinned introduction and release target: Inspected the introduced delta from the pinned release base to the exact head. This targets release/2026.9.8, so corresponding repairs already merged on main do not supersede the release backport. The supplied stale test merge was not used to infer removal of base behavior.
Exact-head CI: GitHub confirms run 36972636031 completed successfully for the reviewed head. A separate PR read confirms the same head, the pinned release base, and clean mergeability.
Latest fixture repairs: Catalog coverage now initiates the production lazy-hydration entry point before waiting for persistence. The two UI changes only stabilize tooltip interaction and allow 0.01 CSS pixels of layout rounding; they change no rendered production UI. The maintainer records focused passes of 27.2s, 27.0s, and 13.8s.
Findings None None.
Security None None.

How this fits together

The updater carries installed packages and existing state through replacement and verification. The Gateway’s session owners coordinate delegated work, publish authorized session views, and deliver completed results.

flowchart TD
  A[Installed package and existing state] --> B[Update preparation and verification]
  B --> C[Package activation]
  D[Agent delegation requests] --> E[Session completion owners]
  E --> F[Current requester authority]
  F --> G[Single reply delivery]
  C --> H[Updated Gateway]
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Silence configuration cutover 1 canonical policy field retired; 0 new options Internal silence becomes required completion through the accepted Doctor migration while configured group silence remains supported.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Root-cause cluster

Relationship: canonical
Canonical: #163074
Summary: This is the release integration candidate for several distinct merged main repairs, not a duplicate main-branch submission.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Carry the verified repairs into the release through the existing update and completion owners, with publication qualified against the final release SHA.

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

Not applicable to a new defect: this backport has upstream failing controls and runtime evidence plus exact-head CI; no code or tests were executed during this read-only review.

Is this the best way to solve the issue?

Yes. Reusing the merged owner-level repairs with release-specific adaptations is appropriate, and the latest fixture changes preserve meaningful assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against fa13650f912f.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: This release backport addresses confirmed update interruptions, excessive runtime memory, and broken delegated-work completion.
  • merge-risk: 🚨 compatibility: The accepted cutover retires internal silence configuration and changes completion defaults; matching migration and published-driver evidence cover that tradeoff.
  • merge-risk: 🚨 message-delivery: The accepted session cutover removes automatic ping-pong and target announcements while delivering requester replies once under lifecycle fences.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from ordinary contributor proof. Upstream native catalog and published-updater evidence support their named scenarios; the byte-identical silence migration preserves group settings, and snapshot changes preserve existing state rather than introduce a stored format. No unresolved authority-chain violation was identified; complete release qualification remains post-merge.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. The delegated-completion cutover can change visible Telegram reply delivery; the recorded release waiver is not a claim of Telegram proof.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RomneyDa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (23 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-02T03:08:54.642Z sha 06c2310 :: blocked before merge. :: none
  • reviewed 2026-10-02T03:23:21.987Z sha f510aee :: blocked before merge. :: none
  • reviewed 2026-10-02T03:55:06.705Z sha 3a69f92 :: blocked before merge. :: none
  • reviewed 2026-10-02T04:11:49.626Z sha a29ee22 :: blocked before merge. :: none
  • reviewed 2026-10-02T04:43:34.720Z sha 9cdbaeb :: blocked before merge. :: none
  • reviewed 2026-10-02T05:53:57.003Z sha b412cdb :: blocked before merge. :: none
  • reviewed 2026-10-02T06:08:38.107Z sha 15a31c1 :: blocked before merge. :: none
  • reviewed 2026-10-02T06:21:40.952Z sha c308000 :: blocked before merge. :: none

@RomneyDa
RomneyDa marked this pull request as ready for review October 1, 2026 23:21
@RomneyDa

RomneyDa commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label Oct 1, 2026
@RomneyDa

RomneyDa commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact-head repair at 06c231079bf addresses the two failures from CI run 36956292776:

Focused proof on this SHA: 51 sessions tests, 42 sessions delivery/admission tests, and 40 SQLite execution tests passed. Formatting, scoped lint, production types, every core-test type shard, and fresh P0–P2 AutoReview are clean. The aggregate changed gate remains stopped only by the PR's pre-existing line-cap drift in unrelated files.

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed the proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. label Oct 2, 2026
@RomneyDa

RomneyDa commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Current head f510aee63af fixes the sole CI failure from run 36958377763. The full agents-tools shard found one remaining Cron fixture that still expected a detached A2A continuation. This now uses main's exact #162227 regression contract: canonical Cron reports skipped delivery and starts no requester A2A flow; ordinary and non-canonical Cron-like callers retain their original routing assertions.

Exact proof: src/agents/tools/sessions.test.ts 84/84 passed, scoped core lint passed, every core-test type shard passed, and fresh P0–P2 AutoReview is clean.

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. label Oct 2, 2026
@RomneyDa

RomneyDa commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

CI fixture-isolation repair evidence for 9cdbaeb3d8e: pnpm test src/gateway/server.heartbeat-store-lifecycle.product-proof.test.ts --maxWorkers=1 passed 2/2 in 51.06s wall. The recovered four-plan manifest from the first uncancelled failed CI job also passed locally with 4/4 invocations completed and zero failures. Fresh AutoReview found no P0-P2 issue in the 5-addition/2-deletion test-only diff.

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Oct 2, 2026
@RomneyDa

RomneyDa commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head c30800016a7 is CI-green in run 36972636031. It carries three blocker-only fixture repairs discovered by exact-head CI:

  • starts lazy session-catalog hydration before waiting for persisted performance data, matching merged upstream f2536975e5d;
  • ports main's bounded 0.01 CSS-pixel sidebar rounding tolerance from 4d638fd3769;
  • ports the model-refresh tooltip hover stabilization hunk from main commit ed9d2c1605c.

Focused proof: catalog performance 1/1 passed in 27.2s; sidebar roster Chromium E2E 1/1 passed in 27.0s; the /new large-catalog model control case passed 1/1 in 13.8s. All three patch scopes received fresh P0-P1 AutoReview with no findings. Exact-head CI is fully green, the PR is conflict-free and GitHub-mergeable.

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui commands Command implementations docs Improvements or additions to documentation extensions: codex gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL 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.

4 participants