Skip to content

perf(skills): coalesce passive refresh off the Gateway thread - #170341

Merged
steipete merged 4 commits into
mainfrom
steipete/perf-micro-skills-watcher-residual-20260919
Oct 13, 2026
Merged

steipete merged 4 commits into
mainfrom
steipete/perf-micro-skills-watcher-residual-20260919

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Skill discovery should not route passive filesystem events through the Gateway thread. This is the explicitly requested single-worker design: coalesce passive discovery to about once per minute while explicit actions stay immediate. The independent repeat is performance-neutral within observed noise; this change is justified by its ownership simplification and removal of per-event machinery, not a claim of repeatable main-thread speedup.

User Impact

Passive on-disk edits may take up to about one minute to appear. Explicit skill install/update/remove, Workshop changes, configuration changes, and Gateway startup await an immediate worker refresh. skills.load.watch=false disables only passive automatic rescans. Existing configurations with skills.load.watchDebounceMs are normalized by Doctor; that obsolete knob is removed.

Why This Change Was Made

Passive skill watching routes unrelated filesystem activity through Gateway-thread work. This candidate replaced the local watcher registry, per-event classification and stability waits with one background discovery worker and a coalesced 60-second scan. Explicit skill actions, configuration changes and startup await immediate refresh; skills.load.watch=false disables passive refresh. Guarded identity/alias checks remain in the scan owner, and snapshots publish atomically. Documentation and dependent tests were updated. Production LOC delta with the requested exclusions: +1102 / -2665 = -1563.

Evidence

Measurements

Synthetic workload on an isolated Linux sandbox: 500 turns, 500 updates, 2,000 history reads, 500 probe rounds, four subscriptions and 20 excluded warmup turns per fresh process. Main 1bfbdceca349; candidate production source tree e4c12e3c8f1f. Later head ab6f9f1f8ded changes only tests/routing metadata. Sources, builds, runtime, affinity and common harness were pinned and verified before/after.

Experiment Main CPU FIFO occupancy Admission delivery Queue p50 / p95
Initial main/candidate ABBA -9.3% -9.3% -8.5% -13.8% / -16.8%
Repeated main/candidate ABBA -0.3% +0.4% -0.2% +0.7% / +3.2%
Candidate versus watch=false ABBA +3.7% +3.2% +3.7% +2.8% / +8.1%

The initial mean depended on a slow main control: 152.319 versus 127.702 CPU seconds. That run did less logical work and had higher scheduler wait; it was retained, not discarded. The repeat was 128.780 → 128.432 CPU seconds, 152.480 → 153.120 FIFO seconds, and 140/237 → 141/244.5 ms queue p50/p95. Total process CPU rose 0.5% in the repeat. The native watcher thread's CPU did fall by about 70%, but that did not translate into a repeatable Gateway-thread or queue improvement.

All twelve workload proofs and trace validations passed. Every candidate run recorded at least two actual scans, all off-main at approximately 60-second intervals. Queue values average per-run quantiles. This five-times workload is not directly comparable in absolute duration to earlier lane reports.

Earlier-head validation

The branch was rebased onto current main at 335d12304b01; all three commits remained patch-identical according to git range-diff. The superseded watcher machinery stays deleted. The three focused files (discovery.integration, refresh.workspace, and remote) passed 53 tests in 87.62 seconds wall time. Changed-file formatting passed; repository lint completed without diagnostics. Fresh isolated independent review found no actionable P0–P2 issues. Exact-head PR CI run 38325587933 completed with all build, type, lint, security and own-scope behavior gates passing; inherited failures are recorded below. No Testbox/Crabbox leases are used for normal validation.

The retained behavior tests cover explicit additions/edits/removals before refresh resolves, passive edits at the minute boundary, shared worker ownership, watch=false, workspace replacement/missing-root recovery, per-source environment isolation, and immediate Gateway RPC refresh.

Exact-head CI completed: 146 successful jobs, 19 skipped jobs, three directly failing test jobs, one cancelled test job, and the failed aggregate. All 75 skill sibling files passed. The managed-worktree Gateway refresh E2E passed (35.111 seconds test time, 68.11 seconds shard wall time), as did the export collision guard, eager-import closure (17 cases), PR wrapper source closure (3 cases), and matching CI plan tests. Independent review is clean at P0–P2.

The earlier head qualified for the authorized inherited-failure exception, preserving its red result. Baseline qualification used unchanged main 335d12304b01; the relevant inputs match the actual tested main parent a8f00d61f689:

  • Teams cleanup: both identical failures reproduce on main (36.16 seconds).
  • QA repeated-turn child: the actual child entrypoint reproduces its unprepared-runtime-config error before skill discovery (26.023 seconds).
  • Mocked UI: the normal focused runner reproduces the exact sidebar 600 versus 500 font assertion (35.30 seconds). The desktop canvas timeout did not recur in the filtered replay or full 12-case file (45.63 seconds); the entire UI tree and mocked Gateway fixtures are byte-identical between the main parent and tested merge. This timing failure remains unreproduced, not a claimed fix.
  • Telegram ingress coalescing: main reproduces the same first album-case 120-second timeout, with an unprepared-runtime-config rejection; its control passes. The focused baseline took 246.77 seconds. CI then cascaded through cleanup timeouts until its recorded one-hour deadline. Telegram, channel, configuration-snapshot and E2E setup inputs are unchanged.

No CI rerun or push-for-green was used. The superseded pre-rebase run was cancelled automatically. Normal validation used no Testbox/Crabbox lease and no standalone local application build, typecheck lane or test suite.

Subsequent conflict and test synchronization repair

Main advanced during the landing checks. Rebased again onto 31f23a54ecaa; the only conflict was the generated config documentation hash, regenerated through pnpm config:docs:gen. The lane’s production changes remained patch-identical. The focused rerun passed the discovery/publication cases and exposed one-second polling deadlines in two existing remote-probe tests on the saturated host. Both now await explicit start signals from their existing mocks; all final coalescing, generation and published-bin assertions remain intact. The remote file passes all 36 tests (51.16 seconds wall), and the test-only repair has an independent clean P0–P2 review. Final head 11e7abb9fb80 completed CI; its final qualification follows, and the earlier run above remains historical evidence.

Final-head validation and landing qualification

CI run 38332340589, attempt 1, tested 11e7abb9fb80 in merge 1329f21385ff with main parent 8e0d08ad52a0. It completed with 148 successful jobs, 18 skipped jobs, one cancelled test job and the failed aggregate. Build, all typechecks, lint, security, all 75 sibling test files in the touched skill directories, the actual Gateway skill-refresh E2E, export collision guard, eager-import and PR-wrapper closure tests, and matching CI-plan tests passed. The two independent reviews are clean at P0–P2. The final remote file passed all 36 cases (11.95 seconds of reported CI test time; 51.16 seconds local command wall time), and the Gateway refresh E2E file passed in 38.322 seconds of CI test time.

The sole remaining root is Telegram ingress coalescing. Its first failing album case has the same 120,000 ms timeout reproduced on unchanged main 335d12304b01; subsequent cleanup hooks cascade until the recorded one-hour job limit. That test, its fixture, dispatch owner, runtime-config owner, runtime setup and channel tree are byte-identical in the reproduction, actual tested main parent and tested merge. The focused baseline also exposes an unprepared-runtime-config rejection; the cancelled CI run does not print its final unhandled-error summary, so the same error message is not claimed from CI. This qualifies the inherited-only exception; CI is not represented as green. Earlier Teams, QA-child and mocked-UI failures are no longer red on this final head. No job was rerun or branch update made solely for green.

@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 12, 2026 22:33
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations size: XL labels Oct 12, 2026
@steipete
steipete force-pushed the steipete/perf-micro-skills-watcher-residual-20260919 branch from 04c69f4 to 266dca3 Compare October 12, 2026 23:02
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR replaces local skill watchers with one background discovery worker, periodic passive scans, and immediate refresh after explicit actions.

Example: Edit ~/workspace/skills/guide/SKILL.md with automatic refresh enabled.

  • Before: Filesystem observation schedules discovery after the watcher debounce.
  • After: The discovery worker picks up the edit during its next approximately 60-second scan.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Owner-boundary coverage supports the direction, but the unresolved capacity defect prevents merge readiness.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its body reports isolated Linux off-main minute scans, while retained integration tests exercise discovery, snapshot publication, and Gateway refresh.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Passive skill filesystem activity can contend with agent admission and other Gateway work.
Reason: Maintainer authorship settles the requested single-worker direction and its minute-based freshness tradeoff; the body appropriately limits performance claims.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: the maintainer-approved worker cutover is useful, but the previously reported pending-reader eviction defect still blocks merge.

Priority: P2
Reviewed head: 11e7abb9fb80d7cac8f612ac528e95ba07817ae7

Before merge

  • Preserve pending discovery readers across LRU eviction (P2) - When 129 distinct prepareLocalSkillSources calls are admitted before discovery settles, this eviction deletes the first source while its caller still awaits scanDirtySources(). Publication skips results absent from state.sources, and the awaiting preparation throws "Skills discovery was retired before publication". Concurrent agent preparation and configured-agent refresh can therefore fail because the residency limit is reached. Retain pending readers through result delivery, then trim completed residency, and cover 129 concurrent new sources. This previously reported finding remains unresolved; the existing capacity test evicts an already-completed source.

Findings

  • [P2] Preserve pending discovery readers across LRU eviction — src/skills/runtime/refresh.ts:225-228
Agent review details

How this fits together

Skill discovery combines bundled, plugin, managed, personal, and workspace files into entries and prompt snapshots consumed by agent preparation and Gateway status requests.

flowchart TD
  A[Skill files] --> B[Discovery worker]
  C[Minute timer] --> B
  D[Explicit skill actions] --> B
  B --> E[Discovery owner]
  E --> F[Agent snapshots]
  E --> G[Gateway status and events]
Loading

Technical review

Best possible solution:

Keep the single discovery owner, retain active readers through result delivery, and trim completed source residency afterward.

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

Source establishes failure when 129 distinct preparation requests are admitted before discovery settles; this read-only review performed no runtime reproduction.

Is this the best way to solve the issue?

The approved worker cutover simplifies discovery ownership, but cache residency must not decide whether an active reader receives its result.

Full review comments:

  • [P2] Preserve pending discovery readers across LRU eviction — src/skills/runtime/refresh.ts:225-228
    When 129 distinct prepareLocalSkillSources calls are admitted before discovery settles, this eviction deletes the first source while its caller still awaits scanDirtySources(). Publication skips results absent from state.sources, and the awaiting preparation throws "Skills discovery was retired before publication". Concurrent agent preparation and configured-agent refresh can therefore fail because the residency limit is reached. Retain pending readers through result delivery, then trim completed residency, and cover 129 concurrent new sources. This previously reported finding remains unresolved; the existing capacity test evicts an already-completed source.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/skills/runtime/discovery.integration.test.ts --maxWorkers=1
  • pnpm test src/skills/runtime/refresh.workspace.test.ts --maxWorkers=1
  • node scripts/check-changed.mjs -- src/skills/runtime/refresh.ts src/skills/runtime/discovery.integration.test.ts
  • git diff --check

What I checked:

  • Pinned introduction and current main: The verified merge-base-to-head diff introduces the discovery worker; fetched main still uses filesystem observation and the local watcher registry. (src/skills/runtime/refresh.ts:1, 11e7abb9fb80)
  • Pending-reader eviction remains: Admission removes the oldest source at capacity, publication skips results whose source is absent, and the awaiting reader then throws instead of receiving its discovery result. (src/skills/runtime/refresh.ts:225, 11e7abb9fb80)
  • Capacity test misses pending eviction: The retained capacity test completes its original reader before admitting 128 additional sources; it does not cover 129 simultaneously pending new readers. (src/skills/runtime/discovery.integration.test.ts:188, 11e7abb9fb80)
  • Production exposure: Configured-agent refresh prepares agents concurrently through Promise.all, and session snapshot preparation also awaits this discovery owner. (src/skills/runtime/refresh.ts:414, 11e7abb9fb80)
  • Accepted product tradeoff: The supplied repository state identifies maintainer authorship; the body explicitly accepts minute-based passive discovery for simpler ownership and reports that the independent performance repeat was neutral within observed noise. (11e7abb9fb80)
  • Verified no-migration case: The latest stable release already removes skills.load.watchDebounceMs through Doctor; this PR changes that explanation, preserves the watch setting's shape, and preserves serialized snapshot fields while moving their projection. (src/commands/doctor/shared/legacy-config-migrations.runtime.config-tranche.ts:166, b8952d477f0c)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Gateway protocol addition One optional boolean: skills.status.refresh Explicit local CLI changes can request immediate Gateway discovery without adding persisted configuration.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Concurrent skill preparation can fail at the new residency boundary, without evidence of a process outage or emergency regression.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

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

Workflow

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

History

