Repository navigation
fix(update): report scheduler policy before discovery - #158301
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 25, 2026, 4:07 PM ET / 20:07 UTC. ClawSweeper reviewWhat this changesThe branch makes Gateway update status report configured automatic-update policy before installation discovery, preserves live campaign facts, and adds documentation and regression tests. Merge readiness⛔ Blocked before merge - 2 items remain Current main can omit the scheduler policy before discovery, and this PR remains a focused fix for the linked open issue. Source review found no discrete patch defect. Priority: P1 Review scores
Verification
How this fits togetherThe Gateway update status request combines configuration, run history, installation discovery, and the live update campaign into a response for operators. An external update guard also uses that response when assessing a managed update. flowchart LR
ConfiguredPolicy[Configured update policy] --> Status[Gateway update status]
InstallDiscovery[Optional install discovery] --> Status
RunHistory[Update run history] --> Status
LiveCampaign[Live update campaign] --> Status
Status --> Operators[Operator clients]
Status --> UpdateGuard[Managed update guard]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +58, Tests +256, Docs +6. Total +320 across 9 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the read-only status projection in the existing Gateway owner and verify that a published updater accepts a candidate reporting disabled automatic updates while active campaigns remain visible. Do we have a high-confidence way to reproduce the issue? Yes. Query update.status with a configured dev channel and disabled automatic updates before the schedule cache fills; current-main source returns only the cache, and the linked issue records that live failure. I did not execute the Gateway in this read-only review. Is this the best way to solve the issue? Yes. The PR derives policy at the existing status owner and retains the campaign controller as the source of live campaign facts; a candidate upgrade trace remains the proof gap. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4368865c48b5. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer review: the completed review reports no source or security findings. I accept the documented live-upgrade evidence gap for this incident under the maintainer's explicit instruction to proceed without waiting for CI or additional broad validation. No after-fix deployed-candidate acceptance is claimed here. The installed driver and acceptance predicate are unchanged. The focused handler/controller regressions demonstrate explicit disabled policy, enabled-policy and active-campaign negative controls, current configuration after asynchronous reads, and correlated campaign metadata. The actual deployment remains subject to its native backup, recovery, and final acceptance checks. |
|
Merged via squash auto-merge.
|
Remove a test-only config cache-reset wrapper, duplicate internal selection and channel-support checks, an unused session-file metadata fallback, and duplicate usage target shapes. Carry transcript delivery facts from their first parsing pass. Keep all network validation, effect authority, transcript durability, current update policy and standalone session memory machinery. Best-effort tradeoffs accepted: - Internal agent updates trust the selection-shape check at their sole production caller, agents.update. The duplicate originated in the Models agent-selection feature #150224; the same boundary check still rejects invalid user input. Live runtime choice validation stays at the effect. - Channel start support is checked once at the synchronous request boundary. The inner check from #67815 / #167159 cannot observe a different plugin without unsupported synchronous mutation; the boundary guard remains. - Workspace-root readers require caller-prepared metadata: both production consumers already provide it. The unused fallback from #161747 is deleted, not the Phase E backend or any factory. A future invalid internal caller gets a clear error instead of starting another metadata read. - Update handlers trust the required getRuntimeConfig contract instead of falling back to a global schedule for an invalid context. Keep #158301's real scheduler-policy incident fix and its post-await current-config read. - Usage summaries trust the canonical required target identity from #169660; the first-instance fallback served no production caller. The integration fixture now supplies that identity with all original assertions retained. No public schema/config/SDK/protocol or persisted shape changes. The config tests call the same canonical invalidators directly; no coverage is removed. Follow-up removes 54 net production lines; branch total removes 154. Targeted types (including MCP consumers), retained-file type-aware lint, formatting, zero runtime import cycles, suppression audit and independent P2 review pass. Gateway behavioral suites remain incomplete after a loaded-host startup run was stopped at about ten minutes (exit 143). The prior full static-graph gap remains pending for the coordinator bundle; no new production edge is added.
…-5 bundle A) (#172989) * refactor(ui): remove unused page plumbing and duplicate presentation work Fold sole-caller Config and Cron adapters into their existing owners, reuse canonical controller types, and remove unused request arguments and login selection options. Adopt the complete background mutation receipt instead of rereading the write; keep authoritative preflight and live ownership checks. Best-effort tradeoffs accepted: a later background edit in another browser is reflected by normal preference events or refresh, not an unconditional read of our own successful write. The introducing feature PR #168301 does not identify a human incident requiring that reread. Settled rendering and public contracts are unchanged; both shipping renderer paths remain intact. * refactor(ui): consolidate presentation helpers and cached preview inputs Share point-menu trigger attributes and deletion-first LCS traversal. Remove an obsolete empty-badge predicate, a one-caller loading facade, and redundant whole-map translation fallback. Preserve both active Lit and Solid paths, positioning formulas, diff work budgets, visible text, and rendering. Best-effort tradeoffs accepted: - Trust successful synchronous Web Storage writes instead of reading them back. Introducing PR #162428 supplied synthetic storage failures, not a human incident where successful setItem silently failed. Nonconforming Storage replacements may miss a cache publication until the next refresh. - Trust immutable message/tool-card identities for cached source previews. PR #148431's in-place mutation assertions were synthetic; production owners publish replacement snapshots. Unsupported in-place mutation may leave a decoration stale until replacement. Run/frame/origin and external source validation remain unchanged. Net production reduction: 76 lines; tests: 20 lines removed, only synthetic same-object mutation assertions. Kept config coercion tied to human Safari report #13348, along with security, durability, ordinary navigation ownership, and all active migration paths. Focused proof: 73 boot/cache/diff tests, 82 menu tests, 46 badge/assistant tests, 20 i18n tests, 8 browser details tests, 3 lint-suppression tests; UI typecheck, formatting, stylesheet lint and CSS declaration parity passed. Known inherited local check failure: environment-variable count is 455 against budget 454, independently reproduced against clean HEAD/index. Its counted source roots exclude UI. No budget or unrelated source changes made. * refactor(ui): remove obsolete presentation compatibility and styling Use the native Popover capability required by the Control UI bootstrap instead of retaining old-engine in-flow fallbacks. Keep native overlay occlusion and all real connection/navigation ownership. Remove retired sidebar style hooks and share identical question-panel declarations. Supported browsers render identically; no user-visible copy, feature, renderer selection, config, protocol, or storage change. Best-effort tradeoffs accepted - Old engines without Popover support, or invalid direct popover mounts, no longer receive an in-flow menu fallback. The fallback came from #105598 as generic compatibility, not a human incident; #168595 made native Popover support a required bootstrap capability. Invalid direct mounts now fail clearly rather than silently changing layering. Deeper coverage and retained candidates are recorded in the requested task-local y03 ledger for coordinator bundling. Branch total: 123 net production LOC removed (+114/-237), excluding tests, fixtures, generated files and declarations. Below the 500-line campaign floor after the deeper components/app/lib/styles and lead-owned owner pass; push branch-only for bundling. * refactor(gateway): reuse server method owners Consolidate duplicate catalog response handling, optional catalog reads, pairing resolution, requester assertions and system agent transcript persistence. Carry prepared pairing and actor facts instead of probing or re-reading them. Remove redundant cache-generation and internal receipt checks; retain security, durability, pagination and resource bounds. Best-effort tradeoffs accepted: - Pairing captures its selected adapter once. Repeated internal checks added by #112401 guarded hypothetical in-place plugin mutation, not a reported incident. Such a mutation now leaves this request on its selected adapter; later requests discover the current registration. - Channel identity RPCs trust the canonical mutation result instead of repeating the action/kind assertion introduced in #161284. No human incident justified the redundant adapter assertion; live mutation authority remains with the state owner. No user-facing feature, protocol/config/persistence shape, schema, dependency, test coverage or standalone session memory backend changes. Net production reduction: 100 lines (179 added / 279 deleted). Type-aware lint, targeted production types, formatting, runtime cycles (zero), SDK surface, suppression audit and independent P2 review pass. Gateway focused suites and the full static import graph remain incomplete on the loaded host; retain these proof gaps for the coordinator bundle rather than claiming green. * refactor(gateway): trust prepared server method inputs Remove a test-only config cache-reset wrapper, duplicate internal selection and channel-support checks, an unused session-file metadata fallback, and duplicate usage target shapes. Carry transcript delivery facts from their first parsing pass. Keep all network validation, effect authority, transcript durability, current update policy and standalone session memory machinery. Best-effort tradeoffs accepted: - Internal agent updates trust the selection-shape check at their sole production caller, agents.update. The duplicate originated in the Models agent-selection feature #150224; the same boundary check still rejects invalid user input. Live runtime choice validation stays at the effect. - Channel start support is checked once at the synchronous request boundary. The inner check from #67815 / #167159 cannot observe a different plugin without unsupported synchronous mutation; the boundary guard remains. - Workspace-root readers require caller-prepared metadata: both production consumers already provide it. The unused fallback from #161747 is deleted, not the Phase E backend or any factory. A future invalid internal caller gets a clear error instead of starting another metadata read. - Update handlers trust the required getRuntimeConfig contract instead of falling back to a global schedule for an invalid context. Keep #158301's real scheduler-policy incident fix and its post-await current-config read. - Usage summaries trust the canonical required target identity from #169660; the first-instance fallback served no production caller. The integration fixture now supplies that identity with all original assertions retained. No public schema/config/SDK/protocol or persisted shape changes. The config tests call the same canonical invalidators directly; no coverage is removed. Follow-up removes 54 net production lines; branch total removes 154. Targeted types (including MCP consumers), retained-file type-aware lint, formatting, zero runtime import cycles, suppression audit and independent P2 review pass. Gateway behavioral suites remain incomplete after a loaded-host startup run was stopped at about ten minutes (exit 143). The prior full static-graph gap remains pending for the coordinator bundle; no new production edge is added. * refactor(ui): consolidate page lifecycle and config plumbing Reuse the existing controller host, subscription and plugin-icon owners; share cloud-worker config edit wiring and Usage query comparisons. Remove the unused Usage detail predicate and duplicate model loading flag. Retire the Web Awesome-era picker hiding fence now that native Popover owns generation-bound close completion. Keep both rendering paths, draft recovery, user-intent checks and dispatch-time write authority. Settled rendering is unchanged. Net production reduction: 210 lines. Best-effort tradeoffs accepted: - Failed channel artwork retries on the next channel refresh rather than a queued trailing ensure. #131511 was a synthetic ordering regression; the human-reported owning-plugin bug #144152 remains covered. - Picker triggers may reopen during closing. #126032's fence came from CI/synthetic overlap, not a human incident; #171441 transferred lifecycle ownership to native Popover, which ignores superseded completions. Focused proof: 281 tests passed, including Chromium/WebKit overlay lifecycle and responsive placement controls. Independent P0-P2 review: scoped-clean. Final UI production and UI-pages test typechecks passed; suppression tests 3/3. Scoped lint passed after a mechanical no-lonely-if fix. Runtime and static import cycles: zero. No visual or locale changes. The global environment-name budget is inherited at 455/454 on both the untouched base and origin/main; none of its counted source roots changed. * refactor(ui): remove unused new-session hiding selector * refactor(gateway): retain legacy catalog and update handler contracts Withdraw two wave-5 cleanups after focused CI failures and bounded isolated replay. Preserve the existing scalar-read concurrency and update-status handler contract. Tighten task-suggestions assertion allowance to match the cleaned source.
…-5 bundle A) (openclaw#172989) * refactor(ui): remove unused page plumbing and duplicate presentation work Fold sole-caller Config and Cron adapters into their existing owners, reuse canonical controller types, and remove unused request arguments and login selection options. Adopt the complete background mutation receipt instead of rereading the write; keep authoritative preflight and live ownership checks. Best-effort tradeoffs accepted: a later background edit in another browser is reflected by normal preference events or refresh, not an unconditional read of our own successful write. The introducing feature PR openclaw#168301 does not identify a human incident requiring that reread. Settled rendering and public contracts are unchanged; both shipping renderer paths remain intact. * refactor(ui): consolidate presentation helpers and cached preview inputs Share point-menu trigger attributes and deletion-first LCS traversal. Remove an obsolete empty-badge predicate, a one-caller loading facade, and redundant whole-map translation fallback. Preserve both active Lit and Solid paths, positioning formulas, diff work budgets, visible text, and rendering. Best-effort tradeoffs accepted: - Trust successful synchronous Web Storage writes instead of reading them back. Introducing PR openclaw#162428 supplied synthetic storage failures, not a human incident where successful setItem silently failed. Nonconforming Storage replacements may miss a cache publication until the next refresh. - Trust immutable message/tool-card identities for cached source previews. PR openclaw#148431's in-place mutation assertions were synthetic; production owners publish replacement snapshots. Unsupported in-place mutation may leave a decoration stale until replacement. Run/frame/origin and external source validation remain unchanged. Net production reduction: 76 lines; tests: 20 lines removed, only synthetic same-object mutation assertions. Kept config coercion tied to human Safari report openclaw#13348, along with security, durability, ordinary navigation ownership, and all active migration paths. Focused proof: 73 boot/cache/diff tests, 82 menu tests, 46 badge/assistant tests, 20 i18n tests, 8 browser details tests, 3 lint-suppression tests; UI typecheck, formatting, stylesheet lint and CSS declaration parity passed. Known inherited local check failure: environment-variable count is 455 against budget 454, independently reproduced against clean HEAD/index. Its counted source roots exclude UI. No budget or unrelated source changes made. * refactor(ui): remove obsolete presentation compatibility and styling Use the native Popover capability required by the Control UI bootstrap instead of retaining old-engine in-flow fallbacks. Keep native overlay occlusion and all real connection/navigation ownership. Remove retired sidebar style hooks and share identical question-panel declarations. Supported browsers render identically; no user-visible copy, feature, renderer selection, config, protocol, or storage change. Best-effort tradeoffs accepted - Old engines without Popover support, or invalid direct popover mounts, no longer receive an in-flow menu fallback. The fallback came from openclaw#105598 as generic compatibility, not a human incident; openclaw#168595 made native Popover support a required bootstrap capability. Invalid direct mounts now fail clearly rather than silently changing layering. Deeper coverage and retained candidates are recorded in the requested task-local y03 ledger for coordinator bundling. Branch total: 123 net production LOC removed (+114/-237), excluding tests, fixtures, generated files and declarations. Below the 500-line campaign floor after the deeper components/app/lib/styles and lead-owned owner pass; push branch-only for bundling. * refactor(gateway): reuse server method owners Consolidate duplicate catalog response handling, optional catalog reads, pairing resolution, requester assertions and system agent transcript persistence. Carry prepared pairing and actor facts instead of probing or re-reading them. Remove redundant cache-generation and internal receipt checks; retain security, durability, pagination and resource bounds. Best-effort tradeoffs accepted: - Pairing captures its selected adapter once. Repeated internal checks added by openclaw#112401 guarded hypothetical in-place plugin mutation, not a reported incident. Such a mutation now leaves this request on its selected adapter; later requests discover the current registration. - Channel identity RPCs trust the canonical mutation result instead of repeating the action/kind assertion introduced in openclaw#161284. No human incident justified the redundant adapter assertion; live mutation authority remains with the state owner. No user-facing feature, protocol/config/persistence shape, schema, dependency, test coverage or standalone session memory backend changes. Net production reduction: 100 lines (179 added / 279 deleted). Type-aware lint, targeted production types, formatting, runtime cycles (zero), SDK surface, suppression audit and independent P2 review pass. Gateway focused suites and the full static import graph remain incomplete on the loaded host; retain these proof gaps for the coordinator bundle rather than claiming green. * refactor(gateway): trust prepared server method inputs Remove a test-only config cache-reset wrapper, duplicate internal selection and channel-support checks, an unused session-file metadata fallback, and duplicate usage target shapes. Carry transcript delivery facts from their first parsing pass. Keep all network validation, effect authority, transcript durability, current update policy and standalone session memory machinery. Best-effort tradeoffs accepted: - Internal agent updates trust the selection-shape check at their sole production caller, agents.update. The duplicate originated in the Models agent-selection feature openclaw#150224; the same boundary check still rejects invalid user input. Live runtime choice validation stays at the effect. - Channel start support is checked once at the synchronous request boundary. The inner check from openclaw#67815 / openclaw#167159 cannot observe a different plugin without unsupported synchronous mutation; the boundary guard remains. - Workspace-root readers require caller-prepared metadata: both production consumers already provide it. The unused fallback from openclaw#161747 is deleted, not the Phase E backend or any factory. A future invalid internal caller gets a clear error instead of starting another metadata read. - Update handlers trust the required getRuntimeConfig contract instead of falling back to a global schedule for an invalid context. Keep openclaw#158301's real scheduler-policy incident fix and its post-await current-config read. - Usage summaries trust the canonical required target identity from openclaw#169660; the first-instance fallback served no production caller. The integration fixture now supplies that identity with all original assertions retained. No public schema/config/SDK/protocol or persisted shape changes. The config tests call the same canonical invalidators directly; no coverage is removed. Follow-up removes 54 net production lines; branch total removes 154. Targeted types (including MCP consumers), retained-file type-aware lint, formatting, zero runtime import cycles, suppression audit and independent P2 review pass. Gateway behavioral suites remain incomplete after a loaded-host startup run was stopped at about ten minutes (exit 143). The prior full static-graph gap remains pending for the coordinator bundle; no new production edge is added. * refactor(ui): consolidate page lifecycle and config plumbing Reuse the existing controller host, subscription and plugin-icon owners; share cloud-worker config edit wiring and Usage query comparisons. Remove the unused Usage detail predicate and duplicate model loading flag. Retire the Web Awesome-era picker hiding fence now that native Popover owns generation-bound close completion. Keep both rendering paths, draft recovery, user-intent checks and dispatch-time write authority. Settled rendering is unchanged. Net production reduction: 210 lines. Best-effort tradeoffs accepted: - Failed channel artwork retries on the next channel refresh rather than a queued trailing ensure. openclaw#131511 was a synthetic ordering regression; the human-reported owning-plugin bug openclaw#144152 remains covered. - Picker triggers may reopen during closing. openclaw#126032's fence came from CI/synthetic overlap, not a human incident; openclaw#171441 transferred lifecycle ownership to native Popover, which ignores superseded completions. Focused proof: 281 tests passed, including Chromium/WebKit overlay lifecycle and responsive placement controls. Independent P0-P2 review: scoped-clean. Final UI production and UI-pages test typechecks passed; suppression tests 3/3. Scoped lint passed after a mechanical no-lonely-if fix. Runtime and static import cycles: zero. No visual or locale changes. The global environment-name budget is inherited at 455/454 on both the untouched base and origin/main; none of its counted source roots changed. * refactor(ui): remove unused new-session hiding selector * refactor(gateway): retain legacy catalog and update handler contracts Withdraw two wave-5 cleanups after focused CI failures and bounded isolated replay. Preserve the existing scalar-read concurrency and update-status handler contract. Tighten task-suggestions assertion allowance to match the cleaned source.
Closes #158293
What Problem This Solves
Fixes missing scheduler policy in
update.statuswhen startup discovery has not completed or fails, which can prevent a managed update from being accepted even when automatic updates are disabled.User Impact
Operators can read current update policy immediately without a checkout refresh. Active campaigns remain visible with their admitted channel and target. No configuration, schema, permissions, or deployment acceptance rules change.
Why This Change Was Made
Scheduler policy and live campaign state are known independently of optional installation discovery. The status owner now projects those facts after awaited history work and rechecks configuration after identity discovery. Unknown channel identity stays unknown, and an old channel's cached target is discarded once its campaign settles.
The metadata projection and checkout refresh share a focused module. A refresh may enrich a matching campaign's same-channel discovery, but cannot replace its metadata with another channel's facts. The existing updater and lifecycle owners retain scheduling, campaign reconciliation, and deployment authority.
Evidence
git diff --checkpassed. Final isolated review found no actionable P0–P2 issues.The maintainer explicitly waived waiting for CI for the incident update. Focused correctness proof and source review are complete; a full changed gate and full CI run are not claimed as passing.