Repository navigation
fix(test): accept remaining systemd timeout budget - #147117
Conversation
|
🦞👀 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 13, 2026, 11:15 AM ET / 15:15 UTC. ClawSweeper reviewWhat this changesUpdates the Linux service-status test to accept a positive remaining timeout within the caller’s original budget while retaining the SIGKILL assertion. Merge readiness✅ Ready for maintainer review The assertion repair remains useful on current main and preserves the timeout and subprocess-kill guarantees. No actionable patch defect was found; this member-authored, protected PR should remain open for normal landing. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw reads Linux service status through systemd commands. Transport discovery consumes part of each command’s timeout budget before the subprocess runs. flowchart LR
A[Service status request] --> B[Caller timeout budget]
B --> C[Discover user transport]
C --> D[Calculate remaining time]
D --> E[Run systemctl with kill timeout]
E --> F[Return service status]
E --> G[Test bounded timeout and kill signal]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +1. Total +1 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the existing deadline owner and align this status test with its bounded remaining-time contract, retaining the separate exact-budget regression tests. Do we have a high-confidence way to reproduce the issue? Yes, from source: discovery consuming at least one millisecond makes the valid remaining timeout smaller than 1234, contradicting the old assertion. This review did not execute the test. Is this the best way to solve the issue? Yes. The bounded assertion matches the existing runtime contract, retains SIGKILL coverage, and leaves exact deadline arithmetic covered by controlled-clock tests. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 59067ac73947. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes: the systemd test lane flakes when asynchronous transport discovery consumes part of a caller-provided timeout budget.
User Impact
User impact: no runtime behavior changes; CI now accepts the valid remaining timeout while preserving the subprocess kill guarantee.
Why This Change Was Made
The runtime passes each
systemctlcall the positive time remaining from the original 1234 ms monotonic deadline. Requiring the exact original value became stale once transport discovery could consume elapsed time.Evidence
src/daemon/systemd-user-command-deadline.test.tsandsrc/daemon/systemd-deadline-clock-step.test.ts: 12 tests passed.git diff --check: passed.node_modulessymlink, so exact-head hosted CI supplies that physical-install proof.