fix(db): restore pool operation attribution on two event paths - #45
Merged
Merged
Conversation
p0_pool_acquisitions_use_typed_operation_pairs_without_other has been red on product/main. Both violations came in from upstream, not from our work: - workflow_sink.rs:566 (upstream 6e7044a, assign_agent) called .get_channel() in a file the invariant treats as write-only. The lookup gates a message post, so get_channel_for_event_write() is the correct pair - identical signature, correct WriterOperation tag. Line 292 already used it. - event.rs huddle_started_links (upstream c6ca9d9, block#7112) ran .fetch_all(pool) directly, bypassing attribution. Now acquires via observability::acquire_writer with SubscriptionHistory, matching its sibling readers on the same req.rs path. Verified: observability_source 3/3 pass (was 1 failing at :321, then :621); huddle_started_links_batches_valid_creator_links_and_ignores_malformed_content passes against real Postgres with all 45 migrations applied; fmt + clippy -D warnings clean on buzz-db and buzz-relay.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
p0_pool_acquisitions_use_typed_operation_pairs_without_otheris red onproduct/mainright now. I hit it while validating the agent-homes branch and confirmed it is not ours — both violations arrived with upstreamblock/buzzcommits.1.
workflow_sink.rs:566— upstream6e7044ac62(assign_agent)Called
.get_channel(...)inside a file the invariant test treats as write-only. The lookup directly gates a message post, so.get_channel_for_event_write(...)is the correct pair: identical signature, just the properWriterOperation::EventWritetag on the pool acquisition. Line 292 in the same file already used the write variant — this was the one straggler.2.
event.rs::huddle_started_links— upstreamc6ca9d94d9(block#7112)Ran
.fetch_all(pool)directly, bypassing operation attribution entirely. Now acquires throughobservability::acquire_writerwithWriterOperation::SubscriptionHistory, matching the sibling readers on the samereq.rssubscription path.Verification
observability_source: 3 passed, 0 failed (previously failed at:321, and after fixing that, at:621— both now green)huddle_started_links_batches_...: passes against real Postgres, all 45/45 migrations applied cleanly in-transaction (66 tables)cargo fmt --all --check= 0;cargo clippy -p buzz-db -p buzz-relay --all-targets -- -D warnings= 0