Skip to content

fix(db): restore pool operation attribution on two event paths - #45

Merged
mfethe1 merged 1 commit into
product/mainfrom
fix/workflow-sink-channel-read-operation
Sep 11, 2026
Merged

mfethe1 merged 1 commit into
product/mainfrom
fix/workflow-sink-channel-read-operation

Conversation

@mfethe1

@mfethe1 mfethe1 commented Sep 11, 2026

Copy link
Copy Markdown
Owner

p0_pool_acquisitions_use_typed_operation_pairs_without_other is red on product/main right now. I hit it while validating the agent-homes branch and confirmed it is not ours — both violations arrived with upstream block/buzz commits.

1. workflow_sink.rs:566 — upstream 6e7044ac62 (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 proper WriterOperation::EventWrite tag 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 — upstream c6ca9d94d9 (block#7112)

Ran .fetch_all(pool) directly, bypassing operation attribution entirely. Now acquires through observability::acquire_writer with WriterOperation::SubscriptionHistory, matching the sibling readers on the same req.rs subscription 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
  • Diff is 6 lines across 2 files

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.
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: b1ed444c-94f6-438d-913e-65ca89dbe863

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

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.

@mfethe1
mfethe1 merged commit b84a9c6 into product/main Sep 11, 2026
46 of 48 checks passed
@mfethe1
mfethe1 deleted the fix/workflow-sink-channel-read-operation branch September 11, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant