Skip to content

fix(channels): stop reinstalling loaded channel plugins from setup fallback - #150026

Merged
fuller-stack-dev merged 14 commits into
openclaw:mainfrom
LiuwqGit:feat/issue-149672-sms-channel-install-loop
Sep 17, 2026
Merged

fuller-stack-dev merged 14 commits into
openclaw:mainfrom
LiuwqGit:feat/issue-149672-sms-channel-install-loop

Conversation

@LiuwqGit

@LiuwqGit LiuwqGit commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

AI-assisted: yes

Related: #149672. SMS/Twilio credential-form completion remains unverified; this PR does not close that remaining issue.

What Problem This Solves

Fixes repeated plugin installation and gateway restarts when channel setup selects an already-loaded catalog plugin.

User Impact

Loaded catalog plugins keep their installation identity and owner-specific settings while proceeding to their existing setup outcome. Missing-plugin recovery, disabled-channel policy, and active/deferred non-catalog plugin activation remain supported. No new credential screen or SMS configuration capability is added.

Why This Change Was Made

Discovery omits loaded catalog plugins from both installation buckets. The fallback must distinguish a loaded plugin from a missing one, and must not enable a loaded catalog plugin by channel ID: its owning plugin may have a different ID. This prevents stray plugin configuration entries and misleading allowlist failure notes.

The contributor's loop-removal work and ancestry are preserved. The maintainer correction additionally verifies returned configuration and notes for distinct plugin/channel IDs, both with unrestricted plugins and an owner-only allowlist.

Evidence

  • The existing exact-head review accepted the real Gateway/WebSocket before/after loop-removal trace at original head 8d00f9d8b3b1: the same production wizard RPC stopped reinstalling the loaded SMS-shaped workspace plugin. That accepted trace is retained, not replayed or represented as new-head live acceptance.
  • Maintainer regression first reproduced both defects: a stray plugins.entries["custom-chat"] entry without an allowlist, and a misleading enablement-failed note with an owner-only allowlist. The corrected flow preserves the returned configuration and emits neither note.
  • Prior channel qualification: 70 focused tests passed, covering loaded reuse, returned config and notes, missing-plugin recovery, disabled policy, eager/deferred activation, discovery, status, prompts, and navigation. The five channel source/test files remain byte-identical to that qualified repair; integrated main supplies the current dependency context.
  • Required-CI prerequisite repairs: consume Peter Steinberger's existing test(skills): restore bounded-read growth hook after fs-safe upgrade #150419 bounded-read hook fix and fix(ui): keep file preview copy out of the startup bundle #150424 lazy-preview catalog fix unchanged, retaining both commits as ancestors. Complete the native wrapper's extraction manifest with its three existing eager dependencies. No CI assertion, budget, baseline, trust check, or allowance is weakened.
  • Local delta evidence: all 24 plugin skill-bundle tests pass, including failed-read budget accounting; the lazy-preview loading/fallback regression passes; the production UI build and unchanged performance gate pass at 362,442 startup gzip bytes against a 362,588-byte limit (seven requests). The previous CI failure and subsequent missing registry dependency were reproduced before completing the manifest correction.
  • The first CI-prerequisite repair passed fresh P0–P2 review and its complete frozen changed-file gate. Hosted CI also passed the UI performance job.
  • A later GitHub merge-context run exposed two newly landed main defects: an unbound Slack approval callback, and the cold-checkout fixture missing the extracted bundled-plugin source helper. This PR preserves the callback receiver and includes that existing fixture dependency; all assertions and gates remain intact. All 245 focused cold-setup and Slack preview/approval tests passed; fresh P0–P2 review is scoped-clean against integrated main 85ee6a57f097. Hosted CI passed the UI-budget, Slack-lint, and cold-fixture jobs. Local two-path guards, typechecks, and export scans passed; local extension lint hit the nested-checkout declaration-isolation guard and was qualified by hosted CI instead, without changing that guard or the parent install.
  • A newer main change introduced an ingress/thread-resolution import cycle. The unchanged private lifecycle type now lives in a leaf contract, with all four consumers updated. Both extension typechecks, the Madge graph check, 27 resolver tests, and fresh P0–P2 review pass. Structural integration with the exact failing main is conflict-free and removes the backedge. Hosted head 729eb63a68c7 passed UI budget, architecture/Madge, and the previously inconsistent sidebar e2e job.
  • Its remaining provider-test failure exposed a clock-dependent exact deadline assertion:119999 instead of120000 milliseconds after real setup elapsed. Freeze Date.now only in that fixture and restore it after each test; keep the exact assertion and production timeout logic unchanged. All27 Qwen tests, extension-test typechecking, and fresh P0–P2 review passed for cbec8587a47e. The immutable Qwen correction is published as cbec8587a47e.
  • Canonical fix(discord): rejoin threads on unarchive to restore MESSAGE_CREATE events #111148 supplied the Slack lifecycle/callback correction. Head c75772a98b24 then passed all 180 jobs in required CI35173898120. During that run, canonical fix(ci): restore current main checks #150491 landed the native manifest, cold-fixture, and narrower lazy bundle-message correction with green required CI. Resolve the resulting catalog conflict exactly to canonical main and remove the superseded broader preview extraction. The remaining seven-file diff preserves the reviewed channel/Qwen changes and original test-inventory addition; UI and tooling now match canonical main exactly. Published head: c4787b7890e4; overlapping integration requires fresh exact-head CI before native LAND. No cycle, budget, or test guard is weakened.
  • Auth prerequisite: CI35176075241 job105058163717 timed out before automatic catalog discovery in the existing 7000-ms endpoint test. Consume only the independent auth correction from Peter Steinberger’s published 2721b8bbc653, coordinated with fix: curb Gateway memory growth after large fleets start #150354; the author is an active maintainer of the listed security-owner team. All eight production files and the bootstrap regression match that commit exactly. Fresh shared-store bootstrap now hands existing runtime snapshots to the committed owner, and login/refresh joins actual credential publication instead of fabricating a second mutation. Worker pooling and its metrics fixtures are not included. The deterministic regression first failed with legacy-main runtime ownership after persistence moved to state-db; all155 focused auth tests then passed, including the unchanged slow-login and refresh fixtures. Fresh P0–P2 review is scoped-clean; four type lanes, three export scans, core lint and Madge0cycles pass. Full local changed-check stopped only at the existing ancestor-install declaration-isolation guard during extension lint; that guard and parent install remain untouched, and isolated exact-head CI must qualify extension lint. No timeout, latency assertion, single-request assertion, public RPC contract, or budget is weakened. Auth repair commit: 0a2832e23bb8; its attempted CI attachment was blocked by the subsequently resolved Qwen conflict. The original isolated login test passed before the correction, so the local evidence is not claimed as reproduction of the hosted timing failure.
  • Canonical fix(qwen): prevent elapsed-time flakes in video generation tests #150523 subsequently landed elapsed-budget and deadline-exhaustion Qwen coverage with green required CI; current main also supplies its clock-fixture cleanup. Resolve the sole Qwen conflict exactly to main 9843b937e354 and drop our superseded Qwen delta. All15 remaining PR paths preserve reviewed changes; all auth owner/caller/dependency review inputs remain byte-identical. No extension, UI, or tooling delta remains against integrated main. Immutable Qwen publication cbec8587a47e remains recorded for dependent-owner provenance. Current published head: 7ae5c49969b8; current-head required CI must pass before native LAND.
  • Not established: live published SMS/Twilio credential-form completion, a real Twilio account, outbound SMS, or the reporter's exact Docker-image restart timing. The existing trace reached the plugin's “no interactive setup screen yet” outcome; it did not prove credential setup.

