Skip to content

fix: isolate systemd clock tests from the host umask - #146990

Merged
steipete merged 1 commit into
mainfrom
codex/private-systemd-fixtures
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/private-systemd-fixtures

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes systemd clock-budget tests rejecting their own fixture files when the host uses umask 0002.

User Impact

No user-visible runtime change. The tests reach the intended monotonic-clock assertions while production service ownership checks remain unchanged.

Why This Change Was Made

Default-mode directory and file creation made the synthetic service definition group-writable. Create the fixture directories with 0700 and its unit file with 0600, matching the existing owner checks. No timing assertions, mocks, timeouts, or runtime guards change.

Related: main-branch QA follow-up to #146897 and #146931.

Evidence

  • Complete original file under child-only umask 0002: 2 passed, 4 failed with unsafe-permission refusals.
  • Fixed complete file: 6 passed under 0002, and 6 passed under the normal environment.
  • Changed-file typecheck, lint, formatting, and repository guards passed.
  • Independent Codex review through P2 found no actionable issues.

@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Sep 13, 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: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 7:57 AM ET / 11:57 UTC (Revision 2).

ClawSweeper review

What this changes

Creates private systemd clock-test directories and service files so group-writable host umasks do not prevent the tests from reaching their timing assertions.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused fix: current main still has umask-sensitive fixtures. No actionable patch defects were found, and the earlier proof warning does not apply to this maintainer-authored, test-only change.

Priority: P3
Reviewed head: 50fabd982a64b8606855e1df1c59f051a6ec9f3a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, source-supported fixture repair with relevant reported regression results and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer exemption applies. Reported runs exercise the changed filesystem fixture setup through the complete clock-test suite; mocked systemd calls do not prove live service behavior, which this patch does not change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer exemption applies. Reported runs exercise the changed filesystem fixture setup through the complete clock-test suite; mocked systemd calls do not prove live service behavior, which this patch does not change.
Evidence reviewed 6 items Verified introduced change: The pinned merge-base-to-head diff changes only fixture creation modes. Assertions, mocks, timeouts, and production code are unchanged; the verified test-merge comparison also lists only this test file.
Current production rejection explains the failures: The production inspection rejects artifacts with group or other write bits. Default creation under umask 0002 produces 0775 directories and a 0664 file; the proposed 0700 and 0600 modes avoid that rejection without weakening admission.
Still needed on main: Comparing fetched main with the reviewed head yields precisely the three fixture-mode changes. The latest supplied release revision and fetched main have identical contents for this test, so neither contains this repair.
Findings None None.
Security None None.

How this fits together

OpenClaw’s systemd service layer checks file ownership and permissions before changing service definitions. These tests supply temporary service files and simulated clock jumps to verify that operation budgets remain stable.

flowchart LR
  A[Host umask] --> C[Temporary test fixtures]
  B[Explicit private modes] --> C
  C --> D[Service permission checks]
  D --> E[Clock budget operations]
  F[Simulated clock jumps] --> E
  E --> G[Timing assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests 0. Total 0 across 1 file.

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

Review metrics

None.

Technical review

Best possible solution:

Keep fixture permissions explicit at creation while preserving the existing production checks and clock-budget assertions.

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

Yes: the complete clock-test file under umask 0002 reaches production checks that reject its default group-writable fixtures. Source inspection supports the reported before-and-after results; tests were not rerun during this read-only review.

Is this the best way to solve the issue?

Yes: explicit creation modes repair the fixture producer and follow the existing sibling-test pattern without changing timing coverage or production policy.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This repairs environment-sensitive test fixtures without changing user-facing runtime behavior.
  • 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: The maintainer exemption applies. Reported runs exercise the changed filesystem fixture setup through the complete clock-test suite; mocked systemd calls do not prove live service behavior, which this patch does not change.

Evidence

What I checked:

  • Verified introduced change: The pinned merge-base-to-head diff changes only fixture creation modes. Assertions, mocks, timeouts, and production code are unchanged; the verified test-merge comparison also lists only this test file. (src/daemon/systemd-deadline-clock-step.test.ts:75, 50fabd982a64)
  • Current production rejection explains the failures: The production inspection rejects artifacts with group or other write bits. Default creation under umask 0002 produces 0775 directories and a 0664 file; the proposed 0700 and 0600 modes avoid that rejection without weakening admission. (src/daemon/systemd-definition-mutation.ts:164, 970992db26c8)
  • Still needed on main: Comparing fetched main with the reviewed head yields precisely the three fixture-mode changes. The latest supplied release revision and fetched main have identical contents for this test, so neither contains this repair. (src/daemon/systemd-deadline-clock-step.test.ts:75, 970992db26c8)
  • Reported before-and-after validation: The captured PR body reports four failures and two passes under child-only umask 0002 before the change, then six passes under both 0002 and the normal environment. These results match the changed fixture boundary. This read-only review did not execute tests. (50fabd982a64)
  • Proof exemption and review continuity: Live GitHub permissions identify steipete as a repository administrator, consistent with the supplied MEMBER classification and maintainer label despite the REST association reporting CONTRIBUTOR. The previous review at this same head contained no findings or rank-up moves; its historical proof warning does not create a new requirement under the current maintainer exemption.
  • Relevant merged history: The clock-budget test was added in the recorded commit; comparison against its raw recorded parent confirms the file addition. The merged follow-ups fix: keep test homes private with group-writable umasks #146931 and fix: stop shell profiles from corrupting installer and Docker tests #146897 provide useful QA context but repair different fixture owners. (src/daemon/systemd-deadline-clock-step.test.ts:92, ffae22e8d18c)

Likely related people:

  • coderdailyone: Raw commit ffae22e adds src/daemon/systemd-deadline-clock-step.test.ts:92 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ffae22e8d18c; files: src/daemon/systemd-deadline-clock-step.test.ts)
  • steipete: 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-13T11:48:20.626Z sha 50fabd9 :: needs real behavior proof before merge. :: none

@steipete
steipete marked this pull request as ready for review September 13, 2026 11:53
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 13, 2026
@steipete
steipete merged commit 4e32013 into main Sep 13, 2026
174 checks passed
@steipete
steipete deleted the codex/private-systemd-fixtures branch September 13, 2026 12:23
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '4aff70f27016f9acf62d0acc19c8bd3592993e4c': (1537 commits)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  test(models): cover quota recovery during catalog discovery (#146708)
  fix(macos): recover browser sign-in when no browser opens (#146787)
  fix(process): prevent one-shot agents exiting while polling (#144268)
  fix(status): label the session inventory as stored (#146979)
  fix: avoid repeated background reads while loading chat (#146953)
  refactor(ui): narrow Skill Workshop proposal context (#146977)
  perf(sessions): keep cleanup responsive and reuse workers (#140897)
  fix(sessions): prevent stranded writers after abort and restart (#146792)
  refactor: reuse deferred owners in Gateway and infra fixtures (#146809)
  fix: prevent queued conversation replies from switching storage (#146984)
  test(ui): preserve nested failure summaries in CI logs (#146864)
  fix(test): respect process memory limits in local scheduling (#146298)
  fix: validate large media data URLs without regexp stack exhaustion (#146972)
  fix(ui): label model usage contributions as messages (#146735)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* temp/pr-145950: (101 commits)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  test(models): cover quota recovery during catalog discovery (#146708)
  fix(macos): recover browser sign-in when no browser opens (#146787)
  fix(process): prevent one-shot agents exiting while polling (#144268)
  fix(status): label the session inventory as stored (#146979)
  fix: avoid repeated background reads while loading chat (#146953)
  refactor(ui): narrow Skill Workshop proposal context (#146977)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '060e856e5f9df245d63c98990fcb47e18108c6b9': (97 commits)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  test(models): cover quota recovery during catalog discovery (#146708)
  fix(macos): recover browser sign-in when no browser opens (#146787)
  fix(process): prevent one-shot agents exiting while polling (#144268)
  fix(status): label the session inventory as stored (#146979)
  fix: avoid repeated background reads while loading chat (#146953)
  refactor(ui): narrow Skill Workshop proposal context (#146977)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* temp/pr-137049: (110 commits)
  improve: reduce GitHub OAuth maintenance work for large agent rosters (#147021)
  fix(test): avoid settings lock writer startup timeouts (#147029)
  fix(update): correct backup guidance and cover incident regressions (#147023)
  refactor(gateway): share connection lifecycle across transports (#145950)
  refactor(telegram): share HTML text escaping (#146936)
  perf(build): reduce disk use in UI performance checks (#146687)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '4aff70f27016f9acf62d0acc19c8bd3592993e4c': (30 commits)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  test(models): cover quota recovery during catalog discovery (#146708)
  fix(macos): recover browser sign-in when no browser opens (#146787)
  fix(process): prevent one-shot agents exiting while polling (#144268)
  fix(status): label the session inventory as stored (#146979)
  fix: avoid repeated background reads while loading chat (#146953)
  refactor(ui): narrow Skill Workshop proposal context (#146977)
  perf(sessions): keep cleanup responsive and reuse workers (#140897)
  fix(sessions): prevent stranded writers after abort and restart (#146792)
  refactor: reuse deferred owners in Gateway and infra fixtures (#146809)
  fix: prevent queued conversation replies from switching storage (#146984)
  test(ui): preserve nested failure summaries in CI logs (#146864)
  fix(test): respect process memory limits in local scheduling (#146298)
  fix: validate large media data URLs without regexp stack exhaustion (#146972)
  fix(ui): label model usage contributions as messages (#146735)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime 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