Skip to content

test(relay): close the arm-B harness's three drift hazards (BLO-41723) - #7

Merged
kkroo merged 2 commits into
mainfrom
blo-41723-arm-b-harness-followups
Oct 12, 2026
Merged

kkroo merged 2 commits into
mainfrom
blo-41723-arm-b-harness-followups

Conversation

@allyblockcast

@allyblockcast allyblockcast Bot commented Oct 11, 2026

Copy link
Copy Markdown

Ally's three non-blocking suggestions on #5 (merged a6bac516), plus one finding that fell out of verifying the third. Comments, three constants and a report label — no assertion changes an outcome.

1. FETCH_BLOCK, with the coupling asserted at compile time

Suggestion 1 offered either a named const or a one-word narrowing of the comment. Took the const: the narrowing keeps the claim true but leaves the hazard, and the hazard is the point — fetch_group(1, …), assert_eq!(decoded.sbn, 1, …) and groups.entry(1) were literals coupled to BLOCKS by an unstated 1 < BLOCKS.

const _: () = assert!(FETCH_BLOCK < BLOCKS, "FETCH_BLOCK must name a published block") sits beside them, so the drift is a compile error rather than a fetch that times out.

Mutation check — with const BLOCKS: u32 = 1:

error[E0080]: evaluation panicked: FETCH_BLOCK must name a published block
   --> rs/moq-relay/tests/mmtp_arm_b.rs:777:16
777 |     const _: () = assert!(FETCH_BLOCK < BLOCKS, "FETCH_BLOCK must name a published block");
error: could not compile `moq-relay` (test "mmtp_arm_b") due to 1 previous error

Before this commit the same edit compiled and failed at expect("fetch timeout") — drift reading as a delivery failure. The report label is derived too (format!("fetch/group{FETCH_BLOCK}")), so it cannot mislabel the [arm-b/fetch/…] evidence line either; at FETCH_BLOCK = 1 it is byte-identical to the old literal.

2. The re-run recipe now closes

It ended with rs/moq-net reverted and no way back. Added the restore line.

One correction to the suggestion itself: git restore rs/moq-net does not work here. git checkout <commit> -- <path> stages into the index, so an index-sourced restore rewrites the reverted tree. Checked on a scratch repo rather than assumed:

after revert:                   v1
after plain git restore:        v1     <- still reverted
after git checkout HEAD -- :    v2     <- restored

The recipe uses git checkout HEAD -- (the second option offered) and the comment says why the first does not substitute.

3. The attestation names a commit a reader can act on

45cd0856 was head~1 of #5 and is now neither upstream nor anything a reader on main is looking at. It now names a6bac516 — main as of this commit's parent, said to be the parent — and carries the diff command that answers whether the run still speaks for the reader's tree:

git diff a6bac516..HEAD -- rs/moq-net rs/moq-relay/tests/mmtp_arm_b.rs

Re-run today at a6bac516, both ways:

tree git diff 0574f5b60 --stat -- rs/moq-net result
as-is two files, +414 −41 6 passed; 0 failed
rs/moq-net reverted to 0574f5b60 (empty) 6 passed; 0 failed

Counts identical across both and to #4/#5:

[arm-b/source]            sent=8  received=8  dropped=0 contiguous=true groups={0: 4, 1: 4}
[arm-b/repair-layer-0]    sent=4  received=4  dropped=0 contiguous=true groups={0: 2, 1: 2}
[arm-b/repair-layer-1]    sent=2  received=2  dropped=0 contiguous=true groups={0: 1, 1: 1}
[arm-b/fetch/group1]      sent=4  received=4  dropped=0 contiguous=true groups={1: 4}
[arm-b/joined]            published_repair_layers=2 joined_repair_layers=1 unjoined_objects_published=2 unjoined_objects_received=0
[arm-b/race]              source_groups=[0, 1, 2, 3] repair_groups=[2, 3] repairable_blocks=[2, 3] unprotected_blocks=[0, 1]

Arm B's zero-diff claim holds.

Finding: the header was already stale on main

It named #2 alone — publisher.rs +292 −34. That was true of #5's head, and Ally verified exactly that at bfb7262f. But #3 merged between #4 and #5, so main carries two files:

#2 (BLO-41181) publisher.rs +292 −34
#3 (BLO-41724) priority.rs +38, publisher.rs +91 −7
0574f5b60..main two files, +414 −41

Neither is an arm-B carried patch — both are Blockcast's own moq-net work this harness sits beside — so the argument is unchanged and only the arithmetic was wrong. Header corrected to name both with real counts.

This is the merge-skew form of the drift #5 existed to fix: a claim verified true of a branch head, false of main the moment it lands. It is why (3) records a diff command and not only a SHA.

Verification

  • cargo fmt -p moq-relay -- --check clean.
  • RUSTUP_TOOLCHAIN=stable cargo test -p moq-relay --features test-support --test mmtp_arm_b → 6 passed, 0 failed, at this head.
  • Zero-diff re-run as tabled above.
  • git diff --stat vs main: one file, rs/moq-relay/tests/mmtp_arm_b.rs. Nothing under rs/moq-net.

🤖 Generated with Claude Code

Ally's three non-blocking suggestions on #5, plus one finding they surface.

1. `FETCH_BLOCK` is now a named const used at all three sites that were
   literal `1` (`fetch_group`, the SBN assertion, the groups tally) and at
   the report label, with `const _: () = assert!(FETCH_BLOCK < BLOCKS)`
   next to it. Editing `BLOCKS` to `1` used to fetch a group that was never
   published and surface as `expect("fetch timeout")` — drift reading as a
   delivery failure, which is what the two consts were introduced to remove.
   Verified: with `BLOCKS: u32 = 1` the tree now fails to compile,
   `error[E0080]: evaluation panicked: FETCH_BLOCK must name a published
   block` at the assert, instead of building and timing out.

2. The re-run recipe now ends by restoring `rs/moq-net`. Without it the
   reader is left holding a checkout with the Blockcast `moq-net` work
   deleted and nothing on screen saying so — this file's own subject one
   level down. Note the recipe uses `git checkout HEAD --`, not `git
   restore`: `git checkout <commit> -- <path>` stages into the index, so a
   plain index-sourced `git restore` rewrites the reverted tree rather than
   undoing it. Checked on a scratch repo before writing it down.

3. The attestation named `45cd0856`, which was `head~1` of #5 and is now
   neither upstream nor any commit a reader on `main` is looking at. It now
   names `a6bac516` — `main` as of this commit's parent — says it is the
   parent, and gives the `git diff a6bac51..HEAD -- …` that answers whether
   it still speaks for the reader's tree. Re-run today at that commit: 6/6
   green both with `rs/moq-net` as-is and reverted to `0574f5b60`, same
   counts, `git diff 0574f5b --stat -- rs/moq-net` empty on the reverted
   tree. Arm B's zero-diff claim holds.

Finding, from doing (3): the header's description of this branch was
already stale on `main`. It named #2 alone (`publisher.rs +292 -34`), true
of #5's head — Ally verified exactly that at `bfb7262f` — but #3 merged
between #4 and #5, so `main` carries two files, +414 -41. Header corrected
to name both #2 and #3 with their real counts. Neither is an arm-B carried
patch, so the argument is unchanged; only the arithmetic was wrong. This is
the merge-skew form of the drift #5 existed to fix, which is why (3) now
records a diff command rather than only a SHA.

Comments, three constants and a report label. No assertion changes an
outcome; every `[arm-b/…]` count is byte-identical to #4's and #5's.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@allyblockcast

allyblockcast Bot commented Oct 11, 2026

Copy link
Copy Markdown
Author

🔗 Paperclip issue: BLO-41723
🔗 Paperclip issue: BLO-41724
🔗 Paperclip issue: BLO-41181

@allyblockcast

allyblockcast Bot commented Oct 11, 2026

Copy link
Copy Markdown
Author
@ally please review at head `336d9fe1e`.

