Skip to content

fix(test): avoid service-permission failures before tests start - #160392

Merged
VACInc merged 14 commits into
mainfrom
openclaw/session-progress-and-blocker-review
Sep 28, 2026
Merged

VACInc merged 14 commits into
mainfrom
openclaw/session-progress-and-blocker-review

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

High Level TLDR

Fixes runtime-consuming tests failing before the first test starts when the caller cannot read an unrelated Gateway’s protected service environment.

User Impact

Local Vitest and E2E preparation use the explicit build path rather than invoking the CLI to trigger an automatic rebuild. Fresh artifacts remain reusable without a writable checkout; canceled preparation joins its writers before releasing ownership.

Boundary: outputs remain in the selected checkout. This is not a new filesystem sandbox. Preparation uses the existing live-Gateway overlap fence and checks loaded services plus potential Gateway definitions before artifact publication. It refuses when their safety cannot be verified; unreadable unrelated unit files do not block local preparation. Use the existing isolated runner when enforced filesystem isolation is needed. Automatic source-CLI rebuilds and actual update publication retain their strict service/maintenance checks unchanged. No production permissions, configuration, service, credentials, or database state are changed by this PR.

Root Cause

Test preparation ran scripts/run-node.mjs --version. A missing runtime or private-QA entry therefore entered the automatic CLI rebuild’s service-publication transaction, which can require protected environment files before determining whether the checkout is unrelated.

The dedicated prerequisite entry reuses the existing source freshness predicates, explicit build profile, runtime postbuild, checkout artifact ownership, and live-dist fence. It checks freshness before requesting write ownership and rechecks after acquisition. The existing cancelable-command owner carries cancellation through lock waits and compiler execution; incomplete child cleanup still retains ownership. No new agent instructions, build bypass flags, or test-selection changes.

What Problem This Solves

Local test preparation could enter a CLI rebuild transaction and read an unrelated Gateway's protected service environment before the first test ran. This PR routes that preparation through its owned build entry and keeps artifact writers joined before releasing ownership.

Service-start concurrency decision

VAC accepted the documented service-start race. The pre-test build fence rejects physically shared compiler output roots, while a Gateway starting after admission remains a documented local-operator concurrency risk. No service-activation coordination is required for this PR. This head makes no further fence-semantics change.

Evidence

The real preparation boundary and shared-output fence passed 61/61 focused cases on the prior code head. The final merge-head fixture test passed 39/39, and all root-test type graphs passed. Hosted exact-head CI and ClawSweeper review are in progress.

Verification

Real behavior proof

On the published d890f517761910574aeed6635d4510e28e422535 head, pnpm test test/scripts/prepare-vitest-runtime.test.ts test/scripts/live-gateway-dist-fence.test.ts --maxWorkers=1 passed 61/61. The real preparation/build-admission boundary refuses before the compiler runs when dist-runtime or packages/sdk/dist physically aliases a live Gateway's output while dist is separate. A disjoint service remains admitted. The changed preparation file alone passed 15/15 (pnpm test test/scripts/prepare-vitest-runtime.test.ts --maxWorkers=1, 39.13 s shard wall, 36.87 s Vitest, 0.238 s test execution). Script and root-test type graphs, focused lint, formatting, diff check, and independent P1 autoreview passed.

What was not tested

No live Gateway was restarted or modified. The shared-output proof uses filesystem symlinks in an isolated fixture; no real bind mount or production Gateway was used. Exact-head hosted CI and ClawSweeper review are pending.

Current head: a366159e4f2794469ece0c7cafea4657d546243c

  • Final, frozen-base merge commit a366159e4f2794469ece0c7cafea4657d546243c integrates origin/main at 25d771cb8203f5afeea7b7c9dc8060210db8e43d solely to clear the bounded-Vitest fixture conflict. Main already has the AI-declaration fixture repair from test(scripts): model AI declarations in bounded E2E preparation fixture #160532. The resolved test/scripts/run-vitest-bounded.test.ts starts from main and differs only in this PR's two scripts/prepare-vitest-runtime.mjs spawn-matcher substitutions; the duplicate fixture repair from 5b31a0945f6 is gone.
  • Focused file passed 39/39 (pnpm test test/scripts/run-vitest-bounded.test.ts --maxWorkers=1, 42.38 s shard wall / 41.16 s Vitest duration). pnpm tsgo:test:root passed tooling, scripts, E2E, and other shards. git diff --check passed. Exact-head CI settled with the inherited source-contracts failure described below; ClawSweeper re-review is in progress.
  • VAC accepted the P2 service-start race as documented. No further fence semantics were changed. No further main integration will be made on this branch.

Exact-head CI

  • check-source-contracts job 109022525871 failed lint:tmp:export-name-collisions. This is inherited from main commit 5de949fc462, brought in by the final merge. It added daemon CLI exports that collide with names already exported in src/cli/daemon-cli/*.ts and src/infra/update-managed-service-handoff.ts. The PR changes none of those files. This failure is not being fixed or rerun in this PR. The exact-head check rollup settled at 47 pass, 3 fail (this job plus two derived openclaw/ci-gate entries), 108 canceled, and 49 skipped.

Previous head: 5b31a0945f67a4da24f8ffab7333dd9b6d7f6d94

Previous head: d890f517761910574aeed6635d4510e28e422535

  • ClawSweeper found that the verified QA build fence checked dist while the compiler also writes dist-runtime and package output roots. runBuildAllSteps and runtime-only test preparation now pass the canonical listTsdownOutputRoots() to the physical-overlap fence. The fence compares every written root against every serving root, including realpath aliases and inode identity. A shared non-dist root refuses before any compiler runs; a separate checkout remains admitted.
  • Focused tests: 61/61; the changed test file alone 15/15. Script and all root-test type graphs, focused lint, formatting, diff check, and staged P1 autoreview passed. ClawSweeper cleared code findings and requested the service-start decision above. CI then exposed the newly merged AI declaration fixture mismatch, repaired on the current head.

Previous head: 2a05b84769933a3bf977d65eb2e374f060f2ffb3

  • Merged current main while preserving Windows Startup discovery. Strict inventory now checks systemd XDG, runtime, generated, transient, control, and system unit paths; Windows inventory checks every scheduled-task action and custom launcher.

  • ClawSweeper's two later systemd findings are repaired: location-only inspection reads no service account or protected environment, while normal service operations keep their account checks; strict inventory also reads loaded manager units, including a running custom-profile Gateway after its unit file disappears. An unreadable unrelated, unloaded unit no longer blocks preparation; unverifiable loaded or recognizable Gateway units still do.

  • Local proof: 19/19 user and 12/12 system paths reported by systemd-analyze unit-paths are covered; the real read-only inventory returned one managed service with zero errors. Focused daemon tests and the strict fence case passed. node scripts/check-changed.mjs passed on the prior merge head; final-head core and core-test type graphs, formatting, lint, line cap, and diff checks passed.

  • Windows CI on an earlier head failed before any Vitest shard during strict live-dist inventory. One unsafe false-positive path was an unreadable unrelated, stopped Task Scheduler entry; this head removes that path. Strict inventory now ignores unreadable actions on unrelated stopped/disabled tasks; unknown, queued, running, selected, and recognizable Gateway tasks remain fail-closed. The focused Windows inventory file passes 28/28, including stopped versus running/unknown state. The full changed-file gate passed on the previous code revision, including core and core-test types, lint, formatting, line cap, and dead-export checks. CI then found a type-only import cycle between inspect-files.ts and inspect.ts and canceled the Windows job before its verdict. This head moves the shared type to the leaf module. The exact CI architecture command pnpm check:architecture now passes, as do core and core-test type graphs, focused lint, formatting, and diff checks. ClawSweeper then found a macOS strict-inventory P1: an unreadable unrelated plist blocked test preparation. This head narrows launchd errors to recognizable Gateway names or marker-bearing malformed content, while keeping known unreadable Gateway definitions fail-closed. The real verified fence path passes with an unreadable unrelated plist and refuses after an overlapping live Gateway plist is added. The focused macOS inventory file passes 5/5 (9.07 s command wall; 6.96 s Vitest duration), and existing inventory tests pass 52/52. Prior-head Linux and Windows CI both failed in the declaration fixture because its copied source tree omitted src/infra/errno.ts, newly imported by the fence; this head copies that owner file, and the exact failing fixture case passes locally (15.93 s command wall; 15.03 s Vitest duration). ClawSweeper later found the non-dist output overlap described above. No service lifecycle action was taken.

  • Earlier revision: 509 distinct focused cases passed: preparation boundary (7), runner build admission (171), E2E global setup (5), existing live-Gateway fence (38), build owner (90), the real bundled-plugin runtime consumer (159), and bounded Vitest process ownership (39). The 7 boundary cases and 159 runtime-consumer cases passed together on published head 4f0fe3918170e6430a2294d8a0bd1608b9040041, after the final lint corrections (54.34 s command wall). Coverage includes known live-overlap refusal, immutable-deployment refusal, read-only warm reuse, postbuild failure propagation, cancellation/joining, and lock reacquisition. Existing selection, exclusion, preparation ordering, and E2E signal assertions remain intact.

  • Native published-head proof: OPENCLAW_BUILD_PRIVATE_QA=1 node scripts/prepare-vitest-runtime.mjs completed successfully in 67.65 s, including the real compiler, 95 plugin builds, bootstrap import guard, and runtime postbuild. Both private-QA SDK entries were generated, artifact ownership was released, and the subsequent normal pnpm test invocation reused the prepared runtime without another build. No service selectors, permissions, credentials, or production configuration were changed.

  • Independent P2 autoreview: initial read-only/cancellation findings repaired; final scoped review has no actionable P0–P2 findings.

  • Selected static checks passed: script types, all four root-test type graphs, formatting, script/test lint, dead-export scans, and the selected repository guards. The initial aggregate stopped on a redundant synchronous await; that and a test brace-style error were corrected and the affected lint stages passed. Hosted exact-head CI/ClawSweeper verification for the current head remains pending. The PR is open for review; this is not a landing-readiness claim.

Test discipline

  • Test audit: one new owner-boundary file; compiler and native-inspection leaves are modeled while real prerequisite routing, build admission, filesystem effects, artifact locking, and cancellation are exercised. No new Gateway boots, sleeps, retries, serial configs, or coverage exclusions.
  • Deslop: diff reviewed; reused the existing build, cancellation, freshness, and lock owners rather than adding service discovery or a second cleanup policy.
  • Failure triage: an initial fixture probe encountered an unrelated retained shared-temp lock. The final regression fixture anchors its own checkout; no existing lock was deleted. The corrected negative control then failed for the intended service-permission reason. One formatter normalization was corrected. No unresolved product/test flake is being hidden.

Measured with pnpm test <file> --maxWorkers=1:

Changed test file Cases Command wall Test time
test/scripts/prepare-vitest-runtime.test.ts 15 39.13 s 0.238 s test execution; 36.87 s Vitest (worker compilation dominates)
src/daemon/inspect.windows.test.ts 28 29.61 s 27.52 s Vitest suite (worker compilation dominates)
src/daemon/inspect.incomplete-inventory.test.ts 5 9.07 s 6.96 s Vitest suite (new fence case 0.016 s)
test/scripts/test-projects-build-admission.test.ts 171 14.27 s Existing integration/process suite
test/scripts/vitest-e2e-global-setup.test.ts 5 31.11 s 0.186 s

Cold command wall includes the shared compiled-worker preparation; the new test file itself is below one second. Per-file hosted CI seconds are not available yet and will be added when observed. No full-suite/local live-Gateway proof is claimed.

CI fixture correction

CI job 108907403112 exposed two missed child-process interceptors in test/scripts/run-vitest-bounded.test.ts. Six existing cases still matched the former run-node.mjs prerequisite and consequently launched real compiler work instead of their owned runtime fixture. This is a PR-caused fixture migration miss, not a flaky timeout or a reason to raise the memory limit.

The correction changes only those two executable selectors. All existing assertions, signal/process cleanup, timeouts, and 39 cases remain intact. The full edited file passes 39/39, with formatting and focused lint clean and an independent P2 review reporting no actionable findings. Production bytes are unchanged from the native build/runtime-consumer proof.

Earlier measured fixed cost: pnpm test test/scripts/run-vitest-bounded.test.ts --maxWorkers=1 — 37.99 s command wall / 36.73 s Vitest duration. The current head passed in 32.89 s shard wall / 32.09 s Vitest duration. This existing native-process suite exercises actual CLI exits, process-group termination, worker generations, and final-report ordering; a mocked helper cannot replace those contracts. Test-audit/deslop retained every assertion and removed no incidental coverage. The test-performance pass identified unintended real builds as the wasted work; the failed hosted file took 90.497 s before correction, but that is a different machine and not a valid local percentage-speedup comparison. Fixed-head hosted timing remains pending.

Worked on by

Work sessions


View the OpenClaw team session

Inherited CI failure

  • check-source-contracts (lint:tmp:export-name-collisions): the merge ref carried main's duplicate src/cli/daemon-cli.ts exports (assertForegroundUpdateOrigin, runDaemon*, waitForGatewayUpdateRecovery) introduced by 5de949f and fixed on main by 385ac28. This PR does not touch src/cli. Every other check is green on this head; landed through the admin exception per the pre-existing-red policy.

Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: 3dfcb5be-749a-48f1-968a-6b25efab0758
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: M labels Sep 28, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 28, 2026 11:28
Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: 996f3d1d-862c-4055-9e99-f85e2ab8dcf3
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Please review current head a859b93ee5f306b32311a6b700b49a55c010a708. The follow-up corrects the two bounded-runner fixture selectors missed by the prerequisite-entry migration. All 39 existing process-ownership cases now pass; assertions, timeouts, and cleanup are unchanged. The focused lint/format checks and P2 independent review passed.

The PR body includes the original CI failure, the correction and measured cost. Production bytes remain identical to the native prerequisite build and actual runtime-consumer proof at 4f0fe3918170e6430a2294d8a0bd1608b9040041. Current-head CI is running in https://github.com/openclaw/openclaw/actions/runs/36417135755 .

Review only; no autofix or automerge requested.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 12:34 PM ET / 16:34 UTC (Revision 10).

ClawSweeper review

What this changes

The branch moves Vitest and E2E runtime preparation to an explicit build entry, checks managed Gateway artifact overlap before writes, and updates service inventory, tests, and runner documentation.

Merge readiness

✅ Ready for maintainer review

Current main still takes the service-sensitive test preparation path, so this PR remains useful. The earlier code findings appear resolved, and the service-start race has since been explicitly accepted by the build/service owner.

Priority: P2
Reviewed head: a366159e4f2794469ece0c7cafea4657d546243c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The branch has substantial focused boundary proof and no remaining actionable finding, with an explicitly accepted concurrency limitation.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The changed Vitest preparation entry has reported after-fix native private-QA build output, and later production-boundary filesystem fault cases show shared-output refusal and disjoint-output admission. The final head retains the reviewed preparation and fence blobs, with its fixture correction reported passing 39/39. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed Vitest preparation entry has reported after-fix native private-QA build output, and later production-boundary filesystem fault cases show shared-output refusal and disjoint-output admission. The final head retains the reviewed preparation and fence blobs, with its fixture correction reported passing 39/39. No stored-data contract changes.
Evidence reviewed 8 items Current main still needs the change: Both ordinary Vitest preparation and E2E setup still invoke the source CLI with --version on the inspected main revision.
Introduced preparation route: The pinned PR delta changes both preparation callers to the dedicated entry. That entry rechecks freshness under checkout artifact ownership and requests the verified Gateway fence before building.
Physical output and incomplete-inventory guard: The fence compares compiler output roots with serving outputs and refuses verified preparation when discovery or service state cannot establish safety.
Findings None None.
Security None None.

How this fits together

Vitest and E2E runners prepare built runtime files before starting test workers. Preparation checks artifact freshness and managed Gateway locations, then builds in the selected checkout or refuses an unsafe write.

flowchart LR
A[Vitest or E2E run] --> B[Runtime prerequisite check]
B --> C{Artifacts current?}
C -- Yes --> G[Test workers]
C -- No --> D[Checkout artifact lock]
D --> E{Gateway outputs separate?}
E -- Yes --> F[Build and postbuild]
F --> G
E -- No --> H[Preparation error]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +404, Tests +880, Other +181. Total +1465 across 26 files.

View PR surface stats
Area Files Added Removed Net
Source 8 658 254 +404
Tests 12 900 20 +880
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 6 219 38 +181
Total 26 1777 312 +1465

Review metrics

Metric Value Why it matters
Production and test growth production +585 net lines, tests +861 net lines The production growth supports cross-platform inventory and output fencing; the test growth covers their failure paths.

Technical review

Best possible solution:

Test preparation should write only after proving its outputs are separate from managed Gateways, while ordinary CLI and update publication keep their existing service checks.

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

Yes at source level: current main still launches the CLI for test prerequisites, and the PR's boundary fixture exercises the protected-service permission failure. This read-only review did not run a current-main reproduction.

Is this the best way to solve the issue?

Yes. The dedicated test build entry reuses existing freshness, artifact ownership, and build owners while avoiding the unrelated service-publication transaction.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This fixes a bounded test-preparation failure without changing normal Gateway operation.
  • merge-risk: 🚨 availability: A Gateway starting after preflight could encounter rebuilt outputs; the build/service owner explicitly accepted this documented race.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed Vitest preparation entry has reported after-fix native private-QA build output, and later production-boundary filesystem fault cases show shared-output refusal and disjoint-output admission. The final head retains the reviewed preparation and fence blobs, with its fixture correction reported passing 39/39. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed Vitest preparation entry has reported after-fix native private-QA build output, and later production-boundary filesystem fault cases show shared-output refusal and disjoint-output admission. The final head retains the reviewed preparation and fence blobs, with its fixture correction reported passing 39/39. No stored-data contract changes.

Evidence

What I checked:

  • Current main still needs the change: Both ordinary Vitest preparation and E2E setup still invoke the source CLI with --version on the inspected main revision. (scripts/lib/vitest-build-prerequisites.mts:510, d9569745764f)
  • Introduced preparation route: The pinned PR delta changes both preparation callers to the dedicated entry. That entry rechecks freshness under checkout artifact ownership and requests the verified Gateway fence before building. (scripts/prepare-vitest-runtime.mts:22, a366159e4f27)
  • Physical output and incomplete-inventory guard: The fence compares compiler output roots with serving outputs and refuses verified preparation when discovery or service state cannot establish safety. (scripts/lib/live-gateway-dist-fence.mts:229, a366159e4f27)
  • Boundary coverage: The production preparation and build owners are exercised against filesystem fixtures for disjoint and physically shared output roots, unreadable paths, and service inspection failures. The PR reports 61 focused cases passing on the prior production head; this read-only review did not execute them. (test/scripts/prepare-vitest-runtime.test.ts:64, a366159e4f27)
  • Proof carried to final head: The final head has the same blob identities as the prior reviewed head for the dedicated preparation entry, build owner, physical fence, and daemon inventory owner. The PR body also reports a native private-QA preparation completing the real compiler and plugin builds on an earlier published head, followed by focused fence proof and a 39/39 final-head fixture run. (scripts/lib/live-gateway-dist-fence.mts:271, a366159e4f27)
  • Accepted service-start tradeoff: VACInc, identified by GitHub as a MEMBER, explicitly accepted the documented race after admission while requiring refusal for physically shared compiler outputs. The later PR body acknowledges that decision; no further coordination was requested.

Likely related people:

  • VACInc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Donnie Fiander: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: 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 (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-28T11:58:03.153Z sha a859b93 :: blocked before merge. :: none
  • reviewed 2026-09-28T12:59:17.523Z sha f1b4a99 :: blocked before merge. :: [P1] Cover all systemd load paths before admitting a rebuild | [P1] Evaluate every action in mixed Windows tasks | [P1] Inspect custom .bat launchers in complete Windows inventory | [P2] Remove the redundant spread blocking script lint
  • reviewed 2026-09-28T13:49:14.723Z sha 9905924 :: blocked before merge. :: [P1] Allow location-only reads across service accounts | [P1] Include loaded units in complete systemd inventory
  • reviewed 2026-09-28T14:30:01.574Z sha 0c73707 :: blocked before merge. :: [P1] Keep unrelated launchd plists out of the strict test gate
  • reviewed 2026-09-28T14:44:07.755Z sha 2793cd8 :: blocked before merge. :: [P1] Exclude unrelated launchd plists from strict test admission
  • reviewed 2026-09-28T14:59:18.913Z sha 80d5a9e :: blocked before merge. :: [P1] Exclude unrelated launchd plists from strict test admission
  • reviewed 2026-09-28T15:29:05.647Z sha 2a05b84 :: needs changes before merge. :: [P1] Fence every runtime output root before test builds
  • reviewed 2026-09-28T15:53:59.388Z sha d890f51 :: blocked before merge. :: none

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: 799d41fc-e479-496d-a0d9-bc77d3c7ad73
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XL and removed size: M labels Sep 28, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Latest work-in-progress correction pushed as f1b4a9920ea95db538d29b25c5df0cb50897f997 for takeover. Not merge-ready; previous proof in the PR body is prior-candidate evidence.

Remaining work:

  • Script lint: remove the unnecessary iterable spread in Promise.all in scripts/lib/live-gateway-dist-fence.mts (unicorn/no-useless-spread).
  • Review: complete Windows inventory must account for every action when a task mixes legacy and current Gateway actions.
  • Review: strict Linux discovery misses additional systemd user-unit load locations, including XDG config/data paths.
  • Review: custom Windows .bat launchers can be silently omitted.

Before the latest inventory extraction/Windows delta, 205 focused cases passed; native preparation passed in 68.58 s and the actual runtime consumer passed 159 cases. Latest scoped checks passed core/script/root-test types, all core-test type shards, formatting, size gates, three dead-export scans, and core lint, then stopped at the script lint error. Subsequent selected checks and final delta tests did not run. Exact-head CI and ClawSweeper remain unverified. No merge, deployment, or Gateway restart was performed.

I am stopping implementation here at the requester’s direction so their agent can take over.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@VACInc

VACInc commented Sep 28, 2026

Copy link
Copy Markdown
Member

@clawsweeper re-review

Please review exact head 62a626cd101d51c877de97bbfb41f6ab8b781d6e. It repairs the four findings on the prior head: strict systemd inventory now scans the shared unit load paths, Windows checks all task actions and custom launchers, and the redundant spread is gone. The merge retains current main's Windows Startup discovery. Focused daemon/tooling tests and core, script, and core-test type graphs passed locally. Exact-head CI is running.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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 28, 2026
@VACInc

VACInc commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Superseded by head a366159. Correction: my prior statement that the service-start race had a maintainer decision was wrong. VAC owns that P2 decision; no acceptance is claimed. The duplicate AI-declaration fixture repair from this prior head was dropped because main landed it through #160532. The new head preserves only this PR's two runtime-preparation matcher substitutions in that file.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@VACInc

VACInc commented Sep 28, 2026

Copy link
Copy Markdown
Member

@clawsweeper re-review

Maintainer decision (build/service owner): the documented service-start race is accepted as-is. The pre-test build fence must reject physically shared dist/dist-runtime/other compiler output roots; it does not need to coordinate artifact writes with managed-service activation. Keep the fence and the documentation of the residual race; no further coordination logic is required for merge.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@VACInc

VACInc commented Sep 28, 2026

Copy link
Copy Markdown
Member

@clawsweeper re-review

Head/merge commit: a366159. This final main integration uses base 25d771c. The conflict file starts from main's version, including its #160532 AI-declaration fixture fix; only this PR's two scripts/prepare-vitest-runtime.mjs matcher substitutions were reapplied. The duplicate fixture hunk from 5b31a09 is gone.

Focused test: 39/39 passed. Root-test typecheck: all four shards passed. The PR body now records this head and the evidence.

VAC owns the P2 service-start race decision. No acceptance is claimed and no fence semantics changed on this head. Please review the code and report that decision as pending.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@VACInc
VACInc merged commit 8ff319f into main Sep 28, 2026
430 of 547 checks passed
@VACInc
VACInc deleted the openclaw/session-progress-and-blocker-review branch September 28, 2026 17:38
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…claw#160392)

* fix(test): avoid service-permission failures before tests start

Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: 3dfcb5be-749a-48f1-968a-6b25efab0758

* fix(test): avoid service-permission failures before tests start

Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: 996f3d1d-862c-4055-9e99-f85e2ab8dcf3

* fix(test): avoid service-permission failures before tests start

Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: 799d41fc-e479-496d-a0d9-bc77d3c7ad73

* fix(daemon): include generated systemd units in inventory

* fix(daemon): inspect loaded systemd Gateways before builds

* fix: ignore stopped unrelated Windows tasks in live dist fence

* fix: break daemon inventory type import cycle

* fix: ignore unrelated unreadable launchd plists in test fence

* test: copy errno owner into declaration fixture

* fix: fence all test runtime build outputs

* test: isolate E2E setup from AI declaration repair

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: VACInc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

2 participants