Skip to content

fix(startup): honor startup webhook decisions for channels Doctor left pending - #169778

Merged
roboclaw-bot merged 1 commit into
openclaw:mainfrom
htjworld:fix/startup-webhook-readiness-rescan
Oct 30, 2026
Merged

roboclaw-bot merged 1 commit into
openclaw:mainfrom
htjworld:fix/startup-webhook-readiness-rescan

Conversation

@htjworld

@htjworld htjworld commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #177224 for #169406. This PR covers only the partial-record case #177224 leaves open.

What Problem This Solves

#177224 made startup read the machine-state webhook completion when openclaw.json has no marker. It still reads it only in that case (config ?? machineState). When Doctor recorded some channels in config and left Teams pending (the documented Teams-without-credentials case), config holds { telegram, feishu, nextcloud-talk }, so the msteams decision startup recorded in machine state is ignored:

  • every Gateway start rescans Teams, finds nothing to do, and records the same machine-state value again;
  • adding Teams later treats Teams as undecided, so startup refuses with openclaw doctor --fix and Doctor pins historical port 3978.

This is the config @JIRBOY reported below on 2026.10.5: webhook-readiness took 41.7 s on a host that configures only Feishu and QQ Bot, and the step disappeared after "msteams": [] was added by hand.

User Impact

After startup records a channel decision Doctor left pending, later starts skip the scan. Config bytes are unchanged. Adding Teams later does not reopen its historical port, as webhook migrations documents: "A startup without Teams credentials … completes that decision without a pin. Adding Teams later does not reopen its old port."

Why This Change Was Made

Both readers of the completion marker treated a partial config record as the whole answer: the startup gate (startup-config-preflight.ts) and applyHistoricalWebhookPins.

Changes, in the existing owner legacy-webhook-pins.ts:

  • mergeWebhookCompletion merges per channel: config decisions win, and machine-state decisions fill channels config has not recorded. A config true still wins outright and skips the machine-state read.
  • readWebhookCompletion (replaces readUnwrittenWebhookCompletion, whose only caller was the startup gate) returns that merged view for startup. applyHistoricalWebhookPins uses the same merge.

Not changed: what the scan does when it runs, the pin policy, Doctor's config writes, and both stored formats (config keeps true or a per-channel record; machine state keeps the same key and JSON value). A full config marker already skipped this scan, so skipping it when config and machine state together cover every channel is not a new bypass.

Evidence

Independent validation, 2026-10-30: retained the contributor's unchanged head b7a52b37878ec9df381510e99be7467c723fecc3; no rebase or source edits were needed. #177224 is merged, and unchanged main 484cb468ccb7b3c85a35058d287c8b41e1400e24 still exhibits this narrower partial-record defect.

  • RED on current main: the startup regression reaches the real preflight and fails because migration is called once despite the persisted Teams decision. Only regression-test code was added to that baseline; production source was unchanged. The runner stopped after this failing shard, so this pass does not establish a fresh Doctor-side RED. Secretless AWS baseline run.
  • GREEN on this exact head: 177 tests in 10 files across startup recovery/availability, deferred Doctor migration, registry selection and webhook pins, the SDK migration contract, and the Teams, Feishu, Telegram, and Nextcloud Talk consumers. All seven shards passed in 158.25 seconds. The two PR regressions took 2.384 seconds and 46 ms respectively. Consumer run.
  • Runtime boundary and negative controls: two additional isolated proof tests passed (45.60 seconds including cold compilation; test bodies 0.780 and 4.902 seconds). They exercise real SQLite receipts, startup preflight, and the registered real Teams Doctor contract with synthetic package metadata and Teams credentials. Doctor leaves missing credentials pending; startup records that decision once; repeated startup and adding Teams cause no rescan, completion write, authored-byte change, or historical pin. Config decisions and true win, absent machine state works, and config-path/state-directory isolation holds. This is admission/Doctor proof, not authenticated Teams delivery or a new physical-listener/upgrade run. Boundary and checks run.
  • Checks: core, command-test, and plugin-test types; touched-file oxlint (zero warnings/errors), oxfmt, and git diff --check passed. An initial consumer command referenced the later main-only doctor-contract-registry.selection.test.ts; it ran no consumer tests. The corrected command above uses this head's doctor-contract-registry.test.ts and passed. All contributor execution used no-role, public-network AWS leases without Tailscale or hydration, forwarding only CI plus Crabbox's run identifiers, with an isolated HOME and pinned toolchain.
  • Fresh independent review: Codex autoreview of the complete f421a5e3ade01a9d60f3133b0852b1ceb6df948c..b7a52b37878ec9df381510e99be7467c723fecc3 change and owner/consumer context completed scoped-clean for P0–P2. Its identified coverage gaps are covered by the additional boundary proof above.
  • Exact-head CI: PR CI run 39811114314 succeeded on b7a52b37878ec9df381510e99be7467c723fecc3 on October 22. This is existing exact-head evidence; it does not certify a newly constructed merge against today's main. The PR remains on the reviewed contributor head.