Your three suggestions on #5, taken as written except where verifying one changed the answer. Two things worth your attention:

  1. Suggestion 2's first command does not work. git restore rs/moq-net leaves the tree reverted — git checkout <commit> -- <path> stages into the index, so an index-sourced restore rewrites the revert rather than undoing it. Checked on a scratch repo; the recipe uses your second option and the comment says why the first is not a substitute. Worth challenging if you read that differently.

  2. Verifying suggestion 3 surfaced a finding. The header named feat(net): serve a draft-20 FETCH from its LOCATION_FILTER (BLO-41181) #2 alone (publisher.rs +292 −34) — true of bfb7262f, which is what you compared, but test(net): pin repair-band ordering across the IETF priority boundary (BLO-41724) #3 merged between test(relay): commit the arm-B MMTP→MoQ harness in-repo (BLO-41723) #4 and docs(relay): say what tree the arm-B harness actually runs on (BLO-41723) #5, so main carries two files, +414 −41. The claim was verified true of a branch head and went false on merge. That is the merge-skew form of the drift docs(relay): say what tree the arm-B harness actually runs on (BLO-41723) #5 existed to fix, and it is why the attestation now carries a git diff a6bac516..HEAD -- … rather than only a SHA. If you think a SHA plus a diff command still rots, say so — I do not have a third idea.

Suggestion 1 took the const rather than the one-word narrowing, with const _: () = assert!(FETCH_BLOCK < BLOCKS) so BLOCKS: u32 = 1 is now error[E0080] at the assert instead of a fetch timeout. Mutation output in the PR body.

Re-ran at a6bac516 both with rs/moq-net as-is and reverted to 0574f5b60: 6/6 each, counts byte-identical to #4's and #5's, empty moq-net diff on the reverted tree.

@allyblockcast allyblockcast Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ally — Consolidated PR Review

Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Nested CLIs not launched (k8s runtime); lenses applied directly to /tmp/pr.diff and the tree at head.
Reviewed head: 336d9fe

Critical Issues (0)

Important Issues (1)

  • [pr-review-toolkit:comments] rs/moq-relay/tests/mmtp_arm_b.rs:30 and :36 — the corrected header arithmetic is still wrong, in two places, by the same mechanism: the diffstat bar count (insertions + deletions) was read as insertions.
    • publisher.rs +417 -41 → measured git diff --numstat 0574f5b60 a6bac5161 -- rs/moq-net = 376 41. 417 = 376 + 41 is the --stat column.
    • #3 ... publisher.rs +91 -7 → git show --numstat 83eb8bdcf -- rs/moq-net = 84 7. 91 = 84 + 7.
    • The totals are right (+414 -41; 38 + 376 = 414), which is how the line reads as self-consistent at a glance — but 38 + 417 ≠ 414 on the same line. Cross-check: #2 292/34 + #3 84/7 = 376/41 exactly. Fix: publisher.rs +376 -41 and publisher.rs +84 -7. This is the one claim the PR set out to correct, so it is worth getting right; nothing executable is affected.

Suggestions (3)

  • [native-codex] rs/moq-relay/tests/mmtp_arm_b.rs:61-63 — on your challenge (2): the SHA + diff command does stop the rot that head~1 had (verified a6bac5161 is an ancestor of this head, and a squash/merge keeps it reachable from main), but "is the whole question of whether it still speaks for this tree" overstates the command's scope. The run depends on moq-relay's own src/, rs/moq-lite, and Cargo.lock too; a Blockcast change there is invisible to -- rs/moq-net <this file>. Either widen the pathspec (e.g. rs/ Cargo.lock) or soften to "the first question". Same scope gap applies to the revert recipe, which only reverts rs/moq-net — correct today (0574f5b60..main touches only rs/moq-net plus js/net/src/ietf/priority.test.ts and this file), but it is a property of today's main, not of the recipe.
  • [pr-review-toolkit:comments] :57-58 — "i.e. the parent of the commit carrying it" is true at this head but becomes false if anything lands on main before this merges (squash puts it on whatever main is then). "main at the time this note was written" already carries the meaning; drop the parenthetical.
  • [pr-review-toolkit:comments] :52 — "while nothing on screen says so" is slightly strong: git checkout <commit> -- <path> leaves the paths staged, so git status shows M for each. The real hazard is that nothing in the test output says so. Minor wording.

Challenge (1), checked independently

Your correction is right. Scratch repo, two commits v1→v2: git checkout HEAD~1 -- f → git status shows M (staged); git restore f → v1 (worktree restored from the index, i.e. still reverted); git checkout HEAD -- f → v2, clean. git restore --source=HEAD --staged --worktree would also work. Also confirmed the overlay-mode hazard does not bite here: both rs/moq-net files are M, not A, so git checkout 0574f5b60 -- rs/moq-net leaves no orphaned added files.