Final exact-head qualification

All 166 jobs passed in required CI35178222943 at 7ae5c49969b833d515b5706c10779d14d15293c4, including openclaw/ci-gate, the previously failing catalog-login shard, and isolated extension lint. This supersedes the pending-CI and local extension-lint qualification notes above. Native review is scoped-clean with the documented source bindings.

The final squash message uses a supported explicit body with preserved contributor credit and a related-issue reference. #149672 remains open; real SMS/Twilio credential-form completion and outbound delivery are still unproven.

@clawsweeper

clawsweeper Bot commented Sep 16, 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.

@LiuwqGit
LiuwqGit force-pushed the feat/issue-149672-sms-channel-install-loop branch from 4998bdc to f1b6c21 Compare September 16, 2026 13:24
@clawsweeper clawsweeper Bot added P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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 Sep 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed September 16, 2026, 11:38 PM ET / September 17, 2026, 03:38 UTC (Revision 10).

ClawSweeper review

What this changes

The branch reuses loaded channel plugins during setup and repairs auth snapshot handoff and refresh publication, with regression coverage.

Merge readiness

⛔ Needs changes before merge - 1 item remains

The fix remains necessary on current main, and both earlier plugin-ID findings are resolved. No blocking code defect was found; the repository’s screenshot delivery gate remains outstanding for the changed Control UI setup flow.

Priority: P0
Reviewed head: 7ae5c49969b833d515b5706c10779d14d15293c4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful runtime evidence and focused owner-level repairs support a good patch with no blocking code findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Retained production Gateway/WebSocket traces establish reinstall-loop removal, and reported real Gateway/HTTP integration runs support auth publication and recovery. They do not prove Twilio credential completion; the separate repository screenshot-delivery requirement remains outstanding.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): Retained production Gateway/WebSocket traces establish reinstall-loop removal, and reported real Gateway/HTTP integration runs support auth publication and recovery. They do not prove Twilio credential completion; the separate repository screenshot-delivery requirement remains outstanding.
Evidence reviewed 8 items Introduced change and checkout identity: The inspected checkout matches the pinned original head. Its raw parents match the supplied records; review used the pinned base-to-head delta, not the stale GitHub test merge. The checkout remained clean and diff whitespace validation passed.
Current main still needs the channel repair: Current main still calls installation unconditionally when both discovery buckets are empty and the trusted catalog supplies an npm specification. Discovery deliberately excludes loaded plugins from both buckets. No supplied merged PR fixes this central behavior. The latest release identity was checked, but release source inspection could not complete, so no shipped-fix claim is made.
Earlier findings resolved: The current fallback checks disablement, installs only when no visible plugin exists, and avoids channel-ID enablement for loaded catalog plugins. Regression cases assert preserved configuration and absence of misleading notes with distinct plugin/channel IDs, including an owner-only allowlist. Non-catalog activation remains covered.
Findings None None.
Security None None.

How this fits together

The Gateway’s channel wizard turns setup selections into plugin installation or configuration steps. Its auth runtime separately publishes saved credentials into the model inventory used by clients and agents.

flowchart TD
  A[Channel selection] --> B[Setup discovery]
  B --> C{Plugin already loaded?}
  C -->|Yes| D[Existing configuration flow]
  C -->|No| E[Trusted installation flow]
  F[Saved credentials] --> G[Auth snapshot publication]
  G --> H[Prepared model inventory]
Loading

Before merge

  • Complete next step (P2) - Attach inspected, sanitized before/after screenshots showing the Control UI install-loop and repaired setup outcome in the originating chat and the PR, link them from the PR body, and verify both render as required by AGENTS.md.
Agent review details

Security

None.

PR surface

Source +22, Tests +468. Total +490 across 15 files.

View PR surface stats
Area Files Added Removed Net
Source 10 103 81 +22
Tests 5 583 115 +468
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 686 196 +490

Review metrics

Metric Value Why it matters
Production versus regression coverage Production net +22 lines; tests/support net +468 lines Production growth supplies the missing auth-owner handoff while channel fallback code shrinks; regression coverage protects installation identity and recovery.

Technical review

Best possible solution:

Keep installation identity and plugin-owned settings intact during setup, with credential persistence remaining the single owner of auth publication.

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

Yes. Current-main discovery excludes loaded plugins from both buckets, while its fallback still installs them; the retained real Gateway trace demonstrates that mechanism. This read-only review did not execute it.

Is this the best way to solve the issue?

Yes. The repair distinguishes loaded plugins at the existing fallback and completes auth ownership handoff at its producer without adding parallel configuration or publication mechanisms.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P0: The linked official-release report establishes a blocked Control UI setup loop that restarts the Gateway and required agent-assisted configuration recovery.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): Retained production Gateway/WebSocket traces establish reinstall-loop removal, and reported real Gateway/HTTP integration runs support auth publication and recovery. They do not prove Twilio credential completion; the separate repository screenshot-delivery requirement remains outstanding.
  • proof: sufficient: Contributor real behavior proof is sufficient. Retained production Gateway/WebSocket traces establish reinstall-loop removal, and reported real Gateway/HTTP integration runs support auth publication and recovery. They do not prove Twilio credential completion; the separate repository screenshot-delivery requirement remains outstanding.

Evidence

What I checked:

  • Introduced change and checkout identity: The inspected checkout matches the pinned original head. Its raw parents match the supplied records; review used the pinned base-to-head delta, not the stale GitHub test merge. The checkout remained clean and diff whitespace validation passed. (7ae5c49969b8)
  • Current main still needs the channel repair: Current main still calls installation unconditionally when both discovery buckets are empty and the trusted catalog supplies an npm specification. Discovery deliberately excludes loaded plugins from both buckets. No supplied merged PR fixes this central behavior. The latest release identity was checked, but release source inspection could not complete, so no shipped-fix claim is made. (src/flows/channel-setup.ts:906, 9a4468148bc0)
  • Earlier findings resolved: The current fallback checks disablement, installs only when no visible plugin exists, and avoids channel-ID enablement for loaded catalog plugins. Regression cases assert preserved configuration and absence of misleading notes with distinct plugin/channel IDs, including an owner-only allowlist. Non-catalog activation remains covered. (src/flows/channel-setup.ts:898, 7ae5c49969b8)
  • Retained real Gateway proof: The captured contributor comment at fix(channels): stop reinstalling loaded channel plugins from setup fallback #150026 (comment) records production wizard RPCs over a real WebSocket: before the repair, setup performed an npm reinstall; afterward, it performed no installation and preserved install identity. This is historical proof at 8d00f9d, not a new-head execution. It reaches the existing no-interactive-setup outcome and does not establish Twilio credential completion. (src/flows/channel-setup.ts, 8d00f9d8b3b1)
  • Auth handoff stays within the existing storage owner: The new handoff runs after the existing empty-store relocation commits. Legacy credentials, pending cleanup, and unreadable sources retain the existing refusal path. Snapshot rebinding matches the previous shared database owner, preserves snapshot keys, and uses existing invalidation/publication machinery; no schema or persisted-format change is introduced. (src/agents/auth-profiles/shared-store-bootstrap.ts:196, 7ae5c49969b8)
  • Auth publication and recovery coverage: The bootstrap regression covers failed first persistence, successful retry, external-profile preservation, and unrelated-root isolation. Existing login/refresh integration suites exercise real Gateway clients and HTTP endpoints, including delayed discovery, account replacement, and logout during pending discovery. The captured body reports 155 focused passes; fix: curb Gateway memory growth after large fleets start #150354 supplies the related repeated production-boundary observations. These runs were inspected as supplied evidence, not executed here. (src/gateway/server-methods/models-auth-refresh.catalog.integration.test.ts:172, 7ae5c49969b8)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: 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.

  • Complete the required sanitized before/after screenshot delivery for the Control UI setup transition.

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 (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-16T19:42:00.180Z sha 8d00f9d :: blocked before merge. :: [P2] Avoid channel-ID enablement when reusing a catalog plugin
  • reviewed 2026-09-17T00:22:04.349Z sha 1c242cf :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T00:29:33.651Z sha 4b71eaf :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T00:45:22.856Z sha 4b71eaf :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T01:37:59.245Z sha f91e0e0 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T01:48:19.844Z sha 729eb63 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T02:25:44.361Z sha c75772a :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T03:01:22.337Z sha c4787b7 :: needs maintainer review before merge. :: none

…llback

Channel setup treated an empty pair of discovery buckets as "plugin
missing" and drove the catalog install fallback unconditionally. A
catalog-backed channel whose plugin is already loaded (e.g. sms in the
gateway process) is excluded from both buckets by design, so selecting
it reinstalled the plugin, rewrote plugins.installs.<id>.installPath,
and restarted the gateway under the setup flow — an endless install
loop in the Control UI.

Reuse the loaded plugin before consulting the trusted catalog so the
fallback only fires when the plugin really cannot be resolved.

Fixes openclaw#149672
…path

Reusing a loaded plugin by returning an undefined catalog entry still fell
into enableBundledPluginForSetup(channel), which enables by CHANNEL id.
Catalog plugins can contribute channels under a different id (plugin
workspace-chat contributing channel custom-chat), so an existing
plugins.allow entry for the owning plugin rejected the channel id as
"blocked by allowlist" before configuration, and without an allowlist the
flow staged an unrelated plugins.entries["custom-chat"] record.

Give the loaded plugin a direct reuse path: keep the operator-disabled
guard before enablement, tolerate a failed enablement write for plugins
that are already live, and cover distinct plugin/channel ids plus the
disabled-policy guard with regression tests.
@LiuwqGit
LiuwqGit force-pushed the feat/issue-149672-sms-channel-install-loop branch from f1b6c21 to 8d00f9d Compare September 16, 2026 19:34
@LiuwqGit

Copy link
Copy Markdown
Contributor Author

Follow-up push 8d00f9d8b3b (rebased on current main 9e6026a90e9) addressing both open blockers:

1. P1 finding — loaded plugins no longer fall into bundled enablement

setupChannels now gives a loaded plugin a direct reuse path: the operator-disabled guard fires before any enablement attempt, and a failed enablement write is tolerated for plugins that are already live (instead of dead-ending on enableBundledPluginForSetup(channel), which enables by channel id and can trip plugins.allow for a different owning plugin id). Two regression tests added:

  • reuses a loaded plugin whose owning plugin id differs from the channel id without tripping the plugin allowlist — RED before this commit (configure never called, flow dead-ended pre-configuration), GREEN after.
  • keeps the disabled-policy guard when reusing a loaded plugin — RED before (guard note missing on the reuse path), GREEN after.

2. Real behavior proof — actual Gateway setup trace (before/after)

Booted the production gateway server (startGatewayServer) from a source checkout against a sandbox temp home, with the sms plugin installed as a local workspace plugin (enabled, loaded at boot) and channels.sms.enabled set — then drove wizard.start { flow: "channels", channel: "sms" } + wizard.next over a real WebSocket client, the same RPC path the Control UI uses. Identical sandbox and driver for both runs; only the two flow files differ (base d18e06eae63 vs this patch):

BEFORE (base flow files):
  decision: catalogEntry=false installedCatalogEntry=false visiblePlugin=true
            empty-buckets fallback → entry=true npmSpec=@openclaw/sms
  steps:    select "Install SMS plugin?"
            progress "Installing SMS plugin…"
            progress "Installing @openclaw/sms into <temp-home>/.openclaw/npm/projects/.openclaw-install-stage-…"
            progress "Installed SMS plugin"        ← real npm reinstall of an already-loaded plugin
  artifacts: <temp-home>/.openclaw/npm/projects/openclaw-sms-a224f6b23c (6.5 MB) created by the run

AFTER (this patch, same sandbox/driver):
  decision: loadedPlugin=true → empty-buckets fallback entry=false npmSpec=none (catalog never consulted)
  steps:    note "sms does not have an interactive setup screen yet…" → note "Done / Channels updated."
            zero install steps, no npm activity
  config:   plugins.installs null → null (install identity unchanged; no installPath rewrite,
            so no reinstall-triggered gateway restart)

Disclosure: two exploratory trace runs carried temporary console.error branch-decision probes in the flow file to confirm which branch executes; the final before/after runs cited above were re-executed on pristine code (no probes, worktree clean), producing the identical step streams. Probes were never committed.

3. SMS completion claim narrowed

As the review noted, SMS has no interactive wizard adapter — completing Twilio credential entry is the existing Control UI schema form / CLI-flag surface, unchanged by this PR. The PR body now claims exactly the deliverable: the reinstall/restart loop is gone and setup proceeds to the channel's configure surface; no SMS configuration-completion claim is made.

Full traces and the harness are reproducible via the Evidence section commands; 43/43 tests green (channel-setup.test.ts + channel-setup-fallback.test.ts), validate.sh clean (oxfmt/oxlint/tsgo:core). CI lanes pending on the new head.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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. labels Sep 16, 2026
@fuller-stack-dev fuller-stack-dev self-assigned this Sep 16, 2026
@clawsweeper clawsweeper Bot added 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. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 17, 2026
fuller-stack-dev added a commit to 849261680/openclaw that referenced this pull request Sep 17, 2026
Consume the reviewed file-preview lazy-English extraction from openclaw#150424,
the cold worktree input closure, and the Qwen initial-deadline fixture
from openclaw#150026. Native manifest closure is now also present on main via
openclaw#150453. Keep the original channel alias implementation and accepted
built-runtime proof unchanged.

Co-authored-by: Peter Steinberger <[email protected]>
fuller-stack-dev added a commit to superdiaodiao/openclaw that referenced this pull request Sep 17, 2026
Reuse the published UI and native closure fixes from openclaw#150026 and openclaw#114032.
Match the landed Slack correction from openclaw#111148, including openclaw#150457.
Keep the qualified ACP production code and SDK proof unchanged.

Co-authored-by: pash-openai <[email protected]>
@vincentkoc

Copy link
Copy Markdown
Member

@fuller-stack-dev, the source-reviewed Qwen fixture correction in cbec8587 also addresses the known blocker in PR150495. Its exact failed provider job observed 119999 versus 120000, while all 27 selected OpenRouter cases passed. That PR has no Qwen changes.

If unrelated CI repair delays this broader PR, could the isolated Qwen test correction land first? I will consume verified canonical main and refresh the identical OpenRouter patch with fresh required CI, without taking over this branch.

For accuracy, the bounded upstream observation was still in progress. The i18n raw log reports catalog fallback baseline drift and exit1, although the captured job API reports success. Neither that discrepancy nor the selected passing tests is a full-CI success claim.

@openclaw-barnacle openclaw-barnacle Bot removed channel: slack Channel integration: slack app: web-ui App: web-ui scripts Repository scripts labels Sep 17, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Sep 17, 2026
Apply the independent auth correction from published security-owner commit
2721b8bbc6530944c75a35283839fdf0c9020176 (PR openclaw#150354).
Preserve runtime snapshot ownership through fresh shared-store bootstrap and
join actual credential publication instead of fabricating another mutation.
Leave worker pooling and its pool-count fixtures to the source PR. Existing
catalog integration timeouts and assertions remain unchanged.

Co-authored-by: Peter Steinberger <[email protected]>
@fuller-stack-dev
fuller-stack-dev requested a review from a team as a code owner September 17, 2026 03:22
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling labels Sep 17, 2026
fuller-stack-dev added a commit that referenced this pull request Sep 17, 2026
* fix(acp): order new session response before updates

Change-Id: I162e6670e72e5e2aa9d1b2a70d8a02f18dd82e05

* test(acp): prove stdio session ordering

* test(acp): close startup input before ordering proof

* fix(acp): use canonical record guard for session ordering

* fix(acp): bound session tracking and route sink failures to shutdown

Two lifecycle defects remained on the ordering boundary.

observeInbound recorded params.sessionId for every inbound message, so a
valid-shaped session/prompt naming a session the translator later rejects
still added an ID that was never reaped -- a peer could grow the set for
the lifetime of the process. Only session/load and session/resume assert a
session that already exists; session/new is now correlated by JSON-RPC
request ID so an ID is established by the response that introduces it.
Every collection is peer-driven, so all three are bounded and fail open:
overflow writes the update through in arrival order, because dropping one
loses session content while emitting one early only restores the pre-fix
ordering. session/close releases anything still buffered instead of
stranding it.

pipeTo rejects when the NDJSON writer or stdout fails, and that promise was
discarded. The ACP client is already unreachable at that point, but the
Gateway connection and shared state database stayed open. It now flows
through the same idempotent shutdown owner as EOF and SIGTERM.

* fix(acp): only buffer updates a new-session response can still release

The previous round bounded the collections but not the consequences of
those bounds, leaving two ways an update could be held forever.

Evicting the oldest correlation to admit the 65th session/new dropped the
only thing that could drain that session's buffered initial update: the
client received the result and never received the update, which is the
silent stall this boundary exists to fix. Correlations are no longer
evicted. Past the cap a request is left uncorrelated and its response is
matched by count instead, falling back to the session ID the response
already carries -- our own outbound payload rather than peer input.

establishedSessionIds was never bounded or released, so a long-lived
bridge grew it for every loaded, resumed, and created session. It is now
released on session/close and bounded; past the bound, established and
pending are no longer distinguishable, so buffering stops rather than
holding updates that might never come back out.

Underneath both: an update is only ever buffered while some session/new
response can still release it. Nothing else introduces a session ID, so
buffering outside that window strands it by construction. When the last
correlation resolves, anything still buffered is written through in
arrival order.

* fix(acp): retire an overflow correlation slot on a failed creation

The count-based fallback for session/new requests past the correlation cap
was only consumed by a response that carried a session ID. A creation that
failed returned a JSON-RPC error instead, so its slot stayed behind and the
next unrelated response carrying a session ID was mistaken for it, flushing
a session the protocol never introduced.

The slot is now retired by the first uncorrelated response whatever it
carries: a result establishes the session, an error simply frees the slot.
Retiring it can also remove the last thing able to release a buffered
update, so the reachability check runs on that path too.

* fix(acp): fail open when new-session correlation saturates

The count-based fallback for requests past the correlation cap could be
consumed by any uncorrelated response. An ordinary RPC reply arriving while
the overflowed session/new was still outstanding took its slot, so that
session's own result no longer established it, and its update could ship
ahead of the result -- the ordering failure this boundary exists to prevent,
reached from the other side.

A response is now matched only by its own request ID. Past the cap the
request is simply not correlated and the boundary fails open until the
tracked correlations drain: while saturated no update is buffered, so
ordering degrades to pre-fix behaviour rather than risking either a strand
or a cross-association. Correlations are still never evicted, so every
tracked request resolves and saturation always clears.

This removes the counter and both of its branches rather than adding a
third guard to it.

* fix(acp): keep buffered updates in global arrival order

The buffer was a map keyed by session, so releasing it walked one session
at a time. Two creations emitting A1, B1, A2 and then both failing put
A1, A2, B1 on the wire, reordering updates across sessions against the
arrival-order guarantee this boundary is supposed to provide.

Buffered updates now live in a single array in arrival order, and that
array is the only thing that decides ordering. Draining one session filters
it in place, preserving the order of everything left behind. The per-session
counts that enforce the bounds move to a separate map that is never consulted
for ordering, so there is one ordering path rather than two.

* refactor(acp): rebuild the ordering boundary around two invariants

Six rounds of point fixes each introduced the next defect, so the state
machine is rebuilt rather than patched again. Everything now follows from
two rules:

An update is queued only while some session/new response can still release
it. Nothing else introduces a session ID, so queuing outside that window
strands it by construction.

The queue drains strictly from the front and stops at the first update that
is still blocked, so releasing never emits an update ahead of one that
arrived earlier.

Three defects fall out of that directly. Correlations now settle only on
frames shaped like JSON-RPC responses, so an agent-initiated request whose
client-chosen id collides with an in-flight session/new no longer releases
that session's updates early. Draining no longer lifts one session's entries
out of the middle of the queue, so a later update cannot overtake an earlier
one when its own creation settles first. Tracking saturation is recomputed
rather than latched, so session/close frees capacity and ordering resumes
instead of failing open for the life of the process.

The released-updates side channel is gone: inbound events only change state,
and the next outbound frame drains the one queue.

* fix(acp): never clear correlation saturation

Saturation was cleared once the tracked correlations drained, on the claim
that this was the first provable quiescent point. It is not: an overflowed
session/new is by definition not in that set, so the set emptying says only
that the tracked requests finished. A later tracked creation could then
re-enable queuing and drain the overflowed session's update ahead of its own
result, which is the failure this boundary exists to prevent.

There is no point at which an uncorrelated creation is provably gone, so the
flag is never cleared. Once correlation has overflowed the boundary stays
failed open, trading ordering for a guarantee it can still honour.

* fix(acp): size the ordering bounds above what the bridge admits

The 64-request correlation cap sat below the agent's own admission limit,
which allows well over a hundred creations in its default window. An
ordinary accepted burst therefore overflowed it and, since saturation is
never cleared, permanently disabled ordering for the rest of the process:
the exact-head trace recorded 140 updates ahead of their results.

The correlation set is now uncapped. An entry is one short string, it is
removed by the response to its own request, and every entry costs the peer
a real session creation, so the agent's admission limit bounds it long
before memory does. Saturation and its permanent fail-open go with it.

MAX_QUEUED_SESSIONS had the same defect for the same reason and is raised
above the admission limit; the per-session bound is unchanged.

* fix(acp): track established sessions until they close

The 1,024-session bound was the third instance of the same defect: once a
long-lived bridge reached it, established and pending sessions became
indistinguishable and ordering was given up for the rest of the process.

It is removed rather than raised. Every entry corresponds to a session that
is live on the Gateway side, which costs orders of magnitude more than the
ID string held here, and session/close releases it, so this set can never be
the binding constraint.

Two bounds remain, both on the queue itself, which holds messages rather
than identifiers: MAX_QUEUED_SESSIONS sits above what the agent admits, and
MAX_QUEUED_UPDATES_PER_SESSION bounds a single session's initial burst. Both
fail open in the direction that only degrades ordering, never delivery.

* fix(acp): follow the session store's lifecycle and drop the last cap

Two owner-boundary defects, both at the seam between this boundary and the
work the bridge actually accepts.

MAX_QUEUED_SESSIONS was the fourth cap to sit below accepted traffic. The
admission limit is a rate, not a concurrency bound; a slow backend can hold
more accepted creations outstanding than any fixed number, and update N+1
then bypassed the queue ahead of its own result. It is removed. The number
of sessions with queued updates is the number of accepted creations still
outstanding, which the bridge already bounds. The per-session cap stays: it
is the one bound that holds messages rather than work the bridge admitted.

establishedSessionIds was released only by an inbound session/close, but the
store reaps idle sessions and evicts at capacity without producing any ACP
request, so a long-lived bridge kept recognizing sessions the store had
discarded. The store now reports every removal through onSessionRemoved,
and server.ts injects a store wired to the boundary's forget(), so
recognition follows the store's own lifecycle rather than only the close
requests a client chooses to send. The injected store is disposed on the
bridge's shutdown path since injected stores stay caller-owned.

Rebased onto current main.

* fix(acp): retire a loaded session the agent rejects

session/load and session/resume were established on arrival, before the
agent validated them. A rejected load -- one carrying per-session MCP
servers, for instance -- left its client-chosen ID recognized until close
or store removal. With the established set now uncapped, that is a growth
vector a peer controls.

The ID is still established provisionally on arrival so a loaded session's
updates are never delayed; the request is remembered by JSON-RPC ID, and an
error response retires the session it named. Bounded by in-flight loads,
each of which is real work, and cleared by its own response.

* fix(acp): only retire recognition a rejected request introduced

The previous commit retired the session named by any failing load or
resume. A session that was already established and merely reloaded lost
its recognition when that reload failed, so its later updates waited
behind an unrelated pending creation -- the delay this boundary exists to
avoid, and which it explicitly promises not to impose on existing
sessions.

Only recognition a request introduces is provisional now: the request is
remembered for retirement only when it established the ID itself.

* fix(acp): keep updates behind their session's backlog; separate claims from confirmation

Two concurrency defects at the boundary, both introduced by earlier repairs.

Strict front-of-queue draining preserved cross-session order but let a
session overtake itself: with A1, B1, A2 queued and A's result in, the drain
emitted A1 and stopped at B1, leaving A2; a later A3 then passed straight
through because A was established, so the client saw A3 before A2. A session
with updates still queued now keeps queuing regardless of recognition, so
its later updates wait behind its own backlog. The per-session overflow
fails open by releasing that session's backlog in order first, so even the
overflow path never reorders within a session.

Provisional load/resume claims shared the confirmed set, so "already
established" could not distinguish a succeeded request from a pending one.
Two overlapping loads on one session: the second succeeds, the first is
rejected, and the first's retirement erased the second's valid recognition.
Claims are now counted per session, separately from confirmation. A session
is recognized while confirmed or while any claim is outstanding; a rejection
retires exactly its own claim; acceptance confirms.

* fix(acp): release a session's backlog when its own result is written

Holding one session behind another let a prompt outrun its own output. With
A1, B1, A2 queued and A introduced, the global front-only drain emitted A1
and stopped at B1, so A kept queuing; a prompt's end_turn response carries no
session ID, never enters the queue, and therefore reached the client ahead of
the agent_message_chunk it completed.

A session's queue is now released whole when its own result is written,
rather than only the run at the head of the shared queue. Sessions are
independent streams, so ordering one against another buys nothing the client
can observe, while it does delay a session past frames that bypass the queue
entirely. Order within a session is unchanged and still exact.

The shared queue keeps global arrival order only on the path where no
creation can introduce anything, which spans sessions that were never
introduced and is the one place a cross-session rule is meaningful.

* test(acp): pin the wire order of a prompt response against its own text

Captures the ordering boundary at the ACP stdio boundary itself rather than
through the ordering class alone: two session/new requests are outstanding at
once, so an update for either is held, and the prompt response that completes
one of them carries no session ID and so passes through the boundary untouched.

Asserted as one five-frame sequence. Frame-by-frame assertions stop at the
first divergence, which hides where a displaced frame actually lands - and
where it lands is the defect.

* test(acp-core): stop shadowing the suite store in the removal-hook test

oxlint eslint(no-shadow) flagged the local store in the onSessionRemoved test
against the suite-level one. Renamed rather than reusing the outer store: the
test needs its own maxSessions and idleTtlMs to reach the eviction paths.

* test(acp): keep ordering fixtures type-safe

* fix(ci): consume canonical ACP landing prerequisites

Reuse the published UI and native closure fixes from #150026 and #114032.
Match the landed Slack correction from #111148, including #150457.
Keep the qualified ACP production code and SDK proof unchanged.

Co-authored-by: pash-openai <[email protected]>

* test(update): await report staging before cleanup race

---------

Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: pash-openai <[email protected]>
@fuller-stack-dev
fuller-stack-dev merged commit 515f424 into openclaw:main Sep 17, 2026
229 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member

Merged via squash.

fuller-stack-dev added a commit that referenced this pull request Sep 17, 2026
* fix(plugin-runtime): restore channel turn alias

* test(plugin-sdk): type channel turn alias override

* fix(plugin-sdk): preserve legacy turn mock overrides

* test(plugin-sdk): refresh channel turn alias gates

* Align legacy channel compatibility paths for current-main repair

Preserve the original contributor ancestry while resolving stale paths before the current-source alias repair. Intermediate branch preparation; not acceptance evidence.

* fix: preserve complete legacy channel runtime alias

Restore the complete five-member alias, including exact runtime-bound dispatch and scoped context construction. Preserve lazy loading, generic signatures and canonical override precedence. Keep deprecated compatibility metadata and current documentation aligned.

Closes #91122

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

* fix(ci): integrate canonical channel alias prerequisites

Consume the reviewed file-preview lazy-English extraction from #150424,
the cold worktree input closure, and the Qwen initial-deadline fixture
from #150026. Native manifest closure is now also present on main via
#150453. Keep the original channel alias implementation and accepted
built-runtime proof unchanged.

Co-authored-by: Peter Steinberger <[email protected]>

* fix(ci): consume landed canonical UI startup repair

Replace the temporary file-preview extraction with the current-main implementation from #150491 before merging main. Preserve the channel alias repair and existing contributor ancestry.

Co-authored-by: Peter Steinberger <[email protected]>

* fix(ci): consume landed canonical Qwen fixture

Use the current-main Qwen fixture from #150523 and #82290 unchanged. Remove the final temporary prerequisite delta while preserving the eleven-file alias repair and original contributor history.

---------

Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Yzx <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
* fix(acp): order new session response before updates

Change-Id: I162e6670e72e5e2aa9d1b2a70d8a02f18dd82e05

* test(acp): prove stdio session ordering

* test(acp): close startup input before ordering proof

* fix(acp): use canonical record guard for session ordering

* fix(acp): bound session tracking and route sink failures to shutdown

Two lifecycle defects remained on the ordering boundary.

observeInbound recorded params.sessionId for every inbound message, so a
valid-shaped session/prompt naming a session the translator later rejects
still added an ID that was never reaped -- a peer could grow the set for
the lifetime of the process. Only session/load and session/resume assert a
session that already exists; session/new is now correlated by JSON-RPC
request ID so an ID is established by the response that introduces it.
Every collection is peer-driven, so all three are bounded and fail open:
overflow writes the update through in arrival order, because dropping one
loses session content while emitting one early only restores the pre-fix
ordering. session/close releases anything still buffered instead of
stranding it.

pipeTo rejects when the NDJSON writer or stdout fails, and that promise was
discarded. The ACP client is already unreachable at that point, but the
Gateway connection and shared state database stayed open. It now flows
through the same idempotent shutdown owner as EOF and SIGTERM.

* fix(acp): only buffer updates a new-session response can still release

The previous round bounded the collections but not the consequences of
those bounds, leaving two ways an update could be held forever.

Evicting the oldest correlation to admit the 65th session/new dropped the
only thing that could drain that session's buffered initial update: the
client received the result and never received the update, which is the
silent stall this boundary exists to fix. Correlations are no longer
evicted. Past the cap a request is left uncorrelated and its response is
matched by count instead, falling back to the session ID the response
already carries -- our own outbound payload rather than peer input.

establishedSessionIds was never bounded or released, so a long-lived
bridge grew it for every loaded, resumed, and created session. It is now
released on session/close and bounded; past the bound, established and
pending are no longer distinguishable, so buffering stops rather than
holding updates that might never come back out.

Underneath both: an update is only ever buffered while some session/new
response can still release it. Nothing else introduces a session ID, so
buffering outside that window strands it by construction. When the last
correlation resolves, anything still buffered is written through in
arrival order.

* fix(acp): retire an overflow correlation slot on a failed creation

The count-based fallback for session/new requests past the correlation cap
was only consumed by a response that carried a session ID. A creation that
failed returned a JSON-RPC error instead, so its slot stayed behind and the
next unrelated response carrying a session ID was mistaken for it, flushing
a session the protocol never introduced.

The slot is now retired by the first uncorrelated response whatever it
carries: a result establishes the session, an error simply frees the slot.
Retiring it can also remove the last thing able to release a buffered
update, so the reachability check runs on that path too.

* fix(acp): fail open when new-session correlation saturates

The count-based fallback for requests past the correlation cap could be
consumed by any uncorrelated response. An ordinary RPC reply arriving while
the overflowed session/new was still outstanding took its slot, so that
session's own result no longer established it, and its update could ship
ahead of the result -- the ordering failure this boundary exists to prevent,
reached from the other side.

A response is now matched only by its own request ID. Past the cap the
request is simply not correlated and the boundary fails open until the
tracked correlations drain: while saturated no update is buffered, so
ordering degrades to pre-fix behaviour rather than risking either a strand
or a cross-association. Correlations are still never evicted, so every
tracked request resolves and saturation always clears.

This removes the counter and both of its branches rather than adding a
third guard to it.

* fix(acp): keep buffered updates in global arrival order

The buffer was a map keyed by session, so releasing it walked one session
at a time. Two creations emitting A1, B1, A2 and then both failing put
A1, A2, B1 on the wire, reordering updates across sessions against the
arrival-order guarantee this boundary is supposed to provide.

Buffered updates now live in a single array in arrival order, and that
array is the only thing that decides ordering. Draining one session filters
it in place, preserving the order of everything left behind. The per-session
counts that enforce the bounds move to a separate map that is never consulted
for ordering, so there is one ordering path rather than two.

* refactor(acp): rebuild the ordering boundary around two invariants

Six rounds of point fixes each introduced the next defect, so the state
machine is rebuilt rather than patched again. Everything now follows from
two rules:

An update is queued only while some session/new response can still release
it. Nothing else introduces a session ID, so queuing outside that window
strands it by construction.

The queue drains strictly from the front and stops at the first update that
is still blocked, so releasing never emits an update ahead of one that
arrived earlier.

Three defects fall out of that directly. Correlations now settle only on
frames shaped like JSON-RPC responses, so an agent-initiated request whose
client-chosen id collides with an in-flight session/new no longer releases
that session's updates early. Draining no longer lifts one session's entries
out of the middle of the queue, so a later update cannot overtake an earlier
one when its own creation settles first. Tracking saturation is recomputed
rather than latched, so session/close frees capacity and ordering resumes
instead of failing open for the life of the process.

The released-updates side channel is gone: inbound events only change state,
and the next outbound frame drains the one queue.

* fix(acp): never clear correlation saturation

Saturation was cleared once the tracked correlations drained, on the claim
that this was the first provable quiescent point. It is not: an overflowed
session/new is by definition not in that set, so the set emptying says only
that the tracked requests finished. A later tracked creation could then
re-enable queuing and drain the overflowed session's update ahead of its own
result, which is the failure this boundary exists to prevent.

There is no point at which an uncorrelated creation is provably gone, so the
flag is never cleared. Once correlation has overflowed the boundary stays
failed open, trading ordering for a guarantee it can still honour.

* fix(acp): size the ordering bounds above what the bridge admits

The 64-request correlation cap sat below the agent's own admission limit,
which allows well over a hundred creations in its default window. An
ordinary accepted burst therefore overflowed it and, since saturation is
never cleared, permanently disabled ordering for the rest of the process:
the exact-head trace recorded 140 updates ahead of their results.

The correlation set is now uncapped. An entry is one short string, it is
removed by the response to its own request, and every entry costs the peer
a real session creation, so the agent's admission limit bounds it long
before memory does. Saturation and its permanent fail-open go with it.

MAX_QUEUED_SESSIONS had the same defect for the same reason and is raised
above the admission limit; the per-session bound is unchanged.

* fix(acp): track established sessions until they close

The 1,024-session bound was the third instance of the same defect: once a
long-lived bridge reached it, established and pending sessions became
indistinguishable and ordering was given up for the rest of the process.

It is removed rather than raised. Every entry corresponds to a session that
is live on the Gateway side, which costs orders of magnitude more than the
ID string held here, and session/close releases it, so this set can never be
the binding constraint.

Two bounds remain, both on the queue itself, which holds messages rather
than identifiers: MAX_QUEUED_SESSIONS sits above what the agent admits, and
MAX_QUEUED_UPDATES_PER_SESSION bounds a single session's initial burst. Both
fail open in the direction that only degrades ordering, never delivery.

* fix(acp): follow the session store's lifecycle and drop the last cap

Two owner-boundary defects, both at the seam between this boundary and the
work the bridge actually accepts.

MAX_QUEUED_SESSIONS was the fourth cap to sit below accepted traffic. The
admission limit is a rate, not a concurrency bound; a slow backend can hold
more accepted creations outstanding than any fixed number, and update N+1
then bypassed the queue ahead of its own result. It is removed. The number
of sessions with queued updates is the number of accepted creations still
outstanding, which the bridge already bounds. The per-session cap stays: it
is the one bound that holds messages rather than work the bridge admitted.

establishedSessionIds was released only by an inbound session/close, but the
store reaps idle sessions and evicts at capacity without producing any ACP
request, so a long-lived bridge kept recognizing sessions the store had
discarded. The store now reports every removal through onSessionRemoved,
and server.ts injects a store wired to the boundary's forget(), so
recognition follows the store's own lifecycle rather than only the close
requests a client chooses to send. The injected store is disposed on the
bridge's shutdown path since injected stores stay caller-owned.

Rebased onto current main.

* fix(acp): retire a loaded session the agent rejects

session/load and session/resume were established on arrival, before the
agent validated them. A rejected load -- one carrying per-session MCP
servers, for instance -- left its client-chosen ID recognized until close
or store removal. With the established set now uncapped, that is a growth
vector a peer controls.

The ID is still established provisionally on arrival so a loaded session's
updates are never delayed; the request is remembered by JSON-RPC ID, and an
error response retires the session it named. Bounded by in-flight loads,
each of which is real work, and cleared by its own response.

* fix(acp): only retire recognition a rejected request introduced

The previous commit retired the session named by any failing load or
resume. A session that was already established and merely reloaded lost
its recognition when that reload failed, so its later updates waited
behind an unrelated pending creation -- the delay this boundary exists to
avoid, and which it explicitly promises not to impose on existing
sessions.

Only recognition a request introduces is provisional now: the request is
remembered for retirement only when it established the ID itself.

* fix(acp): keep updates behind their session's backlog; separate claims from confirmation

Two concurrency defects at the boundary, both introduced by earlier repairs.

Strict front-of-queue draining preserved cross-session order but let a
session overtake itself: with A1, B1, A2 queued and A's result in, the drain
emitted A1 and stopped at B1, leaving A2; a later A3 then passed straight
through because A was established, so the client saw A3 before A2. A session
with updates still queued now keeps queuing regardless of recognition, so
its later updates wait behind its own backlog. The per-session overflow
fails open by releasing that session's backlog in order first, so even the
overflow path never reorders within a session.

Provisional load/resume claims shared the confirmed set, so "already
established" could not distinguish a succeeded request from a pending one.
Two overlapping loads on one session: the second succeeds, the first is
rejected, and the first's retirement erased the second's valid recognition.
Claims are now counted per session, separately from confirmation. A session
is recognized while confirmed or while any claim is outstanding; a rejection
retires exactly its own claim; acceptance confirms.

* fix(acp): release a session's backlog when its own result is written

Holding one session behind another let a prompt outrun its own output. With
A1, B1, A2 queued and A introduced, the global front-only drain emitted A1
and stopped at B1, so A kept queuing; a prompt's end_turn response carries no
session ID, never enters the queue, and therefore reached the client ahead of
the agent_message_chunk it completed.

A session's queue is now released whole when its own result is written,
rather than only the run at the head of the shared queue. Sessions are
independent streams, so ordering one against another buys nothing the client
can observe, while it does delay a session past frames that bypass the queue
entirely. Order within a session is unchanged and still exact.

The shared queue keeps global arrival order only on the path where no
creation can introduce anything, which spans sessions that were never
introduced and is the one place a cross-session rule is meaningful.

* test(acp): pin the wire order of a prompt response against its own text

Captures the ordering boundary at the ACP stdio boundary itself rather than
through the ordering class alone: two session/new requests are outstanding at
once, so an update for either is held, and the prompt response that completes
one of them carries no session ID and so passes through the boundary untouched.

Asserted as one five-frame sequence. Frame-by-frame assertions stop at the
first divergence, which hides where a displaced frame actually lands - and
where it lands is the defect.

* test(acp-core): stop shadowing the suite store in the removal-hook test

oxlint eslint(no-shadow) flagged the local store in the onSessionRemoved test
against the suite-level one. Renamed rather than reusing the outer store: the
test needs its own maxSessions and idleTtlMs to reach the eviction paths.

* test(acp): keep ordering fixtures type-safe

* fix(ci): consume canonical ACP landing prerequisites

Reuse the published UI and native closure fixes from openclaw#150026 and openclaw#114032.
Match the landed Slack correction from openclaw#111148, including openclaw#150457.
Keep the qualified ACP production code and SDK proof unchanged.

Co-authored-by: pash-openai <[email protected]>

* test(update): await report staging before cleanup race

---------

Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: pash-openai <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
…llback (openclaw#150026)

Reuse loaded trusted catalog channel plugins without reinstalling them or enabling a channel ID as a plugin ID. Preserve owner-specific configuration, notes, and eager/deferred noncatalog activation.

Include the independently reviewed auth prerequisite from Peter Steinberger: publish fresh shared-store ownership before credential persistence and join the actual credential publication instead of creating a duplicate mutation. Preserve public RPC/SDK contracts and existing test bounds.

Related: openclaw#149672

The verified channel result is install-loop removal. Real SMS/Twilio credential-form completion and outbound SMS remain unproven; openclaw#149672 must remain open.

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
* fix(plugin-runtime): restore channel turn alias

* test(plugin-sdk): type channel turn alias override

* fix(plugin-sdk): preserve legacy turn mock overrides

* test(plugin-sdk): refresh channel turn alias gates

* Align legacy channel compatibility paths for current-main repair

Preserve the original contributor ancestry while resolving stale paths before the current-source alias repair. Intermediate branch preparation; not acceptance evidence.

* fix: preserve complete legacy channel runtime alias

Restore the complete five-member alias, including exact runtime-bound dispatch and scoped context construction. Preserve lazy loading, generic signatures and canonical override precedence. Keep deprecated compatibility metadata and current documentation aligned.

Closes openclaw#91122

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

* fix(ci): integrate canonical channel alias prerequisites

Consume the reviewed file-preview lazy-English extraction from openclaw#150424,
the cold worktree input closure, and the Qwen initial-deadline fixture
from openclaw#150026. Native manifest closure is now also present on main via
openclaw#150453. Keep the original channel alias implementation and accepted
built-runtime proof unchanged.

Co-authored-by: Peter Steinberger <[email protected]>

* fix(ci): consume landed canonical UI startup repair

Replace the temporary file-preview extraction with the current-main implementation from openclaw#150491 before merging main. Preserve the channel alias repair and existing contributor ancestry.

Co-authored-by: Peter Steinberger <[email protected]>

* fix(ci): consume landed canonical Qwen fixture

Use the current-main Qwen fixture from openclaw#150523 and openclaw#82290 unchanged. Remove the final temporary prerequisite delta while preserving the eleven-file alias repair and original contributor history.

---------

Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Yzx <[email protected]>
steipete added a commit that referenced this pull request Sep 17, 2026
Bound Gateway post-ready memory growth on large fleets by sharing one catalog worker and one transcript-reconciliation worker across configured agents. Preserve task-specific credentials, source generations, guarded transcript writes, exact lease recovery, and complete shutdown drainage. Expose owner-recorded worker-pool diagnostics without new operator settings.

Keep duplicate catalog discovery removed through the credential snapshot handoff and publication joining already integrated on main via #150026, with pool-level request-count integration coverage. Register catalog worker retirement before installing its listener, and reject stale publication before retaining generations or joining auth work.

Related: #149538. Thanks to @609NFT for the fleet measurements and constructor-attributed rerun that identified retained catalog isolates.

Validation: exact-head CI passed for 40cdb96 (https://github.com/openclaw/openclaw/actions/runs/35183530133); the authorized review of record and exact-head ClawSweeper review found no actionable defects. Recorded 200-agent prior-head measurements reduced post-ready RSS growth from 2144.7 to 250.5 MiB while preserving 1600 searchable rows and clean shutdown. Later lifecycle corrections have targeted regression proof. The candidate-specific published-updater transition remains explicitly excepted; final-head RSS and the reporter's 632-agent Linux allocator outcome are outside the measured claim.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
…0354)

Bound Gateway post-ready memory growth on large fleets by sharing one catalog worker and one transcript-reconciliation worker across configured agents. Preserve task-specific credentials, source generations, guarded transcript writes, exact lease recovery, and complete shutdown drainage. Expose owner-recorded worker-pool diagnostics without new operator settings.

Keep duplicate catalog discovery removed through the credential snapshot handoff and publication joining already integrated on main via openclaw#150026, with pool-level request-count integration coverage. Register catalog worker retirement before installing its listener, and reject stale publication before retaining generations or joining auth work.

Related: openclaw#149538. Thanks to @609NFT for the fleet measurements and constructor-attributed rerun that identified retained catalog isolates.

Validation: exact-head CI passed for 40cdb96 (https://github.com/openclaw/openclaw/actions/runs/35183530133); the authorized review of record and exact-head ClawSweeper review found no actionable defects. Recorded 200-agent prior-head measurements reduced post-ready RSS growth from 2144.7 to 250.5 MiB while preserving 1600 searchable rows and clean shutdown. Later lifecycle corrections have targeted regression proof. The candidate-specific published-updater transition remains explicitly excepted; final-head RSS and the reporter's 632-agent Linux allocator outcome are outside the measured claim.
@LiuwqGit
LiuwqGit deleted the feat/issue-149672-sms-channel-install-loop branch September 22, 2026 14:47
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 P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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