Simplification review retained the existing owner and shared merge; the superseded reader has no remaining callers. Production delta: +38/-15; tests: +37/-1. No new store, format, policy, SDK surface, dependency, or config write was introduced. No operator Gateway or state was touched.

Contributor upgrade, Gateway, and regression evidence (source-qualified below)

Upgrade from latest stable [email protected] (npm) to this head (b7a52b37, pnpm build:runtime). macOS, Node 24.22.1, one isolated HOME/OPENCLAW_HOME/OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH, OPENCLAW_GATEWAY_STARTUP_TRACE=1, OPENCLAW_NO_RESPAWN=1. Each boot is openclaw gateway run --port 28789 --allow-unconfigured, waits for /readyz, then stops. Starting config is the partial Doctor record from the report above:

{
  "gateway": { "mode": "local", "auth": { "mode": "none" } },
  "meta": { "migrations": { "webhookListeners": { "telegram": [], "feishu": [], "nextcloud-talk": [] } } }
}
  1. 2026.10.7, boot 1. Scan runs, startup records Teams in machine state, config bytes unchanged. A session is created on the running Gateway.
    [gateway] startup trace: cli.bootstrap.webhook-readiness 135.4ms
    readyz: 200
    config sha256 before/after: 787dbdbf884e0e6b / 787dbdbf884e0e6b
    webhookListeners:~/.openclaw/openclaw.json = {"telegram":[],"feishu":[],"nextcloud-talk":[],"msteams":[]}
    $ openclaw gateway call sessions.create --params '{"label":"upgrade-proof"}'
    "key": "agent:main:dashboard:2629ead4-f5e4-40ca-9e28-4921920dd296", "sessionId": "7b82c182-0814-4a76-9475-67e3d88ca107", "label": "upgrade-proof"
    
  2. 2026.10.7, boot 2: the bug. The recorded msteams decision is ignored and the scan runs again.
    [gateway] startup trace: cli.bootstrap.webhook-readiness 148.2ms
    readyz: 200
    
  3. Candidate openclaw doctor --fix --non-interactive (the updater's step) exits 0. It backs up and migrates the existing databases (agent database schema 25 → 31) and writes its usual unrelated config migrations (lastTouchedVersion, modelPolicyAllowlist, and so on). meta.migrations.webhookListeners stays the three-channel Doctor record, 0 legacyWebhook keys, machine-state row unchanged.
    Saved pre-migration SQLite backup: <home>/.openclaw/agents/main/agent/openclaw-agent.sqlite.pre-startup-migration-….bak
    Saved pre-migration SQLite backup: <home>/.openclaw/state/openclaw.sqlite.pre-startup-migration-….bak
    doctor exit=0
    
  4. Candidate, boots 1 and 2. No webhook-readiness step in either trace; config bytes unchanged; the session created by 2026.10.7 is still listed.
    boot 1: readyz: 200, webhook-readiness: absent, config sha256 before/after: af6e5fe4115b0473 / af6e5fe4115b0473
    $ openclaw gateway call sessions.list
    [{ "key": "agent:main:dashboard:2629ead4-f5e4-40ca-9e28-4921920dd296", "label": "upgrade-proof", "sessionId": "7b82c182-0814-4a76-9475-67e3d88ca107" }]
    boot 2: readyz: 200, webhook-readiness: absent, config sha256 before/after: af6e5fe4115b0473 / af6e5fe4115b0473
    
  5. Add Teams later (synthetic channels.msteams.appId/appPassword/tenantId), candidate boot 3. Ready, no scan, config bytes unchanged, 0 legacyWebhook pins, nothing listening on 3978.
    readyz: 200, webhook-readiness: absent, config sha256 before/after: 7402b0dbda12c375 / 7402b0dbda12c375
    legacyWebhook pins in config: 0
    listening on 3978: 0
    

Control: same flow on 2026.10.7 only (separate isolated home, same starting config). Boot 1 records the same msteams: [] row; after adding the same synthetic Teams credentials, the next boot refuses to start and would pin the historical port:

[gateway] startup trace: cli.bootstrap.webhook-readiness 155.4ms
Gateway failed to start: Webhook listeners require config migration. Run `openclaw doctor --fix`, then restart. Startup left the config unchanged.
Pinned channels.msteams.legacyWebhook. Move the callback or proxy to the Gateway route, then remove the pin.
readyz: 000

Data-model compatibility. No stored format changes. Config keeps true or a per-channel record, and machine state keeps the same webhookListeners:<config path> key and JSON value; only the read side merges them. The proof above reads the exact row 2026.10.7 wrote (step 1) without rewriting it, and the existing session and databases survive the upgrade (steps 3–4).

Contributor regression run on main (adda7fee), macOS, Node 24.22.1. Each new test fails with the two source files reverted to main and passes with this PR:

  • startup-config-preflight.recovery.test.ts "skips a channel startup completed after Doctor left it pending": a partial Doctor record in config plus startup's msteams: [] in machine state. On main: expected "applyPluginDoctorCompatibilityMigrations" to not be called at all, but actually been called 1 times.
  • doctor-contract-registry.webhook-pins.test.ts "keeps a Teams decision startup recorded after Doctor left it pending": adding a Teams account returns { config, changes: [] } (no pin). On main the migration returns config changes instead.

pnpm test src/commands/startup-config-preflight.recovery.test.ts src/commands/startup-config-preflight.availability.test.ts src/plugins/doctor-contract-registry.webhook-pins.test.ts --maxWorkers=2: 45/45 passed, 76 s wall.

Real Gateway, documented Teams-pending flow (measured on the previous head against main c832c45a, before #177224). Doctor recorded telegram/feishu/nextcloud-talk and left Teams pending; isolated home; Windows 11. #177224 did not change this path (its gate still takes the config record as-is), and the startup regression test above reproduces boot 2 on current main.

main (c832c45a) this PR
boot 1 (no Teams) ready; scan runs; machine state {"telegram":[],"feishu":[],"nextcloud-talk":[],"msteams":[]} same
boot 2 ready; scan runs again (webhook-readiness 1337.4ms) ready; no scan
add a Teams bot (synthetic credentials), boot 3 Gateway failed to start: Webhook listeners require config migration. Run openclaw doctor --fix. Running Doctor would pin port 3978 ready; config bytes unchanged; 0 legacyWebhook pins

Contributor gates on this head: oxfmt, oxlint (touched files), tsgo:core: pass. Please rely on CI for the remaining check:changed lanes.

Out of scope: channels whose doctor contract never loads (for example a replacement plugin without a historical listener declaration) stay undecided and still rescan. Recording them as complete would require the product decision this migration intentionally avoids. #168955 and #162211 (other startup costs) are unrelated.

Original implementation and regression tests by @htjworld.

Co-authored-by: htjworld [email protected]
Co-authored-by: steipete [email protected]

@clawsweeper

clawsweeper Bot commented Oct 12, 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 commands Command implementations size: S labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Merge webhook migration completion decisions from config and machine state per channel, preserving config precedence.

Example: Config records telegram, feishu, and nextcloud-talk completion, while SQLite records msteams: [].

  • Before: Every boot rescans Teams, and adding Teams later can require Doctor to pin port 3978.
  • After: Startup honors the recorded Teams decision, skips the scan, and leaves port 3978 closed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused, contract-preserving repair with shipped Gateway proof, compatible existing state, meaningful regressions, and successful exact-head checks.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Exact-head macOS Gateway terminal output covers the partial Doctor record, repeated boots, latest-stable upgrade with retained settings and session, and later Teams setup reaching readiness without reopening port 3978; this resolves the previous review's upgrade-proof gap.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Gateway repeatedly inspects a completed Teams migration and can demand an unwanted historical listener pin when Teams is added later.
Reason: The change restores the documented one-shot migration contract with a small repair in its existing owner.

Merge readiness

✅ Ready for maintainer review

This PR fixes a documented startup behavior that remains broken on current main; no actionable correctness or security findings remain.

Priority: P2
Reviewed head: b7a52b37878ec9df381510e99be7467c723fecc3

Before merge

None.

Findings

None.

Agent review details

How this fits together

Gateway startup and Doctor consume historical webhook completion records to decide whether channel listener migration is still required.

flowchart TD
  A[Config completion] --> C[Webhook migration owner]
  B[SQLite completion] --> C
  C --> D[Startup preflight]
  C --> E[Doctor migration]
  D --> F[Skip completed channels]
  E --> G[Preserve listener decisions]
Loading

Technical review

Best possible solution:

Use the existing webhook migration owner to combine recorded channel decisions consistently across startup and Doctor.

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

Current-main source exposes the partial-record failure directly, and supplied stable-release Gateway traces reproduce repeated inspection and later Teams startup refusal; no target code was executed during this review.

Is this the best way to solve the issue?

The patch repairs both affected readers through one shared merge operation, preserves authored decisions and stored formats, and adds regressions for skipped startup inspection and permanent Teams completion.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Historical webhook listener preservation keeps the original intent (c7c937a: Preserve operated callback endpoints while retiring implicit ports, and retain completion so removed pins stay removed.)
  • Startup machine-state completion lookup keeps the original intent (7dceeae: Skip completed webhook inspection without rewriting authored config and keep receipt-write failures nonfatal.)
  • Shared migration receipt reuse keeps the original intent (7ae60e4: Share a lazy completion receipt within one migration pass rather than rereading it per plugin.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +23, Tests +36. Total +59 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 38 15 +23
Tests 2 37 1 +36
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 75 16 +59

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A bounded startup migration bug causes repeated unnecessary inspection and incorrect historical listener migration when Teams is configured later.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-12T08:59:32.298Z sha ab045a82f14df6f6147b1d75137e85891c6c1d80 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-12T09:57:14.809Z sha ab045a82f14df6f6147b1d75137e85891c6c1d80 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-23T08:59:46.203Z sha b7a52b3 :: needs real behavior proof before merge. :: none

Reviewed October 24, 2026, 3:34 PM ET / 19:34 UTC (Revision 4).

@htjworld

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 12, 2026
@JIRBOY

JIRBOY commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Confirming this still reproduces on 2026.10.5 (npm global install, Windows 11, Node 24.22.1).

The config matched the case described in the PR body exactly — Doctor had completed three channels, and msteams was simply absent because it was never configured:

"meta": { "migrations": { "webhookListeners": {
  "telegram": [], "feishu": [], "nextcloud-talk": []
} } }

Startup phase log on that config:

[gateway] startup phase: cli.bootstrap.webhook-readiness starting total=74523.2ms
[gateway] startup phase: cli.bootstrap.webhook-readiness 41754.0ms total=116277.1ms start=74523.2ms

41.75 s spent in the scan. This host only configures feishu + qqbot, so the scan had nothing to act on.

After manually adding "msteams": [], the step disappears entirely from the next boot's phase list — it is skipped, not merely shortened.

One caveat on the number: this is a production gateway, so I did not run a controlled A/B (removing the key again for a fresh timed boot). The 41.7 s is a single measured start, not an average.

+1 for landing this. It matters more than the raw seconds suggest: on this host total time-to-bind is already ~110 s (cf. #162211), so an unconditional extra scan is a meaningful share of the window where the gateway looks dead and a restart gets requested.

@htjworld

Copy link
Copy Markdown
Contributor Author

Thanks for confirming. 2026.10.5 predates #177224, but that fix still uses config ?? machineState, so your exact config (Doctor recorded telegram/feishu/nextcloud-talk, msteams absent) still rescans on every boot on current main. I rebased this PR onto main to cover only that remaining case; the new regression test fails on main with exactly that rescan.

@htjworld htjworld changed the title fix(startup): Gateway rescans webhook listener contracts on every boot when completion lives in machine state fix(startup): honor startup webhook decisions for channels Doctor left pending Oct 22, 2026
@htjworld
htjworld force-pushed the fix/startup-webhook-readiness-rescan branch from 1f306ba to 355a3d7 Compare October 22, 2026 14:08
…ctor left pending

Startup read the machine-state completion only when config had no marker.
A partial Doctor record (telegram, feishu, nextcloud-talk) hid the msteams
decision startup had recorded, so every boot rescanned Teams and adding Teams
later could reopen its historical port. Merge both per channel; config wins.
@htjworld
htjworld force-pushed the fix/startup-webhook-readiness-rescan branch from 355a3d7 to b7a52b3 Compare October 22, 2026 16:06
@htjworld

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 23, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 23, 2026
@htjworld

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 24, 2026
@htjworld

Copy link
Copy Markdown
Contributor Author

@steipete since you landed #177224: this is the follow-up for the case it leaves open.

#177224 reads the machine-state receipt only when config has no marker (config ?? machineState). When Doctor recorded some channels and left Teams pending, config holds a partial record, so the msteams: [] decision startup wrote to machine state is never read:

  • every boot rescans (JIRBOY measured 41.7 s on 2026.10.5 with exactly this config)
  • adding Teams later makes startup refuse and Doctor pins 3978, which contradicts the webhook migration docs

This PR merges the two records per channel (config wins) in both readers, startup-config-preflight.ts and applyHistoricalWebhookPins. Stored formats don't change. Rebased on current main, CI green, and the new regression test fails on main.

Happy to adjust if you'd rather fold this in differently.

@roboclaw-bot
roboclaw-bot merged commit b1f643f into openclaw:main Oct 30, 2026
163 checks passed
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 31, 2026
…ctor left pending (openclaw#169778)

Preserve startup's completed Teams webhook decision when Doctor left a partial
completion record in config. Repeated startup skips completed migration work,
and adding Teams later does not recreate its historical webhook pin.

Merge decisions per channel in the existing legacy-webhook-pins owner. Explicit
config decisions win, config true avoids machine lookup, and machine state fills
only missing channels. Startup and Doctor use the same merge without changing
stored formats, listener policy, SDK contracts, or authored config writes.

Validation: startup regression RED on unchanged main ca26429 and GREEN on
b7a52b3; 177 consumer tests plus two real SQLite/registered Teams boundary
controls passed in secretless AWS isolation. Core and affected test types,
touched-file lint/format passed. Fresh independent P0-P2 review was clean.
Existing exact-head CI run 39811114314 passed on October 22; no new merge-head
CI or authenticated Teams/upgrade result is claimed.

Co-authored-by: htjworld <[email protected]>
Co-authored-by: steipete <[email protected]>
tideclaw-bot added a commit that referenced this pull request Nov 5, 2026
Backport accepted fixes onto 2026.11.5-beta.2.

Base: bc061f9
Canonical source tree before commit: e6c0c39

These are adapted/squashed backports; do not claim each is an exact Git cherry-pick.
Source provenance (selected verified commits; other cohorts use their frozen patch/adoption manifests):

runtime-B:
b20a0cc fix(macos): connect with configured credentials despite stale app environment (#191468)
c4c0942 fix(update): failed updates from 10.7–10.9 crash in automatic migration recovery (#189713)
6aae408 fix(update): preserve recovery errors and async triage callbacks (#191495)
8910654 fix(macos): prevent first-launch Gateway failures after upgrades (#191436)
00b2ff4 fix: parent sessions miss child approvals with a custom session store (#189827)
c6142a8 fix: avoid copying managed plugin binaries during Gateway startup (#187865)
e72b356 fix(anthropic): avoid token profile collisions (#187875)
807075d fix(anthropic): set API workspace at login (#186976)
bafe92f fix(exec): preserve no-timeout results from macOS app nodes (#190729)
9b05a64 fix(imessage): use a PostgreSQL-safe recovery cursor key (#184919)
6ba197f fix: session search on PostgreSQL scans every transcript row instead of using the text index (#187909)
4f49aa5 fix(sessions): PostgreSQL session search scans every transcript row again after the 5th search on a connection (#188979)
de3936c fix(macos): Mac tab shows a blank or stale page when a load fails (#185432)
e977080 fix(macos): prevent duplicate voice sends and false sent feedback (#186271)

provider-compaction:
1b43c2e fix(compaction): preserve active request provenance (#180214)
7b0cfe3 fix(google): restore tool calls with Python keyword parameters (#191561)
9039ceb fix(ci): keep compaction attribution helpers internal
d6a1327 feat(google): use the Interactions API for Gemini Flash models (#189395)
fe0f8d1 fix(google): Gemini models ignore configured topP (#190695)

history:
c51d733 fix(sessions): stop expanding archive reads from exhausting memory (#190690)
3c8bd4d fix(sessions): page oversized earlier history instead of failing at 8 MiB (#188450)
b195f61 fix(sessions): page oversized transcript history in both directions (#188483)
b65482e fix(gateway): preserve older history across hidden message gaps (#188557)
3d4fc94 fix(sessions): avoid oversized listing and imported-history reads (#189284)
33e7baf fix(sessions): bound active accounting without blocking writers (#190182)
682ade7 fix: preserve chat history continuation metadata (#188612)

runtime-C:
7e005b0 fix(macos): keep secrets when a Gateway config save fails (#187734)
15cf738 fix(macos): keep Gateway auth when Tailscale exposure is turned off (#187664)
b53a06b perf(update): read candidate state inventory without copying the shared database (#187921)
970fc4e fix: restore CLI message sends with agent tool policies (#188058)
73ad731 fix: stop model fallback when session capability metadata changes (#179312)
32305db fix: subagent turns fail after session metadata changes (#183501)
d13bd0f fix(codex): include relay conversation instructions in trajectory (#189005)
e375530 fix: replies after a plugin reload from Control UI go to the session's last external chat (#190982)
9346376 fix: reasoning-only retry is refused by Anthropic as reasoning_extraction (#184434)

direct-auth-state:
1b15408 fix(models): keep the model list when one plugin-owned provider lacks a credential (#189014)
7d8dc60 fix: recover startup migration with retained worker index (#189023)

capacity:
41772e3 fix(worktrees): settle completed disk debt on refused postchecks (#188727)

command-once-189369:
8269137 fix(plugins): plugin commands that continue the agent run three times on native command turns (#189369)

pg-board-189564:
7232a8d fix(boards): publish widgets with PostgreSQL storage (#189564)

queued-edit-189869:
92b32ca fix: hold queued messages through inline edits (#189869)

Preserve source attribution from original commits. For a genuinely exact individual pick only, use the conventional (cherry picked from commit <sha>) line.
Full file-level provenance: coverage-manifest.json; reviewed patch hashes: artifact-registry.json.
No held136/native82 content adopted by this work. No release or full-candidate qualification claim.

Additional original-source identities (exact adapted hunk scope is in frozen artifacts):
release-guides-185258: 39c37e6 docs(release): define ledger-first hotfix routing (#185258)
UI-history: 10a6e4f fix(ui): scope provider-add discovery warning to its own provider (#188541), 3d7b4c4 fix(ui): never fail loading earlier chat history without a boundary (#188372)
obsolete-cache-188203: 90d82c2 fix: preserve completed reasoning and refill chat snapshots (#188203)
webhook-169778: b1f643f fix(startup): keep webhook decisions startup recorded for channels Doctor left pending (#169778)
schema-lease-188391: ba6cfcd fix(state): keep lease renewal independent of parent admission (#188391)
backfill-188976: c75a8a8 fix(gateway): stop session row backfill once the Gateway is closing (#188976)
canonical-disable-188846: 88b56ee fix(config): auto-enable reads and writes mixed-case plugin policy under the canonical id (#188846)
matrix-177272: 5a6d22c fix(matrix): stop seeding new thread sessions from the room transcript (#177272)
provider-hook-189059: 0588f51 fix(models): isolate every per-provider catalog failure (#189059)
unicode-189868: 87396e7 fix(oc-path): avoid reading and editing a different Unicode key (#189868)
replay-cohort: 2031044 fix(sessions): acknowledge committed input retries without duplicate turns (#188527), 9114431 fix: resume configured fallback after interrupted attempts (#188672)

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S 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.

3 participants