Skip to content

refactor(scripts): deslop scripts/lib - #159362

Merged
steipete merged 14 commits into
mainfrom
deslop/l96-scripts-lib-refresh
Sep 28, 2026
Merged

steipete merged 14 commits into
mainfrom
deslop/l96-scripts-lib-refresh

Conversation

@steipete

@steipete steipete commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

scripts/lib repeats scenario rendering, process lifecycle handling, release metadata parsing, and report projection across parallel helpers. Those copies make contract-preserving maintenance harder and have required the same fix in multiple places.

User Impact

CLI flags, environment precedence, output formats, exit codes, test selection, release/publish behavior, and signing choices remain unchanged. Config-boundary scans now observe source edits made between invocations in the same process.

Why This Change Was Made

  • Share Docker/E2E watchdog code while retaining their different process settlement events; carry its new companion through selective fixture and frozen-tooling acquisition.
  • Render test-state scenario JSON from one owner, preserving the published-baseline agents.list projection and exact shell output.
  • Consolidate SQLite crash-worker and cross-OS Gateway log/close lifecycle handling without changing crash checkpoints or cleanup authority.
  • Replace repeated planner prefix branches with ordered descriptors, remove benchmark forwarding exports, and share report projections.
  • Reuse release-version, package observation, bootstrap identity, mobile version, and SDK export owners while retaining validation and publication contracts.
  • Keep the extracted mobile version helper in iOS build/screenshot selection and selective release fixtures; verify that the existing planner still emits Android and iOS test owners.
  • Accumulate bounded nearby simplifications in package metadata, guards, memory sizing, and declaration helpers.

Fixes found along the way

Config guards kept a module-global source cache, so a second scan could miss a newly introduced forbidden config call or retain a removed violation. The cache now belongs to one scan. Two regressions exercise clean → forbidden → clean source through both public collector entrypoints.

The computed PR-tooling import closure contains 96 scripts/lib files. None are changed; scripts/pr and scripts/pr-lib are untouched. No package boundary imports were added.

Evidence

Measured diff: 1,437 net production/tooling lines removed, with 38 net test/support lines added. All production files over 200 lines in the eligible subtree were read; the protected import closure was excluded from edits.

Blacksmith Testbox proof includes:

  • 134 selected script, caller, and import-boundary test files, with focused follow-through for the mobile fixture and iOS routing additions.
  • Before/after comparisons: 51 Docker/state/signing cases, 25 other CLI/report cases, 16 bootstrap/config-guard cases, 42 complete planner projections, and 5,040 release-version inputs. Report timestamps and independently verified checkout revisions are normalized; operational output and exit behavior are preserved.
  • Config-cache and iOS-routing regressions fail against their pre-fix production owners and pass after repair. The shared mobile helper resolves to precise Android/iOS CI test shards.
  • node scripts/check-changed.mjs, pnpm build, pnpm check:workflows, script/test lint, full dependency/unused-file/unused-export scans, macOS script contracts, and all selected typecheck lanes pass on Testbox. The final Knip caller registration also passed its focused changed gate and independent review.
  • Independent review completed with source-backed resolutions. The reviewer confirmed bootstrap admission remains in the unchanged parser; CLI checks reject empty and substituted package inventories. Its subsequent iOS numeric-validation finding was rejected because relevantBuildUploads already validates every relevant record before calculation: both baseline and candidate reject abc, 1.5, 0, -1, and unsafe integers, while preserving whitespace-normalized allocation. No accepted findings remain.
  • Knip models the watchdog's actual shell import through its existing shell compiler. Removing or changing the source import removes or changes the modeled dependency; no ignore or baseline exemption was added.

Changed-test cost on Testbox (pnpm test <file> --maxWorkers=1, wall seconds):

Test file Wall seconds
config-boundary-guard.test.ts 1.43
android-version.test.ts 2.39
plugin-npm-security-scan.test.ts 13.89
vitest-pair-benchmark.test.ts 2.14
docker-build-helper.test.ts 48.61
preflight-frozen-target-contracts.test.ts 44.63
mobile-release.test.ts 4.04
ci-changed-scope.test.ts 15.75

