Commit Graph

39025 Commits

Author SHA1 Message Date
Peter Steinberger 4ef4323db9 fix: keep memory SecretRef failures agent-scoped (#109977)
* test: normalize Copilot token fixture

* test: normalize Copilot auth fixtures

* test: use explicit Copilot placeholders

* test: use neutral Copilot fixture host

* refactor: clarify Copilot embedding auth values

* refactor: keep Copilot profile result intact

* test: normalize embedding credential fixtures

* fix: isolate memory SecretRef owners

* refactor: isolate memory secret collection
2026-07-17 14:44:03 +01:00
Peter Steinberger 649a8b35f8 refactor(mcp): reuse plugin cache primitives (#110013) 2026-07-17 14:42:58 +01:00
Peter Steinberger 7835c03930 test(release): align plugin validation expectations (#110012) 2026-07-17 14:36:12 +01:00
Peter Steinberger b48c801623 test(release): repair extension runtime fixtures 2026-07-17 14:24:13 +01:00
Stephen Hebson cc9d80c3d6 perf(mcp): cache immutable config discovery (#79882)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 14:20:48 +01:00
Peter Steinberger 0c17cd4f1f fix(sqlite): keep additive agent schema at version 11 (#109999) 2026-07-17 14:15:40 +01:00
Peter Steinberger cbaf112355 fix: compaction usage guards and agent-loop turn correctness (#109709)
* fix(agents): compaction usage guards and agent-loop turn correctness

* fix(agents): manual compaction replans with zero retention for small sessions

* ci: retrigger pull-request validation

* ci: refresh pull-request validation

* test(agents): live end-to-end agent session coverage

* fix(agents): keep yielded runs settled so external delivery can claim the session

* docs(agents): clarify length retry bookkeeping
2026-07-17 14:13:29 +01:00
Peter Steinberger da69daeb72 feat(onboarding): recommend plugins and skills from installed apps (#109668)
* feat(onboarding): recommend plugins and skills from installed apps

Scan installed macOS apps during classic onboarding (TCC-free), gather
candidates from official catalogs + ClawHub search, let the configured
model pick genuine matches, and offer an opt-in multiselect install step.
Adds a device.apps node-host command (default-off sharing, Android-parity
envelope) so remote gateways can request a paired Mac's inventory, and a
wizard.appRecommendations kill switch. Custom setup-inference completions
no longer inherit the 32-token verification-probe output cap.

* feat(onboarding): recommend apps in guided flow

* fix(onboarding): harden app recommendations against ClawHub self-promotion

Third-party ClawHub skills are never pre-selected regardless of model tier
(publisher-controlled listing text reaches the matcher prompt and could
promote itself); their labels now say they install third-party code.
Installed-app scans follow symlinked .app bundles. Matcher output stays
bounded by the resolved model's own maxTokens budget (documented invariant).

* fix(onboarding): key official catalog candidates by resolved plugin id

Real catalog entries are package manifests without a top-level id; keying the
candidate map and channel/provider classification by entry.id collapsed the
whole official catalog into one undefined-keyed entry, so no official plugin
or channel was ever recommended. Regression test runs against the bundled
catalogs.

* fix(onboarding): satisfy lint, types, deadcode, and migration gates

Split the guided-onboarding test into a self-contained custodian suite to stay
under max-lines. Narrow app-recommendation exports (drop dead node-payload
normalizer, unexport internal types/helpers, route candidate tests through the
public API), replace map-spread with a helper, unexport device.apps result
types, add installedAppsSharing to node-host migration expectations, cast the
wizard multiselect mock, and regenerate the docs map.

* test(onboarding): register new live test in the shard classifier
2026-07-17 14:07:59 +01:00
Peter Steinberger 8020dd3e08 fix(reef): discover trusted peers as conversations (#109905)
* fix(reef): discover trusted peer conversations

* test(reef): document temporary state cleanup

* test(gateway): include conversation discovery in method order

* chore: leave changelog to release automation

* fix(gateway): preserve configured conversation discovery

* fix(gateway): validate turns before session binding

* fix(gateway): preserve directory conversation identity
2026-07-17 13:55:30 +01:00
Peter Steinberger 62407b36d7 fix(doctor): repair ALTER-appended operator approval schema instead of wedging startup (#109876) 2026-07-17 13:47:06 +01:00
WhatsSkiLL 4d3b18811e feat(android): add Wear real-time Talk controls (#109483)
* feat(android): add Wear real-time Talk controls

* fix(android): satisfy Wear Talk CI checks

* fix(talk): remove unused client language parameter

* fix(android): harden Wear realtime Talk routing

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>

* chore(android): refresh Wear Talk metadata

* chore(android): align native i18n baseline

---------

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 13:46:05 +01:00
Peter Steinberger a291cf7296 test(release): align prerelease scan contracts 2026-07-17 13:43:12 +01:00
DinoMC 017217bae3 fix(heartbeat): remember silent task results for the next user turn (#95838)
* fix(heartbeat): retain silent task outcomes

Co-authored-by: DinoMC <9079110+DinoMC@users.noreply.github.com>

* fix(heartbeat): keep outcome type internal

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 13:24:48 +01:00
Peter Steinberger ee762ad761 feat(teams-meetings): join Microsoft Teams meetings via the meeting-bot core (#109964)
* feat(teams-meetings): join Microsoft Teams meetings via the meeting-bot core

* fix(teams-meetings): satisfy lint and package-boundary contracts
2026-07-17 13:23:39 +01:00
ooiuuii db3213264a fix: avoid model-not-found fallback on OpenRouter image-input 404s (#99079)
* fix: classify OpenRouter image-input 404s as format errors

* test(agents): prove OpenRouter 404 fallback classification

Co-authored-by: luyifan <al3060388206@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 13:13:54 +01:00
WhatsSkiLL 6bd9e5f158 fix(android): keep composer media with its chat (#109200)
* fix(android): keep composer media with its chat

* fix(android): retry shared media after chat switch

* fix(android): bind composer media synchronously

* fix(android): bind composer state to chat owners

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>

* chore(android): keep release notes app-scoped

* refactor(android): reuse localized outbox failure text

* style: format web push state migration

* style: format google meet setup test

* fix(android): restore composer build compatibility

* chore(android): sync native i18n inventory

* fix(android): satisfy composer warning gate

* fix(android): align composer ownership tests

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>

* test(android): align durable composer assertions

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>

* test(android): bound outbox scheduler advances

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>

* fix(ci): recalibrate status startup memory budget (#109887)

* fix(android): admit live composer payload

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>

* fix(android): refresh native i18n inventory

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>

* fix(android): bound composer admission receipts

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>

* fix(android): preserve owner-bound async state

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>

* fix(android): bind composer drafts to saved state

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>

---------

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-17 13:05:38 +01:00
Peter Steinberger 6745f9a553 fix: provider usage accounting, retry/overflow classification, and output clamping (#109796)
* fix(ai): provider usage accounting, retry and overflow classification, output clamping

* ci: refresh pull-request validation

* test(ai): live-probe overflow classification and output clamping
2026-07-17 12:40:01 +01:00
max 907f5552f5 feat(feishu): handle opt-in VC meeting invites (#92340)
* feat(feishu): handle VC meeting invites

* fix(feishu): route VC invites through DM ingress

* fix(feishu): keep VC invite chat id canonical

* fix(feishu): handle VC invite pairing

* fix(feishu): simplify VC invite dispatch

* fix(feishu): guard VC invite pairing

* refactor(feishu): canonicalize VC invite ingress

Co-authored-by: renaocheng <renaocheng@bytedance.com>

* refactor(feishu): keep synthetic routing internal

Co-authored-by: renaocheng <renaocheng@bytedance.com>

* refactor(feishu): hide VC invite internals

Co-authored-by: renaocheng <renaocheng@bytedance.com>

* fix(feishu): gate VC invitation auto-join

* chore(config): refresh Feishu config baseline

* test(feishu): use synthetic VC fixture credential

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 12:36:42 +01:00
Peter Steinberger 56907458ac fix(skills): keep healthy skills available when one secret fails (#109791)
* fix(skills): isolate unavailable skill secrets

* fix(skills): preserve snapshot catalog during degradation

* fix(skills): fail closed for legacy snapshot aliases

* fix(skills): preserve empty runtime catalogs

* fix(skills): migrate snapshots to owner identities

* fix(skills): filter degraded captured prompts

* fix(skills): narrow snapshot owner keys

* style(skills): satisfy captured prompt lint
2026-07-17 12:31:29 +01:00
Peter Steinberger 9b5eb04221 improve(tests): tighten async polling across suites (#109919)
* test: tighten signal delivery polling

* test: tighten async polling across suites

* test: use virtual time for signal ingress drain
2026-07-17 12:20:58 +01:00
ooiuuii ecfcaa07e6 fix(shell): keep Git Bash coreutils on PATH (#108136)
* fix(windows): expose Git Bash coreutils to commands

Co-authored-by: luyifan <al3060388206@gmail.com>

* test(windows): inject duplicate PATH variants

* test(windows): run Git Bash integration in CI

* refactor(windows): keep shell env helper private

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 12:15:46 +01:00
Peter Steinberger f3d1f02dc1 refactor: move MCP OAuth state to SQLite (#109844)
* refactor(mcp): move OAuth state to SQLite

* refactor(mcp): tighten OAuth module boundaries

* chore: refresh PR merge ref

* fix(mcp): align storage docs and merge checks

* fix(mcp): surface OAuth reauthorization status
2026-07-17 12:15:16 +01:00
Kyle Klouzal e316e1c440 feat(discord): show subagent progress (#95604)
* feat(discord): show subagent progress

Co-authored-by: Kyle Klouzal <kklouzal@users.noreply.github.com>

* fix(discord): serialize progress cleanup ownership

Co-authored-by: Kyle Klouzal <kklouzal@users.noreply.github.com>

* test(discord): type progress state fixtures

* refactor(discord): split subagent progress state

* fix(discord): persist terminal progress outcomes

* fix(discord): narrow persisted cleanup rows

* refactor(discord): keep progress internals private

* perf(discord): preserve lazy progress loading

* chore(plugin-sdk): refresh API baseline after rebase

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Kyle Klouzal <kklouzal@users.noreply.github.com>
2026-07-17 12:02:33 +01:00
Peter Steinberger 66aa2eda9d fix(cli): report malformed plugin JSON paths (#109916)
* fix(cli): report malformed plugin JSON paths

Co-authored-by: 丁宇婷0668001435 <ding.yuting@xydigit.com>

* test(google-meet): keep CLI test on plugin boundary

---------

Co-authored-by: 丁宇婷0668001435 <ding.yuting@xydigit.com>
2026-07-17 11:53:23 +01:00
Max Huang 3e838782b1 feat(feishu): bot-to-bot conversation support with @mention handling (#89783)
* feat(feishu): support bot-authored mentions

Co-authored-by: heyumeng154-alt <260365965+heyumeng154-alt@users.noreply.github.com>

* test(feishu): isolate bot name resolver state

* fix(feishu): verify bot mention identity

* docs: refresh Feishu channel map

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: heyumeng154-alt <260365965+heyumeng154-alt@users.noreply.github.com>
2026-07-17 11:44:00 +01:00
wuqxuan d7056abbc8 fix(cli): reject missing separator after config path brackets (#109580)
* fix(cli): reject missing separator after config path brackets

* fix(cli): simplify bracket path separator validation

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 11:42:58 +01:00
mushuiyu886 3a268c08df fix(sqlite): stop mount probes blocking database startup (#109432)
* fix(sqlite): bound fallback mount classification

* test(sqlite): cover mount probe failure policy

* test(sqlite): use tracked mount probe fixtures

* perf(sqlite): keep mount result import type-only

* style(sqlite): format mount probe result

* perf(sqlite): defer mount process module loading

* perf(sqlite): avoid eager mount parser dependency

* refactor(sqlite): isolate lock error detection

* revert: keep sqlite lock errors colocated

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 11:41:25 +01:00
clawsweeper[bot] 2dee283ad0 Open fix(infra): import legacy plugin state partially (newest-first) instead of skipping when capacity is short (#109679) 2026-07-17 16:08:04 +05:30
Peter Steinberger a83ed13204 feat(onboard): guided onboarding becomes the custodian flow (#109841)
* feat(onboard): guided onboarding becomes the custodian flow

Question zero asks for discovery consent up front (full access recommended,
guarded asks once or configures manually; persisted as wizard.accessMode and
honored on reruns). Discovery quietly collects auto-ladder failures into one
summary with details behind 'See other options', quips about detected coding
agents, and announces the working route as a default with an easy undo.
After inference and the memory offer (skipped when discovery was declined),
fresh installs auto-apply the standard setup plan and hatch the agent
directly in the terminal; configured installs (pre-existing model or gateway
config) stay verification-only and never reinstall or restart the Gateway
service. Setup-apply failures fall back to the conversational chat.
Remote-gateway onboarding keeps its legacy chat handoff explicitly.
listManualSetupInferenceOptions lists manual providers without scanning.

* docs(onboarding): add custodian redesign implementation plan (living doc)

* docs: regenerate docs map for onboarding-redesign page
2026-07-17 11:36:41 +01:00
cxbAsDev 4b2b5bcf89 fix(hooks): bound hook workspace manifest and HOOK.md reads (#101472)
* fix(hooks): bound hook workspace manifest and HOOK.md reads

* fix(hooks): enforce maxBytes while reading hook metadata fd

ClawSweeper review noted that openRootFileSync validates stat size
before returning the fd, but the subsequent fs.readFileSync of the fd
was unbounded. A file that grows after validation could still OOM
workspace discovery. Replace the full fd read with a chunked bounded
reader that throws once maxBytes is exceeded, and add regression
coverage for the overflow case.

* test(hooks): cover bounded hook reads through public workspace API

* refactor(hooks): use canonical bounded fd reader for hook metadata

* fix(hooks): warn and skip oversized hook metadata during discovery

ClawSweeper review required the maintainer-selected oversized-metadata
diagnostic contract: warn and skip. readRootFileUtf8 now catches the
RangeError from the canonical readFileDescriptorBoundedSync helper and
emits one warning per oversized package.json/HOOK.md identifying the
path and the byte limit, while discovery continues for other hooks.

The redundant open-time maxBytes stat check is removed so the shared
bounded reader is the single owner of the byte cap; overflow always
surfaces as RangeError, keeping the warning accurate for both static
oversized files and post-open growth.

Add focused tests: warning content for both oversized surfaces,
continued discovery alongside an oversized hook, exact-limit acceptance,
and the plain-hook fallback when a package manifest is oversized.

* chore: retrigger CI after rebase

* refactor(hooks): tighten bounded metadata coverage

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 11:23:21 +01:00
Peter Steinberger 2920ec1fab docs(channels): settle replay-guard vs ingress-drain layering contract (#109799)
* docs(channels): settle replay-guard vs ingress-drain layering contract in code comments and SDK docs

* docs: refresh SDK channel docs map
2026-07-17 11:13:00 +01:00
Peter Steinberger f82511762f test: reuse device pairing database fixture (#109894) 2026-07-17 11:05:25 +01:00
Peter Steinberger 8f3b2ab021 style: format spawn-ps and agents display test
Both landed unformatted on main (6th/7th merge-skew format break today),
failing check-lint repo-wide. Repo-wide oxfmt --check is clean after this.
2026-07-17 02:51:45 -07:00
juyaohuidt 89780d5a60 fix(infra): gateway pid probe no longer hangs when ps sampling stalls (#109731)
* fix(infra): gateway pid probe no longer hangs when ps sampling stalls

readGatewayProcessArgsSync probes ps to verify gateway argv before
signaling or reporting listener PIDs. The darwin branch already passed
timeout: 1000, but spawnSync defaults killSignal to SIGTERM, which an
unresponsive or hung ps child can ignore and keep the gateway process
blocked past the timeout.

Force killSignal: SIGKILL (matching the doctor probe fix in #109243) so
a stalled ps probe is reaped at the deadline instead of hanging gateway
signal verification and listener PID discovery.

Extract GATEWAY_PS_PROBE_TIMEOUT_MS for the named timeout and assert the
full spawnSync options (encoding / killSignal / timeout) in the darwin
test.

* refactor: centralize bounded ps probes

Co-authored-by: 琚耀辉0668001366 <ju.yaohui@xydigit.com>

* refactor: leave doctor ps hardening to main

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 10:41:52 +01:00
Peter Steinberger 1a2d9e5e5c refactor(meeting-bot): extract browser meeting-bot core behind MeetingPlatformAdapter (#109755)
* refactor(meeting-bot): extract browser meeting-bot core behind MeetingPlatformAdapter

* chore(google-meet): prune max-lines baseline entries shrunk by extraction

* fix(meeting-bot): drop orphaned extension realtime files and refresh lint/test types after extraction

* chore(google-meet): prune deleted realtime max-lines baseline

* chore(meeting-bot): remove release-owned changelog entry

* fix(meeting-bot): harden session leave, cleanup retry, and engine teardown paths
2026-07-17 10:35:56 +01:00
zhanxingxin1998 16f658d0c6 fix(gateway): reap stale MCP processes on session reset regardless of… (#93559)
* fix(gateway): defer MCP cleanup until active leases release

Mark session MCP runtimes for retirement before reset/delete waits, preserve active work through leases, and complete deferred cleanup when the final materialized run lease releases.\n\nCo-Authored-By: Codex <noreply@openai.com>

* test(mcp): prove deferred child process retirement

Co-Authored-By: Codex <noreply@openai.com>

* test(mcp): prove deferred database lock release

* fix(gateway): bind MCP retirement to timed-out runs

* style(mcp): avoid lifecycle callback shadowing

* test(mcp): align nullable wait mocks

* fix(gateway): follow replacement runs during cleanup

* fix(gateway): close MCP watcher overlap races

* test(agents): prove reply-backed run draining

* test(gateway): reuse MCP retirement parameter type

* fix(gateway): type MCP watcher identity safely

* perf(gateway): lazy-load session cleanup runtime

* perf(gateway): lazy-load MCP cleanup runtime

* perf(agents): lazy-load MCP retirement manager

---------

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 10:34:29 +01:00
Peter Steinberger 0890f7f914 fix(ci): repair main test and script type checks (#109826) 2026-07-17 10:33:55 +01:00
Monkey-wusky 065223c438 fix(apns): cancel redirect relay response body before returning (#109728)
* fix(apns): cancel redirect relay response body before returning

* test: fold APNS redirect body cleanup proof

Co-authored-by: 毛宇豪0668001457 <mao.yuhao@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 10:25:00 +01:00
Peter Steinberger 01961bbd38 fix(ci): restore web push migration lint (#109845) 2026-07-17 10:24:06 +01:00
wangmiao0668000666 bd7b0ad85f fix(plugins): remove abort listener when channel runtime context is disposed (#109708) 2026-07-17 10:11:21 +01:00
Peter Steinberger 62db322715 chore(channels): mark the legacy plan-step wire branch for removal (#109773)
@openclaw/codex is force-updated with core, so string plan steps can only
reach the normalizer from a plugin pinned against an update. Record that
as a TODO instead of a standing version-skew contract.
2026-07-17 10:11:10 +01:00
krissding 4612b1692c fix: guard terminateStaleProcessesSync against non-ESRCH kill errors (#109702)
* fix: guard terminateStaleProcessesSync against non-ESRCH kill errors

The two catch blocks silently swallowed all errors, not just ESRCH.
Non-ESRCH errors (e.g. EPERM) indicate the process is still alive but
cannot be signaled — continuing as if it were killed risks leaving a
stale process on the port.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: continue stale PID cleanup after signal errors

Co-authored-by: 丁宇婷0668001435 <ding.yuting@xydigit.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 10:06:37 +01:00
Peter Steinberger 8ff4f0161f refactor(push-web): split legacy JSON parsing out of the doctor migration
7af9358841 (#109609) pushed state-migrations.web-push.ts past the
max-lines limit (709), failing check-lint repo-wide. Extract the pure
parsing layer (legacy subscriptions/VAPID JSON -> validated shapes) into
state-migrations.web-push-parse.ts; the migration module keeps
detection/claiming/DB import. No behavior change; 23/23 module tests
green.
2026-07-17 02:03:50 -07:00
krissding af469c85cf fix(cli): guard secrets plan JSON.parse against malformed input (#109721)
* fix(cli): guard secrets plan JSON.parse against malformed input

readPlanFile reads a user-specified file and parses it with JSON.parse
without a try-catch. A malformed or corrupted plan file produces a raw
SyntaxError that is not user-actionable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test: tighten malformed secrets plan proof

Co-authored-by: 丁宇婷0668001435 <ding.yuting@xydigit.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 10:00:35 +01:00
Wynne668 07a36f6eda fix(config): preserve Unicode in validation received values (#109664)
* fix(config): preserve Unicode in validation received values

* test: tighten config diagnostic truncation proof

Co-authored-by: ZengWen-DT <ceng.wen@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 01:53:19 -07:00
mushuiyu886 7af9358841 fix(push-web): ignore blank VAPID environment overrides (#109609)
* fix(push-web): ignore blank VAPID environment values

* fix: normalize migrated web push VAPID inputs

Co-authored-by: mushuiyu886 <yang.haoyu@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 01:48:55 -07:00
Peter Steinberger 92e5a10f1a fix(doctor): diagnose ignored web fetch proxy settings (#109778)
* fix(doctor): diagnose direct web fetch proxy routing

* test(doctor): cover proxy diagnostic through public API

* test(doctor): validate emitted proxy diagnostic type
2026-07-17 01:24:32 -07:00
Peter Steinberger edcf3131ad test(gateway): stop background plugin reloads from wiping test task runtimes (#109801)
Root cause of the flaky 120s timeout in "logs a swallowed finalize error
without blocking the background run" (CI run 29559328261, shard
agentic-gateway-methods): the preceding ACP plugin-subagent test registers a
subagent run whose completion keeps running in the background after the test
ends. That leaked chain (completeSubagentRunAttempt ->
emitSubagentEndedHookForRun -> ensureSubagentRegistryPluginRuntimeLoaded ->
ensureRuntimePluginsLoaded -> loadOpenClawPlugins) starts by calling
clearActivatedPluginRuntimeState(), which clears the process-wide detached
task lifecycle runtime registration. When it lands between the next test's
setDetachedTaskLifecycleRuntime(spy) install and that test's background
finalize, finalizeTaskRunByRunId re-reads the registration at call time,
falls back to the default executor, and finalizes the run successfully - so
the finalize spy is never called while the run itself completes with an ok
frame.

The prior event-driven rework (#109653, 883995f08d) could not fix this: it
only waits longer for a spy call that never comes. The older 2s
waitForAssertion flake ("expected 1 call, got 0") was the same mechanism.

Fix at the harness boundary: gateway agent handler tests now pin the
subagent-registry deps with a no-op ensureRuntimePluginsLoaded (matching
subagent-registry's own suites), applied at harness setup, in the shared
afterEach, and through the one wholesale deps override, so no leaked
ended-run hook can reload the plugin runtime and clear a later test's
runtime seam mid-test.

Proof:
- Deterministic repro (temporary env-gated interleaving patch in
  subagent-registry.ts, not committed): hold the ACP plugin-child run's
  ended-hook load until the next finalize-only runtime registration appears,
  then reload synchronously. Pre-fix this reproduces the exact CI failure
  (target times out at 120000ms; registration observed ABSENT right after
  the reload). Post-fix, with the identical forced interleaving, all 238
  tests pass and the registration stays present.
- Stress post-fix: 10x agent.test.ts and 5x src/gateway/server-methods with
  OPENCLAW_VITEST_MAX_WORKERS=6 - 0 failures (3765 tests per shard run).
- The same wipe-then-re-register window exists in prod plugin activation
  (loadOpenClawPlugins cache-miss path); flagged separately for an
  owner-reviewed atomic-swap follow-up rather than bundled here.
2026-07-17 01:16:34 -07:00
Peter Steinberger 4ecd85e0b7 fix: keep healthy channel accounts running when one credential fails (#109766)
* fix(secrets): isolate channel account credentials

* fix(secrets): normalize Feishu default ownership

* fix(feishu): preserve accountless secret ownership

* fix(matrix): keep accountless top-level refs active
2026-07-17 01:12:18 -07:00
Peter Steinberger e693d279b3 fix: Bedrock ARN region routing, Copilot device-flow pacing, TUI input fixes (#109740)
* build(deps): bump terminal UI library to 0.80.9

* fix(plugins): Bedrock ARN region routing, stop-reason detail, and Copilot device-flow pacing
2026-07-17 01:09:29 -07:00