fix(exec): stamp demand-capture epochs against deferred stream pollution - #1092
Conversation
Deferred one-hop expand drops were mutating the next capture session's DemandSnapshot, which failed Bazel full-lifecycle slope proof. Stamp streams with the active epoch and ignore stale record paths. Closes #1091 Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 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 |
This comment has been minimized.
This comment has been minimized.
Deferred partition execute was re-reading the global capture epoch and adopting the next session, so one-hop expand RSS/hop counters still leaked into optimized two-hop snapshots under Bazel. Bind the epoch on Expand, RSS/filter probes, and OrderedTwoHop at optimize time.
Process-global demand capture was still adopting another test's live epoch when uncaptured execute planned under an active capture session, which leaked one-hop expand counters into optimized two-hop snapshots under Bazel. Bind the capture epoch to the capturing thread (inherited across block_on workers), make enable/epoch/snapshot transitions atomic under one mutex, and only instrument when the bound session matches. Co-authored-by: Cursor <cursoragent@cursor.com>
Thread-bound capture correctly stopped concurrent executes from adopting a live session, but gating FixedHopDemandRule on may_instrument_demand dropped behavioral demand_batch wrapping that fixed_hop_limit explain/execute needs. Always wrap terminal fixed-hop limits; stamp unbound plans with epoch 0 so records no-op; bind the calling thread in reset() for the legacy reset/execute/disable path; gate RSS and plan-completion writes on the bound session. Co-authored-by: David Spencer <DecisionNerd@users.noreply.github.com>
Summary
DemandSnapshot.stale_capture_epoch_cannot_pollute_next_sessionregression for the Bazelequivalent_full_lifecyclefailure mode.Closes #1091
Test plan
cargo test -p graphforge-exec --lib stale_capture_epoch_cannot_pollute_next_sessioncargo test -p graphforge-execTMPDIR=<ext4> cargo test -p graphforge-api --test scale_g500_ladder equivalent_full_lifecycleMade with Cursor
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.