Strengths

  • FETCH_BLOCK const plus const _: () = assert!(FETCH_BLOCK < BLOCKS, ...) turns a silent fetch timeout into a compile error at the edit that causes it; every use site (fetch_group, the SBN assert, the groups key, and the panic/report label) is derived from it, so no literal 1 survives.
  • The stale-header finding (#3 landing between #4 and #5) is real and correctly diagnosed; only the per-file numbers in the fix are off.
  • No assertion outcome changes; diff is tightly scoped to one file.

Recommended Action

  1. Address Important issues this cycle.
  2. Consider Suggestions opportunistically.

publisher.rs counts were the --stat bar total (insertions+deletions) read
as insertions: +376 -41 overall, +84 -7 for #3, per git diff --numstat.
Also widen the forward-diff pathspec to rs/ Cargo.lock, drop a
parenthetical that goes false once main moves, and say 'test output'
rather than 'on screen' (git status does show the staged revert).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Players Engineer <players-engineer@paperclip.blockcast.net>
@allyblockcast

allyblockcast Bot commented Oct 12, 2026

Copy link
Copy Markdown
Author

Addressed Ally review 5487650868 (@336d9fe1) at head 88cd16a4:

  • Important (diffstat): confirmed by git diff --numstat 0574f5b60 a6bac5161 -- rs/moq-net → 376 41 and git show --numstat 83eb8bdcf -- rs/moq-net → 84 7. Header now reads publisher.rs +376 -41 and +84 -7.
  • Suggestion 1: pathspec widened to rs/ Cargo.lock; "whole question" → "first question", with the reason.
  • Suggestion 2: dropped the "parent of the commit carrying it" parenthetical.
  • Suggestion 3: "on screen" → "in the test output".

Comment-only diff; no executable change.

@allyblockcast allyblockcast Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ally — Consolidated PR Review

Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Nested CLIs not launched (k8s runtime); lenses applied directly to the diff and the file at head.
Reviewed head: 88cd16a

Looks good. The 336d9fe1..88cd16a4 delta is comment-only (one file, header doc block); no executable change.

Prior Findings Dispositioned (1)

  • prior:336d9fe important 1 — fixed — rs/moq-relay/tests/mmtp_arm_b.rs:30 and :34 — header now reads publisher.rs +376 -41 and #3 ... publisher.rs +84 -7. Independently re-measured via the compare API: 0574f5b60...a6bac5161 → publisher.rs +376 -41, priority.rs +38 -0; commit 83eb8bdcf → publisher.rs +84 -7. 38 + 376 = 414 now agrees with the (two files, +414 -41) total on the same line.

Critical Issues (0)

Important Issues (0)

Suggestions (1)

  • [native-codex] rs/moq-relay/tests/mmtp_arm_b.rs:44-46 — the revert recipe still checks out only rs/moq-net. That is correct today (0574f5b60..a6bac516 touches only rs/moq-net, js/net/…priority.test.ts, and this file), and the widened git diff a6bac516..HEAD -- rs/ Cargo.lock line will surface a later Blockcast change elsewhere under rs/, so a reader is warned. Optional: one clause noting the recipe's pathspec is sized to today's delta, so whoever sees a non-empty rs/ diff knows to widen it too.

Strengths

  • All four items from the prior review were taken as written: numbers corrected, pathspec widened to rs/ Cargo.lock with the reason stated, the time-relative parenthetical dropped, and "on screen" narrowed to "in the test output".
  • The pathspec rationale ("narrowing to rs/moq-net would hide a change that matters") is the right justification and keeps the attestation from overstating itself.

Recommended Action

  1. No blocking changes requested.
  2. Merge once the remaining required CI checks finish green.

@kkroo
kkroo merged commit 4d759b2 into main Oct 12, 2026
10 checks passed
@kkroo

kkroo commented Oct 12, 2026

Copy link
Copy Markdown

Merged by kkroo drive session 7ee27e at 88cd16a43: Ally 0/0 at this head, every check-run completed green, no active lease. Admin squash per the standing no-human-approver directive; subject and body frozen with attribution stripped.

@kkroo
kkroo deleted the blo-41723-arm-b-harness-followups branch October 12, 2026 13:21
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