Repository navigation
fix(ci): catch generated SQLite fixture regressions before merge - #158409
Merged
Merged
Conversation
Contributor
|
🦞👀 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. |
RomneyDa
enabled auto-merge (squash)
September 25, 2026 22:37
RomneyDa
force-pushed
the
fix/ci-generated-sqlite-fixture-coverage
branch
from
September 25, 2026 22:53
dcc7bc7 to
dba58ef
Compare
steipete
added a commit
to DonnieFi/openclaw
that referenced
this pull request
Sep 26, 2026
Replace the provisional physical-thread metadata with the logical-host fixture contract from merged openclaw#158209. Preserve every cleanup assertion and the forbidden Worker constructor. Carry merged openclaw#158409's literal dependency resolvers, caller update and selection regression. Exact canonical postimages, the ordered cleanup case, dependency-selection case, selected checks and independent review pass.
steipete
added a commit
that referenced
this pull request
Sep 26, 2026
Keep verified Node and legacy diagnostics visible while offering read-only Scheduled Task inspection in Doctor and deep status. Preserve the existing service cleanup owners and diagnostic JSON shape. Carry the canonical SQLite fixture host-context and dependency-selection repairs from #158209 and #158409 for the inherited CI collection failure.
This was referenced Sep 26, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Sep 26, 2026
steipete
added a commit
that referenced
this pull request
Sep 27, 2026
* fix(daemon): inspect registered Gateway services accurately Read strict Windows service commands from registered actions and preserve supported launcher encodings without treating dynamic CMD expansion as a verified command. Retain exact task identity and bound systemd selection. Use one platform inventory collector for the existing full and diagnostic projections. Report incomplete inspection through Doctor while preserving status JSON and the existing managed-service filters. Keep load-state inspection behind a leaf capability instead of reverse facade imports. Refs #151608, #151463. * fix(daemon): classify service commands by position Share runtime and root-option parsing so Node display names and profile values cannot classify a Node service as a Gateway. Preserve literal shell, env and generated launchd wrappers, and honor the executable selected by launchd. Read systemd's single-quoted arguments through the existing parser and preserve literal apostrophes when rendering. Keep strict Windows command rejection separate from lenient diagnostics, and align the native-boundary fixtures with that contract without weakening ownership or source-preservation assertions. * fix(daemon): inspect direct registered task actions Read literal executable actions from their registered Scheduled Task and revalidate the action before returning command facts. Strict runtime inspection uses the same registered command instead of a default launcher. Keep executable paths out of managed launcher provenance. Direct actions remain outside automatic update service management when no restorable CMD/VBS launcher exists, preserving the prior stop and definition ownership boundary. * test(windows): prove installed service upgrade paths Extend the existing native Scheduled Task proof with verified immutable package handoff and fixed fresh, published 2026.9.3, and published 2026.9.4 CLI cells. Require live version/build identity, selected PID replacement, peer continuity, strict registered-action inspection, and settled cleanup before evidence publication and disposable installation retirement. Keep source-only and repair modes, permissions, deadlines, and native lifecycle owners intact. Direct executable fixtures remain disabled and preserve the updater's unsupported-mutation boundary. Native execution remains pending. * test(doctor): retain managed Windows launcher provenance Keep the generated CMD path on the existing managed-service fixture before and after reinstall so Doctor admission sees the installation it models. Preserve all stop, install, restart, rollback, and direct-action refusal expectations without changing production behavior. * test(windows): exercise native autostart ownership boundaries Extend the existing published-updater cell with its stopped, task-owned Scheduled Task. Capture real admission, exercise native enable/disable, and preserve the definition and files after foreign-owner refusal. Test retained admission separately from restoration so legitimate same-root refresh remains supported. Restore the original XML through the existing fixture lifetime; do not broaden product control or workflow permissions. Modeled owner tests, selected source checks, and independent review pass. Actual Windows execution remains required before a native proof claim. * test(windows): retain sanitized installed command failures Keep unexpected command stdout and stderr in bounded failure diagnostics so JSON-mode CLI errors survive native proof failures. Reuse the existing terminal and support redaction owners before clipping; withhold incomplete captures while preserving the existing truncation failure. Move the existing command runner into its own test-support module and update both consumers without changing timeout, exit, signal, or cleanup semantics. Real-child regressions reproduce both privacy defects and pass with the correction. The original installed Gateway failure remains undiagnosed. * fix(daemon): preserve Windows probe budgets and Doctor cleanup eligibility Use the existing cold PowerShell startup budget for Task Scheduler queries without an explicit deadline. Keep periodic activation checks bounded and preserve unknown results rather than treating timeouts as task absence. The native probe test now exercises the production default. Share Doctor's existing legacy cleanup classification with its registered preview. Keep unsupported platforms, scopes and unrecognized Linux unit names as findings without advertising removal or invoking unrelated cleanup. Extract the classifier and complete cleanup test group without dropping assertions or changing native mutation ownership. Retain the failed installed Windows runs and their source identities; new package and native upgrade qualification remain separate requirements. * chore(daemon): retire stale Doctor size baseline The split Doctor service module no longer needs a max-lines suppression. Remove only its stale baseline entry so the shrink-only ratchet matches actual source. Product, dependency, workflow and fixture bytes are unchanged. * test(windows): retain sanitized service proof observations Record bounded install and status facts before semantic assertions so a successful CLI exit cannot hide the native inspection reason. Exclude free-form stderr and private response fields, and preserve existing execution, deadline, and cleanup assertions. * fix(windows): preserve native status inspection defaults Keep the CLI RPC default distinct from an explicit timeout so Windows service inspection can use its existing cold-start budget. Forward explicit load-query deadlines through the Task Scheduler owner while preserving lifecycle defaults and timeout diagnostics. * fix(models): retain discovered models after refresh failures Record successful legacy catalog results at the producer boundary so unavailable refreshes retain the accepted inventory. Preserve explicit outcomes, advisory SDK fallback behavior, and first-discovery starter policy. * fix(models): preserve skipped catalog outcome semantics Mark bundled static, configured, and advisory catalog projections with explicit empty outcomes so legacy success inference cannot promote them to observed account inventory. Preserve live outcomes and helper types. Keep exact auth provenance histories and move existing fixture/policy code into focused owners where required by the line-cap ratchet. Validation: 447 producer and sibling cases, 56 shared self-hosted cases, 95 auth/policy cases, causal missing-outcome failures, maintained checks, and independent review. * test(plugin-sdk): keep discovery loader types acyclic Move the shared loader type into a leaf consumed by both discovery contract helpers. Preserve its public provider-test-contracts export without a child-to-parent type import cycle. Validation: maintained Madge check reports zero cycles; core, all core test graphs, extension test types, lint, formatting and independent review pass. Runtime behavior and previous catalog proof are unchanged. * fix(plugin-sdk): mark generated static catalogs explicitly Keep the generated non-live, non-strict catalog adapter from claiming successful acquisition for manifest or configured rows. Preserve null, errors, strict and custom callbacks, static catalogs, and public types. Validation: three existing controls fail before the correction; all49 owner and sibling cases pass afterward, with types, lint, line caps and fresh independent review clean. * test(windows): handle omitted scheduled task settings * test(windows): preserve native context and failure evidence * test(daemon): wait for installed gateway readiness before inspection * test(daemon): stop installed fixtures through their profiled CLI * fix(daemon): inspect extra Windows services before removal Keep verified Node and legacy diagnostics visible while offering read-only Scheduled Task inspection in Doctor and deep status. Preserve the existing service cleanup owners and diagnostic JSON shape. Carry the canonical SQLite fixture host-context and dependency-selection repairs from #158209 and #158409 for the inherited CI collection failure. * fix: restore asynchronous harness task completion Complete the shared task-content projection cutover for asynchronous finalization and delivery. Preserve the captured Incognito policy and exact task-assignment fences. The unchanged worker suite reproduced six ReferenceError failures before the fix and passes all seven cases afterward; the sibling SDK runtime suite passes all 30 cases. Independent review is clean through P2. * test(windows): budget installed service phases and retain progress * test(windows): retain failed installed update progress Read failed published-updater progress through the existing asynchronous SQLite owner before native cleanup. Retain only safe phase, status and step timings; preserve all command, body and teardown deadlines. Validation: five installed-fixture tests, services types, targeted changed checks and independent review through P2 passed. Shared diagnostic implementation qualified in the Windows fixture owner. * fix(daemon): bound aggregate Windows service inventory Carry one monotonic deadline through Scheduler discovery, launcher reads, registration revalidation, and missing-launcher metadata. Preserve completed findings and report incomplete inventory when the shared budget is exhausted. * fix(daemon): classify registered helpers without profile admission Let read-only registered inventory classify faithfully revalidated commands without requiring an OpenClaw profile. Keep selected-service profile admission strict and preserve launcher, Task, script and deadline checks. Native disabled-discovery exposed a false warning for a static node --version helper. The actual collector regression fails before this fix and passes with all 206 owner and sibling cases afterward. * fix(daemon): recognize released waiting task launchers Recognize the exact waiting VBS wrapper shipped by 2026.9.3 during owned service reconciliation. Keep custom launcher behavior unknown and preserve all command, root, Task and authority checks. The real audit entry point rejected this released form as TaskLauncher unknown-edit before repair. The causal regression and edited-launcher control pass with 55 audit and 140 backup/rewrite sibling cases. * test(daemon): cover retained Task ownership refusal * test(windows): preserve XML bytes around enabled export lines
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Sep 28, 2026
…#151608) * fix(daemon): inspect registered Gateway services accurately Read strict Windows service commands from registered actions and preserve supported launcher encodings without treating dynamic CMD expansion as a verified command. Retain exact task identity and bound systemd selection. Use one platform inventory collector for the existing full and diagnostic projections. Report incomplete inspection through Doctor while preserving status JSON and the existing managed-service filters. Keep load-state inspection behind a leaf capability instead of reverse facade imports. Refs openclaw#151608, openclaw#151463. * fix(daemon): classify service commands by position Share runtime and root-option parsing so Node display names and profile values cannot classify a Node service as a Gateway. Preserve literal shell, env and generated launchd wrappers, and honor the executable selected by launchd. Read systemd's single-quoted arguments through the existing parser and preserve literal apostrophes when rendering. Keep strict Windows command rejection separate from lenient diagnostics, and align the native-boundary fixtures with that contract without weakening ownership or source-preservation assertions. * fix(daemon): inspect direct registered task actions Read literal executable actions from their registered Scheduled Task and revalidate the action before returning command facts. Strict runtime inspection uses the same registered command instead of a default launcher. Keep executable paths out of managed launcher provenance. Direct actions remain outside automatic update service management when no restorable CMD/VBS launcher exists, preserving the prior stop and definition ownership boundary. * test(windows): prove installed service upgrade paths Extend the existing native Scheduled Task proof with verified immutable package handoff and fixed fresh, published 2026.9.3, and published 2026.9.4 CLI cells. Require live version/build identity, selected PID replacement, peer continuity, strict registered-action inspection, and settled cleanup before evidence publication and disposable installation retirement. Keep source-only and repair modes, permissions, deadlines, and native lifecycle owners intact. Direct executable fixtures remain disabled and preserve the updater's unsupported-mutation boundary. Native execution remains pending. * test(doctor): retain managed Windows launcher provenance Keep the generated CMD path on the existing managed-service fixture before and after reinstall so Doctor admission sees the installation it models. Preserve all stop, install, restart, rollback, and direct-action refusal expectations without changing production behavior. * test(windows): exercise native autostart ownership boundaries Extend the existing published-updater cell with its stopped, task-owned Scheduled Task. Capture real admission, exercise native enable/disable, and preserve the definition and files after foreign-owner refusal. Test retained admission separately from restoration so legitimate same-root refresh remains supported. Restore the original XML through the existing fixture lifetime; do not broaden product control or workflow permissions. Modeled owner tests, selected source checks, and independent review pass. Actual Windows execution remains required before a native proof claim. * test(windows): retain sanitized installed command failures Keep unexpected command stdout and stderr in bounded failure diagnostics so JSON-mode CLI errors survive native proof failures. Reuse the existing terminal and support redaction owners before clipping; withhold incomplete captures while preserving the existing truncation failure. Move the existing command runner into its own test-support module and update both consumers without changing timeout, exit, signal, or cleanup semantics. Real-child regressions reproduce both privacy defects and pass with the correction. The original installed Gateway failure remains undiagnosed. * fix(daemon): preserve Windows probe budgets and Doctor cleanup eligibility Use the existing cold PowerShell startup budget for Task Scheduler queries without an explicit deadline. Keep periodic activation checks bounded and preserve unknown results rather than treating timeouts as task absence. The native probe test now exercises the production default. Share Doctor's existing legacy cleanup classification with its registered preview. Keep unsupported platforms, scopes and unrecognized Linux unit names as findings without advertising removal or invoking unrelated cleanup. Extract the classifier and complete cleanup test group without dropping assertions or changing native mutation ownership. Retain the failed installed Windows runs and their source identities; new package and native upgrade qualification remain separate requirements. * chore(daemon): retire stale Doctor size baseline The split Doctor service module no longer needs a max-lines suppression. Remove only its stale baseline entry so the shrink-only ratchet matches actual source. Product, dependency, workflow and fixture bytes are unchanged. * test(windows): retain sanitized service proof observations Record bounded install and status facts before semantic assertions so a successful CLI exit cannot hide the native inspection reason. Exclude free-form stderr and private response fields, and preserve existing execution, deadline, and cleanup assertions. * fix(windows): preserve native status inspection defaults Keep the CLI RPC default distinct from an explicit timeout so Windows service inspection can use its existing cold-start budget. Forward explicit load-query deadlines through the Task Scheduler owner while preserving lifecycle defaults and timeout diagnostics. * fix(models): retain discovered models after refresh failures Record successful legacy catalog results at the producer boundary so unavailable refreshes retain the accepted inventory. Preserve explicit outcomes, advisory SDK fallback behavior, and first-discovery starter policy. * fix(models): preserve skipped catalog outcome semantics Mark bundled static, configured, and advisory catalog projections with explicit empty outcomes so legacy success inference cannot promote them to observed account inventory. Preserve live outcomes and helper types. Keep exact auth provenance histories and move existing fixture/policy code into focused owners where required by the line-cap ratchet. Validation: 447 producer and sibling cases, 56 shared self-hosted cases, 95 auth/policy cases, causal missing-outcome failures, maintained checks, and independent review. * test(plugin-sdk): keep discovery loader types acyclic Move the shared loader type into a leaf consumed by both discovery contract helpers. Preserve its public provider-test-contracts export without a child-to-parent type import cycle. Validation: maintained Madge check reports zero cycles; core, all core test graphs, extension test types, lint, formatting and independent review pass. Runtime behavior and previous catalog proof are unchanged. * fix(plugin-sdk): mark generated static catalogs explicitly Keep the generated non-live, non-strict catalog adapter from claiming successful acquisition for manifest or configured rows. Preserve null, errors, strict and custom callbacks, static catalogs, and public types. Validation: three existing controls fail before the correction; all49 owner and sibling cases pass afterward, with types, lint, line caps and fresh independent review clean. * test(windows): handle omitted scheduled task settings * test(windows): preserve native context and failure evidence * test(daemon): wait for installed gateway readiness before inspection * test(daemon): stop installed fixtures through their profiled CLI * fix(daemon): inspect extra Windows services before removal Keep verified Node and legacy diagnostics visible while offering read-only Scheduled Task inspection in Doctor and deep status. Preserve the existing service cleanup owners and diagnostic JSON shape. Carry the canonical SQLite fixture host-context and dependency-selection repairs from openclaw#158209 and openclaw#158409 for the inherited CI collection failure. * fix: restore asynchronous harness task completion Complete the shared task-content projection cutover for asynchronous finalization and delivery. Preserve the captured Incognito policy and exact task-assignment fences. The unchanged worker suite reproduced six ReferenceError failures before the fix and passes all seven cases afterward; the sibling SDK runtime suite passes all 30 cases. Independent review is clean through P2. * test(windows): budget installed service phases and retain progress * test(windows): retain failed installed update progress Read failed published-updater progress through the existing asynchronous SQLite owner before native cleanup. Retain only safe phase, status and step timings; preserve all command, body and teardown deadlines. Validation: five installed-fixture tests, services types, targeted changed checks and independent review through P2 passed. Shared diagnostic implementation qualified in the Windows fixture owner. * fix(daemon): bound aggregate Windows service inventory Carry one monotonic deadline through Scheduler discovery, launcher reads, registration revalidation, and missing-launcher metadata. Preserve completed findings and report incomplete inventory when the shared budget is exhausted. * fix(daemon): classify registered helpers without profile admission Let read-only registered inventory classify faithfully revalidated commands without requiring an OpenClaw profile. Keep selected-service profile admission strict and preserve launcher, Task, script and deadline checks. Native disabled-discovery exposed a false warning for a static node --version helper. The actual collector regression fails before this fix and passes with all 206 owner and sibling cases afterward. * fix(daemon): recognize released waiting task launchers Recognize the exact waiting VBS wrapper shipped by 2026.9.3 during owned service reconciliation. Keep custom launcher behavior unknown and preserve all command, root, Task and authority checks. The real audit entry point rejected this released form as TaskLauncher unknown-edit before repair. The causal regression and edited-launcher control pass with 55 audit and 140 backup/rewrite sibling cases. * test(daemon): cover retained Task ownership refusal * test(windows): preserve XML bytes around enabled export lines
steipete
added a commit
that referenced
this pull request
Sep 28, 2026
* fix(build): refuse dist rebuild under a live managed Gateway Stop pnpm build and run-node auto-build from deleting hashed dist modules while a managed Gateway ExecStart still points at this checkout. * chore(build): drop unused fence message field * fix(build): also fence direct tsdown and run-node rebuilds Cover the cleanTsdownOutputRoots path and refuse early in run-node so live managed Gateway dist cannot be wiped outside build-all. * fix(build): keep live Gateway stop off the rebuild path Dispatch gateway stop/restart from existing dist, apply --profile before service inspection, and fence only physically overlapping checkouts. * fix(build): keep live dist fence off tsdown declaration graph Load daemon inspection lazily so tsdown fixtures and plugin-sdk dts generation do not import service-layout. Move run-node recovery tests to a sibling file so the line-cap ratchet does not grow. * fix(build): use import type for SpawnOptions in live-dist tests * fix(build): dispatch source-only QA reports before the live dist fence qa parity-report and qa coverage already run from source without rebuilding private QA dist. Check that path before refusing a live managed Gateway rebuild. * fix(daemon): discover managed Gateway bindings across profiles The live-dist fence needs every installed managed selector, not only the current OPENCLAW_PROFILE. Reuse includeManagedOpenClaw scans and leave findExtraGatewayServices semantics unchanged. * fix(build): refuse live dist rebuild for every overlapping Gateway profile A default-env build could still replace dist under a sibling profile Gateway. Inspect all managed bindings, name offenders, and point operators at stop or openclaw update. * fix(daemon): keep managed Gateway binding discovery under lint limits Move profile binding mapping out of inspect.ts, list managed services via listManagedOpenClawGatewayServices, and use toSorted for profile naming. * fix(build): keep live-dist refusal out of updater restore and system census Propagate admissionRefused so update-gateway-build does not rm live output roots after a pre-mutation fence refuse. Enumerate system-scope managed units with explicit systemdReadTarget so user and system siblings both reach the fence. * test(build): pass a compare function to toSorted in the fence fixture * fix(build): satisfy live-dist fence CI type, knip, and assertion gates Treat toSorted comparators as possibly undefined, stop re-exporting the unused binding type, and read launchd profile env through the record owner instead of a type assertion. * fix(daemon): inspect systemd template instances in the live-dist census Discovered `[email protected]` files were forwarded as unit names, so the fence queried a non-runnable template and fail-opened past a live instance when a separate user Gateway was installed. Reuse the existing instance resolution owner and cover user+system template inspection through the service reader. * fix(tooling): pin foreign-cwd tsconfig and clear CI gates - pin TSX_TSCONFIG_PATH in the CLI shim only when the cwd lacks one, so fixture-spawned run-node.mts resolves workspace profile imports - pass --import scripts/tsx.mjs to live-updater spawns and pin the tsconfig in run-node-lifecycle fixture envs (production loader parity) - drop the unused systemd re-export for knip and move the template- instance test to service.systemd-scope.test.ts for the line cap * fix(daemon): inspect registered Gateway services accurately Read strict Windows service commands from registered actions and preserve supported launcher encodings without treating dynamic CMD expansion as a verified command. Retain exact task identity and bound systemd selection. Use one platform inventory collector for the existing full and diagnostic projections. Report incomplete inspection through Doctor while preserving status JSON and the existing managed-service filters. Keep load-state inspection behind a leaf capability instead of reverse facade imports. Refs #151608, #151463. * fix(daemon): classify service commands by position Share runtime and root-option parsing so Node display names and profile values cannot classify a Node service as a Gateway. Preserve literal shell, env and generated launchd wrappers, and honor the executable selected by launchd. Read systemd's single-quoted arguments through the existing parser and preserve literal apostrophes when rendering. Keep strict Windows command rejection separate from lenient diagnostics, and align the native-boundary fixtures with that contract without weakening ownership or source-preservation assertions. * fix(daemon): inspect direct registered task actions Read literal executable actions from their registered Scheduled Task and revalidate the action before returning command facts. Strict runtime inspection uses the same registered command instead of a default launcher. Keep executable paths out of managed launcher provenance. Direct actions remain outside automatic update service management when no restorable CMD/VBS launcher exists, preserving the prior stop and definition ownership boundary. * test(windows): prove installed service upgrade paths Extend the existing native Scheduled Task proof with verified immutable package handoff and fixed fresh, published 2026.9.3, and published 2026.9.4 CLI cells. Require live version/build identity, selected PID replacement, peer continuity, strict registered-action inspection, and settled cleanup before evidence publication and disposable installation retirement. Keep source-only and repair modes, permissions, deadlines, and native lifecycle owners intact. Direct executable fixtures remain disabled and preserve the updater's unsupported-mutation boundary. Native execution remains pending. * test(doctor): retain managed Windows launcher provenance Keep the generated CMD path on the existing managed-service fixture before and after reinstall so Doctor admission sees the installation it models. Preserve all stop, install, restart, rollback, and direct-action refusal expectations without changing production behavior. * test(windows): exercise native autostart ownership boundaries Extend the existing published-updater cell with its stopped, task-owned Scheduled Task. Capture real admission, exercise native enable/disable, and preserve the definition and files after foreign-owner refusal. Test retained admission separately from restoration so legitimate same-root refresh remains supported. Restore the original XML through the existing fixture lifetime; do not broaden product control or workflow permissions. Modeled owner tests, selected source checks, and independent review pass. Actual Windows execution remains required before a native proof claim. * test(windows): retain sanitized installed command failures Keep unexpected command stdout and stderr in bounded failure diagnostics so JSON-mode CLI errors survive native proof failures. Reuse the existing terminal and support redaction owners before clipping; withhold incomplete captures while preserving the existing truncation failure. Move the existing command runner into its own test-support module and update both consumers without changing timeout, exit, signal, or cleanup semantics. Real-child regressions reproduce both privacy defects and pass with the correction. The original installed Gateway failure remains undiagnosed. * fix(daemon): preserve Windows probe budgets and Doctor cleanup eligibility Use the existing cold PowerShell startup budget for Task Scheduler queries without an explicit deadline. Keep periodic activation checks bounded and preserve unknown results rather than treating timeouts as task absence. The native probe test now exercises the production default. Share Doctor's existing legacy cleanup classification with its registered preview. Keep unsupported platforms, scopes and unrecognized Linux unit names as findings without advertising removal or invoking unrelated cleanup. Extract the classifier and complete cleanup test group without dropping assertions or changing native mutation ownership. Retain the failed installed Windows runs and their source identities; new package and native upgrade qualification remain separate requirements. * chore(daemon): retire stale Doctor size baseline The split Doctor service module no longer needs a max-lines suppression. Remove only its stale baseline entry so the shrink-only ratchet matches actual source. Product, dependency, workflow and fixture bytes are unchanged. * fix(build): keep native fixture import closures complete Keep the legacy source-update transaction at its existing direct CLI call site so native declaration-library consumers do not load its CLI-only source resolver closure. Copy the exact PID helper inputs into the runtime fixture. Use the real legacy-loader file URL in its existing subprocess invocation, so execution and unused-file analysis share the same dependency reference. Preserve all assertions, lifecycle guards and package runtime behavior. Co-authored-by: Donnie Fiander <[email protected]> * test(windows): retain sanitized service proof observations Record bounded install and status facts before semantic assertions so a successful CLI exit cannot hide the native inspection reason. Exclude free-form stderr and private response fields, and preserve existing execution, deadline, and cleanup assertions. * test(windows): retain safe installed-service observations Retain allowlisted install/status JSON before strict semantic assertions, without copying private response fields or opaque successful stderr. Compose service observation and exact sibling-refusal checks through one internal options record and migrate every test/support caller together. Preserve native process cleanup, readiness assertions and command budgets. Co-authored-by: Donnie Fiander <[email protected]> * test(update): isolate source updater fixture inputs Give the synthetic compiler declared memory capacity through the existing memory owner instead of inheriting competing CI workers. Keep real build heap admission and all lifecycle assertions unchanged. Use the established TypeScript loader for the Linux-only live-updater CLI case so it reaches the platform refusal rather than failing during import. Refs #152875. Retains the exact failing Linux CI evidence and contributor work. Co-authored-by: Donnie Fiander <[email protected]> * fix(windows): preserve native status inspection defaults Keep the CLI RPC default distinct from an explicit timeout so Windows service inspection can use its existing cold-start budget. Forward explicit load-query deadlines through the Task Scheduler owner while preserving lifecycle defaults and timeout diagnostics. * fix(models): retain discovered models after refresh failures Record successful legacy catalog results at the producer boundary so unavailable refreshes retain the accepted inventory. Preserve explicit outcomes, advisory SDK fallback behavior, and first-discovery starter policy. * fix(models): preserve skipped catalog outcome semantics Mark bundled static, configured, and advisory catalog projections with explicit empty outcomes so legacy success inference cannot promote them to observed account inventory. Preserve live outcomes and helper types. Keep exact auth provenance histories and move existing fixture/policy code into focused owners where required by the line-cap ratchet. Validation: 447 producer and sibling cases, 56 shared self-hosted cases, 95 auth/policy cases, causal missing-outcome failures, maintained checks, and independent review. * test(plugin-sdk): keep discovery loader types acyclic Move the shared loader type into a leaf consumed by both discovery contract helpers. Preserve its public provider-test-contracts export without a child-to-parent type import cycle. Validation: maintained Madge check reports zero cycles; core, all core test graphs, extension test types, lint, formatting and independent review pass. Runtime behavior and previous catalog proof are unchanged. * fix(plugin-sdk): mark generated static catalogs explicitly Keep the generated non-live, non-strict catalog adapter from claiming successful acquisition for manifest or configured rows. Preserve null, errors, strict and custom callbacks, static catalogs, and public types. Validation: three existing controls fail before the correction; all49 owner and sibling cases pass afterward, with types, lint, line caps and fresh independent review clean. * test(windows): honor omitted task XML defaults Use the existing task XML setter for disabled installed fixtures and normalize only the task-level Enabled setting in the enable roundtrip. Keep all other definition, native state, cleanup, and sibling build refusal assertions intact. Co-authored-by: Donnie Fiander <[email protected]> * test: preserve native and npm fixture environment Use the canonical native service environment projection for installed Windows fixtures, retaining private application and npm paths with case-aware overrides. Keep credentials and Node options outside the projection. Apply the exact isolated npm global-config fixture correction from #158197 so version-selection tests reach their existing assertions after config discovery. Validation: 16 focused cases, all selected changed checks, and independent P2 review passed. Product and dependency inputs are unchanged; Windows installed upgrade and sibling-build qualification remains outstanding. * test(windows): await installed readiness before status checks Use the existing HTTP startup-readiness owner after install and update, while retaining strict one-shot status, build identity, and sibling continuity checks. Stop registered fixture services through the guarded owner before deleting Task definitions. Proven absence skips only stop; unknown inspection or stop failure retains the error and cleanup authority instead of bypassing the guard. Validation: source-identical readiness/stop owner proof (71 cases), affected services types, lint, formatting and ratchets passed. Fresh P2 review's request to delete after failed stop was rejected against the retained-authority contract. Native Windows completion remains unqualified; no deadline or assertion changed. * fix(tests): wait for queued RPC admission before restart Await the exact terminal chat event after deferred registration before releasing the held first response. Preserve the actual queue assertion, all delivery and restart checks, and the overall test deadline. Refs #150153 Refs #152875 Source-equivalent carry of #158347 (4713210). * test(windows): stop installed fixtures in their own profile Invoke the guarded installed CLI through the existing managed command owner, using the admitted Task entry, profile and environment. Vitest's synthetic ambient state must not decide whether that Task can be stopped. Keep the existing 180-second command lifetime and child join, without inheriting an already-aborted test-body signal during cleanup. Unknown registration and failed stop still retain authority; proven absence skips only stop. Validation: affected services types, lint, formatting and independent P2 review passed. Shared command-owner proof remains retained. Native completion is still pending; no service guard, process assertion or test deadline was weakened. * fix(update): retain native custody during partial-stop recovery Compensate a failed native stop through the existing guarded service restart, revalidating the original binding inside its operation lock. Require completed recovery and preserve the original failure without starting a build or custom shell command. Successful and failed-build custom restart contracts stay intact. Four published-shell regressions fail on the former path and pass after this repair; 21 unchanged controls, selected checks, and independent review pass. Co-authored-by: Donnie Fiander <[email protected]> * test: preserve threaded SQLite cleanup fixture metadata Carry the exact qualified d103e23/#158407 fixture correction for incoming compile-cache initialization. The non-isolated harness runs in threads; retain its false/null metadata and forbidden Worker constructor without changing assertions, order, or timeouts. * test: align SQLite lifecycle proof with canonical host contract Replace the provisional physical-thread metadata with the logical-host fixture contract from merged #158209. Preserve every cleanup assertion and the forbidden Worker constructor. Carry merged #158409's literal dependency resolvers, caller update and selection regression. Exact canonical postimages, the ordered cleanup case, dependency-selection case, selected checks and independent review pass. * test(windows): preserve installed command budgets and progress The aggregate 240-second fixture deadline cut the published updater short before its existing 180-second command budget. Allocate installed cells 360/900/900 seconds and matching 10/19/19-minute Actions envelopes, including the existing teardown and runner margin. Source-native and command limits, assertions, and the quiet watchdog stay unchanged. Reuse the existing durable recorder for real phase progress, preserving original failures and emitting only fixed labels. The Task-only 9.4 cell needs one sibling fence, with no Startup fingerprint allowance. The 32 focused cases, selected types and export scans, workflow validation, owned lint, and independent review pass. Retain the unchanged main replay lint-cap failure separately. Production and dependency inputs are unchanged. * test(windows): retain installed updater failure progress Read the isolated selected service update ledger before native fixture cleanup and retain only phase and step metadata. Preserve the original updater error and all existing execution budgets.\n\nValidation: 15 focused tests, incremental changed-file checks, and independent review passed. The moving-main ratchet failure on three untouched older files is retained separately. * test(daemon): complete system template runtime fixture Provide the loaded-runtime reader's required ControlGroup metadata. The missing native response correctly made inspection unavailable and broke the template regression after main integration; production behavior is unchanged. Validation: the original fixture fails locally for the CI assertion, then all 76 service-scope and loaded-runtime cases pass after correction. Independent P2 review is clean. No assertion, timeout, or package source changed. * fix(daemon): ignore unrelated registered task profiles Read-only Scheduled Task discovery can inspect a static unrelated command without requiring an OpenClaw profile. Keep selected-service profile checks strict, and preserve launcher, registration and deadline revalidation. The installed Windows fixture exposed a false Doctor finding for a Helper that only runs node.exe --version. Add its causal collector regression and retain the selected-service rejection assertion. Receive the canonical 2b2ae31 SDK fixture fix so mutation occurs after real declaration emission. Receiving tests and core/services/SDK types pass; focused lint and P2 review are clean. The full changed gate still encounters the inherited OpenRouter suppression defect already repaired on main. The production change requires new package acceptance and native Windows proof before landing. * fix(build): give external recovery steps for stale dist The live-build refusal now names an external stop, successful rebuild, and start sequence for every matching service. Explain that an already-current update does not rebuild stale output, and document the default-profile commands with failure-short-circuiting in the source update guide. This changes guidance only, without altering admission or lifecycle policy. The existing fence suite passes 37 cases with one platform skip; focused lint, formatting and independent P2 review are clean. * test(daemon): observe published updater settlement Record launcher, command, and output lifecycle timestamps for the published update command. After its current ledger run becomes terminal, retain at most two bounded and sanitized process snapshots with creation and CPU/I/O facts. Fence progress and snapshots to that same run; observations neither refresh progress nor change command, cleanup, or watchdog budgets. This diagnoses a published 9.3 command that timed out after its candidate reported successful activation and verification. Preserve the failure and avoid inferring early process exit from post-timeout cleanup observations. 34 focused cases, services types, scoped lint, formatting, and independent P2 review pass. Native diagnostic execution remains required. * fix(daemon): recognize the released waiting task launcher Accept the exact waiting VBS form generated by the published 2026.9.3 installer during an owned service-definition audit. Keep custom launcher behavior classified as an unknown edit and preserve all selector, command, root, and native authority checks. Receive the three reviewed postimages from ec74258. The actual audit regression fails on the original implementation; 55 receiving cases pass. The shared owner also verified 140 backup/rewrite cases, core/services types, scoped lint and P2 review. This repairs the observed reconciliation warning; it does not claim to explain the independent updater settlement timeout. * test(daemon): sample unsettled updates before the command deadline Keep the same two-snapshot cap, current-run binding and progress behavior. Capture an unfinished run at 300 seconds so a slower installation cannot prevent all process observations. Rename the diagnostic field to reflect both active and terminal observations. The original observer regression fails; 25 cases, scoped lint/types and independent P2 review pass. Command and cleanup budgets are unchanged. * test(daemon): preserve CRCRLF task export comparisons * fix(windows): enable a verified disabled task on explicit start Receive the shared selected-service start repair, preserving published command fingerprints and optional Enabled metadata behavior. Keep the finalization process fixture's real entrypoint exports available. Source-build recovery ownership remains unchanged. * docs(windows): clarify explicit start partial effects Document that successful enablement remains an audited effect when the later launch fails. Preserve the existing explicit-start contract and require inspection before retrying; do not imply rollback after authority loss. * docs: clarify source CLI recovery uses the existing build --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Donnie Fiander <[email protected]>
steipete
added a commit
that referenced
this pull request
Sep 28, 2026
* fix(build): refuse dist rebuild under a live managed Gateway Stop pnpm build and run-node auto-build from deleting hashed dist modules while a managed Gateway ExecStart still points at this checkout. * chore(build): drop unused fence message field * fix(build): also fence direct tsdown and run-node rebuilds Cover the cleanTsdownOutputRoots path and refuse early in run-node so live managed Gateway dist cannot be wiped outside build-all. * fix(build): keep live Gateway stop off the rebuild path Dispatch gateway stop/restart from existing dist, apply --profile before service inspection, and fence only physically overlapping checkouts. * fix(build): keep live dist fence off tsdown declaration graph Load daemon inspection lazily so tsdown fixtures and plugin-sdk dts generation do not import service-layout. Move run-node recovery tests to a sibling file so the line-cap ratchet does not grow. * fix(build): use import type for SpawnOptions in live-dist tests * fix(build): dispatch source-only QA reports before the live dist fence qa parity-report and qa coverage already run from source without rebuilding private QA dist. Check that path before refusing a live managed Gateway rebuild. * fix(daemon): discover managed Gateway bindings across profiles The live-dist fence needs every installed managed selector, not only the current OPENCLAW_PROFILE. Reuse includeManagedOpenClaw scans and leave findExtraGatewayServices semantics unchanged. * fix(build): refuse live dist rebuild for every overlapping Gateway profile A default-env build could still replace dist under a sibling profile Gateway. Inspect all managed bindings, name offenders, and point operators at stop or openclaw update. * fix(daemon): keep managed Gateway binding discovery under lint limits Move profile binding mapping out of inspect.ts, list managed services via listManagedOpenClawGatewayServices, and use toSorted for profile naming. * fix(build): keep live-dist refusal out of updater restore and system census Propagate admissionRefused so update-gateway-build does not rm live output roots after a pre-mutation fence refuse. Enumerate system-scope managed units with explicit systemdReadTarget so user and system siblings both reach the fence. * test(build): pass a compare function to toSorted in the fence fixture * fix(build): satisfy live-dist fence CI type, knip, and assertion gates Treat toSorted comparators as possibly undefined, stop re-exporting the unused binding type, and read launchd profile env through the record owner instead of a type assertion. * fix(daemon): inspect systemd template instances in the live-dist census Discovered `[email protected]` files were forwarded as unit names, so the fence queried a non-runnable template and fail-opened past a live instance when a separate user Gateway was installed. Reuse the existing instance resolution owner and cover user+system template inspection through the service reader. * fix(tooling): pin foreign-cwd tsconfig and clear CI gates - pin TSX_TSCONFIG_PATH in the CLI shim only when the cwd lacks one, so fixture-spawned run-node.mts resolves workspace profile imports - pass --import scripts/tsx.mjs to live-updater spawns and pin the tsconfig in run-node-lifecycle fixture envs (production loader parity) - drop the unused systemd re-export for knip and move the template- instance test to service.systemd-scope.test.ts for the line cap * fix(daemon): inspect registered Gateway services accurately Read strict Windows service commands from registered actions and preserve supported launcher encodings without treating dynamic CMD expansion as a verified command. Retain exact task identity and bound systemd selection. Use one platform inventory collector for the existing full and diagnostic projections. Report incomplete inspection through Doctor while preserving status JSON and the existing managed-service filters. Keep load-state inspection behind a leaf capability instead of reverse facade imports. Refs #151608, #151463. * fix(daemon): classify service commands by position Share runtime and root-option parsing so Node display names and profile values cannot classify a Node service as a Gateway. Preserve literal shell, env and generated launchd wrappers, and honor the executable selected by launchd. Read systemd's single-quoted arguments through the existing parser and preserve literal apostrophes when rendering. Keep strict Windows command rejection separate from lenient diagnostics, and align the native-boundary fixtures with that contract without weakening ownership or source-preservation assertions. * fix(daemon): inspect direct registered task actions Read literal executable actions from their registered Scheduled Task and revalidate the action before returning command facts. Strict runtime inspection uses the same registered command instead of a default launcher. Keep executable paths out of managed launcher provenance. Direct actions remain outside automatic update service management when no restorable CMD/VBS launcher exists, preserving the prior stop and definition ownership boundary. * test(windows): prove installed service upgrade paths Extend the existing native Scheduled Task proof with verified immutable package handoff and fixed fresh, published 2026.9.3, and published 2026.9.4 CLI cells. Require live version/build identity, selected PID replacement, peer continuity, strict registered-action inspection, and settled cleanup before evidence publication and disposable installation retirement. Keep source-only and repair modes, permissions, deadlines, and native lifecycle owners intact. Direct executable fixtures remain disabled and preserve the updater's unsupported-mutation boundary. Native execution remains pending. * test(doctor): retain managed Windows launcher provenance Keep the generated CMD path on the existing managed-service fixture before and after reinstall so Doctor admission sees the installation it models. Preserve all stop, install, restart, rollback, and direct-action refusal expectations without changing production behavior. * test(windows): exercise native autostart ownership boundaries Extend the existing published-updater cell with its stopped, task-owned Scheduled Task. Capture real admission, exercise native enable/disable, and preserve the definition and files after foreign-owner refusal. Test retained admission separately from restoration so legitimate same-root refresh remains supported. Restore the original XML through the existing fixture lifetime; do not broaden product control or workflow permissions. Modeled owner tests, selected source checks, and independent review pass. Actual Windows execution remains required before a native proof claim. * test(windows): retain sanitized installed command failures Keep unexpected command stdout and stderr in bounded failure diagnostics so JSON-mode CLI errors survive native proof failures. Reuse the existing terminal and support redaction owners before clipping; withhold incomplete captures while preserving the existing truncation failure. Move the existing command runner into its own test-support module and update both consumers without changing timeout, exit, signal, or cleanup semantics. Real-child regressions reproduce both privacy defects and pass with the correction. The original installed Gateway failure remains undiagnosed. * fix(daemon): preserve Windows probe budgets and Doctor cleanup eligibility Use the existing cold PowerShell startup budget for Task Scheduler queries without an explicit deadline. Keep periodic activation checks bounded and preserve unknown results rather than treating timeouts as task absence. The native probe test now exercises the production default. Share Doctor's existing legacy cleanup classification with its registered preview. Keep unsupported platforms, scopes and unrecognized Linux unit names as findings without advertising removal or invoking unrelated cleanup. Extract the classifier and complete cleanup test group without dropping assertions or changing native mutation ownership. Retain the failed installed Windows runs and their source identities; new package and native upgrade qualification remain separate requirements. * chore(daemon): retire stale Doctor size baseline The split Doctor service module no longer needs a max-lines suppression. Remove only its stale baseline entry so the shrink-only ratchet matches actual source. Product, dependency, workflow and fixture bytes are unchanged. * fix(build): keep native fixture import closures complete Keep the legacy source-update transaction at its existing direct CLI call site so native declaration-library consumers do not load its CLI-only source resolver closure. Copy the exact PID helper inputs into the runtime fixture. Use the real legacy-loader file URL in its existing subprocess invocation, so execution and unused-file analysis share the same dependency reference. Preserve all assertions, lifecycle guards and package runtime behavior. Co-authored-by: Donnie Fiander <[email protected]> * test(windows): retain sanitized service proof observations Record bounded install and status facts before semantic assertions so a successful CLI exit cannot hide the native inspection reason. Exclude free-form stderr and private response fields, and preserve existing execution, deadline, and cleanup assertions. * fix(windows): discover exact Startup Gateway launchers Carry the focused Startup discovery changes from #151674 onto the current service inventory owner. Preserve exact file identities, selected fallback classification, Scheduler inspection failures, and published updater fingerprints. Extend the existing installed Windows cells with read-only Startup diagnostics and owned-file cleanup. Focused local regressions pass, including Doctor failure on the original collector and success with Startup discovery. Native Windows qualification and the managed binding/fence integration remain pending. * test(windows): retain safe installed-service observations Retain allowlisted install/status JSON before strict semantic assertions, without copying private response fields or opaque successful stderr. Compose service observation and exact sibling-refusal checks through one internal options record and migrate every test/support caller together. Preserve native process cleanup, readiness assertions and command budgets. Co-authored-by: Donnie Fiander <[email protected]> * test(update): isolate source updater fixture inputs Give the synthetic compiler declared memory capacity through the existing memory owner instead of inheriting competing CI workers. Keep real build heap admission and all lifecycle assertions unchanged. Use the established TypeScript loader for the Linux-only live-updater CLI case so it reaches the platform refusal rather than failing during import. Refs #152875. Retains the exact failing Linux CI evidence and contributor work. Co-authored-by: Donnie Fiander <[email protected]> * fix(windows): preserve native status inspection defaults Keep the CLI RPC default distinct from an explicit timeout so Windows service inspection can use its existing cold-start budget. Forward explicit load-query deadlines through the Task Scheduler owner while preserving lifecycle defaults and timeout diagnostics. * fix(windows): preserve native status inspection defaults Keep the CLI RPC default distinct from an explicit timeout so Windows service inspection can use its existing cold-start budget. Forward explicit load-query deadlines through the Task Scheduler owner while preserving lifecycle defaults and timeout diagnostics. (cherry picked from commit 9c3bb9c) * fix(daemon): remove inventory file-helper type cycle * fix(models): retain discovered models after refresh failures Record successful legacy catalog results at the producer boundary so unavailable refreshes retain the accepted inventory. Preserve explicit outcomes, advisory SDK fallback behavior, and first-discovery starter policy. * fix(models): preserve skipped catalog outcome semantics Mark bundled static, configured, and advisory catalog projections with explicit empty outcomes so legacy success inference cannot promote them to observed account inventory. Preserve live outcomes and helper types. Keep exact auth provenance histories and move existing fixture/policy code into focused owners where required by the line-cap ratchet. Validation: 447 producer and sibling cases, 56 shared self-hosted cases, 95 auth/policy cases, causal missing-outcome failures, maintained checks, and independent review. * test(plugin-sdk): keep discovery loader types acyclic Move the shared loader type into a leaf consumed by both discovery contract helpers. Preserve its public provider-test-contracts export without a child-to-parent type import cycle. Validation: maintained Madge check reports zero cycles; core, all core test graphs, extension test types, lint, formatting and independent review pass. Runtime behavior and previous catalog proof are unchanged. * fix(plugin-sdk): mark generated static catalogs explicitly Keep the generated non-live, non-strict catalog adapter from claiming successful acquisition for manifest or configured rows. Preserve null, errors, strict and custom callbacks, static catalogs, and public types. Validation: three existing controls fail before the correction; all49 owner and sibling cases pass afterward, with types, lint, line caps and fresh independent review clean. * fix(models): remove unlanded catalog outcome inference * test(windows): handle omitted scheduled task settings * test(windows): handle exported task defaults and reuse pinned packages Preserve disabled-task and cleanup assertions when Task Scheduler omits default settings. Bind the package to its source commit and permit only the reviewed fixture paths to differ in tooling. Includes the canonical sharing-fixture retirement correction from cd2f12e (#158205). * test(windows): retain installed proof before native cleanup Persist settled commands and the original inspection failure before awaited cleanup. Prepare the existing compiled worker cache before each installed campaign and give installed Actions steps room for the unchanged native test and teardown bounds. * test(windows): diagnose native probe context after cleanup Compare read-only PowerShell probes under native and isolated OS contexts only after failed cold acceptance and verified cleanup. Preserve probe deadlines, process ownership, original results and package identity. Carry the canonical failure-only Gateway hook phase observer for the separate CI recurrence without claiming a causal repair. * test(windows): record native module cache context Retain only projected environment key names and module-cache path kind/hash so the diagnostic can distinguish an actual caller-selected cache from an absent one without recording values or changing launch behavior. * test(windows): preserve native context in installed fixtures Replace the duplicate OS environment filter with the existing native service projection and case-aware merge. Preserve caller-selected PowerShell module cache routing while retaining private application, temporary and npm paths and excluding application credentials and Node options. Two old-code regression failures and 23 fixed owner/parity cases pass; native timing remains to be verified without changing deadlines. * test(windows): preserve native context and failure evidence * test(windows): await installed readiness and guarded cleanup Installation acknowledges service activation without certifying runtime readiness. Await the existing HTTP readiness owner after install and update before the unchanged Task/PID/RPC/build assertions. Stop installed supervisors through the guarded service owner before generic task deletion; the probe PID-file cleanup does not own those processes. Preserve original failures, cleanup authority and all existing native deadlines. * test(windows): distinguish absent tasks during fixture cleanup Use authoritative Scheduler inspection before guarded stop. Confirmed absence after uninstall or failed registration skips only stop; unknown inspection still fails, and full process/port cleanup remains required. Preserve task authority on a genuine stop failure. * test(daemon): wait for installed gateway readiness before inspection * test(daemon): stop installed fixtures through their profiled CLI * fix(daemon): give actionable Startup refusal guidance * fix(update): retain native custody during partial-stop recovery Compensate a failed native stop through the existing guarded service restart, revalidating the original binding inside its operation lock. Require completed recovery and preserve the original failure without starting a build or custom shell command. Successful and failed-build custom restart contracts stay intact. Four published-shell regressions fail on the former path and pass after this repair; 21 unchanged controls, selected checks, and independent review pass. Co-authored-by: Donnie Fiander <[email protected]> * fix(daemon): inspect extra Windows services before removal Keep verified Node and legacy diagnostics visible while offering read-only Scheduled Task inspection in Doctor and deep status. Preserve the existing service cleanup owners and diagnostic JSON shape. Carry the canonical SQLite fixture host-context and dependency-selection repairs from #158209 and #158409 for the inherited CI collection failure. * test(windows): expect informational Startup fallback findings * fix: restore asynchronous harness task completion Complete the shared task-content projection cutover for asynchronous finalization and delivery. Preserve the captured Incognito policy and exact task-assignment fences. The unchanged worker suite reproduced six ReferenceError failures before the fix and passes all seven cases afterward; the sibling SDK runtime suite passes all 30 cases. Independent review is clean through P2. * fix(daemon): compose read-only Windows inspection hints Preserve exact Startup file inspection while adopting read-only Scheduled Task advice and Inspection headings. Keep Node diagnostics visible without suggesting deletion. Combine both owner behaviors and reuse the qualified lower correction without unrelated fixture changes. * test(windows): accept omitted PID for stopped Startup runtime * test(windows): budget installed lifecycle phases separately Give the fixed installed cells room for their serial setup, unchanged updater command window, native assertions and cleanup. Keep source-native and command deadlines, the quiet-run detector and the hard job limit unchanged. Record real completed phases after durable evidence writes, and verify workflow envelopes against the actual body and teardown configuration. * fix(qa): retain the current Telegram renderer reference Carry the canonical one-line metadata correction from #158313. The retired formatter was moved into format.ts, already listed by this scenario; execution and all assertions are unchanged. The owning catalog suite passes all 56 cases and fresh review is clean. * test(windows): budget installed service phases and retain progress * test(daemon): retain installed update failure progress * test(windows): retain failed installed update progress Read failed published-updater progress through the existing asynchronous SQLite owner before native cleanup. Retain only safe phase, status and step timings; preserve all command, body and teardown deadlines. Validation: five installed-fixture tests, services types, targeted changed checks and independent review through P2 passed. Shared diagnostic implementation qualified in the Windows fixture owner. * test(daemon): budget the full published Windows update * chore(ci): carry canonical line-cap repairs Carry the necessary kernel environment and publication alias hunks from #158625 (8f22acd), and the interrupted replay fixture extraction from #158538 (25f4dfa). Preserve their assertions, state contracts, and Peter Steinberger attribution. Update installed workflow comments to match the already-qualified body budgets. * test(windows): retain final updater verification diagnostics * test(windows): verify stale admission refuses foreign task resume * fix(daemon): bound aggregate Windows service inventory Carry one monotonic deadline through Scheduler discovery, launcher reads, registration revalidation, and missing-launcher metadata. Preserve completed findings and report incomplete inventory when the shared budget is exhausted. * fix(windows): share inspection deadlines with Startup launchers Compose the shared Windows inventory deadline through Startup directory inspection, launcher reads, and definition revalidation. Preserve completed discoveries and report every exhausted scan, including arbitrary filenames and the final completed Task. Use the same caller deadline for exact Startup state capture and reread. Stalled file operations remain unknown diagnostics without extending the native inspection allowance. Retain immediate Task-query failure fallback, profile bindings, and process cleanup propagation. * test(openrouter): split Fusion prompt coverage below line limit * test(daemon): complete system template runtime fixture Provide the loaded-runtime reader's required ControlGroup metadata. The missing native response correctly made inspection unavailable and broke the template regression after main integration; production behavior is unchanged. Validation: the original fixture fails locally for the CI assertion, then all 76 service-scope and loaded-runtime cases pass after correction. Independent P2 review is clean. No assertion, timeout, or package source changed. * test(openrouter): align the canonical Fusion suite label * fix(daemon): classify registered helpers without profile admission Let read-only registered inventory classify faithfully revalidated commands without requiring an OpenClaw profile. Keep selected-service profile admission strict and preserve launcher, Task, script and deadline checks. Native disabled-discovery exposed a false warning for a static node --version helper. The actual collector regression fails before this fix and passes with all 206 owner and sibling cases afterward. * fix(daemon): separate task discovery from profile admission Registered inventory must classify fully inspected unrelated commands without requiring an OpenClaw profile. Preserve resolved matching profiles for selected-service reads and all native definition revalidation. Reproduced through the real inventory collector after the installed Windows discovery fixture failed; retain the selected-service refusal control. * fix(build): retain Startup identity in external recovery guidance Carry the shared stop, successful rebuild, and start guidance while keeping Startup-only siblings tied to their exact entry paths. An already-current update does not repair stale output. Fence tests pass 44 cases with one existing skip; script types, lint, formatting and independent P2 review pass. This copy-only successor is separate from the frozen f919 Windows package source. * fix(daemon): recognize released waiting task launchers Recognize the exact waiting VBS wrapper shipped by 2026.9.3 during owned service reconciliation. Keep custom launcher behavior unknown and preserve all command, root, Task and authority checks. The real audit entry point rejected this released form as TaskLauncher unknown-edit before repair. The causal regression and edited-launcher control pass with 55 audit and 140 backup/rewrite sibling cases. * test(windows): preserve primary installed update failure facts Retain bounded sanitized fields from the original published-update JSON before unchanged failure assertions. This preserves primary reasons and failed checks that the output tail can omit, without changing capture ceilings, command deadlines, process ownership, or cleanup. * fix(test): read Windows proof archive members portably * test(windows): normalize native task export line endings * fix(windows): enable verified disabled tasks on explicit start Preserve captured autostart policy during update recovery; an explicit Gateway or Node start revalidates the selected task and its launcher/package or recorded wrapper before enabling and running it. Keep stronger local start fingerprints out of published update drivers serialized command shape. * fix(windows): retain starts with unavailable enable metadata Only an explicit disabled policy admits enabling. Preserve native Run for readable Tasks whose optional Enabled field is absent, while retaining typed failures for failed inspections. Keep the finalization fixture original gateway-entrypoint exports when replacing its install resolver. * docs(windows): explain partial effects of an explicit start A successful enable can remain after a later launch failure. Preserve the existing independently audited enable contract and require current authority for any further control; do not imply automatic rollback of a failed start. * fix(build): bound exact Startup service inspections Pass the existing Windows inspection allowance when the build fence reads an exact Startup entry. A stalled launcher read now aborts within that budget so the fence can still inspect and refuse a later live sibling. Preserve ordinary reader defaults and the cold native-Node import boundary. The real fence/state/file-reader regression fails before the fix and passes afterward. All 122 fence and Startup/deadline cases, selected type/lint/export checks, native Node import, and independent scoped review pass. * docs(update): clarify existing-build recovery commands Source-runner gateway stop and restart use the existing CLI by default. Explain that applying source changes requires the documented stop, build, and start sequence. --------- Co-authored-by: Donnie Fiander <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Sep 29, 2026
…w#152875) * fix(build): refuse dist rebuild under a live managed Gateway Stop pnpm build and run-node auto-build from deleting hashed dist modules while a managed Gateway ExecStart still points at this checkout. * chore(build): drop unused fence message field * fix(build): also fence direct tsdown and run-node rebuilds Cover the cleanTsdownOutputRoots path and refuse early in run-node so live managed Gateway dist cannot be wiped outside build-all. * fix(build): keep live Gateway stop off the rebuild path Dispatch gateway stop/restart from existing dist, apply --profile before service inspection, and fence only physically overlapping checkouts. * fix(build): keep live dist fence off tsdown declaration graph Load daemon inspection lazily so tsdown fixtures and plugin-sdk dts generation do not import service-layout. Move run-node recovery tests to a sibling file so the line-cap ratchet does not grow. * fix(build): use import type for SpawnOptions in live-dist tests * fix(build): dispatch source-only QA reports before the live dist fence qa parity-report and qa coverage already run from source without rebuilding private QA dist. Check that path before refusing a live managed Gateway rebuild. * fix(daemon): discover managed Gateway bindings across profiles The live-dist fence needs every installed managed selector, not only the current OPENCLAW_PROFILE. Reuse includeManagedOpenClaw scans and leave findExtraGatewayServices semantics unchanged. * fix(build): refuse live dist rebuild for every overlapping Gateway profile A default-env build could still replace dist under a sibling profile Gateway. Inspect all managed bindings, name offenders, and point operators at stop or openclaw update. * fix(daemon): keep managed Gateway binding discovery under lint limits Move profile binding mapping out of inspect.ts, list managed services via listManagedOpenClawGatewayServices, and use toSorted for profile naming. * fix(build): keep live-dist refusal out of updater restore and system census Propagate admissionRefused so update-gateway-build does not rm live output roots after a pre-mutation fence refuse. Enumerate system-scope managed units with explicit systemdReadTarget so user and system siblings both reach the fence. * test(build): pass a compare function to toSorted in the fence fixture * fix(build): satisfy live-dist fence CI type, knip, and assertion gates Treat toSorted comparators as possibly undefined, stop re-exporting the unused binding type, and read launchd profile env through the record owner instead of a type assertion. * fix(daemon): inspect systemd template instances in the live-dist census Discovered `[email protected]` files were forwarded as unit names, so the fence queried a non-runnable template and fail-opened past a live instance when a separate user Gateway was installed. Reuse the existing instance resolution owner and cover user+system template inspection through the service reader. * fix(tooling): pin foreign-cwd tsconfig and clear CI gates - pin TSX_TSCONFIG_PATH in the CLI shim only when the cwd lacks one, so fixture-spawned run-node.mts resolves workspace profile imports - pass --import scripts/tsx.mjs to live-updater spawns and pin the tsconfig in run-node-lifecycle fixture envs (production loader parity) - drop the unused systemd re-export for knip and move the template- instance test to service.systemd-scope.test.ts for the line cap * fix(daemon): inspect registered Gateway services accurately Read strict Windows service commands from registered actions and preserve supported launcher encodings without treating dynamic CMD expansion as a verified command. Retain exact task identity and bound systemd selection. Use one platform inventory collector for the existing full and diagnostic projections. Report incomplete inspection through Doctor while preserving status JSON and the existing managed-service filters. Keep load-state inspection behind a leaf capability instead of reverse facade imports. Refs openclaw#151608, openclaw#151463. * fix(daemon): classify service commands by position Share runtime and root-option parsing so Node display names and profile values cannot classify a Node service as a Gateway. Preserve literal shell, env and generated launchd wrappers, and honor the executable selected by launchd. Read systemd's single-quoted arguments through the existing parser and preserve literal apostrophes when rendering. Keep strict Windows command rejection separate from lenient diagnostics, and align the native-boundary fixtures with that contract without weakening ownership or source-preservation assertions. * fix(daemon): inspect direct registered task actions Read literal executable actions from their registered Scheduled Task and revalidate the action before returning command facts. Strict runtime inspection uses the same registered command instead of a default launcher. Keep executable paths out of managed launcher provenance. Direct actions remain outside automatic update service management when no restorable CMD/VBS launcher exists, preserving the prior stop and definition ownership boundary. * test(windows): prove installed service upgrade paths Extend the existing native Scheduled Task proof with verified immutable package handoff and fixed fresh, published 2026.9.3, and published 2026.9.4 CLI cells. Require live version/build identity, selected PID replacement, peer continuity, strict registered-action inspection, and settled cleanup before evidence publication and disposable installation retirement. Keep source-only and repair modes, permissions, deadlines, and native lifecycle owners intact. Direct executable fixtures remain disabled and preserve the updater's unsupported-mutation boundary. Native execution remains pending. * test(doctor): retain managed Windows launcher provenance Keep the generated CMD path on the existing managed-service fixture before and after reinstall so Doctor admission sees the installation it models. Preserve all stop, install, restart, rollback, and direct-action refusal expectations without changing production behavior. * test(windows): exercise native autostart ownership boundaries Extend the existing published-updater cell with its stopped, task-owned Scheduled Task. Capture real admission, exercise native enable/disable, and preserve the definition and files after foreign-owner refusal. Test retained admission separately from restoration so legitimate same-root refresh remains supported. Restore the original XML through the existing fixture lifetime; do not broaden product control or workflow permissions. Modeled owner tests, selected source checks, and independent review pass. Actual Windows execution remains required before a native proof claim. * test(windows): retain sanitized installed command failures Keep unexpected command stdout and stderr in bounded failure diagnostics so JSON-mode CLI errors survive native proof failures. Reuse the existing terminal and support redaction owners before clipping; withhold incomplete captures while preserving the existing truncation failure. Move the existing command runner into its own test-support module and update both consumers without changing timeout, exit, signal, or cleanup semantics. Real-child regressions reproduce both privacy defects and pass with the correction. The original installed Gateway failure remains undiagnosed. * fix(daemon): preserve Windows probe budgets and Doctor cleanup eligibility Use the existing cold PowerShell startup budget for Task Scheduler queries without an explicit deadline. Keep periodic activation checks bounded and preserve unknown results rather than treating timeouts as task absence. The native probe test now exercises the production default. Share Doctor's existing legacy cleanup classification with its registered preview. Keep unsupported platforms, scopes and unrecognized Linux unit names as findings without advertising removal or invoking unrelated cleanup. Extract the classifier and complete cleanup test group without dropping assertions or changing native mutation ownership. Retain the failed installed Windows runs and their source identities; new package and native upgrade qualification remain separate requirements. * chore(daemon): retire stale Doctor size baseline The split Doctor service module no longer needs a max-lines suppression. Remove only its stale baseline entry so the shrink-only ratchet matches actual source. Product, dependency, workflow and fixture bytes are unchanged. * fix(build): keep native fixture import closures complete Keep the legacy source-update transaction at its existing direct CLI call site so native declaration-library consumers do not load its CLI-only source resolver closure. Copy the exact PID helper inputs into the runtime fixture. Use the real legacy-loader file URL in its existing subprocess invocation, so execution and unused-file analysis share the same dependency reference. Preserve all assertions, lifecycle guards and package runtime behavior. Co-authored-by: Donnie Fiander <[email protected]> * test(windows): retain sanitized service proof observations Record bounded install and status facts before semantic assertions so a successful CLI exit cannot hide the native inspection reason. Exclude free-form stderr and private response fields, and preserve existing execution, deadline, and cleanup assertions. * test(windows): retain safe installed-service observations Retain allowlisted install/status JSON before strict semantic assertions, without copying private response fields or opaque successful stderr. Compose service observation and exact sibling-refusal checks through one internal options record and migrate every test/support caller together. Preserve native process cleanup, readiness assertions and command budgets. Co-authored-by: Donnie Fiander <[email protected]> * test(update): isolate source updater fixture inputs Give the synthetic compiler declared memory capacity through the existing memory owner instead of inheriting competing CI workers. Keep real build heap admission and all lifecycle assertions unchanged. Use the established TypeScript loader for the Linux-only live-updater CLI case so it reaches the platform refusal rather than failing during import. Refs openclaw#152875. Retains the exact failing Linux CI evidence and contributor work. Co-authored-by: Donnie Fiander <[email protected]> * fix(windows): preserve native status inspection defaults Keep the CLI RPC default distinct from an explicit timeout so Windows service inspection can use its existing cold-start budget. Forward explicit load-query deadlines through the Task Scheduler owner while preserving lifecycle defaults and timeout diagnostics. * fix(models): retain discovered models after refresh failures Record successful legacy catalog results at the producer boundary so unavailable refreshes retain the accepted inventory. Preserve explicit outcomes, advisory SDK fallback behavior, and first-discovery starter policy. * fix(models): preserve skipped catalog outcome semantics Mark bundled static, configured, and advisory catalog projections with explicit empty outcomes so legacy success inference cannot promote them to observed account inventory. Preserve live outcomes and helper types. Keep exact auth provenance histories and move existing fixture/policy code into focused owners where required by the line-cap ratchet. Validation: 447 producer and sibling cases, 56 shared self-hosted cases, 95 auth/policy cases, causal missing-outcome failures, maintained checks, and independent review. * test(plugin-sdk): keep discovery loader types acyclic Move the shared loader type into a leaf consumed by both discovery contract helpers. Preserve its public provider-test-contracts export without a child-to-parent type import cycle. Validation: maintained Madge check reports zero cycles; core, all core test graphs, extension test types, lint, formatting and independent review pass. Runtime behavior and previous catalog proof are unchanged. * fix(plugin-sdk): mark generated static catalogs explicitly Keep the generated non-live, non-strict catalog adapter from claiming successful acquisition for manifest or configured rows. Preserve null, errors, strict and custom callbacks, static catalogs, and public types. Validation: three existing controls fail before the correction; all49 owner and sibling cases pass afterward, with types, lint, line caps and fresh independent review clean. * test(windows): honor omitted task XML defaults Use the existing task XML setter for disabled installed fixtures and normalize only the task-level Enabled setting in the enable roundtrip. Keep all other definition, native state, cleanup, and sibling build refusal assertions intact. Co-authored-by: Donnie Fiander <[email protected]> * test: preserve native and npm fixture environment Use the canonical native service environment projection for installed Windows fixtures, retaining private application and npm paths with case-aware overrides. Keep credentials and Node options outside the projection. Apply the exact isolated npm global-config fixture correction from openclaw#158197 so version-selection tests reach their existing assertions after config discovery. Validation: 16 focused cases, all selected changed checks, and independent P2 review passed. Product and dependency inputs are unchanged; Windows installed upgrade and sibling-build qualification remains outstanding. * test(windows): await installed readiness before status checks Use the existing HTTP startup-readiness owner after install and update, while retaining strict one-shot status, build identity, and sibling continuity checks. Stop registered fixture services through the guarded owner before deleting Task definitions. Proven absence skips only stop; unknown inspection or stop failure retains the error and cleanup authority instead of bypassing the guard. Validation: source-identical readiness/stop owner proof (71 cases), affected services types, lint, formatting and ratchets passed. Fresh P2 review's request to delete after failed stop was rejected against the retained-authority contract. Native Windows completion remains unqualified; no deadline or assertion changed. * fix(tests): wait for queued RPC admission before restart Await the exact terminal chat event after deferred registration before releasing the held first response. Preserve the actual queue assertion, all delivery and restart checks, and the overall test deadline. Refs openclaw#150153 Refs openclaw#152875 Source-equivalent carry of openclaw#158347 (4713210). * test(windows): stop installed fixtures in their own profile Invoke the guarded installed CLI through the existing managed command owner, using the admitted Task entry, profile and environment. Vitest's synthetic ambient state must not decide whether that Task can be stopped. Keep the existing 180-second command lifetime and child join, without inheriting an already-aborted test-body signal during cleanup. Unknown registration and failed stop still retain authority; proven absence skips only stop. Validation: affected services types, lint, formatting and independent P2 review passed. Shared command-owner proof remains retained. Native completion is still pending; no service guard, process assertion or test deadline was weakened. * fix(update): retain native custody during partial-stop recovery Compensate a failed native stop through the existing guarded service restart, revalidating the original binding inside its operation lock. Require completed recovery and preserve the original failure without starting a build or custom shell command. Successful and failed-build custom restart contracts stay intact. Four published-shell regressions fail on the former path and pass after this repair; 21 unchanged controls, selected checks, and independent review pass. Co-authored-by: Donnie Fiander <[email protected]> * test: preserve threaded SQLite cleanup fixture metadata Carry the exact qualified d103e23/openclaw#158407 fixture correction for incoming compile-cache initialization. The non-isolated harness runs in threads; retain its false/null metadata and forbidden Worker constructor without changing assertions, order, or timeouts. * test: align SQLite lifecycle proof with canonical host contract Replace the provisional physical-thread metadata with the logical-host fixture contract from merged openclaw#158209. Preserve every cleanup assertion and the forbidden Worker constructor. Carry merged openclaw#158409's literal dependency resolvers, caller update and selection regression. Exact canonical postimages, the ordered cleanup case, dependency-selection case, selected checks and independent review pass. * test(windows): preserve installed command budgets and progress The aggregate 240-second fixture deadline cut the published updater short before its existing 180-second command budget. Allocate installed cells 360/900/900 seconds and matching 10/19/19-minute Actions envelopes, including the existing teardown and runner margin. Source-native and command limits, assertions, and the quiet watchdog stay unchanged. Reuse the existing durable recorder for real phase progress, preserving original failures and emitting only fixed labels. The Task-only 9.4 cell needs one sibling fence, with no Startup fingerprint allowance. The 32 focused cases, selected types and export scans, workflow validation, owned lint, and independent review pass. Retain the unchanged main replay lint-cap failure separately. Production and dependency inputs are unchanged. * test(windows): retain installed updater failure progress Read the isolated selected service update ledger before native fixture cleanup and retain only phase and step metadata. Preserve the original updater error and all existing execution budgets.\n\nValidation: 15 focused tests, incremental changed-file checks, and independent review passed. The moving-main ratchet failure on three untouched older files is retained separately. * test(daemon): complete system template runtime fixture Provide the loaded-runtime reader's required ControlGroup metadata. The missing native response correctly made inspection unavailable and broke the template regression after main integration; production behavior is unchanged. Validation: the original fixture fails locally for the CI assertion, then all 76 service-scope and loaded-runtime cases pass after correction. Independent P2 review is clean. No assertion, timeout, or package source changed. * fix(daemon): ignore unrelated registered task profiles Read-only Scheduled Task discovery can inspect a static unrelated command without requiring an OpenClaw profile. Keep selected-service profile checks strict, and preserve launcher, registration and deadline revalidation. The installed Windows fixture exposed a false Doctor finding for a Helper that only runs node.exe --version. Add its causal collector regression and retain the selected-service rejection assertion. Receive the canonical 98b1a5b SDK fixture fix so mutation occurs after real declaration emission. Receiving tests and core/services/SDK types pass; focused lint and P2 review are clean. The full changed gate still encounters the inherited OpenRouter suppression defect already repaired on main. The production change requires new package acceptance and native Windows proof before landing. * fix(build): give external recovery steps for stale dist The live-build refusal now names an external stop, successful rebuild, and start sequence for every matching service. Explain that an already-current update does not rebuild stale output, and document the default-profile commands with failure-short-circuiting in the source update guide. This changes guidance only, without altering admission or lifecycle policy. The existing fence suite passes 37 cases with one platform skip; focused lint, formatting and independent P2 review are clean. * test(daemon): observe published updater settlement Record launcher, command, and output lifecycle timestamps for the published update command. After its current ledger run becomes terminal, retain at most two bounded and sanitized process snapshots with creation and CPU/I/O facts. Fence progress and snapshots to that same run; observations neither refresh progress nor change command, cleanup, or watchdog budgets. This diagnoses a published 9.3 command that timed out after its candidate reported successful activation and verification. Preserve the failure and avoid inferring early process exit from post-timeout cleanup observations. 34 focused cases, services types, scoped lint, formatting, and independent P2 review pass. Native diagnostic execution remains required. * fix(daemon): recognize the released waiting task launcher Accept the exact waiting VBS form generated by the published 2026.9.3 installer during an owned service-definition audit. Keep custom launcher behavior classified as an unknown edit and preserve all selector, command, root, and native authority checks. Receive the three reviewed postimages from ec74258. The actual audit regression fails on the original implementation; 55 receiving cases pass. The shared owner also verified 140 backup/rewrite cases, core/services types, scoped lint and P2 review. This repairs the observed reconciliation warning; it does not claim to explain the independent updater settlement timeout. * test(daemon): sample unsettled updates before the command deadline Keep the same two-snapshot cap, current-run binding and progress behavior. Capture an unfinished run at 300 seconds so a slower installation cannot prevent all process observations. Rename the diagnostic field to reflect both active and terminal observations. The original observer regression fails; 25 cases, scoped lint/types and independent P2 review pass. Command and cleanup budgets are unchanged. * test(daemon): preserve CRCRLF task export comparisons * fix(windows): enable a verified disabled task on explicit start Receive the shared selected-service start repair, preserving published command fingerprints and optional Enabled metadata behavior. Keep the finalization process fixture's real entrypoint exports available. Source-build recovery ownership remains unchanged. * docs(windows): clarify explicit start partial effects Document that successful enablement remains an audited effect when the later launch fails. Preserve the existing explicit-start contract and require inspection before retrying; do not imply rollback after authority loss. * docs: clarify source CLI recovery uses the existing build --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Donnie Fiander <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Sep 29, 2026
) * fix(build): refuse dist rebuild under a live managed Gateway Stop pnpm build and run-node auto-build from deleting hashed dist modules while a managed Gateway ExecStart still points at this checkout. * chore(build): drop unused fence message field * fix(build): also fence direct tsdown and run-node rebuilds Cover the cleanTsdownOutputRoots path and refuse early in run-node so live managed Gateway dist cannot be wiped outside build-all. * fix(build): keep live Gateway stop off the rebuild path Dispatch gateway stop/restart from existing dist, apply --profile before service inspection, and fence only physically overlapping checkouts. * fix(build): keep live dist fence off tsdown declaration graph Load daemon inspection lazily so tsdown fixtures and plugin-sdk dts generation do not import service-layout. Move run-node recovery tests to a sibling file so the line-cap ratchet does not grow. * fix(build): use import type for SpawnOptions in live-dist tests * fix(build): dispatch source-only QA reports before the live dist fence qa parity-report and qa coverage already run from source without rebuilding private QA dist. Check that path before refusing a live managed Gateway rebuild. * fix(daemon): discover managed Gateway bindings across profiles The live-dist fence needs every installed managed selector, not only the current OPENCLAW_PROFILE. Reuse includeManagedOpenClaw scans and leave findExtraGatewayServices semantics unchanged. * fix(build): refuse live dist rebuild for every overlapping Gateway profile A default-env build could still replace dist under a sibling profile Gateway. Inspect all managed bindings, name offenders, and point operators at stop or openclaw update. * fix(daemon): keep managed Gateway binding discovery under lint limits Move profile binding mapping out of inspect.ts, list managed services via listManagedOpenClawGatewayServices, and use toSorted for profile naming. * fix(build): keep live-dist refusal out of updater restore and system census Propagate admissionRefused so update-gateway-build does not rm live output roots after a pre-mutation fence refuse. Enumerate system-scope managed units with explicit systemdReadTarget so user and system siblings both reach the fence. * test(build): pass a compare function to toSorted in the fence fixture * fix(build): satisfy live-dist fence CI type, knip, and assertion gates Treat toSorted comparators as possibly undefined, stop re-exporting the unused binding type, and read launchd profile env through the record owner instead of a type assertion. * fix(daemon): inspect systemd template instances in the live-dist census Discovered `[email protected]` files were forwarded as unit names, so the fence queried a non-runnable template and fail-opened past a live instance when a separate user Gateway was installed. Reuse the existing instance resolution owner and cover user+system template inspection through the service reader. * fix(tooling): pin foreign-cwd tsconfig and clear CI gates - pin TSX_TSCONFIG_PATH in the CLI shim only when the cwd lacks one, so fixture-spawned run-node.mts resolves workspace profile imports - pass --import scripts/tsx.mjs to live-updater spawns and pin the tsconfig in run-node-lifecycle fixture envs (production loader parity) - drop the unused systemd re-export for knip and move the template- instance test to service.systemd-scope.test.ts for the line cap * fix(daemon): inspect registered Gateway services accurately Read strict Windows service commands from registered actions and preserve supported launcher encodings without treating dynamic CMD expansion as a verified command. Retain exact task identity and bound systemd selection. Use one platform inventory collector for the existing full and diagnostic projections. Report incomplete inspection through Doctor while preserving status JSON and the existing managed-service filters. Keep load-state inspection behind a leaf capability instead of reverse facade imports. Refs openclaw#151608, openclaw#151463. * fix(daemon): classify service commands by position Share runtime and root-option parsing so Node display names and profile values cannot classify a Node service as a Gateway. Preserve literal shell, env and generated launchd wrappers, and honor the executable selected by launchd. Read systemd's single-quoted arguments through the existing parser and preserve literal apostrophes when rendering. Keep strict Windows command rejection separate from lenient diagnostics, and align the native-boundary fixtures with that contract without weakening ownership or source-preservation assertions. * fix(daemon): inspect direct registered task actions Read literal executable actions from their registered Scheduled Task and revalidate the action before returning command facts. Strict runtime inspection uses the same registered command instead of a default launcher. Keep executable paths out of managed launcher provenance. Direct actions remain outside automatic update service management when no restorable CMD/VBS launcher exists, preserving the prior stop and definition ownership boundary. * test(windows): prove installed service upgrade paths Extend the existing native Scheduled Task proof with verified immutable package handoff and fixed fresh, published 2026.9.3, and published 2026.9.4 CLI cells. Require live version/build identity, selected PID replacement, peer continuity, strict registered-action inspection, and settled cleanup before evidence publication and disposable installation retirement. Keep source-only and repair modes, permissions, deadlines, and native lifecycle owners intact. Direct executable fixtures remain disabled and preserve the updater's unsupported-mutation boundary. Native execution remains pending. * test(doctor): retain managed Windows launcher provenance Keep the generated CMD path on the existing managed-service fixture before and after reinstall so Doctor admission sees the installation it models. Preserve all stop, install, restart, rollback, and direct-action refusal expectations without changing production behavior. * test(windows): exercise native autostart ownership boundaries Extend the existing published-updater cell with its stopped, task-owned Scheduled Task. Capture real admission, exercise native enable/disable, and preserve the definition and files after foreign-owner refusal. Test retained admission separately from restoration so legitimate same-root refresh remains supported. Restore the original XML through the existing fixture lifetime; do not broaden product control or workflow permissions. Modeled owner tests, selected source checks, and independent review pass. Actual Windows execution remains required before a native proof claim. * test(windows): retain sanitized installed command failures Keep unexpected command stdout and stderr in bounded failure diagnostics so JSON-mode CLI errors survive native proof failures. Reuse the existing terminal and support redaction owners before clipping; withhold incomplete captures while preserving the existing truncation failure. Move the existing command runner into its own test-support module and update both consumers without changing timeout, exit, signal, or cleanup semantics. Real-child regressions reproduce both privacy defects and pass with the correction. The original installed Gateway failure remains undiagnosed. * fix(daemon): preserve Windows probe budgets and Doctor cleanup eligibility Use the existing cold PowerShell startup budget for Task Scheduler queries without an explicit deadline. Keep periodic activation checks bounded and preserve unknown results rather than treating timeouts as task absence. The native probe test now exercises the production default. Share Doctor's existing legacy cleanup classification with its registered preview. Keep unsupported platforms, scopes and unrecognized Linux unit names as findings without advertising removal or invoking unrelated cleanup. Extract the classifier and complete cleanup test group without dropping assertions or changing native mutation ownership. Retain the failed installed Windows runs and their source identities; new package and native upgrade qualification remain separate requirements. * chore(daemon): retire stale Doctor size baseline The split Doctor service module no longer needs a max-lines suppression. Remove only its stale baseline entry so the shrink-only ratchet matches actual source. Product, dependency, workflow and fixture bytes are unchanged. * fix(build): keep native fixture import closures complete Keep the legacy source-update transaction at its existing direct CLI call site so native declaration-library consumers do not load its CLI-only source resolver closure. Copy the exact PID helper inputs into the runtime fixture. Use the real legacy-loader file URL in its existing subprocess invocation, so execution and unused-file analysis share the same dependency reference. Preserve all assertions, lifecycle guards and package runtime behavior. Co-authored-by: Donnie Fiander <[email protected]> * test(windows): retain sanitized service proof observations Record bounded install and status facts before semantic assertions so a successful CLI exit cannot hide the native inspection reason. Exclude free-form stderr and private response fields, and preserve existing execution, deadline, and cleanup assertions. * fix(windows): discover exact Startup Gateway launchers Carry the focused Startup discovery changes from openclaw#151674 onto the current service inventory owner. Preserve exact file identities, selected fallback classification, Scheduler inspection failures, and published updater fingerprints. Extend the existing installed Windows cells with read-only Startup diagnostics and owned-file cleanup. Focused local regressions pass, including Doctor failure on the original collector and success with Startup discovery. Native Windows qualification and the managed binding/fence integration remain pending. * test(windows): retain safe installed-service observations Retain allowlisted install/status JSON before strict semantic assertions, without copying private response fields or opaque successful stderr. Compose service observation and exact sibling-refusal checks through one internal options record and migrate every test/support caller together. Preserve native process cleanup, readiness assertions and command budgets. Co-authored-by: Donnie Fiander <[email protected]> * test(update): isolate source updater fixture inputs Give the synthetic compiler declared memory capacity through the existing memory owner instead of inheriting competing CI workers. Keep real build heap admission and all lifecycle assertions unchanged. Use the established TypeScript loader for the Linux-only live-updater CLI case so it reaches the platform refusal rather than failing during import. Refs openclaw#152875. Retains the exact failing Linux CI evidence and contributor work. Co-authored-by: Donnie Fiander <[email protected]> * fix(windows): preserve native status inspection defaults Keep the CLI RPC default distinct from an explicit timeout so Windows service inspection can use its existing cold-start budget. Forward explicit load-query deadlines through the Task Scheduler owner while preserving lifecycle defaults and timeout diagnostics. * fix(windows): preserve native status inspection defaults Keep the CLI RPC default distinct from an explicit timeout so Windows service inspection can use its existing cold-start budget. Forward explicit load-query deadlines through the Task Scheduler owner while preserving lifecycle defaults and timeout diagnostics. (cherry picked from commit 9c3bb9c) * fix(daemon): remove inventory file-helper type cycle * fix(models): retain discovered models after refresh failures Record successful legacy catalog results at the producer boundary so unavailable refreshes retain the accepted inventory. Preserve explicit outcomes, advisory SDK fallback behavior, and first-discovery starter policy. * fix(models): preserve skipped catalog outcome semantics Mark bundled static, configured, and advisory catalog projections with explicit empty outcomes so legacy success inference cannot promote them to observed account inventory. Preserve live outcomes and helper types. Keep exact auth provenance histories and move existing fixture/policy code into focused owners where required by the line-cap ratchet. Validation: 447 producer and sibling cases, 56 shared self-hosted cases, 95 auth/policy cases, causal missing-outcome failures, maintained checks, and independent review. * test(plugin-sdk): keep discovery loader types acyclic Move the shared loader type into a leaf consumed by both discovery contract helpers. Preserve its public provider-test-contracts export without a child-to-parent type import cycle. Validation: maintained Madge check reports zero cycles; core, all core test graphs, extension test types, lint, formatting and independent review pass. Runtime behavior and previous catalog proof are unchanged. * fix(plugin-sdk): mark generated static catalogs explicitly Keep the generated non-live, non-strict catalog adapter from claiming successful acquisition for manifest or configured rows. Preserve null, errors, strict and custom callbacks, static catalogs, and public types. Validation: three existing controls fail before the correction; all49 owner and sibling cases pass afterward, with types, lint, line caps and fresh independent review clean. * fix(models): remove unlanded catalog outcome inference * test(windows): handle omitted scheduled task settings * test(windows): handle exported task defaults and reuse pinned packages Preserve disabled-task and cleanup assertions when Task Scheduler omits default settings. Bind the package to its source commit and permit only the reviewed fixture paths to differ in tooling. Includes the canonical sharing-fixture retirement correction from 8699132 (openclaw#158205). * test(windows): retain installed proof before native cleanup Persist settled commands and the original inspection failure before awaited cleanup. Prepare the existing compiled worker cache before each installed campaign and give installed Actions steps room for the unchanged native test and teardown bounds. * test(windows): diagnose native probe context after cleanup Compare read-only PowerShell probes under native and isolated OS contexts only after failed cold acceptance and verified cleanup. Preserve probe deadlines, process ownership, original results and package identity. Carry the canonical failure-only Gateway hook phase observer for the separate CI recurrence without claiming a causal repair. * test(windows): record native module cache context Retain only projected environment key names and module-cache path kind/hash so the diagnostic can distinguish an actual caller-selected cache from an absent one without recording values or changing launch behavior. * test(windows): preserve native context in installed fixtures Replace the duplicate OS environment filter with the existing native service projection and case-aware merge. Preserve caller-selected PowerShell module cache routing while retaining private application, temporary and npm paths and excluding application credentials and Node options. Two old-code regression failures and 23 fixed owner/parity cases pass; native timing remains to be verified without changing deadlines. * test(windows): preserve native context and failure evidence * test(windows): await installed readiness and guarded cleanup Installation acknowledges service activation without certifying runtime readiness. Await the existing HTTP readiness owner after install and update before the unchanged Task/PID/RPC/build assertions. Stop installed supervisors through the guarded service owner before generic task deletion; the probe PID-file cleanup does not own those processes. Preserve original failures, cleanup authority and all existing native deadlines. * test(windows): distinguish absent tasks during fixture cleanup Use authoritative Scheduler inspection before guarded stop. Confirmed absence after uninstall or failed registration skips only stop; unknown inspection still fails, and full process/port cleanup remains required. Preserve task authority on a genuine stop failure. * test(daemon): wait for installed gateway readiness before inspection * test(daemon): stop installed fixtures through their profiled CLI * fix(daemon): give actionable Startup refusal guidance * fix(update): retain native custody during partial-stop recovery Compensate a failed native stop through the existing guarded service restart, revalidating the original binding inside its operation lock. Require completed recovery and preserve the original failure without starting a build or custom shell command. Successful and failed-build custom restart contracts stay intact. Four published-shell regressions fail on the former path and pass after this repair; 21 unchanged controls, selected checks, and independent review pass. Co-authored-by: Donnie Fiander <[email protected]> * fix(daemon): inspect extra Windows services before removal Keep verified Node and legacy diagnostics visible while offering read-only Scheduled Task inspection in Doctor and deep status. Preserve the existing service cleanup owners and diagnostic JSON shape. Carry the canonical SQLite fixture host-context and dependency-selection repairs from openclaw#158209 and openclaw#158409 for the inherited CI collection failure. * test(windows): expect informational Startup fallback findings * fix: restore asynchronous harness task completion Complete the shared task-content projection cutover for asynchronous finalization and delivery. Preserve the captured Incognito policy and exact task-assignment fences. The unchanged worker suite reproduced six ReferenceError failures before the fix and passes all seven cases afterward; the sibling SDK runtime suite passes all 30 cases. Independent review is clean through P2. * fix(daemon): compose read-only Windows inspection hints Preserve exact Startup file inspection while adopting read-only Scheduled Task advice and Inspection headings. Keep Node diagnostics visible without suggesting deletion. Combine both owner behaviors and reuse the qualified lower correction without unrelated fixture changes. * test(windows): accept omitted PID for stopped Startup runtime * test(windows): budget installed lifecycle phases separately Give the fixed installed cells room for their serial setup, unchanged updater command window, native assertions and cleanup. Keep source-native and command deadlines, the quiet-run detector and the hard job limit unchanged. Record real completed phases after durable evidence writes, and verify workflow envelopes against the actual body and teardown configuration. * fix(qa): retain the current Telegram renderer reference Carry the canonical one-line metadata correction from openclaw#158313. The retired formatter was moved into format.ts, already listed by this scenario; execution and all assertions are unchanged. The owning catalog suite passes all 56 cases and fresh review is clean. * test(windows): budget installed service phases and retain progress * test(daemon): retain installed update failure progress * test(windows): retain failed installed update progress Read failed published-updater progress through the existing asynchronous SQLite owner before native cleanup. Retain only safe phase, status and step timings; preserve all command, body and teardown deadlines. Validation: five installed-fixture tests, services types, targeted changed checks and independent review through P2 passed. Shared diagnostic implementation qualified in the Windows fixture owner. * test(daemon): budget the full published Windows update * chore(ci): carry canonical line-cap repairs Carry the necessary kernel environment and publication alias hunks from openclaw#158625 (85aa765), and the interrupted replay fixture extraction from openclaw#158538 (3fd1eb9). Preserve their assertions, state contracts, and Peter Steinberger attribution. Update installed workflow comments to match the already-qualified body budgets. * test(windows): retain final updater verification diagnostics * test(windows): verify stale admission refuses foreign task resume * fix(daemon): bound aggregate Windows service inventory Carry one monotonic deadline through Scheduler discovery, launcher reads, registration revalidation, and missing-launcher metadata. Preserve completed findings and report incomplete inventory when the shared budget is exhausted. * fix(windows): share inspection deadlines with Startup launchers Compose the shared Windows inventory deadline through Startup directory inspection, launcher reads, and definition revalidation. Preserve completed discoveries and report every exhausted scan, including arbitrary filenames and the final completed Task. Use the same caller deadline for exact Startup state capture and reread. Stalled file operations remain unknown diagnostics without extending the native inspection allowance. Retain immediate Task-query failure fallback, profile bindings, and process cleanup propagation. * test(openrouter): split Fusion prompt coverage below line limit * test(daemon): complete system template runtime fixture Provide the loaded-runtime reader's required ControlGroup metadata. The missing native response correctly made inspection unavailable and broke the template regression after main integration; production behavior is unchanged. Validation: the original fixture fails locally for the CI assertion, then all 76 service-scope and loaded-runtime cases pass after correction. Independent P2 review is clean. No assertion, timeout, or package source changed. * test(openrouter): align the canonical Fusion suite label * fix(daemon): classify registered helpers without profile admission Let read-only registered inventory classify faithfully revalidated commands without requiring an OpenClaw profile. Keep selected-service profile admission strict and preserve launcher, Task, script and deadline checks. Native disabled-discovery exposed a false warning for a static node --version helper. The actual collector regression fails before this fix and passes with all 206 owner and sibling cases afterward. * fix(daemon): separate task discovery from profile admission Registered inventory must classify fully inspected unrelated commands without requiring an OpenClaw profile. Preserve resolved matching profiles for selected-service reads and all native definition revalidation. Reproduced through the real inventory collector after the installed Windows discovery fixture failed; retain the selected-service refusal control. * fix(build): retain Startup identity in external recovery guidance Carry the shared stop, successful rebuild, and start guidance while keeping Startup-only siblings tied to their exact entry paths. An already-current update does not repair stale output. Fence tests pass 44 cases with one existing skip; script types, lint, formatting and independent P2 review pass. This copy-only successor is separate from the frozen f919 Windows package source. * fix(daemon): recognize released waiting task launchers Recognize the exact waiting VBS wrapper shipped by 2026.9.3 during owned service reconciliation. Keep custom launcher behavior unknown and preserve all command, root, Task and authority checks. The real audit entry point rejected this released form as TaskLauncher unknown-edit before repair. The causal regression and edited-launcher control pass with 55 audit and 140 backup/rewrite sibling cases. * test(windows): preserve primary installed update failure facts Retain bounded sanitized fields from the original published-update JSON before unchanged failure assertions. This preserves primary reasons and failed checks that the output tail can omit, without changing capture ceilings, command deadlines, process ownership, or cleanup. * fix(test): read Windows proof archive members portably * test(windows): normalize native task export line endings * fix(windows): enable verified disabled tasks on explicit start Preserve captured autostart policy during update recovery; an explicit Gateway or Node start revalidates the selected task and its launcher/package or recorded wrapper before enabling and running it. Keep stronger local start fingerprints out of published update drivers serialized command shape. * fix(windows): retain starts with unavailable enable metadata Only an explicit disabled policy admits enabling. Preserve native Run for readable Tasks whose optional Enabled field is absent, while retaining typed failures for failed inspections. Keep the finalization fixture original gateway-entrypoint exports when replacing its install resolver. * docs(windows): explain partial effects of an explicit start A successful enable can remain after a later launch failure. Preserve the existing independently audited enable contract and require current authority for any further control; do not imply automatic rollback of a failed start. * fix(build): bound exact Startup service inspections Pass the existing Windows inspection allowance when the build fence reads an exact Startup entry. A stalled launcher read now aborts within that budget so the fence can still inspect and refuse a later live sibling. Preserve ordinary reader defaults and the cold native-Node import boundary. The real fence/state/file-reader regression fails before the fix and passes afterward. All 122 fence and Startup/deadline cases, selected type/lint/export checks, native Node import, and independent scoped review pass. * docs(update): clarify existing-build recovery commands Source-runner gateway stop and restart use the existing CLI by default. Explain that applying source changes requires the documented stop, build, and start sequence. --------- Co-authored-by: Donnie Fiander <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #157884, #156946
What Problem This Solves
Fixes: PR CI can pass while omitting the generated SQLite lifecycle regression, allowing an import-time failure to reach main and break other PRs.
User Impact
No runtime behavior changes. CI selects the SQLite lifecycle check when its transitive dependencies change. The worker-mock failure is already fixed on the rebased main branch.
Why This Change Was Made
The compile-cache maintenance change in #157884 began reading
isMainThreadat import time. The generated cleanup fixture mocked the worker module with onlyWorker, so that import failed. Main now suppliesisMainThread: truevia #158209; this PR preserves that fix, including the assertion that cleanup never opens a native database or worker.The fixture's generated imports used an opaque path-building helper. Replace those references with literal
import.meta.resolvecalls that the existing CI dependency scanner understands. A regression against the real dependency graph requiresnode-compile-cache.mjsto remain reachable from the outer SQLite lifecycle test; a separate full CI-plan replay verifies selection for the original PR diff. This fixes the dependency declaration at its owner without new selector heuristics or workflow changes.Evidence
1276071e997: the ordered lifecycle test fails with the missingisMainThreadexport; immediate parente06986400cepasses.test/non-isolated-runner.sqlite.test.tsselected exactly once inchecks-node-compact-small-11.node scripts/check-changed.mjsandgit diff --checkpass, including root test types, lint, formatting, guards, and dead-export checks.Rebased onto
1ac96c767f2: resolved the overlapping worker-mock edit by preserving main’s fix. The ordered SQLite lifecycle test and dependency-routing regression both pass on the rebased head; formatting and diff checks pass. Earlier full routing-suite and CI-plan replay evidence above applies to the pre-rebase head.Rebased-head
check:changedand fresh independent P0–P2 autoreview pass.