Skip to content

coverage: the registry knows each identity by the set that holds it, each arm held by a test (#918) - #939

Merged
valentinyanakiev merged 1 commit into
mainfrom
test-918-knows-arms
Nov 1, 2026
Merged

valentinyanakiev merged 1 commit into
mainfrom
test-918-knows-arms

Conversation

@valentinyanakiev

@valentinyanakiev valentinyanakiev commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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:

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 that no set holds is unknown.

Together with only_an_open_attempt_knows_its_group_by_its_bare_pid, cargo llvm-cov --branch over these two tests alone covers both arms of every condition in knows.

How it's held

  • Removal control: live.before.contains(id) replaced by false fails the test by name ("before was not known").
  • Gates: fmt, clippy, and brokkr-protocol lib process::attempts (23).
  • No production line, contract or public API changes.

Rulings asked (ruled 2026-11-01: the by-hand label)

  1. How this test-only PR is vouched: the operator's by-hand label, or a landing run. Recommended: the by-hand label, 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 no Brokkr-Run to read.

Ruling: operator 2026-11-01, in chat, "go with recommended" (#918, #918 (comment)): the by-hand label for this test-only follow-up

Part of #918's follow-ups. Part of #330.

🤖 Generated with Claude Code

…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
valentinyanakiev marked this pull request as ready for review October 31, 2026 23:04
@valentinyanakiev valentinyanakiev added the by-hand Operator-only escape hatch for 'delivered by brokkr' (decision 0033) label Oct 31, 2026
@valentinyanakiev
valentinyanakiev added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit cc275f6 Nov 1, 2026
53 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

by-hand Operator-only escape hatch for 'delivered by brokkr' (decision 0033)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant