Skip to content

fix(ci): prevent systemd shim timing flakes - #143134

Merged
vincentkoc merged 1 commit into
mainfrom
fix/systemd-shim-test-timeout-20260909
Sep 9, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/systemd-shim-test-timeout-20260909

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where the tooling Docker test shard could fail while inspecting a
missing systemd unit when host load made the Node-based busctl fixture exceed
the production deadline's first per-call slice.

Why This Change Was Made

The affected integration tests now pass an explicit 30-second manager-read
budget to their Node-shim-backed calls. Production systemd deadlines, fixture
behavior, and all result assertions remain unchanged.

User Impact

CI no longer reports a false systemd inspection failure when the test fixture's
Node process starts slowly. There is no runtime product behavior change.

Evidence

  • Pre-fix focused reproduction failed twice after about 1.7-1.9 seconds with
    Effective systemd service command could not be inspected.
  • Both affected focused tests pass after the change.
  • The full 297-test file completed cleanly twice after one unrelated,
    non-reproducing first-run failure elsewhere in the file.
  • Changed-gate lanes passed except the worktree test-root typecheck wrapper,
    which rejected the shared node_modules symlink before compilation.
  • Direct test-root tsgo reported no errors in the edited file.
  • git diff --check is clean.
  • Independent final autoreview is scoped-clean at P0-P2.

@clawsweeper

clawsweeper Bot commented Sep 9, 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.

@vincentkoc vincentkoc self-assigned this Sep 9, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 9, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 9, 2026
@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 10:00 AM ET / 14:00 UTC (Revision 2).

ClawSweeper review

What this changes

The PR gives systemd inspection calls in two integration tests a 30-second budget so slow Node fixture startup does not cause false failures.

Merge readiness

✅ Ready for maintainer review

The PR remains useful: current main and the latest release retain the fixture timing exposure. No actionable correctness or security finding remains, and the previous review recorded no findings.

Priority: P3
Reviewed head: 300d3f405deaf5f267732465b54a91d71e95819a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-explained test repair with preserved assertions, reported before/after validation, and no actionable finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored test-only PR is exempt from the external contributor proof gate; its reported before/after test runs exercise the changed fixture calls without claiming native systemd runtime proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored test-only PR is exempt from the external contributor proof gate; its reported before/after test runs exercise the changed fixture calls without claiming native systemd runtime proof.
Evidence reviewed 7 items Verified introduced change: The pinned merge-base-to-head diff changes only three timeout arguments and an explanatory comment; all result assertions remain intact.
Current-main behavior and timeout mechanism: Current main still omits the explicit budget at the affected calls. The production reader defaults to 5,000 ms and initially divides the remaining budget across three manager calls, giving Node startup roughly 1,666 ms; the fixture uses a Node interpreter. Production reader and execution code are unchanged by this PR.
Independent deadline coverage: The existing deadline-sharing test checks exact per-call budgets of 400, 550, and 800 ms. Separate clock-step tests preserve the 5-second budget invariant, while the changed integration tests retain their semantic assertions.
Findings None None.
Security None None.

How this fits together

The Docker tooling tests simulate Linux service-manager responses with a Node-based busctl fixture. OpenClaw's service reader consumes those responses, and the tests verify installed-service details, missing units, and inspection failures.

flowchart LR
  A[Test unit files] --> B[Node busctl fixture]
  C[Test read budget] --> D[Service manager reader]
  B --> D
  D --> E{Inspection result}
  E --> F[Service details]
  E --> G[Missing or unavailable]
  F --> H[Test assertions]
  G --> H
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +7. Total +7 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 10 3 +7
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 10 3 +7

Review metrics

None.

Technical review

Best possible solution:

Keep fixture startup tolerance local to these semantic integration tests while retaining the production deadline and independent timeout coverage.

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

Yes, conditionally: Node fixture startup exceeding the first approximately 1.67-second slice produces the reported inspection error. Source supports that mechanism and the author reports reproducing it twice; this read-only review did not rerun it.

Is this the best way to solve the issue?

Yes. An existing per-call option accommodates fixture startup without changing production behavior, removing assertions, or replacing synchronization with sleeps; deadline semantics retain separate coverage.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e1370779eaa7.

Labels

Label justifications:

  • P3: This is a bounded test-reliability improvement with no runtime product behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored test-only PR is exempt from the external contributor proof gate; its reported before/after test runs exercise the changed fixture calls without claiming native systemd runtime proof.

Evidence

What I checked:

  • Verified introduced change: The pinned merge-base-to-head diff changes only three timeout arguments and an explanatory comment; all result assertions remain intact. (test/scripts/docker-build-helper.test.ts:7792, 300d3f405dea)
  • Current-main behavior and timeout mechanism: Current main still omits the explicit budget at the affected calls. The production reader defaults to 5,000 ms and initially divides the remaining budget across three manager calls, giving Node startup roughly 1,666 ms; the fixture uses a Node interpreter. Production reader and execution code are unchanged by this PR. (src/daemon/systemd-service-files.ts:100, 300d3f405dea)
  • Independent deadline coverage: The existing deadline-sharing test checks exact per-call budgets of 400, 550, and 800 ms. Separate clock-step tests preserve the 5-second budget invariant, while the changed integration tests retain their semantic assertions. (src/daemon/systemd.test.ts:1944, 300d3f405dea)
  • Latest release still uses the default fixture budget: The latest supplied release, v2026.9.3, contains all three affected calls without timeoutMs overrides. The release source was read through GitHub after the local tag lookup was unavailable. (test/scripts/docker-build-helper.test.ts:7454, 1391f7cd2d40)
  • Captured validation and review continuity: The supplied complete PR body reports two pre-fix failures after approximately 1.7–1.9 seconds, passing focused tests after the change, and two clean 297-test file runs. These are author-reported results, not reviewer execution. The previous review examined the same head and retained no findings or published rank-up moves. (300d3f405dea)
  • Prior merged fixture work supports routing: GitHub verifies fix(test): accept systemd Node flags in doctor switch validation #131860 as merged at this commit. It repaired argument parsing in the same doctor-switch fixture, a distinct problem rather than a replacement for this timeout change. Main history also identifies Vincent Koc's recent work in the affected test file. Broader line-history inspection encountered an unavailable blob, so no introducing-author claim is made. (scripts/e2e/lib/doctor-install-switch/shims/busctl, 816bc273c29d)

Likely related people:

  • vincentkoc: 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 (1 earlier review cycle)
  • reviewed 2026-09-09T13:47:25.815Z sha 300d3f4 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review September 9, 2026 13:56
@vincentkoc
vincentkoc merged commit 5623bf2 into main Sep 9, 2026
172 checks passed
@vincentkoc
vincentkoc deleted the fix/systemd-shim-test-timeout-20260909 branch September 9, 2026 15:09
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 9, 2026
…er-ownership-20260909

* origin/main: (147 commits)
  fix(cli): reject blank account selectors before command startup (#143088)
  fix(update): repair young runs after recorded drivers exit (#143136)
  test(telegram): close model callback fixture connections (#143197)
  improve(test): reduce Telegram policy fixture startup overhead (#143192)
  test(ci): stabilize systemd manager shim timing (#143134)
  fix(test): retire chat preview Escape listeners during teardown (#143191)
  test(memory-wiki): share visibility test callbacks (#143181)
  fix(ci): accept native iOS keychain filenames (#142968)
  fix(ci): show publication observations in FRV status (#143171)
  fix(github): point the stuck-FAQ auto-response at a live anchor (#143194)
  docs: correct verified accuracy defects in CLI, tools, and automation pages (#143179)
  refactor(tests): remove duplicate Mistral cache-cost test (#143172)
  fix(doctor): complete canonical model-reference migration (#142284)
  fix(ci): reject stale and empty timing sample cohorts (#143182)
  fix(ui): remove first-reply confetti from chat (#143167)
  docs: split help/faq into 13 topic pages (#143150)
  refactor(docs): require caller-owned route indexes (#143164)
  fix(android): distinguish connection status from chat readiness (#143128)
  refactor: share agent-turn execution test defaults (#143166)
  fix(cli): print immutable-config refusals without crash framing (#143140)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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