Skip to content

test(core,server): make the suite pass as root, under a slow init, and on Linux rustdoc - #8

Merged
RutaTang merged 1 commit into
mainfrom
claude/relaxed-cori-bw7sku
Sep 30, 2026
Merged

RutaTang merged 1 commit into
mainfrom
claude/relaxed-cori-bw7sku

Conversation

@RutaTang

Copy link
Copy Markdown
Owner

Summary

Running the backend CI gate (clippy, rustdoc with warnings denied, the hermetic suite for clew-core, clew-server and clew-protocol) on a Linux container turned up four failures the macOS-hosted jobs never meet. All four fixes are in tests and docs; no product logic changes.

  • Two tests fail as root. statefile::tests::a_store_whose_read_failed_is_not_a_refusal and clew-server's state::tests::a_refused_merge_and_a_failed_one_are_told_apart observe a failed read or write through chmod, which root reads and writes past. They now return early as root, through a new shared testutil::running_as_root(), matching what the fs_scan tests already do inline.
  • The cancel-while-forking test fails under a slow-reaping init. lsp::store::tests::a_cancel_while_the_installer_forks_stops_every_helper probed the process group once, 100 ms after the kill. Killed helpers linger as zombies until init reaps them (a container without an init does so slowly), and Linux counts a zombie as signalled. The probe now waits up to ten seconds, as the procgroup tests already do; a real survivor is a sleep 30, well past that.
  • settle_new_executable hits Linux's ETXTBSY in a parallel suite. A child that another test thread forked while the script was still open for writing holds that descriptor until it execs, and exec of the file fails meanwhile. The helper now retries that one error briefly; absorbing first-run costs is what it exists for.
  • A doc link breaks rustdoc on Linux. net.rs linked ProxyConfig::from_system, which is only built on macOS or under test, so cargo doc -D warnings failed on Linux. It is plain code text now.

Verification

On Linux, for clew-core, clew-server and clew-protocol:

Check Result
scripts/hermetic-test.sh 808 passed, 0 failed
cargo clippy --all-targets -- -D warnings 0 warnings
cargo doc --no-deps --document-private-items with -D warnings passes
cargo fmt --all -- --check passes

🤖 Generated with Claude Code

https://claude.ai/code/session_01WRJ4sDknvQJ86tFvGydgpf


Generated by Claude Code

…d on Linux rustdoc

Four findings from running the backend CI gate (clippy, rustdoc, the
hermetic suite) on a Linux container, three of which the macOS-hosted
jobs never meet:

- Two tests observe a failed read or write through `chmod`, which root
  reads and writes past; they now return early as root, through a shared
  `testutil::running_as_root`, as the fs_scan tests already do inline.
- The store's cancel-while-forking test probed the process group once,
  100 ms after the kill; killed helpers linger as zombies until init reaps
  them, which a container without an init does slowly, and Linux counts a
  zombie as signalled. The probe now waits up to ten seconds, as the
  procgroup tests do; a real survivor sleeps thirty.
- `settle_new_executable` read Linux's ETXTBSY (a child another test
  thread forked while the script was still open for writing holds that
  descriptor until it execs) as a script that does not run. It now retries
  that one error briefly, which is the first-run cost it exists to absorb.
- A doc link to `ProxyConfig::from_system` resolves only where the item is
  built (macOS or test); rustdoc with warnings denied failed on Linux. It
  is plain code text now.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRJ4sDknvQJ86tFvGydgpf
@RutaTang
RutaTang merged commit 041f28a into main Sep 30, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants