Skip to content

test(api): measure the registration write bound in an isolated process - #1945

Merged
DecisionNerd merged 1 commit into
mainfrom
fix/registration-write-isolation
Oct 9, 2026
Merged

DecisionNerd merged 1 commit into
mainfrom
fix/registration-write-isolation

Conversation

@DecisionNerd

@DecisionNerd DecisionNerd commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1941.

Why

registration_copies_and_writes_no_source_bytes (from #1923) asserts that registering a 641 KB source writes under 64 KiB. The count comes from RegionCapture::written_bytes, which is wchar from /proc/self/io and covers every thread in the process (crates/graphforge-storage/src/concurrency_attribution/capture.rs:436,453). Nextest isolates tests in separate processes, but the lean lane runs cargo test -p graphforge-api --no-default-features (.github/workflows/test.yml:285), where other tests write concurrently. It failed on #1940, a YAML-only PR, with registration wrote 307842 bytes (run 37876583854).

Change

Each route now runs registration_write_bound_child alone in a fresh process. This is the same env-gated child pattern construction_clock_tests.rs uses. The parent asserts that the child succeeded and printed 1 passed, so a filter mismatch can't pass vacuously. The < 64 KiB bound and every other assertion are unchanged; nothing is skipped, retried or relaxed.

Validation

  • cargo test --locked -p graphforge-api --no-default-features --lib, the lane's configuration with the full suite running concurrently on a loaded host: 433 passed, 0 failed.
  • Known positive: with the bound temporarily set to 1 byte, the isolated child reports registration wrote 1072 bytes and the parent fails. In isolation the registration writes about 1 KiB, against the 307,842 bytes measured while sharing a process. Reverted before commit.
  • cargo nextest run -p graphforge-api --no-default-features --lib for both tests: 2 passed.
  • cargo fmt --check passes. Clippy doesn't lint test code in make check.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

#1941)

registration_copies_and_writes_no_source_bytes bounds RegionCapture
written_bytes, which is wchar from /proc/self/io and counts every thread
in the process. Under cargo test other tests write concurrently, so the
lean API lane failed with "registration wrote 307842 bytes" on an
unrelated PR. Each route now runs in a fresh process through an env-gated
child test; the parent requires the child to report 1 passed. The bound
and every other assertion are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: CurateLabs/graphforge/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e2f53b3e-5b18-4921-9858-c8c52b320639

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


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.

@github-actions github-actions Bot added executor Changes to query executor core Core source code changes testing Test coverage and testing infrastructure documentation Improvements or additions to documentation ci-cd CI/CD configuration changes labels Oct 9, 2026
@DecisionNerd
DecisionNerd added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit 8c7c448 Oct 9, 2026
15 checks passed
@DecisionNerd
DecisionNerd deleted the fix/registration-write-isolation branch October 9, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd CI/CD configuration changes core Core source code changes documentation Improvements or additions to documentation executor Changes to query executor testing Test coverage and testing infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(api): registration write bound counts other tests' writes under cargo test

1 participant