Repository navigation
fix(ci): honor loaded stop policy in upgrade fixtures - #160000
Conversation
Use the admitted unit stop budget for inspection and termination. Preserve loaded snapshots until reload and retain process custody through failed policy reads and group settlement. Co-authored-by: RomneyDa <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 9:56 PM ET / September 28, 2026, 01:56 UTC (Revision 3). ClawSweeper reviewWhat this changesThe upgrade acceptance fixture now reads the loaded systemd stop timeout, waits for owned processes to settle after stop failures, and tests those paths. Merge readiness✅ Ready for maintainer review Current main still gives the upgrade fixture a 30-second stop deadline for a generated 330-second unit. The current PR head addresses that mismatch and the earlier stop-cleanup finding. I found no introduced blocking defect. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's upgrade acceptance harness installs a simulated systemd manager around a Gateway process. It reads a generated service unit, supervises the process during an update, and reports whether the stop and restart settled. flowchart LR
A[Generated service unit] --> B[Fixture loader]
B --> C[Loaded stop policy]
C --> D[Supervisor and outer stop]
D --> E[Process settlement]
E --> F[Upgrade acceptance result]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +522, Other +89. Total +611 across 6 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one loaded-unit policy source for fixture stop paths and retain process custody until the owned process group is observed extinct. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source supplies a 330-second generated unit but enforces 30 seconds in the fixture supervisor; the installed-shim scenario gives a focused reproduction path. I did not execute the checkout. Is this the best way to solve the issue? Yes. Reading the loaded policy through the fixture's existing unit parser and observing process settlement addresses the mismatch at its owner boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8a14f266fcc9. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
I confirmed the actionable outer-stop finding in the reviewed head. The current pre-signal policy lookup can return before notifying the live supervisor; that path needs an installed-shim regression and a fix before merge. It is distinct from the supervisor-side signal/child-close cases already tested. The correction is in progress, with process custody and nonzero failure reporting retained. The CI caller-integration repair is also prepared: extracted supervisors now receive the required narrow manager dependency, and existing timing/process assertions use their original test budgets through that dependency. All 10 reported failures plus the bootstrap sibling pass (11/11). The full local helper file is not claimed green: 333/344 passed; two loopback-proxy cases passed with command-scoped loopback exclusion, and the remaining nine setup/parser failures reproduced against the unchanged base test file. Hosted exact-head gates will still be required. No production fallback to the old hardcoded timeout, acceptance weakening, merge override, or duplicate review request. I will push the cohesive correction after the outer-entrypoint proof and review are complete. |
Signal the existing cleanup owner when outer stop-policy inspection fails, retain failure after observed settlement, and supply loaded-policy dependencies in supervisor tests. Co-authored-by: RomneyDa <[email protected]>
Preserve reviewed behavior while adding required braces, avoiding a shadowed callback name, and using Number.NaN and nonmutating fresh-array sorting. Full scripts lint and targeted regression proof verified. Co-authored-by: RomneyDa <[email protected]>
Use the fixture's admitted loaded-unit stop budget for policy inspection and cleanup. Preserve loaded snapshots until reload, retain supervisor custody through failed policy reads, and report failed stops only after observed cleanup. Adapt supervisor test callers without weakening their behavior checks. Independent and ClawSweeper reviews resolved the outer-stop failure; installed-shim regressions cover policy loss, process extinction and uncertain settlement. Focused policy/cgroup and caller proofs passed. Full local suite setup limitations and exact-head hosted evidence are recorded in the PR. No product runtime changes or completed release qualification are claimed. Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes upgrade-survivor fixtures rejecting the effective stop-policy query and enforcing a hardcoded 30-second deadline when the loaded generated unit specifies a different budget.
User Impact
Internal acceptance-harness correction only; no updater runtime or production configuration change. The fixture reports and enforces its loaded unit policy, retains admitted state until reload, and does not report successful stop while owned processes remain or policy inspection failed.
Why This Change Was Made
The existing loaded-unit parser owns the effective stop budget for the maintenance query, supervisor and outer wait. Ordinary inspection cannot unload a removed on-disk unit. Supervisor-side policy errors trigger fatal cleanup and observed process-group extinction rather than abandoning the child or restarting.
The additional outer-entrypoint finding is also addressed: failed pre-signal policy inspection still signals the supervisor and joins through the existing five-second settlement allowance—not a replacement service timeout. Failure remains nonzero after cleanup; uncertain settlement retains supervisor/custody files. Normal, zero/infinite, reload and process/cgroup guards remain intact.
Existing extracted-supervisor test callers now supply the narrow manager dependency and their original timing budgets through it. Graceful drain, descendant extinction, restart overlap and sanitized-diagnostics assertions remain unchanged. This repairs demonstrated fixture defects; it does not establish the cause of the earlier inaccessible updater failure.
Evidence
Independent reviews cleared the earlier two P2 fixes and caller-only adaptation. Final combined outer-entrypoint re-review is scoped-clean P0–P2; it independently confirmed the caller delta was unchanged. Reviews were static; executed proof is listed above. No installed-package release qualification is claimed.