Repository navigation
Rename the origin-filtered event channel to subscribe_to_events_excluding_origin - #3394
Conversation
|
Automated pragmatic-code-review (initial review, medium): APPROVE Code Review SummaryA clean, mechanical rename with accurate docs. I read every hunk of the two-file diff ( What I checked and how:
FindingsCritical IssuesNone. Suggested Improvements
Nitpicks
Doc accuracy (verified against the code)
Test quality
Requirements Check (issue #3338)
Recommendation: APPROVE |
mstomar125
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment, GitHub blocks self-approval). Full findings in the review comment above.
Address-review summary (round 1)Review: APPROVE, 0 Critical, 1 Improvement, 1 Nit. Addressed (1)
Skipped (1)
Checks after the fix: Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: the only change since the reviewed commit is a comment wording fix (two doc comments), with no code, identifier or test change. The reviewer's behaviour, completeness and doc-accuracy checks are unaffected. |
subscribe_for_push becomes subscribe_to_events_excluding_origin and set_push_excluded_origin becomes set_excluded_event_origin. The fields, the batch-guard members, the filter predicate and the flush helper's parameters follow (origin_filtered_event_tx, excluded_event_origin, filtered_tx, passes_origin_filter). Behaviour is unchanged. The docs on the renamed items no longer name a consumer or describe the channel as "push". The tests use a test-local excluded origin instead of the sync client id, and the playbook engine's reference to the filter uses the new names. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Co-Authored-By: Claude Sonnet 5 <[email protected]>
5397f8f to
e07a6bb
Compare
Closes #3338
Part of the Pro/core boundary epic (#3298): renames the origin-filtered mirror of the domain-event channel for what it does, per ADR-083 §4 (proposed, decision 4-A). Behaviour is unchanged.
Renames
subscribe_for_pushsubscribe_to_events_excluding_originset_push_excluded_originset_excluded_event_originNodeService.push_event_txorigin_filtered_event_txNodeService.push_excluded_origin,BatchEmitGuard.push_excluded_originexcluded_event_originBatchEmitGuard.push_txfiltered_txpush_forward_allowedpasses_origin_filterflush_envelopesparamspush_tx/push_excluded_origin, localpush_excluded_origin_reffiltered_tx/excluded_origin/excluded_origin_refpush_channel_*origin_filtered_channel_*The names occur only in
packages/core/src/services/node_service/mod.rsand theis_sync_originateddoc inpackages/core/src/playbook/engine.rs. A repo-wide grep found no other caller; the only external one was the Pro daemon in nodespace-sync, which stops compiling until its next pin bump renames two call sites (accepted).Docs and tests
create_node_streamingfixed-source caveat is kept, and now also appears on the publicsubscribe_to_events_excluding_origindoc.const EXCLUDED_ORIGIN: &str = "bulk-apply"instead of the"sync-service"literal, in both the setter calls andwith_client(..). Assertion messages, locals and the block header no longer say "push", "sync" or "UI".emit_eventpath". Mutation runs (below) show they reach neither, so those parentheticals were dropped rather than carried over.Deviations from the issue text
BASELINESto the printed counts. The standing decision for this epic is not to lower BASELINES (parallel PRs collide on those lines; Drive every Pro-boundary ratchet count to zero and make the check a hard ban #3371 tightens everything), and this change moves no count, soscripts/check-pro-boundary.tsis not in the diff.SYNC_SERVICE_CLIENT_ID/is_sync_originated(Give the replicated-apply origin constant and engine gate neutral names, value unchanged #3339). The docs onDOMAIN_EVENT_CHANNEL_CAPACITYand onbulk_add_to_collections_notify_emits_push_eventsalso mention "cloud-sync push", but they describe the main channel and amember_oftest, not this seam, and are not in the issue's scope table.Ratchet
bun run scripts/check-pro-boundary.tsexits 0. Counts are identical toorigin/main(no count rises or falls from this change).cloudSyncHooksalready sits at 0 against a baseline of 4 on main; left for #3371.Verification
git grep -n -E 'subscribe_for_push|set_push_excluded_origin|push_event_tx|push_excluded_origin|push_forward_allowed|push_channel_' -- packagesprints nothing.cargo fmt -p nodespace-core --check: clean.cargo clippy -p nodespace-core --all-targets -- -D warnings -D clippy::unused-async: clean.nextest run -p nodespace-core --lib origin_filtered_channel create_parent_edge_reparent: the fourorigin_filtered_channel_*tests andcreate_parent_edge_reparent_emits_former_parent_deletepass.bun run test:changed: passed (scripts tier and the full Rust workspace nextest run).Mutation check
No test was added, but the renamed tests were mutation-checked so a rename cannot have quietly weakened them. Each mutation was applied to
node_service/mod.rs, the five tests run, then the file restored:passes_origin_filteralwaystrue..._node_events,..._relationship_events,..._batched_flush,create_parent_edge_reparent_emits_former_parent_deletepasses_origin_filteralwaysfalse..._mirrors_main_when_no_origin_excluded,..._node_eventsset_excluded_event_origina no-op..._node_events,..._relationship_events,..._batched_flush,create_parent_edge_reparent_emits_former_parent_deleteBatchEmitGuard::dropignores the configured origin..._batched_flush(only)NodeService::newignores the configured originemit_eventflush ignores the configured originThe last two are an existing coverage gap, not something this rename introduced: node and relationship writes in these tests publish through the transaction-commit flush, so the notifier and
emit_eventflush sites have no test that an excluded origin is withheld. The rename does not touch their logic (and the compiler checks their arguments, since the sender and lock types differ). Flagging it as a possible follow-up rather than growing a pure-rename PR.🤖 Generated with Claude Code