Count subscriptions and deliveries, not just events collected - #502
Merged
Conversation
samoylenkodmitry
force-pushed
the
test/event-stream-subscription-counts
branch
from
August 27, 2026 15:53
d28bac9 to
1cfe674
Compare
samoylenkodmitry
changed the base branch from
main
to
fix/toggle-test-tmpfs-literal
August 27, 2026 15:53
An event stream that reaches its collector twice per publish looks exactly like a publisher firing twice, and nothing in the suite could tell the two apart: every existing collector test drives an EventChannel directly, so no test ever asked how many observers a platform service was left holding. These two do. A fake service counts its registrations and hands them back on drop, the way observe_incoming_content and its siblings do, so a stream that subscribes twice or never subscribes is visible as a count rather than as a doubled log line on a device. The second test is the shape that failed: a stream mounting above its siblings must not move them onto each other's effect state. Against the source-keyed hook identity both pass; against positional identity the conditional stream never subscribes and the last one subscribes twice, delivering every later event twice. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
samoylenkodmitry
changed the base branch from
fix/toggle-test-tmpfs-literal
to
main
August 27, 2026 15:59
samoylenkodmitry
force-pushed
the
test/event-stream-subscription-counts
branch
from
August 27, 2026 15:59
1cfe674 to
4f14898
Compare
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.
An event stream that reaches its collector twice per publish looks exactly like a publisher firing twice, and nothing in the suite could tell the two apart: every existing collector test drives an
EventChanneldirectly, so no test ever asked how many observers a platform service was left holding.These two do. A fake service counts its registrations and hands them back on drop, the way
observe_incoming_contentand its siblings do, so a stream that subscribes twice — or never subscribes — shows up as a count rather than as a doubled log line on a device.The second test is the shape that failed in the field: a stream mounting above its siblings must not move them onto each other's effect state. Against the source-keyed hook identity from #495 both pass. Against positional identity the conditional stream never subscribes and the last one subscribes twice, delivering every later event twice — verified by running these tests against the pre-#495 tree, where the banner service ends at 0 observers and the pressure collector receives
[3, 3]for a single publish.Tests only, plus two
TIME_WASTERS.mdnotes: the host-dependent dependency-budget trap (cargo tree --duplicatesresolves per host, so Apple-only duplicates are invisible to the Linux budgets job), and the observer-count-first diagnosis for doubled delivery.Gates:
just fmt,just clippy(zero warnings),cargo test -p cranpose-core --test effects_and_frames8/8.🤖 Generated with Claude Code