The two existing suites above 30 seconds exercise process cleanup and frozen-checkout authority. Their only changes add the new companion to existing fixtures; no test cases were added to those suites. The new behavior regressions use existing lightweight suites.

The first changed-file gate exposed pre-existing cron fixture type errors, fixed on main by c0e6951d6f0; the branch was refreshed onto that repair. Subsequent checks caught and corrected selective fixture acquisition, type-contract, and dead-export issues. A later rebase introduced a sanitizer fast-path reference to the retired constant; focused tests reproduced it and the correction preserves the upstream fast path. Hosted CI additionally required the source-derived Knip caller registration. No assertions, security checks, retries, or timeout budgets were weakened.

The previous hosted run failed during cron fixture removal (ENOTEMPTY) and cancelled its remaining jobs. Current main already contains the scoped database cleanup repair and held-worker regression in #159182 (e1e4e6981cb). This branch was rebased onto 3faf686bde3; git range-diff confirms all three refactor commits are patch-identical. The incorporated regression proves settlement before removal and sibling-store isolation; passing replays alone do not establish the exact cause of the intermittent hosted failure.

Current-head CI run 36304153515 is blocked by an inherited suppression-guard failure: native-subagent-monitor.test-support.ts|typescript/unbound-method|1 was introduced on main by #159325 but is absent from the explicit allowed tail. Neither the helper nor the guard is changed here. The separately owned repair in #159550 now covers this exact failure without widening the suppression allowlist. Its current head is aa0ea90cd7cbb3cad24d0fd573cc506028d8bb6a; the required CI gate is green. This refactor awaits that repair landing, then a rebase and fresh hosted CI. Other jobs were cancelled by fail-fast, so this run is not a passing full gate.

The original four hosted job groups passed across the resumed Testbox replay (4,166 passed tests, two skips). The exact cron shard passed all 130 files / 1,453 tests, followed by 20 consecutive Linux iterations of the 18 reaper and scoped-cleanup cases (360 passes). The first replay stopped on an incorrect carrier-commit assertion before any tests; the next lacked CI’s Bun executable. The final replay used the workflow’s checksum-pinned Bun runtime and exited 0. Provider: blacksmith-testbox; stopped lease: tbx_01m3gx6zqyqe4cfsn50gntyzdv; Testbox run. Commands: the original ci-run-node-test-shard.mts group envelope, then 20 sequential run-vitest.mjs invocations for service.session-reaper-in-finally.test.ts and service.test-harness.test.ts.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling size: XL labels Sep 27, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 27, 2026
@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 27, 2026, 7:01 PM ET / 23:01 UTC (Revision 17).

ClawSweeper review

What this changes

The branch consolidates Docker, CI planning, release, packaging, and reporting helpers and makes repeated config-boundary scans read current source.

Merge readiness

⛔ Blocked before merge - 2 items remain

Current main still has the repeated script helpers and the config-scan cache defect addressed by this PR. I found no blocking code defect, but the PR description still says a closed, unmerged CI repair is pending.

Priority: P3
Reviewed head: faa6ea555452503b83ced21e51dfaaba24878eda

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Substantial comparative script proof and a smaller implementation support a good review; the CI account in the PR body needs correction.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The changed production owners are repository script entrypoints and helpers. The captured PR body reports after-change Testbox execution and before/after operational-output comparisons for Docker, test-state, planner, signing, and release scenarios; raw comparison logs were not independently inspected. The changed JSON is test-fixture and publication-artifact output, with no identified stored user-data contract change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The changed production owners are repository script entrypoints and helpers. The captured PR body reports after-change Testbox execution and before/after operational-output comparisons for Docker, test-state, planner, signing, and release scenarios; raw comparison logs were not independently inspected. The changed JSON is test-fixture and publication-artifact output, with no identified stored user-data contract change.
Evidence reviewed 11 items Current main still caches across scans: The fetched main revision retains a module-global source cache in the config-boundary collector.
Changed cache ownership: The PR scopes the source cache to a collector invocation; the added test covers clean, forbidden, then clean source through the public collectors.
Distinct script work remains: The introduced diff adds a shared Docker watchdog; current main still has the inline implementation. Main's later changes are in unrelated Android, Gateway, UI, and documentation paths.
Findings None None.
Security None None.

How this fits together

Repository scripts turn source changes, package metadata, and runner settings into CI jobs, Docker checks, release artifacts, and reports. They support OpenClaw development and publication.

flowchart LR
A[Source changes] --> D[Script helpers]
B[Package and release inputs] --> D
C[Runner settings] --> D
D --> E[CI jobs]
D --> F[Docker checks]
D --> G[Release artifacts and reports]
Loading

Before merge

Agent review details

Security

None.

PR surface

Tests +38, Other -1437. Total -1399 across 70 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 9 63 25 +38
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 61 1334 2771 -1437
Total 70 1397 2796 -1399

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: scripts/lib/openclaw-test-state.mts, migration/backfill/repair: scripts/lib/sqlite-reliability-index-repair.ts, serialized state: scripts/lib/mobile-version.ts, serialized state: scripts/lib/plugin-npm-release.ts, unknown-data-model-change: scripts/lib/android-version.ts, unknown-data-model-change: scripts/lib/plugin-npm-release.ts, and 1 more. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep one owner for each script contract while preserving Docker exit behavior, CI selection, and release artifact validation.

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

Yes for the incidental cache defect: current-main source retains text across collector calls, and the proposed regression exercises clean, forbidden, then clean source in one process. This read-only review did not execute it.

Is this the best way to solve the issue?

Yes. Sharing the existing script responsibilities and scoping the cache to each scan addresses the identified maintenance problem without adding a competing owner.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is primarily internal tooling cleanup with a bounded config-scan correction.
  • merge-risk: 🚨 automation: The diff changes CI selection, Docker checks, and release verification, where semantic drift could affect automation despite focused comparisons.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The changed production owners are repository script entrypoints and helpers. The captured PR body reports after-change Testbox execution and before/after operational-output comparisons for Docker, test-state, planner, signing, and release scenarios; raw comparison logs were not independently inspected. The changed JSON is test-fixture and publication-artifact output, with no identified stored user-data contract change.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed production owners are repository script entrypoints and helpers. The captured PR body reports after-change Testbox execution and before/after operational-output comparisons for Docker, test-state, planner, signing, and release scenarios; raw comparison logs were not independently inspected. The changed JSON is test-fixture and publication-artifact output, with no identified stored user-data contract change.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (16 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-27T10:43:05.696Z sha e4e3603 :: blocked before merge. :: none
  • reviewed 2026-09-27T11:47:06.263Z sha 79c4df6 :: blocked before merge. :: none
  • reviewed 2026-09-27T13:19:47.754Z sha 81156af :: blocked before merge. :: none
  • reviewed 2026-09-27T16:06:35.406Z sha 086d82b :: blocked before merge. :: [P2] Restore the WSL test to its network/platform shard
  • reviewed 2026-09-27T17:07:47.262Z sha 93f30c8 :: blocked before merge. :: none
  • reviewed 2026-09-27T19:45:11.265Z sha 5170f1e :: blocked before merge. :: none
  • reviewed September 27, 2026, 4:16 PM ET / 20:16 UTC (Revision 15) sha unknown :: blocked before merge. :: none
  • reviewed 2026-09-27T22:33:33.830Z sha 7e9ad4b :: blocked before merge. :: none

@steipete
steipete marked this pull request as ready for review September 27, 2026 03:21
@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

Consolidate script lifecycle, scenario, planner, report, release and
packaging helpers while retaining CLI and publication contracts.

Keep config-boundary source caches within one scan so repeated in-process
checks observe edits. Carry extracted helpers through selective fixtures
and iOS scope routing. Leave PR tooling and its library import closure intact.
@steipete
steipete force-pushed the deslop/l96-scripts-lib-refresh branch from f1d52bc to fe9d0bc Compare September 27, 2026 07:46
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 27, 2026
@steipete
steipete enabled auto-merge (squash) September 27, 2026 10:11
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 27, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 27, 2026
@clawsweeper clawsweeper Bot added the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label Sep 27, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 27, 2026
@steipete
steipete merged commit 9491d5a into main Sep 28, 2026
116 of 191 checks passed
@steipete
steipete deleted the deslop/l96-scripts-lib-refresh branch September 28, 2026 00:14
@steipete

Copy link
Copy Markdown
Contributor Author

Landed over a pre-existing main failure (coordinator, per maintainer rule). The only failing job, checks-node-compact-large-11, failed in src/gateway/server/plugin-legacy-listeners.test.ts (ECONNRESET where ECONNREFUSED is expected). This PR touches no gateway code; its only src/ edits are two script-contract tests. The same reset/refusal race was already observed on main (CI run 36337704399), and the partial fix df3ea62 is included in this head. A follow-up flake repair is being prepared separately.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
* refactor(scripts): deslop scripts/lib

Consolidate script lifecycle, scenario, planner, report, release and
packaging helpers while retaining CLI and publication contracts.

Keep config-boundary source caches within one scan so repeated in-process
checks observe edits. Carry extracted helpers through selective fixtures
and iOS scope routing. Leave PR tooling and its library import closure intact.

* fix(scripts): retain sanitizer fast path after helper cleanup

* fix(scripts): model watchdog shell consumer in dead-code checks
steipete added a commit that referenced this pull request Sep 28, 2026
…ests

#158491 imports it from two infra tests after #159362 made it module-local,
so the core test-types infra stripe failed on main with TS2459.
steipete added a commit that referenced this pull request Sep 28, 2026
…ests

#158491 imports it from two infra tests after #159362 made it module-local,
so the core test-types infra stripe failed on main with TS2459.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…ests

openclaw#158491 imports it from two infra tests after openclaw#159362 made it module-local,
so the core test-types infra stripe failed on main with TS2459.
steipete added a commit that referenced this pull request Sep 29, 2026
#158916)

* refactor(runtime): deslop tasks, daemon, node-host and tui second pass

* test(update): mock canonical systemd activation admission

Keep native-start and retained-restart fixtures on the lifecycle admission owner after consolidation. Preserve real executor revocation, native command ordering and every assertion.

* test(runtime): track relocated decoder suppression

* test(tui): synchronize terminal fixture readiness

Inspect the current completed target screen instead of cumulative terminal output. Wait for startup readiness and command publication while isolating unrelated fd discovery in the exact-argument completion fixture.

* test(tui): isolate fallback projection from vendor policy loading

Use distinct synthetic provider/model identities while retaining foreign-run and malformed-event rejection, exact footer replacement, unchanged backend calls, and clean exit. Include captured terminal output when the exit assertion fails.

* test(tui): group session mode proof with identity fixtures

Move the self-contained mode-scoping case out of the general harness to retain the line cap. Preserve every assertion, the 20-second operation budget, the 25-second test budget, and owned fixture cleanup.

* refactor(runtime): reuse projection and worker dispatch values

Inline the one-use row identity before keyed refresh and integrate the deferred plugin-migration write-options cleanup from main (ad31034, #159426). Preserve worker admission, transaction ownership, options, and refresh order. Also use the synchronized current screen for the sibling stale-display-name assertion without changing its timeout or cleanup.

* test(tui): fence reused-session fixture transitions

* refactor(ui): colocate omitted media status rendering (#159938)

* fix(tui): preserve CLI lifecycle context for terminal events

Bind input and resize callbacks at terminal startup so later stdin events retain the existing CLI resource host and scheduler. Keep ingress authority and shutdown ownership unchanged. Add a focused callback-context regression; the real built CLI reproduces the original MCP scheduler error and passes with the adapter.

* fix(ci): keep chat attachment controls within lint limit (#160159)

Move the unchanged image data-URL decoder into the existing image helper to restore the 700-line lint limit.

Validated on Blacksmith Testbox: 34 attachment tests, all core lint stripes, targeted changed checks, and the UI build. Independent review found no actionable issues.

* test(daemon): assert incompatible custody release diagnostics

Align the four retained historical custody cases with b107d4a. Release now validates the stored generation directly rather than using the mutation-authority predicate, allowing paired cancellation settlement without hiding incompatible-row diagnostics. Require the full incompatibility error while preserving service callback refusal and exact sidecar identity, bytes, and stored-row assertions. Production behavior is unchanged.

Blacksmith Testbox tbx_01m3kf15jgcthvq4f69nxn8t28: pristine main ff8c752 fails 3/3 runs with the same four failures; the fix passes 24/24 tests in each of three runs through ci-run-node-test-shard with the daemon config, agentic-command-support shard, CI=1, and two workers. Three sibling files pass 32/32 tests. The single-worker pnpm test cost is 28.05s wall including cold compiler preparation. Targeted lint, formatting, and git diff --check pass.

check-changed runs but stops at pre-existing services graph TS2459 errors: package-update-activation-journal.test.ts:7 and package-update-activation-lifetime.test.ts:11 import assertReliabilityForcedExit, made private by 9491d5a. A clean baseline checkout with independent dependencies reproduces both exact errors. No unrelated fix, local validation, autoreview, or push is included; review and publication remain with the lead.

* fix(node-host): retain container timeout diagnostics

Restore the configured deadline and safe engine operation when runExec reports a sanitized timeout. Keep arguments and executable paths out of the diagnostic, preserve the original cause, and leave deadlines, daemon pinning, and cleanup unchanged.

Reproduced the container supervisor failure on main at 8b549de. The focused file now passes all 22 cases; the full supervisor, container, and process families pass 1193 tests with 49 skips across 110 files. Core typecheck, targeted lint/format, docs syntax, and independent P2 review pass. The new four-case deterministic file takes 1.82s Vitest wall; the existing integration file takes 41.03s, with no added processes or waits.

* fix(scripts): export assertReliabilityForcedExit for package update tests

#158491 imports it from two infra tests after #159362 made it module-local,
so the core test-types infra stripe failed on main with TS2459.

* fix(ci): keep test planning within its existing budgets

Apply the canonical planner repairs from #160408, #160458, #160531, and
#160517 to the runtime cleanup branch. Preserve complete source facts,
canonical command ownership, and the existing PR-exempt test inventory.

The merged cohort passed its old-reader regression control, owner suites,
scoped changed checks, and 20 full original-group repetitions on two CPUs.

* test(daemon): retain canonical stale-lease release expectation

Preserve #160288 when integrating main: a stale stored generation is rejected
before its replacement payload is decoded, so release returns false. Keep the
callback refusal and exact sidecar and database-row preservation assertions.

* fix(ci): adopt canonical Doctor repair lint fix

Apply #160715 so the pinned runtime branch includes the canonical repair
module split. Version and cohort planning use the existing targets owner;
installation retirement and transaction ordering stay with repair.

* ci: refresh runtime checks after canonical contract repairs

Refresh the PR merge ref after main fixed the unused 1Password dependency
in 4ed0cb3 and the retired runtime API
inventory in 5b76930.

The runtime source tree remains cd5b525,
matching the reviewed and completed Testbox proof.

* ci: refresh runtime validation after main CI fixes

* ci: refresh runtime checks after duplicate route repair
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 30, 2026
openclaw#158916)

* refactor(runtime): deslop tasks, daemon, node-host and tui second pass

* test(update): mock canonical systemd activation admission

Keep native-start and retained-restart fixtures on the lifecycle admission owner after consolidation. Preserve real executor revocation, native command ordering and every assertion.

* test(runtime): track relocated decoder suppression

* test(tui): synchronize terminal fixture readiness

Inspect the current completed target screen instead of cumulative terminal output. Wait for startup readiness and command publication while isolating unrelated fd discovery in the exact-argument completion fixture.

* test(tui): isolate fallback projection from vendor policy loading

Use distinct synthetic provider/model identities while retaining foreign-run and malformed-event rejection, exact footer replacement, unchanged backend calls, and clean exit. Include captured terminal output when the exit assertion fails.

* test(tui): group session mode proof with identity fixtures

Move the self-contained mode-scoping case out of the general harness to retain the line cap. Preserve every assertion, the 20-second operation budget, the 25-second test budget, and owned fixture cleanup.

* refactor(runtime): reuse projection and worker dispatch values

Inline the one-use row identity before keyed refresh and integrate the deferred plugin-migration write-options cleanup from main (13f2174, openclaw#159426). Preserve worker admission, transaction ownership, options, and refresh order. Also use the synchronized current screen for the sibling stale-display-name assertion without changing its timeout or cleanup.

* test(tui): fence reused-session fixture transitions

* refactor(ui): colocate omitted media status rendering (openclaw#159938)

* fix(tui): preserve CLI lifecycle context for terminal events

Bind input and resize callbacks at terminal startup so later stdin events retain the existing CLI resource host and scheduler. Keep ingress authority and shutdown ownership unchanged. Add a focused callback-context regression; the real built CLI reproduces the original MCP scheduler error and passes with the adapter.

* fix(ci): keep chat attachment controls within lint limit (openclaw#160159)

Move the unchanged image data-URL decoder into the existing image helper to restore the 700-line lint limit.

Validated on Blacksmith Testbox: 34 attachment tests, all core lint stripes, targeted changed checks, and the UI build. Independent review found no actionable issues.

* test(daemon): assert incompatible custody release diagnostics

Align the four retained historical custody cases with 82ab893. Release now validates the stored generation directly rather than using the mutation-authority predicate, allowing paired cancellation settlement without hiding incompatible-row diagnostics. Require the full incompatibility error while preserving service callback refusal and exact sidecar identity, bytes, and stored-row assertions. Production behavior is unchanged.

Blacksmith Testbox tbx_01m3kf15jgcthvq4f69nxn8t28: pristine main 5f12b85 fails 3/3 runs with the same four failures; the fix passes 24/24 tests in each of three runs through ci-run-node-test-shard with the daemon config, agentic-command-support shard, CI=1, and two workers. Three sibling files pass 32/32 tests. The single-worker pnpm test cost is 28.05s wall including cold compiler preparation. Targeted lint, formatting, and git diff --check pass.

check-changed runs but stops at pre-existing services graph TS2459 errors: package-update-activation-journal.test.ts:7 and package-update-activation-lifetime.test.ts:11 import assertReliabilityForcedExit, made private by 90bddde. A clean baseline checkout with independent dependencies reproduces both exact errors. No unrelated fix, local validation, autoreview, or push is included; review and publication remain with the lead.

* fix(node-host): retain container timeout diagnostics

Restore the configured deadline and safe engine operation when runExec reports a sanitized timeout. Keep arguments and executable paths out of the diagnostic, preserve the original cause, and leave deadlines, daemon pinning, and cleanup unchanged.

Reproduced the container supervisor failure on main at 2d04b95. The focused file now passes all 22 cases; the full supervisor, container, and process families pass 1193 tests with 49 skips across 110 files. Core typecheck, targeted lint/format, docs syntax, and independent P2 review pass. The new four-case deterministic file takes 1.82s Vitest wall; the existing integration file takes 41.03s, with no added processes or waits.

* fix(scripts): export assertReliabilityForcedExit for package update tests

openclaw#158491 imports it from two infra tests after openclaw#159362 made it module-local,
so the core test-types infra stripe failed on main with TS2459.

* fix(ci): keep test planning within its existing budgets

Apply the canonical planner repairs from openclaw#160408, openclaw#160458, openclaw#160531, and
openclaw#160517 to the runtime cleanup branch. Preserve complete source facts,
canonical command ownership, and the existing PR-exempt test inventory.

The merged cohort passed its old-reader regression control, owner suites,
scoped changed checks, and 20 full original-group repetitions on two CPUs.

* test(daemon): retain canonical stale-lease release expectation

Preserve openclaw#160288 when integrating main: a stale stored generation is rejected
before its replacement payload is decoded, so release returns false. Keep the
callback refusal and exact sidecar and database-row preservation assertions.

* fix(ci): adopt canonical Doctor repair lint fix

Apply openclaw#160715 so the pinned runtime branch includes the canonical repair
module split. Version and cohort planning use the existing targets owner;
installation retirement and transaction ordering stay with repair.

* ci: refresh runtime checks after canonical contract repairs

Refresh the PR merge ref after main fixed the unused 1Password dependency
in 3b5b7e1 and the retired runtime API
inventory in 1ed57fc.

The runtime source tree remains cd5b525,
matching the reviewed and completed Testbox proof.

* ci: refresh runtime validation after main CI fixes

* ci: refresh runtime checks after duplicate route repair
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant