Repository navigation
coverage: the registry knows each identity by the set that holds it, each arm held by a test (#918) - #939
Merged
Conversation
…each arm held by a test (#918) Landing 431L3's host coverage (on main c3e52bd) missed one branch, all outside #431: crates/brokkr-protocol/src/process/attempts.rs:313, the `live.before.contains(id)` true arm of `knows`. #931 already pinned the `live.open` arm (:316) after the merge queue missed it; the other arms were still reached only by process-driven ticks whose timing decides whether an identity is met through a closed attempt's sets. Any PR's exact-coverage gate could miss one by load. the_registry_knows_each_identity_by_the_set_that_holds_it asks `knows` directly: the engine itself, an unowned identity, and a closed attempt's `before`, `recorded` and `doubted` identities are each known; an identity no set holds is not. With only_an_open_attempt_knows_its_group_by_its_bare_pid, cargo llvm-cov --branch over the two tests alone covers both arms of every condition in `knows` (attempts.rs:310-316). Removal control: `live.before.contains(id)` replaced by `false` fails the test by name, "before was not known"; restored. Test only. Gates: cargo fmt --all -- --check; cargo clippy -p brokkr-protocol --all-targets --all-features -D warnings; brokkr-protocol lib process::attempts (23 passed). Signed-off-by: Valentin Yanakiev <valentin.yanakiev@gmail.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
valentinyanakiev
marked this pull request as ready for review
October 31, 2026 23:04
valentinyanakiev
enabled auto-merge
October 31, 2026 23:04
6 tasks
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.
What changed
A test-only follow-up to #918 (merged as #931). The tracker's
knows(crates/brokkr-protocol/src/process/attempts.rs:309-317) decides whether the registry already knows an identity. Most of its arms were reached only by process-driven ticks, whose timing decides whether an identity is met through a closed attempt's sets. So the exact-coverage gate could miss one under load on any PR:live.open(:316), which protocol: an idle run driver walks its own tree to detect, and one full snapshot attributes (#918) #931's last commit pinned;live.before.contains(id)(:313).the_registry_knows_each_identity_by_the_set_that_holds_itasksknowsdirectly:before,recordedanddoubtedidentities are each known;Together with
only_an_open_attempt_knows_its_group_by_its_bare_pid,cargo llvm-cov --branchover these two tests alone covers both arms of every condition inknows.How it's held
live.before.contains(id)replaced byfalsefails the test by name ("before was not known").process::attempts(23).Rulings asked (ruled 2026-11-01: the
by-handlabel)by-handlabel, or a landing run. Recommended: theby-handlabel, as ruled for protocol: an idle run driver walks its own tree to detect, and one full snapshot attributes (#918) #931's and bundle: a bundle's identity stops at its own files, and its bound holds on every read (#908) #934's test-only coverage commits. It has no run of its own (the controller wrote it), so the contribution gate has noBrokkr-Runto read.Ruling: operator 2026-11-01, in chat, "go with recommended" (#918, #918 (comment)): the
by-handlabel for this test-only follow-upPart of #918's follow-ups. Part of #330.
🤖 Generated with Claude Code