Review history (4 earlier review cycles)
  • reviewed 2026-10-12T23:14:07.366Z sha 266dca3fef059de63350189ba3a0592dd364bf42 :: needs changes before merge. :: [P2] Preserve pending discovery readers across LRU eviction | [P2] Migrate the Gateway refresh fixture to the discovery worker | [P2] Remove the deleted recovery suite from the routing inventory
  • reviewed 2026-10-12T23:27:00.496Z sha ab6f9f1f8ded99b8b2040946ac2bfa5e1fa9b7b5 :: needs changes before merge. :: [P2] Preserve pending discovery readers across LRU eviction
  • reviewed 2026-10-13T00:26:16.198Z sha ce682ddb0495c6eda741623b9629174dc0e94ba2 :: blocked before merge. :: [P2] Preserve pending discovery readers across LRU eviction
  • reviewed 2026-10-13T00:42:43.485Z sha ce682ddb0495c6eda741623b9629174dc0e94ba2 :: needs changes before merge. :: [P2] Preserve pending discovery readers across LRU eviction

Reviewed October 12, 2026, 9:36 PM ET / October 13, 2026, 01:36 UTC (Revision 5).

@steipete steipete closed this Oct 13, 2026
@steipete steipete reopened this Oct 13, 2026
@steipete
steipete force-pushed the steipete/perf-micro-skills-watcher-residual-20260919 branch from ab6f9f1 to ce682dd Compare October 13, 2026 00:06
@steipete
steipete force-pushed the steipete/perf-micro-skills-watcher-residual-20260919 branch from ce682dd to 7d48354 Compare October 13, 2026 01:22
@steipete
steipete merged commit 877301a into main Oct 13, 2026
245 of 248 checks passed
@steipete
steipete deleted the steipete/perf-micro-skills-watcher-residual-20260919 branch October 13, 2026 02:44
@steipete

steipete commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

The inherited failure is the Telegram durable-ingress coalescing job: its first album case timed out at 120 seconds, then cleanup hooks cascaded until the one-hour job limit. The same first timeout reproduced on unchanged main 335d12304b01 (one control passed; one case failed). The test, fixture, dispatch owner, runtime-config owner, runtime setup and channel tree are byte-identical in that reproduction, CI main parent 8e0d08ad52a0, and tested merge 1329f21385ff. The baseline also exposes an unprepared-runtime-config rejection; the cancelled CI run does not print its final unhandled-error summary.

All 148 other successful jobs include build, types, lint and security. All 75 sibling test files in the touched skill directories, Gateway refresh E2E, and export/closure/CI-plan guards passed.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…aw#170341)

* perf(skills): coalesce passive refresh off the Gateway thread

* fix(skills): preserve discovery worker environment and fixtures

* test(skills): migrate remaining watcher lifecycle proof

* test(skills): await remote probe start without polling
steipete added a commit that referenced this pull request Oct 13, 2026
Configuration publications refresh skills because skills can depend on arbitrary
config paths. Reuse the published model-list cache when the existing catalog
facts still match, while rebuilding commands and other skill-dependent metadata.
Model, auth, plugin, catalog and owner changes keep their existing invalidation
and read-authority boundaries.

Fixes the repeated projection work exposed by 877301a (#170341): scheduled
main run 38339144048 rebuilt model lists after each of six UI preference writes.
The prepared-model regression also reproduced the unnecessary second projection
before this change. Preserve the original integration assertion and verify that
skills-dependent commands refresh alongside retained model projections.

Validation: prepared-model regression fails before the repair and passes after
(2/2 tests; 257.74s on the loaded host). Targeted lint, formatting and diff checks
pass. Independent Codex review completed with no actionable findings. The full
Gateway freshness integration remains assigned to canonical CI.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
Configuration publications refresh skills because skills can depend on arbitrary
config paths. Reuse the published model-list cache when the existing catalog
facts still match, while rebuilding commands and other skill-dependent metadata.
Model, auth, plugin, catalog and owner changes keep their existing invalidation
and read-authority boundaries.

Fixes the repeated projection work exposed by 044ae43 (openclaw#170341): scheduled
main run 38339144048 rebuilt model lists after each of six UI preference writes.
The prepared-model regression also reproduced the unnecessary second projection
before this change. Preserve the original integration assertion and verify that
skills-dependent commands refresh alongside retained model projections.

Validation: prepared-model regression fails before the repair and passes after
(2/2 tests; 257.74s on the loaded host). Targeted lint, formatting and diff checks
pass. Independent Codex review completed with no actionable findings. The full
Gateway freshness integration remains assigned to canonical CI.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
* improve: simplify workspace and memory plugin messages

* test(reef): match stored-key generation diagnostic

* fix(webchat): stage offloaded images for file tools (openclaw#168537)

fix(webchat): stage offloaded WebChat images into the managed workspace

WebChat images above the inline threshold reached vision input but were not handed to managed workspace staging, so file tools couldn't find them. Offloaded WebChat images now expose their media-store path for staging, path-less transcript images hydrate from the staged sandbox copy, and images already staged are not staged again. Vision still receives exactly one image.

Proof: built Gateway chat.send with a 3,147,780-byte PNG: on main the image reached vision but exec found no staged file; on the candidate exec finds the staged PNG. A 378-byte inline image works the same on both. A live gpt-5-mini turn also found the staged image through exec.

Thanks @synthalorian.

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

* fix(gateway): retain model lists across skills refreshes

Configuration publications refresh skills because skills can depend on arbitrary
config paths. Reuse the published model-list cache when the existing catalog
facts still match, while rebuilding commands and other skill-dependent metadata.
Model, auth, plugin, catalog and owner changes keep their existing invalidation
and read-authority boundaries.

Fixes the repeated projection work exposed by 044ae43 (openclaw#170341): scheduled
main run 38339144048 rebuilt model lists after each of six UI preference writes.
The prepared-model regression also reproduced the unnecessary second projection
before this change. Preserve the original integration assertion and verify that
skills-dependent commands refresh alongside retained model projections.

Validation: prepared-model regression fails before the repair and passes after
(2/2 tests; 257.74s on the loaded host). Targeted lint, formatting and diff checks
pass. Independent Codex review completed with no actionable findings. The full
Gateway freshness integration remains assigned to canonical CI.

* test(gateway): resolve auth-policy session targets in workers

The synchronous fixture lookup could create a database after a Gateway
worker captured its absence, triggering the physical identity guard and
closing admission before the initial turn. Use existing read-only worker
discovery for both fixture targets, matching neighboring authority tests.

Preserve all retained and revoked grant, final-write, and transcript
assertions. No production guard or authorization behavior changes.

* fix(plugins): retain inspected config for decision diagnostics

Plugin inspection resolved the explicitly supplied config, then discarded
it while projecting decision providers and consulted the runtime snapshot
instead. Cold inspection could fail with an unprepared runtime config; a
prepared but different runtime could also report the wrong configured model.

Carry the resolved config through the existing inspection context. Cover
single and all-plugin inspection with different explicit and ambient models.
Plugin loading, decision execution, and lifecycle ownership are unchanged.

Original ambient-config lookup: 0a54fc6 (openclaw#152237), exposed by
5dbf215 (openclaw#169714). Scheduled main 38334375513 repeats nine
trust-diagnostics failures.

Focused proof: loader.trust-diagnostics 11/11 and status 9/9 passed.
The two new cases take 29ms and 15ms; loaded-host wrapper wall 1794.74s
is dominated by worker build and module transforms. Independent review
found no actionable defects.

* fix: allow test builds in containers without systemd (openclaw#170640)

---------

Co-authored-by: synth <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
* improve: simplify gateway, protocol, and security diagnostics

* fix(webchat): stage offloaded images for file tools (openclaw#168537)

fix(webchat): stage offloaded WebChat images into the managed workspace

WebChat images above the inline threshold reached vision input but were not handed to managed workspace staging, so file tools couldn't find them. Offloaded WebChat images now expose their media-store path for staging, path-less transcript images hydrate from the staged sandbox copy, and images already staged are not staged again. Vision still receives exactly one image.

Proof: built Gateway chat.send with a 3,147,780-byte PNG: on main the image reached vision but exec found no staged file; on the candidate exec finds the staged PNG. A 378-byte inline image works the same on both. A live gpt-5-mini turn also found the staged image through exec.

Thanks @synthalorian.

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

* fix(gateway): retain model lists across skills refreshes

Configuration publications refresh skills because skills can depend on arbitrary
config paths. Reuse the published model-list cache when the existing catalog
facts still match, while rebuilding commands and other skill-dependent metadata.
Model, auth, plugin, catalog and owner changes keep their existing invalidation
and read-authority boundaries.

Fixes the repeated projection work exposed by 044ae43 (openclaw#170341): scheduled
main run 38339144048 rebuilt model lists after each of six UI preference writes.
The prepared-model regression also reproduced the unnecessary second projection
before this change. Preserve the original integration assertion and verify that
skills-dependent commands refresh alongside retained model projections.

Validation: prepared-model regression fails before the repair and passes after
(2/2 tests; 257.74s on the loaded host). Targeted lint, formatting and diff checks
pass. Independent Codex review completed with no actionable findings. The full
Gateway freshness integration remains assigned to canonical CI.

* test(gateway): resolve auth-policy session targets in workers

The synchronous fixture lookup could create a database after a Gateway
worker captured its absence, triggering the physical identity guard and
closing admission before the initial turn. Use existing read-only worker
discovery for both fixture targets, matching neighboring authority tests.

Preserve all retained and revoked grant, final-write, and transcript
assertions. No production guard or authorization behavior changes.

* fix(plugins): retain inspected config for decision diagnostics

Plugin inspection resolved the explicitly supplied config, then discarded
it while projecting decision providers and consulted the runtime snapshot
instead. Cold inspection could fail with an unprepared runtime config; a
prepared but different runtime could also report the wrong configured model.

Carry the resolved config through the existing inspection context. Cover
single and all-plugin inspection with different explicit and ambient models.
Plugin loading, decision execution, and lifecycle ownership are unchanged.

Original ambient-config lookup: 0a54fc6 (openclaw#152237), exposed by
5dbf215 (openclaw#169714). Scheduled main 38334375513 repeats nine
trust-diagnostics failures.

Focused proof: loader.trust-diagnostics 11/11 and status 9/9 passed.
The two new cases take 29ms and 15ms; loaded-host wrapper wall 1794.74s
is dominated by worker build and module transforms. Independent review
found no actionable defects.

* fix: allow test builds in containers without systemd (openclaw#170640)

---------

Co-authored-by: synth <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
* improve: simplify agent, exec, and automation messages

* fix(webchat): stage offloaded images for file tools (openclaw#168537)

fix(webchat): stage offloaded WebChat images into the managed workspace

WebChat images above the inline threshold reached vision input but were not handed to managed workspace staging, so file tools couldn't find them. Offloaded WebChat images now expose their media-store path for staging, path-less transcript images hydrate from the staged sandbox copy, and images already staged are not staged again. Vision still receives exactly one image.

Proof: built Gateway chat.send with a 3,147,780-byte PNG: on main the image reached vision but exec found no staged file; on the candidate exec finds the staged PNG. A 378-byte inline image works the same on both. A live gpt-5-mini turn also found the staged image through exec.

Thanks @synthalorian.

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

* fix(gateway): retain model lists across skills refreshes

Configuration publications refresh skills because skills can depend on arbitrary
config paths. Reuse the published model-list cache when the existing catalog
facts still match, while rebuilding commands and other skill-dependent metadata.
Model, auth, plugin, catalog and owner changes keep their existing invalidation
and read-authority boundaries.

Fixes the repeated projection work exposed by 044ae43 (openclaw#170341): scheduled
main run 38339144048 rebuilt model lists after each of six UI preference writes.
The prepared-model regression also reproduced the unnecessary second projection
before this change. Preserve the original integration assertion and verify that
skills-dependent commands refresh alongside retained model projections.

Validation: prepared-model regression fails before the repair and passes after
(2/2 tests; 257.74s on the loaded host). Targeted lint, formatting and diff checks
pass. Independent Codex review completed with no actionable findings. The full
Gateway freshness integration remains assigned to canonical CI.

* test(gateway): resolve auth-policy session targets in workers

The synchronous fixture lookup could create a database after a Gateway
worker captured its absence, triggering the physical identity guard and
closing admission before the initial turn. Use existing read-only worker
discovery for both fixture targets, matching neighboring authority tests.

Preserve all retained and revoked grant, final-write, and transcript
assertions. No production guard or authorization behavior changes.

* fix(plugins): retain inspected config for decision diagnostics

Plugin inspection resolved the explicitly supplied config, then discarded
it while projecting decision providers and consulted the runtime snapshot
instead. Cold inspection could fail with an unprepared runtime config; a
prepared but different runtime could also report the wrong configured model.

Carry the resolved config through the existing inspection context. Cover
single and all-plugin inspection with different explicit and ambient models.
Plugin loading, decision execution, and lifecycle ownership are unchanged.

Original ambient-config lookup: 0a54fc6 (openclaw#152237), exposed by
5dbf215 (openclaw#169714). Scheduled main 38334375513 repeats nine
trust-diagnostics failures.

Focused proof: loader.trust-diagnostics 11/11 and status 9/9 passed.
The two new cases take 29ms and 15ms; loaded-host wrapper wall 1794.74s
is dominated by worker build and module transforms. Independent review
found no actionable defects.

* fix: allow test builds in containers without systemd (openclaw#170640)

---------

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

Labels

app: web-ui App: web-ui cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant