Repository navigation
fix(ci): restore managed gateway update test isolation - #129852
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 12:13 AM ET / 04:13 UTC. ClawSweeper reviewWhat this changesThe PR resets managed-gateway selector environment variables between updater CLI tests and models mocked owned services with their managed definition. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep this active maintainer-labeled PR open. The focused test fixture repair matches the current managed-service selector and definition contracts; no patch defect was found, but the branch is behind main and exact-head CI is still in progress. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherManaged gateway updates inspect a service’s effective command and managed definition to preserve the correct installation, profile, and environment through stop, update, and restart. The updater test suite supplies those service inputs and verifies the resulting update behavior. flowchart LR
A[Updater CLI tests] --> B[Service selector environment]
B --> C[Mock managed service definition]
C --> D[Update and restart flow]
D --> E[Ownership and profile assertions]
E --> F[CI coverage]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +2. Total +2 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase or refresh the branch onto current main, retain the canonical selector cleanup and managed-definition fixture shape, then merge after exact-head CI confirms the updater suite remains isolated. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the old fixture did not reset the complete canonical selector set and did not model the managed definition consumed by the updater ownership path. The PR body also records a failing main CI shard and an after-fix 247-test pass. Is this the best way to solve the issue? Yes. Reusing the canonical selector list prevents fixture drift, while a single helper makes owned-service mocks match the production effective-command and managed-definition contract without touching runtime code. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d670f20be2d9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Co-authored-by: roboclaw-bot <[email protected]>
What Problem This Solves
Resolves a problem where current main CI fails dozens of managed-gateway update and restart assertions in
src/cli/update-cli.test.ts, blocking unrelated pull requests from landing.The affected main run is https://github.com/openclaw/openclaw/actions/runs/32922605020, job
checks-node-compact-small-6(job98039417864). Its first failures include stopping a running managed Git gateway, restarting an updated managed service, resolving the updated entrypoint, and preserving the managed service Node and installation prefix.Why This Change Was Made
The updater test fixture did not isolate the complete set of gateway service-selector environment variables between cases, and its mocked service commands did not represent the effective-command plus managed-definition ownership contract introduced for systemd drop-ins. Capture and restore the canonical selector set, clear it before each test, and construct service fixtures through one helper that carries the managed definition. This repairs the test-boundary ownership contract without changing production behavior or weakening assertions.
This cherry-picks the existing focused fix
378ae5db8551f942d2726ce2911c4c55538ad59ffrom #128257 while preserving its original commit author,roboclaw-bot <[email protected]>. The unrelated changes from that pull request are deliberately excluded.User Impact
No user-visible or production behavior changes. Maintainers regain reliable main CI coverage for managed gateway update, restart, package-entrypoint, and service-ownership behavior.
Evidence
93573e8fdf7abba3f472833a82c4034e296f14eafails the updater shard in https://github.com/openclaw/openclaw/actions/runs/32922605020/job/98039417864.node scripts/run-vitest.mjs src/cli/update-cli.test.ts: 1 file passed, 247 tests passed.node_modules/.bin/oxfmt --check src/cli/update-cli.test.ts: passed.git diff --check 4b3f764c498f32e59f4654222a84fea6f59a9e90...HEAD: passed.