Skip to content

test(kio): isolate log reclamation tests sharing the epoch collector - #7244

Merged
kixelated merged 2 commits into
mainfrom
quest/m1/kio-workspace-tests
Oct 29, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m1/kio-workspace-tests

Conversation

@kixelated

@kixelated kixelated commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Parallel libtest runs can fail kio's log reclamation assertions even on current main, including the log ordering fix in moq-dev/moq#7134. Crossbeam's collector is process-wide, so another log test's active read can prevent collection during the asserting test's eight flushes.

This is a harness interaction, not feature unification: the pre-fix binaries fail with both standalone and workspace features under parallel libtest, and pass serially. Crossbeam enables the same alloc,default,std features in both builds.

Approach

  • Serialize the log tests within a process with one test-only mutex, establishing the isolation their reclamation helper requires.
  • Keep every eviction assertion, collection budget, and the four-reader concurrent test unchanged. Production code is unchanged.
  • Remove the completed quest and its milestone link.

Choice made under unattended authorization: use a test-only mutex to isolate the shared collector.

Impact

  • Public API: none.
  • Wire: none.

Validation

  • Before: the original workspace-feature binary fails eviction_frees_whatever_readers_do and reader_outlives_writer with 16 libtest workers; the same binary passes with one worker. The standalone-feature binary also fails in parallel.
  • After: cargo test --locked --workspace --lib log:: -- --test-threads=16 passes, including all 13 kio log tests.
  • just rs test -p kio --lib and the workspace nextest run filtered to kio: 88 passed each.
  • quest check --base origin/main and formatting pass.
  • Full just ci: passed, including all 10,208 selected tests, both 39-package feature extremes, isolated feature boundaries, Rustdoc, and repository checks. Used the Nix toolchain with BASH_ENV unset to avoid repeatedly reloading the session environment into nested shells; the default launcher otherwise failed with Argument list too long.

Alternatives

Changing production collectors or increasing flush counts would add cost or mask the shared-process test assumption. Nextest already isolates tests, but plain libtest should work too.

Follow-ups

None.

(Written by GPT-6.1)

@kixelated kixelated changed the title kio's log tests pass in a workspace build test(kio): isolate log reclamation tests sharing the epoch collector Oct 29, 2026
@kixelated
kixelated marked this pull request as ready for review October 29, 2026 14:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T14:55:11.257669Z f6efc31 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: f6efc31

No actionable bugs found. The test-only mutex is a focused fix for shared-collector interference: all 13 log tests hold it through teardown, while the four-reader test retains its internal concurrency and joins its workers before unlocking. Eviction assertions and the collection budget remain intact; production behavior is unchanged. This is simpler than changing production collectors or increasing flush counts, and the completed quest/link are removed together.

Verification limits: static inspection of the diff and relevant log/test surroundings, including an independent static pass. I did not execute libtest, nextest, workspace tests or CI, and have not independently reproduced the reported validation or reclamation timing.

(Written by OpenAI)

@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6d546883-11e4-4cb7-a44f-2d2d0f569642
Commits

Reviewing files that changed from the base of the PR and between 66bdbb9 and f6efc31.

Files selected for processing: 3
  • quest/m1/README.md
  • quest/m1/kio-workspace-tests.md
  • rs/kio/src/log.rs
Files with no reviewable changes: 2
  • quest/m1/README.md
  • quest/m1/kio-workspace-tests.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

Walkthrough

The kio log tests now acquire a process-wide mutex when exercising Crossbeam’s shared epoch collector. The collect helper documentation describes running reclamation under that lock. The workspace-test quest and its planning document were removed.

Priority: Low

Merge Risk: Minimal · up to f6efc

No concrete merge-blocking risk remains; the test-only serialization change is ready to merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: isolating kio log reclamation tests that share the epoch collector.
Description check Passed The description explains the parallel test failure, the test-only mutex solution, the unchanged production behavior, and the validation results.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 9 functions across 1 files.

Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary: no changes were needed in the merge pass. All 11 checks pass on f6efc31. Codex gave a 👍 with no findings, and the automated review on the maintainer account found no actionable bugs. CodeRabbit had no actionable comments. quest check --base origin/main passes on the head. No design decisions are open. Landing through the merge queue (squash).

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 71a68b7 Oct 29, 2026
11 checks passed
@kixelated
kixelated deleted the quest/m1/kio-workspace-tests branch October 29, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant