Skip to content

fix(cli): differentiate gateway-restart hint for hot-loadable agent config sets (#80722) - #80823

Merged
vincentkoc merged 6 commits into
openclaw:mainfrom
kiranmagic7:kiran/daily-community-20260512
Jun 28, 2026
Merged

fix(cli): differentiate gateway-restart hint for hot-loadable agent config sets (#80722)#80823
vincentkoc merged 6 commits into
openclaw:mainfrom
kiranmagic7:kiran/daily-community-20260512

Conversation

@kiranmagic7

@kiranmagic7 kiranmagic7 commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • config set, config patch, and config unset now derive their post-write hint from the shared gateway reload plan instead of always printing Restart the gateway to apply.
  • Hot-reloadable config paths, including agents.list.*, agents.defaults.models.*, and models.* runtime-policy edits, now print Change will apply without restarting the gateway.
  • Restart-required paths still keep Restart the gateway to apply.; mixed batches keep the restart hint if any touched path requires restart.
  • Legacy whole-agent runtime keys such as agents.list[].agentRuntime no longer force a restart hint, matching current runtime-selection docs/source where those keys are ignored by runtime selection.

Closes #80722.

Why

The old CLI success text was stale after reload metadata landed: agents.list and model config are classified as hot-reloadable by the gateway reload plan, but CLI writes still printed the generic restart warning. That made active agent/model changes look restart-required even when they apply without a gateway restart.

The earlier implementation treated legacy per-agent agentRuntime.id as load-bearing. Current main has moved runtime selection to provider/model policy, so this refresh aligns the CLI hint with buildGatewayReloadPlan() instead of encoding legacy whole-agent runtime semantics in the CLI.

Implementation

  • Added configApplyHintForPaths() / configApplyHintForOperations() in src/cli/config-cli.ts.
  • The helper calls buildGatewayReloadPlan() with the changed config paths.
  • Result mapping:
    • restartGateway: true -> Restart the gateway to apply.
    • hot reasons present -> Change will apply without restarting the gateway.
    • no hot/restart reason -> No gateway restart needed.
  • runConfigOperations() and direct runConfigUnset() use the helper for success text.
  • Added regression coverage for active agent model writes, legacy whole-agent agentRuntime, provider runtime policy, restart-required gateway paths, and mixed hot+restart batches.

Real behavior proof

  • Behavior or issue addressed: The CLI used to print Restart the gateway to apply. after hot-reloadable config writes such as active agent model updates. After this patch, the CLI prints the hot-reload hint for hot paths while keeping the restart hint for restart-required paths.
  • Real environment tested: Local OpenClaw checkout at PR head 0b18f14e4b7fa699f82eae9a98a3a6e81ca828a4, using the repository's real node scripts/run-node.mjs config command against a temporary OPENCLAW_CONFIG_PATH=/tmp/openclaw-80722.fpLUa4/openclaw.json fixture.
  • Exact steps or command run after this patch:
OPENCLAW_CONFIG_PATH=/tmp/openclaw-80722.fpLUa4/openclaw.json node scripts/run-node.mjs config set 'agents.list[0].model.primary' '"openai/gpt-5.4-mini"' --strict-json
OPENCLAW_CONFIG_PATH=/tmp/openclaw-80722.fpLUa4/openclaw.json node scripts/run-node.mjs config set 'agents.list[1].model.primary' '"openai/gpt-5.4-mini"' --strict-json
OPENCLAW_CONFIG_PATH=/tmp/openclaw-80722.fpLUa4/openclaw.json node scripts/run-node.mjs config set 'models.providers.openai.agentRuntime.id' '"pi"' --strict-json
OPENCLAW_CONFIG_PATH=/tmp/openclaw-80722.fpLUa4/openclaw.json node scripts/run-node.mjs config set 'gateway.auth.mode' 'token'
OPENCLAW_CONFIG_PATH=/tmp/openclaw-80722.fpLUa4/openclaw.json node scripts/run-node.mjs config unset 'agents.list[1].agentRuntime'
  • Evidence after fix: Copied terminal output from those live CLI commands:
Updated agents.list.0.model.primary. Change will apply without restarting the gateway.
Updated agents.list.1.model.primary. Change will apply without restarting the gateway.
Updated models.providers.openai.agentRuntime.id. Change will apply without restarting the gateway.
Updated gateway.auth.mode. Restart the gateway to apply.
Removed agents.list[1].agentRuntime. Change will apply without restarting the gateway.
  • Observed result after fix: Active-agent model writes, legacy whole-agent runtime removal, and provider runtime-policy edits now avoid the stale restart hint; the restart-required gateway auth path still prints Restart the gateway to apply..
  • What was not tested: I did not run a full long-lived gateway reload loop here; this PR only changes the CLI post-write success hint and reuses the existing gateway reload planner for the classification.

Current-head proof update (2026-06-20)

After the latest direct-unset change, I verified the broad root removals that ClawSweeper called out on head 01e96400a197.

config unset models with models.pricing.enabled present:

$ OPENCLAW_STATE_DIR=/tmp/openclaw-80823-proof-models.HdGPd1/state OPENCLAW_CONFIG_PATH=/tmp/openclaw-80823-proof-models.HdGPd1/openclaw.json OPENCLAW_NO_COLOR=1 node scripts/run-node.mjs config unset models
Removed models. Restart the gateway to apply.

config unset plugins with plugins.load.paths present:

$ OPENCLAW_STATE_DIR=/tmp/openclaw-80823-proof-plugins.gWf5XB/state OPENCLAW_CONFIG_PATH=/tmp/openclaw-80823-proof-plugins.gWf5XB/openclaw.json OPENCLAW_NO_COLOR=1 node scripts/run-node.mjs config unset plugins
Removed plugins. Restart the gateway to apply.

The first live proof attempt exposed the root cause: whole-object removals collapsed to models / plugins before reload planning, so restart-owned descendants such as models.pricing.* and plugins.load.* could be hidden. The latest patch expands whole-object add/remove diffs to their descendant paths before calling buildGatewayReloadPlan(); config write behavior is unchanged.

Verification

$ pnpm exec oxfmt --write src/cli/config-cli.ts src/cli/config-cli.test.ts --threads=1
Finished in 22ms on 2 files using 1 threads.

$ OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/config-cli.test.ts
Test Files  1 passed (1)
Tests  105 passed (105)

$ git diff --check
# exit 0

Compatibility / risk

Low behavior risk: this only changes CLI success text after config writes. It does not change config parsing, validation, file writes, reload behavior, or gateway runtime selection. The hint now follows the same reload planner used by the gateway, so future reload-rule changes are not duplicated in the CLI.

Current-head refresh, 2026-06-21

Updated this branch against current main to clear the red CI paths on head da00cc2d36be5599ef9338f95123bdd6e1eb4fe1. The PR-visible diff after the merge is still limited to:

  • src/cli/config-cli.ts
  • src/cli/config-cli.test.ts
  • src/gateway/config-reload.test.ts

Verification on head da00cc2d36be5599ef9338f95123bdd6e1eb4fe1:

node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/config-cli.test.ts
PASS: 1 file, 126 tests

node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/config-reload.test.ts
PASS: 3 files, 228 tests

node scripts/run-vitest.mjs run --config test/vitest/vitest.tooling.config.ts src/scripts/test-projects.test.ts test/scripts/openclaw-cross-os-release-checks.test.ts --reporter=verbose
PASS: 2 files, 177 tests

env NODE_OPTIONS=--max-old-space-size=8192 OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs run --config test/vitest/vitest.full-core-support-boundary.config.ts
PASS: 12 files, 97 tests

env ADDITIONAL_CHECK_GROUP=boundaries OPENCLAW_ADDITIONAL_BOUNDARY_SHARD=2/4,3/4,4/4 OPENCLAW_ADDITIONAL_BOUNDARY_CONCURRENCY=4 OPENCLAW_EXTENSION_BOUNDARY_CONCURRENCY=6 node scripts/run-additional-boundary-checks.mjs
PASS: 15/21 additional boundary checks for shard 2/4,3/4,4/4

git diff --check
PASS

Current-head repair, 2026-06-24

Addressed the reload-mode hint finding on head f0a673bf52d3bd1ea6fc936c36361973ebe66fa7.

  • CLI apply hints now resolve gateway.reload.mode from the post-write config before printing the hot-apply text.
  • gateway.reload.mode=off and gateway.reload.mode=restart keep Restart the gateway to apply. for hot-path edits, matching the gateway reload handler behavior.
  • Added focused regressions for active agent model edits under both reload modes.

Verification on head f0a673bf52d3bd1ea6fc936c36361973ebe66fa7:

node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/config-cli.test.ts
PASS: 1 file, 128 tests

node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/config-reload.test.ts
PASS: 3 files, 228 tests

git diff --check
PASS

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 12, 2026
@clawsweeper

clawsweeper Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 24, 2026, 2:20 AM ET / 06:20 UTC.

Summary
The PR changes CLI config set, patch, and unset success text plus focused tests so restart hints reflect actual changed paths, gateway reload planning, and reload mode.

PR surface: Source +122, Tests +336. Total +458 across 3 files.

Reproducibility: yes. Source inspection shows current main and v2026.6.10 still emit the generic restart hint, while the reload planner and docs classify agent/model config as hot-reloadable.

Review metrics: 2 noteworthy metrics.

  • CLI config hint command modes: 3 changed. config set, config patch, and direct config unset now share the same user-facing restart guidance decision surface.
  • Reload-mode edge coverage: 2 modes added. The PR adds focused coverage for gateway.reload.mode=off and gateway.reload.mode=restart, which are the compatibility-sensitive modes for hot-path edits.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #80722
Summary: This PR is the active candidate fix for the canonical misleading CLI restart-hint issue; adjacent reload metadata and deterministic-status items do not replace it.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] The PR intentionally changes user-facing config mutation restart guidance; if a reload rule or plugin-metadata edge is misclassified, an operator could skip or schedule a gateway restart incorrectly.

Maintainer options:

  1. Accept planner-backed CLI hints (recommended)
    Maintainers can land this after exact-head review because the PR uses actual config diffs, the shared reload planner, and reload-mode checks for the affected CLI copy.
  2. Defer to broader apply-status design
    If maintainers want machine-readable post-write apply state instead of improved human CLI copy, pause this PR and continue that product/API design in config patch should return deterministic reload/apply status #83851.

Next step before merge

  • No automated repair remains; maintainer review should decide whether to accept and land the compatibility-sensitive user-facing config guidance change.

Security
Cleared: The diff changes CLI hint selection and tests only, with no dependency, workflow, credential, permission, package, or code-execution surface added.

Review details

Best possible solution:

Land the current planner-backed CLI hint change if maintainers accept the compatibility-sensitive wording, and keep the broader deterministic apply-status contract in #83851.

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

Yes. Source inspection shows current main and v2026.6.10 still emit the generic restart hint, while the reload planner and docs classify agent/model config as hot-reloadable.

Is this the best way to solve the issue?

Yes. Reusing actual config diffs, buildGatewayReloadPlan(), and resolveGatewayReloadSettings() is the narrow maintainable fix for the CLI hint; the broader machine-readable apply-status contract belongs in #83851.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9d381d4530b9.

Label changes

Label justifications:

  • P2: This is a normal-priority CLI/operator guidance bug with limited blast radius but real restart-planning impact.
  • merge-risk: 🚨 compatibility: The PR changes existing config-write restart guidance, so maintainers should treat the operator-facing wording as compatibility-sensitive even with green CI.
  • 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 PR body includes terminal output from real CLI config commands showing improved hot, restart, and broad-unset hints; the latest reload-mode edge is covered by focused regression tests.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes terminal output from real CLI config commands showing improved hot, restart, and broad-unset hints; the latest reload-mode edge is covered by focused regression tests.
Evidence reviewed

PR surface:

Source +122, Tests +336. Total +458 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 129 7 +122
Tests 2 336 0 +336
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 465 7 +458

What I checked:

  • Repository policy applied: Root AGENTS.md was read fully, and its config/operator guidance compatibility policy applies because the PR changes user-facing config mutation guidance. (AGENTS.md:15, 9d381d4530b9)
  • Scoped gateway policy read: The scoped gateway guide was read; it affects review context for the touched gateway reload tests, though it does not create a line-level finding. (src/gateway/AGENTS.md:1, 9d381d4530b9)
  • Current main still has generic hint: Current main still prints Restart the gateway to apply. in the config set/patch success path without consulting reload planning. (src/cli/config-cli.ts:2201, 9d381d4530b9)
  • Current main direct unset still has generic hint: The direct config unset success path on current main still prints the same restart hint unconditionally. (src/cli/config-cli.ts:2417, 9d381d4530b9)
  • Latest release still has generic hint: The latest release tag v2026.6.10 still contains the same generic config mutation restart hint, so this is not shipped-fixed. (src/cli/config-cli.ts:2201, aa69b12d0086)
  • Reload planner classifies agent/model paths as hot: Current main’s reload rules mark agents.defaults.models, models, and agents.list as hot paths, which is the contract the PR reuses for CLI guidance. (src/gateway/config-reload-plan.ts:86, 9d381d4530b9)

Likely related people:

  • jalehman: Current blame on the CLI hint and reload-plan lines points to commit 5839ef5, and PR metadata shows this recent broad refactor was authored and merged by jalehman. (role: recent area contributor; confidence: medium; commits: 5839ef519a81; files: src/cli/config-cli.ts, src/gateway/config-reload-plan.ts)
  • steipete: GitHub history for the reload planner and config CLI includes multiple config/gateway reload commits by steipete, including the merged plugin hot-reload work in fix: hot reload plugin management changes #75976. (role: reload and config area contributor; confidence: high; commits: d678bcfcc7d0, c8ac4c8aeada, 09cee2224939; files: src/gateway/config-reload-plan.ts, src/cli/config-cli.ts, docs/gateway/configuration.md)
  • vincentkoc: Recent GitHub path history shows vincentkoc touching both config CLI and gateway reload helper files around the same config/reload surface. (role: recent area contributor; confidence: medium; commits: a3ae453a1ac2, d7d4852e5e34, a682e6481382; files: src/cli/config-cli.ts, src/gateway/config-reload-plan.ts)
  • giodl73-repo: History links giodl73-repo to direct config unset and patch mutation behavior that this PR now routes through the shared hint helper. (role: adjacent config mutation contributor; confidence: medium; commits: 489cab2738df, 0dc8552cb3ff, 13c2e245aa80; files: src/cli/config-cli.ts, src/cli/config-cli.test.ts)
  • LLagoon3: Merged PR 81612 added reloadKind lookup metadata for the adjacent schema issue, which is related context but not this CLI post-write hint fix. (role: adjacent reload-metadata contributor; confidence: medium; commits: 35cd2af159f4; files: src/config/schema.ts, src/gateway/config-reload-plan.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 12, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label May 27, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels May 27, 2026
@clawsweeper

clawsweeper Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg: 🔥 warming; proof passed, review follow-up or readiness checks remain. Hatch with @clawsweeper hatch when eligible.

Rules and details

Hatchability:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

About:

  • Eggs appear after real-behavior proof passes. They are collectible flavor only.
  • Review momentum changes the shell state: follow-up work warms it, re-review makes it wobble, and a clean final review lets it hatch.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@kiranmagic7
kiranmagic7 force-pushed the kiran/daily-community-20260512 branch from 8389d28 to 0b18f14 Compare May 27, 2026 07:48
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. proof: supplied External PR includes structured after-fix real behavior proof. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 27, 2026
@kiranmagic7

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updated the PR to address the stale legacy runtime finding:

  • the CLI hint now delegates to buildGatewayReloadPlan() instead of a duplicated restart classifier
  • legacy whole-agent agents.list[].agentRuntime no longer forces a restart hint
  • provider/model runtime-policy paths and restart-required gateway paths have focused tests
  • the PR body now has a dedicated Real behavior proof section, and the latest proof gate passed on head 0b18f14e4b7fa699f82eae9a98a3a6e81ca828a4

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: msteams Channel integration: msteams app: web-ui App: web-ui extensions: diagnostics-otel Extension: diagnostics-otel scripts Repository scripts commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling labels Jun 18, 2026
@kiranmagic7

kiranmagic7 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Updated against current main to clear the merge conflict. New head: 45d174541e07da8872928483aae79065a95b2abd.

Conflict resolution was limited to src/cli/config-cli.ts: kept upstream current globals import including warn, and preserved the buildGatewayReloadPlan()-based CLI apply hints.

Local verification on the merge head:

node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/config-cli.test.ts
PASS: 1 file, 122 tests

node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/config-reload.test.ts
PASS: 3 files, 264 tests

git diff --check
PASS

GitHub checks are running on the new head.

@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Narrowed the branch to the intended CLI/gateway reload-hint diff. New head: 6dd22f79f7586ac00b906d35a7e4c1afeec72790.

This drops CHANGELOG.md and the unrelated formatting/import-order churn. The live PR diff now contains only:

  • src/cli/config-cli.ts
  • src/cli/config-cli.test.ts
  • src/gateway/config-reload.test.ts

Local verification on the narrowed head:

node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/config-cli.test.ts
PASS: 1 file, 122 tests

node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/config-reload.test.ts
PASS: 3 files, 225 tests

git diff --check 6dd22f79f7586ac00b906d35a7e4c1afeec72790^ 6dd22f79f7586ac00b906d35a7e4c1afeec72790
PASS

GitHub checks at last poll had the previously failing branch-scope checks green: Scan changed paths (precise) and security-fast passed, with no failing checks visible. One startup-health shard was still pending.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Addressed the changed-path planning blocker on head 9834d50091a0784238aa2fbf4f2baaf2b24058eb.

What changed:

  • CLI apply hints now diff the before/after config snapshots and feed the actual changed paths into the gateway reload planner.
  • Array-root diffs map back to the requested descendant path, so leaf updates such as agents.list[1].model.primary still get the hot-reload hint.
  • Broad models and plugins writes now keep the restart hint when the actual nested changes touch models.pricing.* or plugins.load.*.

Verification:

node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/config-cli.test.ts
PASS: 1 file, 124 tests

node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/config-reload.test.ts
PASS: 3 files, 225 tests

git diff --check HEAD^ HEAD
PASS

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@kiranmagic7

kiranmagic7 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the direct config unset reload-hint gap on head 1b07eb76df6c4daf0e440086af4eb578e001f7f1.

Changes made:

  • Direct config unset now derives the success hint from actual before/after changed paths, matching the set/patch path.
  • Added regressions for broad config unset models and config unset plugins when those removals include restart-owned nested paths under models.pricing.* or plugins.load.*.

Verification:

node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/config-cli.test.ts
PASS: 1 file, 126 tests

node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/config-reload.test.ts
PASS: 3 files, 225 tests

git diff --check
PASS

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Addressed the current-head proof gap on head 01e96400a197d8efcece3ba509d18c4e3a48a4ae.

What changed:

  • Whole-object add/remove diffs now expand to descendant config paths before calling buildGatewayReloadPlan().
  • This keeps broad config unset models and config unset plugins restart-backed when the removed config includes restart-owned descendants such as models.pricing.* or plugins.load.*.
  • Config write behavior is unchanged; this only affects post-write hint planning.

Current-head live CLI proof added to the PR body:

$ OPENCLAW_STATE_DIR=/tmp/openclaw-80823-proof-models.HdGPd1/state OPENCLAW_CONFIG_PATH=/tmp/openclaw-80823-proof-models.HdGPd1/openclaw.json OPENCLAW_NO_COLOR=1 node scripts/run-node.mjs config unset models
Removed models. Restart the gateway to apply.

$ OPENCLAW_STATE_DIR=/tmp/openclaw-80823-proof-plugins.gWf5XB/state OPENCLAW_CONFIG_PATH=/tmp/openclaw-80823-proof-plugins.gWf5XB/openclaw.json OPENCLAW_NO_COLOR=1 node scripts/run-node.mjs config unset plugins
Removed plugins. Restart the gateway to apply.

Verification:

node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/config-cli.test.ts
PASS: 1 file, 126 tests

node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/config-reload.test.ts
PASS: 3 files, 225 tests

git diff --check
PASS

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Updated this branch against current main to clear the red CI paths. New head: da00cc2d36be5599ef9338f95123bdd6e1eb4fe1.

The PR-visible diff after the merge is still limited to the config-hint implementation and focused CLI/gateway tests:

  • src/cli/config-cli.ts
  • src/cli/config-cli.test.ts
  • src/gateway/config-reload.test.ts

Current-head verification added to the PR body:

node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/config-cli.test.ts
PASS: 1 file, 126 tests

node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/config-reload.test.ts
PASS: 3 files, 228 tests

node scripts/run-vitest.mjs run --config test/vitest/vitest.tooling.config.ts src/scripts/test-projects.test.ts test/scripts/openclaw-cross-os-release-checks.test.ts --reporter=verbose
PASS: 2 files, 177 tests

env NODE_OPTIONS=--max-old-space-size=8192 OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs run --config test/vitest/vitest.full-core-support-boundary.config.ts
PASS: 12 files, 97 tests

env ADDITIONAL_CHECK_GROUP=boundaries OPENCLAW_ADDITIONAL_BOUNDARY_SHARD=2/4,3/4,4/4 OPENCLAW_ADDITIONAL_BOUNDARY_CONCURRENCY=4 OPENCLAW_EXTENSION_BOUNDARY_CONCURRENCY=6 node scripts/run-additional-boundary-checks.mjs
PASS: 15/21 additional boundary checks for shard 2/4,3/4,4/4

git diff --check
PASS

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Addressed the reload-mode hint finding on head f0a673bf52d3bd1ea6fc936c36361973ebe66fa7.

What changed:

  • CLI apply hints now resolve gateway.reload.mode from the post-write config before printing the hot-apply text.
  • gateway.reload.mode=off and gateway.reload.mode=restart keep Restart the gateway to apply. for hot-path edits.
  • Added focused regressions for active agent model edits under both reload modes.

Verification:

node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/config-cli.test.ts
PASS: 1 file, 128 tests

node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/config-reload.test.ts
PASS: 3 files, 228 tests

git diff --check
PASS

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Status check on current head f0a673bf52d3bd1ea6fc936c36361973ebe66fa7: REST reports mergeable/clean. The check rollup shows 73 successes, 61 skipped, 6 cancelled proof/auto-response reruns, 1 neutral, and no failure or pending states. Labels remain proof: sufficient and status: ready for maintainer look.

Review focus: the CLI apply hint should keep restart guidance when gateway.reload.mode is off or restart, while preserving hot-apply guidance only for hot-loadable config sets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes 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. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

config set "Restart the gateway to apply" warning is misleading for active agents without agentRuntime override

3 participants

Sponsor
SponsoredKunjungi sekarang
Promo