Repository navigation
test(api): measure the registration write bound in an isolated process - #1945
Conversation
#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>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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 fromRegionCapture::written_bytes, which iswcharfrom/proc/self/ioand 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 runscargo 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, withregistration wrote 307842 bytes(run 37876583854).Change
Each route now runs
registration_write_bound_childalone in a fresh process. This is the same env-gated child patternconstruction_clock_tests.rsuses. The parent asserts that the child succeeded and printed1 passed, so a filter mismatch can't pass vacuously. The< 64 KiBbound 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.registration wrote 1072 bytesand 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 --libfor both tests: 2 passed.cargo fmt --checkpasses. Clippy doesn't lint test code inmake check.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.