Skip to content

fix(config): apply Gateway writes without waiting for file events - #157372

Merged
steipete merged 5 commits into
mainfrom
hostneutral/config-source-0924
Sep 24, 2026
Merged

steipete merged 5 commits into
mainfrom
hostneutral/config-source-0924

Conversation

@steipete

@steipete steipete commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Gateway config writes could lose their immediate application path when their filesystem echo transferred the write's receipt and restart intent into debounced watcher work.

User Impact

Writes through the running Gateway now publish their resolved, validated snapshot directly, without waiting for a watcher event. External JSON5 edits, $include changes, editor rename-replace writes, reload mode off, restart requirements, and last-good runtime behavior retain their contracts. Accepted source revisions identify write versus file admission in the log. No migration or operator action is required.

Why This Change Was Made

Extend the existing runtime snapshot and committed policy owners: shared writer publication carries the canonical snapshot, including authored bytes, include ownership, and environment-resolution facts. One config source owns revisioned observations and shared reads; its file adapter owns the config watcher. The reload planner consumes those observations, preserves pending restart intent across supersession, and publishes policy only when runtime application commits. Explicit plugin lifecycle actions still reconcile their exact persisted target through that source.

The touched reload journal now uses the existing read-only and write workers. Its single-slot CAS, fingerprints, stored bytes, retention, and best-effort diagnostic behavior are unchanged. The narrow worker additions preserve the existing database and engine owners.

Cutover, size, update behavior, and contracts

Removed the reload controller's chokidar lifetime and recovery machinery, watcher-owned transfer of pending writes, duplicate observation reads, hash-only echo bookkeeping, duplicated writer-notification construction, and the unused path-filtered journal reader. Watcher recovery coverage moved to the file adapter; duplicate listener-copy and startup scaffolding were removed. The inventory found no additional config watchers or freshness polls to retire. Skills content watching remains with its existing owner.

The diagnostic worker extraction preserves audit replies and invalid-cursor behavior while satisfying the post-rebase line cap.

Measured against origin/main...HEAD using the work order's source exclusions:

Category Added Deleted Net
Production 750 589 +161
Tests and test support 768 854 -86
Docs 22 3 +19

This uses the work order's honest-growth escape hatch. Journal/worker plumbing accounts for net +134 production lines; the remaining source cutover and shared publication account for net +27. Authority checks, transactional rollback, receipt settlement, and synchronous CLI writer contracts remain intact.

Updates keep the same config files, include graph, environment substitution, backup/rollback path, and startup validation. Older updaters and separate CLI processes keep writing the existing format; those cross-process changes enter through the file adapter. Source revisions are process-local. There is no config option, config-format/schema change, database schema/version bump, retention change, or Plugin SDK surface change. The work order authorizes the internal storage-admission change; no persistent migration is introduced.

Evidence

Publication head: 6ebbd6ac86b1d5f617eae75325e7cbae420c12f2, based on 4dbec4804a7cfc010b1759a22e8074219fecdbe1. All five commits remained patch-identical through the final rebase. Blacksmith Testbox proof passed 778 focused tests and the complete changed-file gate. The final rebase is patch-identical; journal/reload and live proof are refreshed on the publication head.

Publication-head refresh passed 510 journal/reload tests and the full isolated live flow. Exact-head CI and openclaw/ci-gate passed; this PR remains unmerged for coordinator review.

Remote commands, leases, and measured test costs

Provider: blacksmith-testbox. Commands ran through Crabbox/Testbox with pnpm install --frozen-lockfile before tests/checks in synced checkouts. No local Vitest, tsgo, build, or Gateway execution was used.

  • L1: tbx_01m39aevhkb96qeqc1kfv4p5w5 (run) — initial focused tests and live proof; its long changed-check attempt ended with SSH exit 255, so that attempt is not gate proof. The lease completed/cancelled.
  • L2: tbx_01m39gxyt33713zh7k34sdn8jw (run) — regression controls and final reload tests; later sync/base problems prevented a complete gate. Explicitly stopped.
  • L3: tbx_01m39pbee0fvgpk6tc32hzfj33 (run) — canonical-reader/diagnostic tests and the full gate through typechecking and dead-export scans; lint then found five unbound-method errors, corrected below. Lease completed and explicit cleanup was verified. A targeted retry failed SSH after completion and executed no checks.
  • L4: tbx_01m39xm0qkvfmm8nh0vx3e12e9 (run) (harbor-krill-0deb) — 778 focused tests and the full changed gate passed before the patch-identical publication rebase; 510 journal/reload tests, Markdown lint, and the complete live flow passed on the publication head. Stopped; native status verified completed.

Each standalone measurement below used pnpm test <file> --maxWorkers=1. Wall times include wrapper/compiler startup and are samples, not pure test execution time.

File Standalone result Wall Lease CI reported case seconds
src/config/source-file.test.ts 11 passed 2.66 s L4 0.015
src/config/io.runtime-snapshot-write.test.ts 7 passed 29.43 s L1 3.481
src/config/runtime-snapshot.test.ts 28 passed 2.50 s L1 0.016
src/config/config-journal-snapshot.test.ts 5 passed 14.27 s L1 3.201
src/config/io.write-journal.test.ts 2 passed 10.42 s L1 2.145
src/config/io.write-config.test.ts 221 passed 37.43 s L1 67.948
src/config/io.write-reread.test.ts 16 passed 55.62 s (cold compiler preparation included) L4 4.266
src/gateway/config-reload.test.ts 487 passed 34.10 s L2 21.385
src/gateway/server-reload-managed-context.test.ts 1 passed 24.67 s L1 0.861
src/gateway/server-reload-handlers.test.ts 269 passed 21.96 s L1 10.457 subtotal

The existing large writer suite protects persistence, includes, backup/rollback, and write authority; its startup cases moved to the journal suite. Adapter recovery coverage moved to its owning suite. CI seconds are the sum of Vitest-reported case durations, excluding compilation and suite/worker startup. Counts match each changed test file. The unchanged server-reload-handlers sibling reports 267 of 269 durations because two fixture labels and timings were redacted by the log sanitizer; its value is a subtotal, not a full-file cost.

Pre-publication focused proof on L4 (1ae6797f8fde330f6fdefca66d3819f2bed3d0ee):

pnpm test src/config/config-journal-snapshot.test.ts src/config/io.write-config.test.ts src/config/io.write-journal.test.ts src/config/io.runtime-snapshot-write.test.ts src/config/runtime-snapshot.test.ts src/gateway/config-reload.test.ts src/gateway/server-reload-managed-context.test.ts --maxWorkers=1

Result: 488 Gateway and 263 config tests passed; 152.35 s command wall. The separate adapter/reread runs above add 27 cases. After the publication rebase, this command passed 487 reload and 23 journal/reread cases in 62.79 s:

pnpm test src/config/config-journal-snapshot.test.ts src/config/io.write-journal.test.ts src/config/io.write-reread.test.ts src/gateway/config-reload.test.ts --maxWorkers=1

Diagnostic-shard proof also passed with:

pnpm test src/config/config-journal-snapshot.test.ts src/audit/execution-decision-cursors.test.ts src/audit/execution-identity-context.test.ts --maxWorkers=1

Result: 32 audit and 5 journal tests passed; 68.65 s wall including cold preparation. Earlier sibling coverage passed 95 tests across config-reload.activation.integration, server-reload-handlers.operator-model-policy, server-reload-channel-restart, and server.config-patch.

Full gate: node scripts/check-changed.mjs --base origin/main passed on 1ae6797f8fde330f6fdefca66d3819f2bed3d0ee in 1873.94 s. It includes all core/test type graphs, lint, formatting, config-doc baseline, native schema, storage, import-cycle, and dead-export guards. That proof is retained across the patch-identical rebase; publication-head journal/reload and live evidence follow below. Markdown lint passed on the publication head (1309 files, zero issues). No SDK API regeneration was required.

Live behavior and restart proof

L4 launched pnpm --silent openclaw gateway run --port "$port" --bind loopback with an isolated home, state directory, config, workspace, synthetic token, and private port. RPCs used pnpm --silent openclaw gateway call <method> --url "ws://127.0.0.1:$port" --token "$synthetic_token" --params '<synthetic JSON>' --timeout 60000 --json.

With CHOKIDAR_USEPOLLING=true CHOKIDAR_INTERVAL=600000, config.patch changed messages.ackReactionScope and was applied/acknowledged in 1.935 seconds including CLI startup. The log recorded config source revision 1 accepted (write); config.get reported matching source/applied hashes.

After restart with normal file detection, a root edit, editor-style rename-replace, and an edit to logging.json5 each produced exactly one file publication and the expected applied value. Invalid JSON5 produced no publication, logged config reload skipped (invalid config), and retained the last applied hash. Restoring valid bytes, killing the owned Gateway with SIGKILL, and restarting preserved the settings and matching source/applied hashes. Live command result: exit 0.

Publication-head live refresh: passed, exit 0, 67.41 s wall. With ten-minute watcher polling, the RPC produced only config source revision 1 accepted (write) and matching source/applied hashes. Native file detection then recorded exactly one publication each for root, rename-replace, and include edits. Invalid JSON5 logged the rejection and published nothing; the last applied hash stayed intact. The harness sent SIGKILL to the actual Gateway PID, then verified settings and hashes after restart.

An earlier refresh exposed harness process ownership: the pnpm wrapper exits before its detached Gateway, and SIGKILL cannot forward through the wrapper. The harness now identifies the owned Gateway PID from its startup record, signals that PID, and joins child stream closure. All owned processes from the interrupted fixture were cleaned up; no production change was needed.

Failures, regression controls, and review

Focused failures led to updated duplicate-read expectations, startup fixtures awaiting owner readiness, and corrected source/restart-intent handling. The producer test now checks the authored ${VAR} path and resolved-reference provenance instead of incorrectly expecting no environment fact.

Negative controls failed for the original direct-snapshot path, lost active-write intent, startup-journal readiness, watcher-close cleanup, and pending external observations; the latter three-case control passed after repair. An intermediate batch retained an obsolete no-restart expectation after restart-intent preservation was repaired (482 passed, one failed). That test now verifies that the newest config applies while the earlier committed restart requirement survives; the final 487-test reload suite passed.

Changed checks found line-cap growth, pinned-formatting differences, and an unused journal reader; shared publication, coherent test/diagnostic extraction, pinned formatting, and deletion resolved them. The latest completed full attempt passed core/all core-test type graphs and all three dead-export scans with zero entries, then failed five unbound-method lint errors. The correction changes three adapter methods to lexical arrows and retains the test close spy (five lines changed each way, no net LOC growth). The subsequent complete gate passed without exceptions or skips. SSH, missing-base-ref, and sync failures supplied no passing gate evidence.

Codex autoreview: 10 attempts, 9 completed; 4 finding rounds and 5 clean rounds. Attempt 1 was unavailable (refresh_token_reused). Rounds 2–5 identified restart-intent races, preparation/shutdown fencing, and a pending external observation; all were addressed. Round 6 was clean; full-branch rounds 7 and 9 were clean after diagnostic extraction and journal-reader deletion. Round 8 covered formatting; round 10 covered the five-line lint correction. Both were clean. No accepted/actionable finding remains.

Exact-head CI: run 36021720956 passed on 6ebbd6ac86b1d5f617eae75325e7cbae420c12f2 (152 jobs completed, no failed jobs). The required openclaw/ci-gate and all other applicable checks passed. No CI retry or source change was needed. This PR remains unmerged for coordinator review.

Maintainer review confirmed that a published-updater x candidate cell is not required: this change does not touch the updater, Doctor, service lifecycle, config/state migration, or plugin loading. An older updater's config write enters through the file adapter, already covered by the isolated live proof.

Deferred credentials work

Credentials migration remains separate. Auth profiles/legacy OAuth, Matrix, and Zalo already have store and migration owners. Remaining active files include WhatsApp's Baileys multi-file authentication and GitHub CLI configuration under credentials/github.

A follow-up should inventory active versus legacy artifacts by owner, migrate WhatsApp through its authentication adapter with crash/reconnect proof, retain or derive GitHub CLI files for that external-tool contract, and extend the existing Doctor receipts, backup, restore, and cleanup owners together. Moving the directory wholesale would cross those contracts.

Landing validation

The coordinator approved the owner cutover. After synchronizing with main, all five patches remained unchanged by range-diff. CI run 36033238816 passed on landing head a876d273f902cad41cac78364c5cad7a3a831fb2.

An earlier rebased run, 36026877058, timed out in models-connect-publication.integration.test.ts: startup/connect consumed 55.375 seconds of its 60-second case budget, followed by a plugin-metadata cleanup error in the next non-isolated suite. The exact 14-file selector and eight-worker replay passed all 391 tests in 142.68 seconds on Blacksmith lease tbx_01m3a5avs1bhrbcdzxxsf711v5 (run); the model-publication case took 9.828 seconds. This was non-reproduction, not a claimed fix.

One diagnostic-only base/candidate comparison passed both cases: startup/connect was 20.168/25.672 seconds and the measured config-reloader readiness await was 5/9 ms. These single samples do not explain the CI startup outlier. No timeout, assertion, worker count, or production behavior was changed to obtain green. The diagnostic lease was stopped and verified completed. The failed attempt and cleanup uncertainty remain recorded under the repository's best-effort test-failure policy.

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: XL labels Sep 24, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 24, 2026, 2:07 PM ET / 18:07 UTC (Revision 5).

ClawSweeper review

What this changes

The branch makes running Gateway config writes publish validated snapshots directly, moves file observations into a shared config source, and routes config-journal access through SQLite workers.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open. Current main still has the watcher-mediated path, while this PR has credible direct Gateway proof and no identified code defect. The remaining question is whether the changed reload and lifecycle path requires published-updater compatibility proof.

Priority: P2
Reviewed head: a876d273f902cad41cac78364c5cad7a3a831fb2
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Direct Gateway proof and focused validation support a coherent patch, with one upgrade-policy decision still open.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The changed Gateway config source is exercised through a real isolated config.patch RPC with watcher polling delayed: the recorded after-fix source and applied hashes match, and external edits, invalid config, and restart recovery are observed. The journal retains its stored contract, so data-model migration proof is not applicable; the published-updater question is a separate compatibility gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed Gateway config source is exercised through a real isolated config.patch RPC with watcher polling delayed: the recorded after-fix source and applied hashes match, and external edits, invalid config, and restart recovery are observed. The journal retains its stored contract, so data-model migration proof is not applicable; the published-updater question is a separate compatibility gate.
Evidence reviewed 9 items Current main still uses watcher handoff: The current-main reloader transfers pending write intent into watcher work; the new config-source file is absent from current main.
Direct write publication: Committed-write finalization passes its canonical reread snapshot to the new runtime write publisher.
Shared source admission: The new source assigns revisions to writes and file observations and shares each observation's resolved snapshot.
Findings None None.
Security None None.

How this fits together

The Gateway receives configuration from its write methods and from edits to the root or included files. Its reload owner applies valid changes to the running process, requests restarts when needed, and records journal diagnostics.

flowchart LR
  A[Gateway config write] --> D[Config source]
  B[File edit] --> C[File watcher]
  C --> D
  D --> E[Reload planner]
  E --> F[Running Gateway]
  E --> G[Restart request]
  D --> H[Config journal]
Loading

Decision needed

Question Recommendation
Does this reload and plugin-lifecycle cutover require a published v2026.9.6 updater × candidate proof cell, or is the exception reported in the PR body approved? Prove the shipped upgrade: Run the published updater into this candidate using existing root config, an included file, and journal state, then record startup and reload outcomes.

Why: The previous review required that cell, and the current patch still changes lifecycle reconciliation. The PR body reports coordinator approval, but no independent maintainer comment or review records the exception.

Before merge

  • Resolve merge risk (P1) - A published v2026.9.6 updater has not been shown entering this candidate with existing root and included config files plus journal state. The PR body reports an exception, but the visible discussion does not independently settle the prior upgrade-proof requirement for the changed reload and plugin lifecycle path.
  • Complete next step (P2) - Record the published-updater compatibility cell or an explicit maintainer decision accepting the stated exception before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +161, Tests -86, Docs +19. Total +94 across 27 files.

View PR surface stats
Area Files Added Removed Net
Source 15 750 589 +161
Tests 11 764 850 -86
Docs 1 22 3 +19
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 27 1536 1442 +94

Review metrics

Metric Value Why it matters
Production growth attribution 134 of net 161 production lines attributed to journal worker plumbing; tests net -86 The PR body accounts for most production growth as part of moving journal access off the Gateway thread.

Merge-risk options

Maintainer options:

  1. Prove existing-state upgrade (recommended)
    Exercise the published updater with existing root and included config plus journal state before merging the cutover.
  2. Accept candidate-only coverage
    A maintainer may explicitly confirm that the recorded candidate startup and restart proof covers this change's upgrade exposure.

Technical review

Best possible solution:

Keep the unified config source and demonstrate that a shipped updater preserves existing config, included files, and journal state when entering the candidate.

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

Yes: delaying file events during a current-main Gateway config.patch call and comparing source and applied hashes targets the watcher handoff shown in source. This reviewer did not execute the pre-fix path.

Is this the best way to solve the issue?

Yes. A shared source for committed writes and file observations repairs the handoff at its owner; the shipped upgrade entry remains to be settled.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0eecafafa554.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded Gateway configuration reliability repair with credible direct runtime proof.
  • merge-risk: 🚨 compatibility: The reload and journal cutover affects existing configuration state, while the prior published-updater proof requirement remains unsettled.
  • 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 (terminal): The changed Gateway config source is exercised through a real isolated config.patch RPC with watcher polling delayed: the recorded after-fix source and applied hashes match, and external edits, invalid config, and restart recovery are observed. The journal retains its stored contract, so data-model migration proof is not applicable; the published-updater question is a separate compatibility gate.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed Gateway config source is exercised through a real isolated config.patch RPC with watcher polling delayed: the recorded after-fix source and applied hashes match, and external edits, invalid config, and restart recovery are observed. The journal retains its stored contract, so data-model migration proof is not applicable; the published-updater question is a separate compatibility gate.

Evidence

What I checked:

  • Current main still uses watcher handoff: The current-main reloader transfers pending write intent into watcher work; the new config-source file is absent from current main. (src/gateway/config-reload.ts:1380, 0eecafafa554)
  • Direct write publication: Committed-write finalization passes its canonical reread snapshot to the new runtime write publisher. (src/config/io.runtime-write-finalization.ts:118, a876d273f902)
  • Shared source admission: The new source assigns revisions to writes and file observations and shares each observation's resolved snapshot. (src/config/source.ts:49, a876d273f902)
  • Stored journal shape: The worker kernel retains the existing scope, key, and config path, raw hash, and fingerprinted authored-config fields; no stored schema change is evident. (src/config/config-journal-snapshot.kernel.ts:7, a876d273f902)
  • Production behavior proof: The PR body records an isolated real Gateway config.patch call with watcher polling delayed, matching source and applied hashes, followed by root, rename-replace, include, invalid-config, and restart observations. The body also reports that a coordinator considered the published-updater cell unnecessary; that decision is not independently recorded in the visible discussion.
  • Upgrade policy and affected lifecycle path: Repository policy calls for a published-driver × candidate proof cell for service-lifecycle or plugin-loading changes; this branch changes plugin lifecycle reconciliation and restart-intent handling in the reload owner. (AGENTS.md:83, a876d273f902)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • Vincent Koc: 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.

  • Record the published v2026.9.6 updater-to-candidate run with existing config, an included file, and journal state, unless a maintainer explicitly confirms the exception.

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 (4 earlier review cycles)
  • reviewed 2026-09-24T15:45:47.691Z sha 6ebbd6a :: blocked before merge. :: none
  • reviewed 2026-09-24T16:18:23.665Z sha 6ebbd6a :: blocked before merge. :: none
  • reviewed 2026-09-24T16:30:48.211Z sha f2df171 :: blocked before merge. :: none
  • reviewed 2026-09-24T17:26:34.000Z sha a876d27 :: blocked before merge. :: none

@steipete
steipete force-pushed the hostneutral/config-source-0924 branch from 6ebbd6a to f2df171 Compare September 24, 2026 16:22
Publish canonical snapshots directly from managed writers and keep external
file observations under the same revisioned source. Preserve restart intent
and application receipts through coalescing, file echoes, and retries.

Move config file watching and recovery to the source adapter, share source
reads, and move the reload journal onto the existing SQLite workers. Keep
JSON5, includes, environment substitution, and config/storage/SDK contracts.
Keep config journal and audit inspection replies together without growing the shared worker dispatcher. Preserve query kernels, admission, cursor errors, and stored data.
@steipete
steipete force-pushed the hostneutral/config-source-0924 branch from f2df171 to a876d27 Compare September 24, 2026 17:17
@steipete
steipete merged commit c35b657 into main Sep 24, 2026
208 checks passed
@steipete
steipete deleted the hostneutral/config-source-0924 branch September 24, 2026 18:33
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit '926bb1e1d75c6b102bcbf93114c690312c23cf18': (2027 commits)
  refactor(matrix): reuse startup verification account key (#157310)
  perf(config): avoid repeated environment scans during publication (#156457)
  chore(i18n): refresh native locales (#157495)
  fix(update): show quiet step progress and date recorded outcomes (#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (#157454)
  test(scripts): await CLI admission fixture lifetimes (#157424)
  fix(ci): preserve consumer selection across core type stripes (#157373)
  fix(wizard): preserve typed plugin enum values (#127577) (#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (#157458)
  test: prebuild run-node signal fixture (#157478)
  refactor(exec): reuse approval policy rule keys (#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (#157365)
  fix(config): apply Gateway writes without waiting for file events (#157372)
  fix: count recorded nested tool operations once (#157438)
  fix(telegram): stop leaking raw file:// markdown links in messages (#137810)
  refactor(claws): share resource capability changes (#154680)
  improve(channels): reduce redundant preparation for button messages (#157050)
  fix(build): package preparation fails on unrelated test types (#157318)
  refactor(claws): share bounded document reading (#157436)
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* refactor(config): share config doc wildcard traversal

* refactor(config): refresh wildcard traversal on frozen main

Integrate the frozen main baseline while preserving the documentation wildcard extraction and its public renderer coverage.

* chore: merge main for config doc validation

* commit '926bb1e1d75c6b102bcbf93114c690312c23cf18': (2027 commits)
  refactor(matrix): reuse startup verification account key (#157310)
  perf(config): avoid repeated environment scans during publication (#156457)
  chore(i18n): refresh native locales (#157495)
  fix(update): show quiet step progress and date recorded outcomes (#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (#157454)
  test(scripts): await CLI admission fixture lifetimes (#157424)
  fix(ci): preserve consumer selection across core type stripes (#157373)
  fix(wizard): preserve typed plugin enum values (#127577) (#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (#157458)
  test: prebuild run-node signal fixture (#157478)
  refactor(exec): reuse approval policy rule keys (#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (#157365)
  fix(config): apply Gateway writes without waiting for file events (#157372)
  fix: count recorded nested tool operations once (#157438)
  fix(telegram): stop leaking raw file:// markdown links in messages (#137810)
  refactor(claws): share resource capability changes (#154680)
  improve(channels): reduce redundant preparation for button messages (#157050)
  fix(build): package preparation fails on unrelated test types (#157318)
  refactor(claws): share bounded document reading (#157436)
  ...

Co-authored-by: Vincent Koc <[email protected]>
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit 'a0905dfe5c17053a3f0ef2aa0cf8f421bce9381c': (75 commits)
  fix: preserve conversation titles across split-pane agent switches (#157482)
  test(gateway): settle resumed work before checking announcement
  fix(update): avoid socket-arrival assumptions in deadline tests (#157504)
  fix(ci): include Android Access in release coordination
  refactor: share LINE message context test fixtures (#157488)
  refactor(matrix): reuse startup verification account key (#157310)
  perf(config): avoid repeated environment scans during publication (#156457)
  chore(i18n): refresh native locales (#157495)
  fix(update): show quiet step progress and date recorded outcomes (#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (#157454)
  test(scripts): await CLI admission fixture lifetimes (#157424)
  fix(ci): preserve consumer selection across core type stripes (#157373)
  fix(wizard): preserve typed plugin enum values (#127577) (#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (#157458)
  test: prebuild run-node signal fixture (#157478)
  refactor(exec): reuse approval policy rule keys (#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (#157365)
  fix(config): apply Gateway writes without waiting for file events (#157372)
  fix: count recorded nested tool operations once (#157438)
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit '926bb1e1d75c6b102bcbf93114c690312c23cf18': (1903 commits)
  refactor(matrix): reuse startup verification account key (#157310)
  perf(config): avoid repeated environment scans during publication (#156457)
  chore(i18n): refresh native locales (#157495)
  fix(update): show quiet step progress and date recorded outcomes (#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (#157454)
  test(scripts): await CLI admission fixture lifetimes (#157424)
  fix(ci): preserve consumer selection across core type stripes (#157373)
  fix(wizard): preserve typed plugin enum values (#127577) (#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (#157458)
  test: prebuild run-node signal fixture (#157478)
  refactor(exec): reuse approval policy rule keys (#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (#157365)
  fix(config): apply Gateway writes without waiting for file events (#157372)
  fix: count recorded nested tool operations once (#157438)
  fix(telegram): stop leaking raw file:// markdown links in messages (#137810)
  refactor(claws): share resource capability changes (#154680)
  improve(channels): reduce redundant preparation for button messages (#157050)
  fix(build): package preparation fails on unrelated test types (#157318)
  refactor(claws): share bounded document reading (#157436)
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* refactor(acp): consolidate scalar runtime option validation

* chore: merge main for ACP validation

* commit 'a0905dfe5c17053a3f0ef2aa0cf8f421bce9381c': (75 commits)
  fix: preserve conversation titles across split-pane agent switches (#157482)
  test(gateway): settle resumed work before checking announcement
  fix(update): avoid socket-arrival assumptions in deadline tests (#157504)
  fix(ci): include Android Access in release coordination
  refactor: share LINE message context test fixtures (#157488)
  refactor(matrix): reuse startup verification account key (#157310)
  perf(config): avoid repeated environment scans during publication (#156457)
  chore(i18n): refresh native locales (#157495)
  fix(update): show quiet step progress and date recorded outcomes (#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (#157454)
  test(scripts): await CLI admission fixture lifetimes (#157424)
  fix(ci): preserve consumer selection across core type stripes (#157373)
  fix(wizard): preserve typed plugin enum values (#127577) (#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (#157458)
  test: prebuild run-node signal fixture (#157478)
  refactor(exec): reuse approval policy rule keys (#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (#157365)
  fix(config): apply Gateway writes without waiting for file events (#157372)
  fix: count recorded nested tool operations once (#157438)
  ...

Co-authored-by: Vincent Koc <[email protected]>
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* refactor(agents): centralize tool description exclusions

* Merge main into refactor/tool-description-exclusions-20260915

* commit '84114b5a2711764e2ca333e327e808fd88316063': (40 commits)
  improve(sessions): reuse compiled transcript metadata queries (#148773)
  fix(ci): repair Copilot contracts and config failure diagnostics (#149001)
  test: align model auth and setup fixtures with current behavior (#149023)
  refactor: reuse web search request context (#148949)
  fix(ci): remove duplicate Copilot auth metadata (#149016)
  test(agents): align auth fixtures with runtime store reads (#149004)
  improve: reduce data fetched during reminder maintenance (#148996)
  fix(cron): skip availability checks when session pruning is idle (#148920)
  fix(auth): guard GitHub Copilot device flow authority (#148999)
  fix(agents): prevent early recovery aborts of foreground exec (#148959)
  fix(github-copilot): remove retired Raptor mini (#116505)
  improve(feishu): reduce preparation work for documents with tables (#148997)
  improve: reduce database work when recording participants (#148841)
  test: accept Bun error labels in plugin assertions (#148955)
  fix(models): clarify saved account health and catalog status (#148987)
  test(plugins): align Copilot auth-choice registry expectations (#148981)
  fix(channels): reject blank integer channel add options (#145534)
  fix(ui): preserve archive undo after chat navigation (#148831)
  feat: show cited source previews in macOS and iOS chat (#148906)
  fix: avoid redundant tab updates while chats stream (#148865)
  ...

* refactor(agents): consolidate tool description exclusions

* chore: merge main for tool summary validation

* commit '926bb1e1d75c6b102bcbf93114c690312c23cf18': (1903 commits)
  refactor(matrix): reuse startup verification account key (#157310)
  perf(config): avoid repeated environment scans during publication (#156457)
  chore(i18n): refresh native locales (#157495)
  fix(update): show quiet step progress and date recorded outcomes (#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (#157454)
  test(scripts): await CLI admission fixture lifetimes (#157424)
  fix(ci): preserve consumer selection across core type stripes (#157373)
  fix(wizard): preserve typed plugin enum values (#127577) (#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (#157458)
  test: prebuild run-node signal fixture (#157478)
  refactor(exec): reuse approval policy rule keys (#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (#157365)
  fix(config): apply Gateway writes without waiting for file events (#157372)
  fix: count recorded nested tool operations once (#157438)
  fix(telegram): stop leaking raw file:// markdown links in messages (#137810)
  refactor(claws): share resource capability changes (#154680)
  improve(channels): reduce redundant preparation for button messages (#157050)
  fix(build): package preparation fails on unrelated test types (#157318)
  refactor(claws): share bounded document reading (#157436)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…enclaw#157372)

Gateway config writes could lose their immediate application path when a filesystem echo transferred the write's receipt and restart intent into debounced watcher work.

Publish canonical committed snapshots through the existing runtime snapshot and committed-policy owners. One revisioned config source feeds the reload planner, and its file adapter owns external root/include edits and editor rename-replace events. Preserve pending restart requirements and the last good runtime across supersession and invalid edits. Move the touched reload-journal reads and writes onto the existing SQLite workers without changing the stored representation.

Update behavior: existing JSON5 config, includes, environment substitution, journal state, backups, and rollback contracts remain unchanged. This change does not touch the updater, Doctor, service lifecycle, config/state migration, or plugin loading. A published-updater x candidate cell is therefore not required: an older updater's config write enters through the file adapter, which the isolated live proof already exercised.

Validation: focused config/reload and journal suites, full changed checks, independent review, exact-head hosted CI, and isolated Gateway proof of immediate RPC publication, one publication per external/root/rename/include edit, invalid-config retention, and consistent restart state.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
* refactor(config): share config doc wildcard traversal

* refactor(config): refresh wildcard traversal on frozen main

Integrate the frozen main baseline while preserving the documentation wildcard extraction and its public renderer coverage.

* chore: merge main for config doc validation

* commit 'e0f58a77476acbe382bff5e55cd520e9d228d478': (2027 commits)
  refactor(matrix): reuse startup verification account key (openclaw#157310)
  perf(config): avoid repeated environment scans during publication (openclaw#156457)
  chore(i18n): refresh native locales (openclaw#157495)
  fix(update): show quiet step progress and date recorded outcomes (openclaw#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (openclaw#157454)
  test(scripts): await CLI admission fixture lifetimes (openclaw#157424)
  fix(ci): preserve consumer selection across core type stripes (openclaw#157373)
  fix(wizard): preserve typed plugin enum values (openclaw#127577) (openclaw#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (openclaw#157458)
  test: prebuild run-node signal fixture (openclaw#157478)
  refactor(exec): reuse approval policy rule keys (openclaw#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (openclaw#157365)
  fix(config): apply Gateway writes without waiting for file events (openclaw#157372)
  fix: count recorded nested tool operations once (openclaw#157438)
  fix(telegram): stop leaking raw file:// markdown links in messages (openclaw#137810)
  refactor(claws): share resource capability changes (openclaw#154680)
  improve(channels): reduce redundant preparation for button messages (openclaw#157050)
  fix(build): package preparation fails on unrelated test types (openclaw#157318)
  refactor(claws): share bounded document reading (openclaw#157436)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…#157446)

* refactor(acp): consolidate scalar runtime option validation

* chore: merge main for ACP validation

* commit 'a2532ef8d2eb80fd2fd391ef7ea645c051f8be9c': (75 commits)
  fix: preserve conversation titles across split-pane agent switches (openclaw#157482)
  test(gateway): settle resumed work before checking announcement
  fix(update): avoid socket-arrival assumptions in deadline tests (openclaw#157504)
  fix(ci): include Android Access in release coordination
  refactor: share LINE message context test fixtures (openclaw#157488)
  refactor(matrix): reuse startup verification account key (openclaw#157310)
  perf(config): avoid repeated environment scans during publication (openclaw#156457)
  chore(i18n): refresh native locales (openclaw#157495)
  fix(update): show quiet step progress and date recorded outcomes (openclaw#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (openclaw#157454)
  test(scripts): await CLI admission fixture lifetimes (openclaw#157424)
  fix(ci): preserve consumer selection across core type stripes (openclaw#157373)
  fix(wizard): preserve typed plugin enum values (openclaw#127577) (openclaw#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (openclaw#157458)
  test: prebuild run-node signal fixture (openclaw#157478)
  refactor(exec): reuse approval policy rule keys (openclaw#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (openclaw#157365)
  fix(config): apply Gateway writes without waiting for file events (openclaw#157372)
  fix: count recorded nested tool operations once (openclaw#157438)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…8966)

* refactor(agents): centralize tool description exclusions

* Merge main into refactor/tool-description-exclusions-20260915

* commit '4a994031abb1b54d51b76755a55ac8f6e918162d': (40 commits)
  improve(sessions): reuse compiled transcript metadata queries (openclaw#148773)
  fix(ci): repair Copilot contracts and config failure diagnostics (openclaw#149001)
  test: align model auth and setup fixtures with current behavior (openclaw#149023)
  refactor: reuse web search request context (openclaw#148949)
  fix(ci): remove duplicate Copilot auth metadata (openclaw#149016)
  test(agents): align auth fixtures with runtime store reads (openclaw#149004)
  improve: reduce data fetched during reminder maintenance (openclaw#148996)
  fix(cron): skip availability checks when session pruning is idle (openclaw#148920)
  fix(auth): guard GitHub Copilot device flow authority (openclaw#148999)
  fix(agents): prevent early recovery aborts of foreground exec (openclaw#148959)
  fix(github-copilot): remove retired Raptor mini (openclaw#116505)
  improve(feishu): reduce preparation work for documents with tables (openclaw#148997)
  improve: reduce database work when recording participants (openclaw#148841)
  test: accept Bun error labels in plugin assertions (openclaw#148955)
  fix(models): clarify saved account health and catalog status (openclaw#148987)
  test(plugins): align Copilot auth-choice registry expectations (openclaw#148981)
  fix(channels): reject blank integer channel add options (openclaw#145534)
  fix(ui): preserve archive undo after chat navigation (openclaw#148831)
  feat: show cited source previews in macOS and iOS chat (openclaw#148906)
  fix: avoid redundant tab updates while chats stream (openclaw#148865)
  ...

* refactor(agents): consolidate tool description exclusions

* chore: merge main for tool summary validation

* commit 'e0f58a77476acbe382bff5e55cd520e9d228d478': (1903 commits)
  refactor(matrix): reuse startup verification account key (openclaw#157310)
  perf(config): avoid repeated environment scans during publication (openclaw#156457)
  chore(i18n): refresh native locales (openclaw#157495)
  fix(update): show quiet step progress and date recorded outcomes (openclaw#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (openclaw#157454)
  test(scripts): await CLI admission fixture lifetimes (openclaw#157424)
  fix(ci): preserve consumer selection across core type stripes (openclaw#157373)
  fix(wizard): preserve typed plugin enum values (openclaw#127577) (openclaw#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (openclaw#157458)
  test: prebuild run-node signal fixture (openclaw#157478)
  refactor(exec): reuse approval policy rule keys (openclaw#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (openclaw#157365)
  fix(config): apply Gateway writes without waiting for file events (openclaw#157372)
  fix: count recorded nested tool operations once (openclaw#157438)
  fix(telegram): stop leaking raw file:// markdown links in messages (openclaw#137810)
  refactor(claws): share resource capability changes (openclaw#154680)
  improve(channels): reduce redundant preparation for button messages (openclaw#157050)
  fix(build): package preparation fails on unrelated test types (openclaw#157318)
  refactor(claws): share bounded document reading (openclaw#157436)
  ...

Co-authored-by: Vincent Koc <[email protected]>
amittell added a commit to amittell/openclaw that referenced this pull request Oct 9, 2026
Main 6b2afbf conflicted in eight files. Resolution notes:

- config-reload.ts: main moved source observation into src/config/source.ts
  (openclaw#157372) and write notifications now carry the writer's canonical reread
  (openclaw#161868). The observation tracker keys on source.observation.revision,
  the accepted-echo marker lives in config-reload-observed.ts, and the
  pending-write path records the notification's snapshot because it no
  longer rereads. config-reload-watcher.ts is removed: main dropped the
  polling resolver it held.
- snapshot.ts: runtimeConfig sits beside main's childRuntime (openclaw#157190).
- server-methods/health.ts: the capability projection wraps main's inlined
  cached-health object and its live childRuntime read.
- server-connection-state.ts: the health event projection returns main's
  { payload } projection shape.
- health.ts: the runtime-config line joins main's formatter loop.
- connect-hello.update-scope.test.ts: makeContext takes { caps, client }.
- config-reload.observation.test.ts: writes use makeWrite; the reread cases
  now drive the notification's snapshot, and the read-failure case is gone
  with the reread it covered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant