Skip to content

fix(release): backport P0/P1 reliability fixes for 2026.9.8 - #162959

Merged
RomneyDa merged 14 commits into
release/2026.9.8from
release-prep/2026.9.8-p0-p1-backports
Oct 1, 2026
Merged

RomneyDa merged 14 commits into
release/2026.9.8from
release-prep/2026.9.8-p0-p1-backports

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The 2026.9.8 hotfix branch still contained high-impact regressions from the 2026.9.7 baseline after the initial urgent backports.

User Impact

This stack adds 14 reviewed P0/P1 fixes covering update recovery, Windows startup and schema handling, Gateway ownership and health probes, SQLite maintenance leases, Telegram migration and preview authority, Codex fleet memory, Anthropic completion, read-only skill refreshes, and bounded Doctor repairs.

Selected Backports

P0: #160344, #160193, #160718, #160702, #161946, #161832, #162321, #162912.

P1: #161260, #162841, #160137, #162290, #162304, #162394.

This PR is stacked after #162931. Candidate-side updater fixes that cannot repair the installed updater's first hop, broad dependency groups, and candidates requiring release-only structural refactors were excluded. AutoReview found an unrelated-waiter risk in the channel-reload candidate, so that backport was removed.

Release Notes

The generated 2026.9.8 changelog is intentionally not part of this stacked backport PR. Per the release workflow, it will be regenerated once from the final product-complete release history after the pending backport stack lands.

Evidence

  • All 14 source commits were cherry-picked with provenance and applied without retained conflict edits.
  • Focused regression proof passed 11 Vitest shards in 236.83s on the retained-code superset.
  • node scripts/check-changed.mjs --base origin/release-prep/2026.9.8 --timed passed every selected lane on the final-code superset, including typechecks, lint, dead-export scan, import-cycle scan, plugin boundaries, and ratchets.
  • git diff --check and pnpm changelog:check pass after deferring generated notes.
  • pnpm release:prepare -- --version 2026.9.8 --check passed.
  • AutoReview completed at P1 severity; its actionable finding was resolved by removing the affected backport.

Test cost: 236.83s wall for the focused 11-shard regression run with --maxWorkers=1.

@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.

@RomneyDa
RomneyDa marked this pull request as ready for review October 1, 2026 19:45
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: telegram Channel integration: telegram gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: anthropic extensions: qa-lab extensions: codex 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. 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. 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: needs changes before merge. Reviewed October 1, 2026, 4:44 PM ET / 20:44 UTC (Revision 2).

ClawSweeper review

What this changes

Backports fourteen reliability fixes and regression coverage into the 2026.9.8 release branch, covering updates, Gateway startup, Windows, SQLite maintenance, provider sessions, Telegram, and skill refreshes.

Merge readiness

⛔ Needs changes before merge - 1 item remains

This remains useful release-branch work despite the source fixes being merged on main. The previous sequencing blocker is resolved, and no concrete introduced code defect was identified; scoped Telegram proof remains incomplete.

Priority: P1
Reviewed head: 2a8b7a6e69fc4c74cf2a8dba56f8c2a08a358546

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The backports have useful production evidence and no identified blocking code defect, but the scoped live Telegram requirement remains unmet.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 13 items Pinned introduction boundary: Reviewed the introduced hunks from the pinned release base to the original PR head. The verified test merge has that release base followed by the exact head as parents; fetched main is separate behavioral context.
Previous prerequisite resolved: GitHub confirms #162931 merged into release/2026.9.8 at 2026-10-01T20:27:16Z. The previous review's instruction to wait for that prerequisite no longer applies.
Main and shipped-release distinction: Current main carries preview authority through both preview and final requests, while latest release v2026.9.7 retains the final-only branch. Existing main implementation therefore does not make this release backport redundant.
Findings None None.
Security None None.

How this fits together

The release branch supplies the packaged OpenClaw runtime. These fixes affect how installed versions upgrade existing state, how the Gateway acquires ownership, and how agents and Telegram replies complete.

flowchart LR
A[Installed OpenClaw] --> B[Release candidate]
B --> C[Doctor and update recovery]
C --> D[Existing configuration and state]
D --> E[Gateway startup and ownership]
E --> F[Agent and provider sessions]
F --> G[Telegram replies]
Loading

Before merge

  • Complete next step (P2) - Provide live Telegram Test Server proof for the changed preview path before merge. Redacted logs or transcripts count; screenshots or recordings help when they show the behavior. Remove credentials and private identifiers, then update the PR body to trigger re-review; if needed, ask a maintainer to comment @clawsweeper re-review.
Agent review details

Security

None.

PR surface

Source +463, Tests +1462, Docs +52, Other +40. Total +2017 across 80 files.

View PR surface stats
Area Files Added Removed Net
Source 34 675 212 +463
Tests 30 1632 170 +1462
Docs 10 54 2 +52
Config 0 0 0 0
Generated 0 0 0 0
Other 6 55 15 +40
Total 80 2416 399 +2017

Review metrics

Metric Value Why it matters
Focused regression cost 11 shards, 236.83 seconds wall The PR records the retained-code regression run's measured cost; this review did not rerun it.

Stored data model

Persistent data-model change detected: migration/backfill/repair: extensions/telegram/src/state-migrations.ts, migration/backfill/repair: src/cli/update-cli/update-command-finalize.ts, migration/backfill/repair: src/commands/doctor-session-canonical-owner-evidence.ts, migration/backfill/repair: src/commands/doctor-update-run.ts, migration/backfill/repair: src/commands/doctor-update-schema-guard.ts, migration/backfill/repair: src/infra/deferred-plugin-migration-warnings.ts, and 4 more. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Technical review

Best possible solution:

Retain the focused backports and their state-preservation safeguards, with release qualification that covers the changed Telegram preview path.

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

Yes for the affected release baseline: source paths and the source PRs' failing controls identify concrete triggers. This read-only review did not execute them, and several defects are already repaired on main.

Is this the best way to solve the issue?

Yes. Backporting the existing owner-level repairs is a bounded way to restore release behavior without introducing competing implementations.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P1: The release backport addresses established update, startup, and agent-workflow failures affecting shipped 2026.9.7 behavior.
  • merge-risk: 🚨 compatibility: The accepted Windows 2026.9.4 containment intentionally refuses incompatible automatic staging and requires documented manual recovery.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. The preview-authority correction changes which Telegram message edits remain visible after a writer is replaced.

Evidence

What I checked:

  • Pinned introduction boundary: Reviewed the introduced hunks from the pinned release base to the original PR head. The verified test merge has that release base followed by the exact head as parents; fetched main is separate behavioral context. (2a8b7a6e69fc)
  • Previous prerequisite resolved: GitHub confirms chore(release): prepare 2026.9.8 P0 hotfix #162931 merged into release/2026.9.8 at 2026-10-01T20:27:16Z. The previous review's instruction to wait for that prerequisite no longer applies.
  • Main and shipped-release distinction: Current main carries preview authority through both preview and final requests, while latest release v2026.9.7 retains the final-only branch. Existing main implementation therefore does not make this release backport redundant. (extensions/telegram/src/draft-stream.ts:236, a6ee7e12d29c)
  • Authority enforcement and negative control: The preview wrapper preserves the authorization callback through the account scheduler. The added current/retired-writer cases use a real grammY client and local HTTP server, asserting that a queued retired writer produces no edit request. The production network admission checks the captured callback immediately before transport I/O. (extensions/telegram/src/send.proxy.test.ts:120, 2a8b7a6e69fc)
  • Scoped Telegram proof requirement: The applicable Telegram guide requires real Telegram proof for streaming and authorization changes. The source PR at fix(telegram): preserve queued preview writer authority #160137 explicitly says live Telegram Test Server proof was not run; the captured backport body provides regression and static-check results but no replacement live preview evidence. (extensions/telegram/AGENTS.md:135, 2a8b7a6e69fc)
  • Existing-state compatibility evidence: The supplied source PR records include published-updater tests preserving incompatible plugin settings, byte-exact archival of verified-empty Telegram bindings with a nonempty refusal control, and deep session-owner repair preserving all transcript bytes and identities. GitHub additionally confirms the merged session repair at fix(doctor): avoid stack overflow on deep session owner chains #162321 and its published 2026.9.6 updater proof. The backport introduces no schema version or persistent-format change. (src/commands/doctor-session-canonical-owner-evidence.ts:18, 9fb7ba202992)

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)
  • VACInc: 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.

  • Add redacted Telegram Test Server evidence for authorized preview edits and replacement of the old writer, preserving the existing HTTP-boundary negative control.

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 (1 earlier review cycle)
  • reviewed 2026-10-01T19:54:35.162Z sha f634d57 :: blocked before merge. :: none

Base automatically changed from release-prep/2026.9.8 to release/2026.9.8 October 1, 2026 20:27
@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: nextcloud-talk Channel integration: nextcloud-talk channel: nostr Channel integration: nostr labels Oct 1, 2026
steipete and others added 14 commits October 1, 2026 13:28
Keep incompatible local plugin configuration intact and complete deferred migration confirmation after unchanged package convergence. Use completion receipts to clear obsolete retry warnings without rewriting update history.

Fixes #159477. Thanks @EndeavorPioneer for the recovery report.

(cherry picked from commit 8e66b0b)
* fix: prevent duplicate Gateways during container onboarding

* fix: keep QA cron controls scoped to the child

Drop inherited parent cron suppression while preserving explicit child runtime
settings. Cover the failing inheritance contract at the environment owner.

Await node-list RPC responses after acknowledged rename and reconnect events
without racing the existing RPC deadline against a separate polling timeout.

(cherry picked from commit 54b1b1b)
* fix: refuse incompatible Windows 9.4 schema upgrades

Refuse shared-state migration during the shipped Windows 9.4 raw Doctor preflight while its recorded updater drivers have not positively stopped. Keep the existing delegated Doctor and 9.2 publication paths unchanged. Split manual recovery text so the shipped canary retains the reason and commands within its per-line capture limit. This contains the old callback failure; it does not complete automatic 9.4 updates.

* fix: refuse legacy Windows migration during package staging

* fix(update): load package lifecycle guard only at runtime

(cherry picked from commit 0703c21)
…161260)

* fix(anthropic): release backgrounded Bash hold on task-notification result

* fix(anthropic): settle background replies without stalled or prematurely closed turns

Keep native Bash, agent, and workflow completions attached until consumed. Correlate queued and inline acknowledgements, preserve failure retirement, and distinguish automatic Bash timeouts from explicit background requests using authorized input. Add transport regressions; verify real Claude producer ordering and patched warm-session reuse.

Co-authored-by: VACInc <[email protected]>

---------

Co-authored-by: VACInc <[email protected]>
(cherry picked from commit 38dd3c2)
…161832)

* test(telegram): cover empty retired bindings migration

* test(doctor): cover empty Telegram migration receipt

* fix(telegram): archive verified empty retired bindings

Co-authored-by: ericcaiwx-star <[email protected]>
(cherry picked from commit 646ac9a)
…ains (#162321)

Doctor's session-repair step overflowed the stack (RangeError: Maximum call stack size exceeded) on large but healthy agent databases during 2026.9.7 update activation: canonical-owner resolution followed canonicalOwnerSessionKey alias chains recursively, and row-count-sized spreads sat on the same path. Resolution is now iterative with the same terminal-owner, missing-owner, and cycle outcomes, and the spreads are linear reductions with unchanged empty-input behavior. A healthy 12,000-owner / 200,000-event fixture fails pre-fix and passes post-fix; the published-driver upgrade preserved transcript bytes.

Closes #161979

(cherry picked from commit 9fb7ba2)
…2841)

2026.9.7 lengthened the compile-cache marker from <mtime>-<size> to build-<buildId>, which pushed cache paths on Windows into the directory-length window where Node 24's module.enableCompileCache() never returns (nodejs/node#66438); every OpenClaw process start could then spin at full CPU. The shared cache owner now uses a 16-character hash of the full build id as the marker, refuses Windows cache paths over 200 characters with a recorded warning (cache off for that process), and no longer propagates an unsafe inherited cache path to children. Legacy namespace handling and POSIX behavior are unchanged; native Windows/Node 24.18 completes the packaged CLI with a 220-character TEMP in 2.4 s.

Closes #162821

(cherry picked from commit 6e987af)
…162912)

Closes #162802

## What Problem This Solves

Fixes Gateway heap exhaustion during Codex session discovery on large agent fleets. Thanks to @609NFT for the report and allocation profiles.

## User Impact

Large fleets can finish startup and retain their native Codex session catalog without retaining a whole fleet configuration for every agent/home pair. No schema, stored-data, configuration, or catalog-output changes are required.

## Why This Change Was Made

The existing config-identity cache now owns one captured configuration per generation. Agent/home entries keep their separate directories and cloned connection options, but share that captured configuration. Config reload isolation and source-specific backoff remain unchanged.

No overlap with Pash/Sarah changes.

Codex source inspection: `codex-rs/app-server/src/request_processors/thread_processor.rs:2524–2608` in the sibling Codex checkout confirms that `thread/list` consumes pagination and filter parameters; the fleet configuration capture being repaired belongs to OpenClaw, not the native listing protocol.

## Evidence

Compared baseline `7ef388bac8f607eb03510189922d1c6a4d786b52` with candidate `f0ae922f60922f2b357bc3d5af22a2142799fbe0` in isolated Linux arm64 Docker containers, Node 24.21.0. The synthetic profile contained 739 agents, eight explicit Codex homes, and three native sessions (380,439 bytes of configuration).

| Check | Baseline | Candidate |
| --- | --- | --- |
| Real Gateway, 2,560 MiB heap | Heap OOM at 100.3 s | Survived the six-minute window; clean shutdown |
| Sampled catalog allocations under `resolveRequestOptions` → `structuredClone` | 2.248 GB | 5.48 MB |
| Post-startup heap, 150–360 s | Process already terminated | Bounded at 377–566 MiB |
| Complete startup, separate 6,144 MiB control without profiling | 98.34 s | 93.83 s |
| HTTP listening, same startup control | 50.52 s | 49.56 s |

The larger-heap startup control lets the baseline complete startup rather than comparing a successful candidate against an OOM.

- Real `sessions.catalog.list` Gateway RPCs returned exactly the three expected native session IDs for agents `agent000`, `agent001`, and `agent738`.
- Exact-head live gate: a real OpenAI `gpt-5.4-mini` turn through the candidate Gateway's Codex harness returned `CATALOG_LIVE_OK` on the 739-agent profile (5.449 s). Its temporary read-only credential file and container were removed.
- Regression failed on baseline: four fleet config clones instead of one across multiple agents/homes. It passes on the candidate and also checks reload allocation isolation; the regression itself took 5 ms.
- All 38 focused tests passed across `session-catalog-listing-cache.test.ts`, `session-catalog-request-lifetime.test.ts`, `session-catalog-homes.test.ts`, and `session-catalog-backoff.test.ts` (38.67 s wall).
- Standalone `pnpm test extensions/codex/src/session-catalog-listing-cache.test.ts --maxWorkers=1` passed (32.61 s wall, including runner preparation).
- Built and exercised the real candidate runtime with `pnpm build`. Broader static and project-wide validation is left to CI.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit fd01246)
* fix(telegram): preserve queued preview writer authority

Forward-port the Telegram preview correction from f488a8c. Both preview paths retain current-writer authority through the account scheduler and network admission.

WIP: the regression failed before the repair and all 86 focused tests pass. Full changed-check completion and independent review remain pending under the work-order time budget.

Co-authored-by: Ayaan Zaidi <[email protected]>

* docs(telegram): scope the preview authority note to guarded updates

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit a8907e3)
…tes (#162290)

Follow-up to #161832: when archiving a verified-empty retired Telegram bindings file fails (for example the .migrated target already exists), the migration records a recoverable warning instead of refusing the update; non-empty or uncertain sources keep the preservation refusal. Sanitized refusal messages keep their diagnostic text.

Refs #161795

Thanks @ericcaiwx-star for the base fix in #161832.

(cherry picked from commit 1b9d7e7)
…only installs (#162304)

* fix(sandbox): keep synced skill copies removable on read-only installs

Sandbox skill sync copied bundled skills with fs.cp, which keeps source
modes. From a read-only install every copied directory became 0555, so the
next full re-sync (skills version bump or Gateway restart) failed with
EACCES unlinking skills/<skill>/SKILL.md, and library-pinned sessions
failed every turn.

Copied directories are now made owner-writable (file modes unchanged), and
removal repairs legacy read-only trees inside the synced child before one
retry. The repair stays inside the skills root and never follows symlinks.
The Claude CLI skills-plugin copy fallback uses the same helper.

* fix(sandbox): classify skill removal errors without a type assertion

(cherry picked from commit be93e85)
… check (#162394)

doctor --fix heap-OOMed on a 739-agent state: the runtime tool-schema check resolved a model per agent workspace, and every plugin-load cache context cloned the full runtime config and retained a registry per workspace (516 MB of config clones at 2.4 GB heap). The loader now defers config capture until a cache miss and shares prepared provider registrations within a captured config generation for agents with matching configuration and plugin sources; a reentrant load during capture joins the in-flight load instead of registering twice. 300 synthetic agents: config clones 1,802 -> 3, registries 300 -> 1, peak RSS 1.25 GB -> 0.88 GB.

Closes #161869

(cherry picked from commit e304e4f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: telegram Channel integration: telegram cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: anthropic extensions: codex extensions: qa-lab gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

5 participants