Repository navigation
test(relay): close the arm-B harness's three drift hazards (BLO-41723) - #7
Conversation
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>
|
@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:
Suggestion 1 took the const rather than the one-word narrowing, with Re-ran at |
There was a problem hiding this comment.
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:30and: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→ measuredgit diff --numstat 0574f5b60 a6bac5161 -- rs/moq-net=376 41. 417 = 376 + 41 is the--statcolumn.#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 — but38 + 417 ≠ 414on the same line. Cross-check: #2292/34+ #384/7=376/41exactly. Fix:publisher.rs +376 -41andpublisher.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 thathead~1had (verifieda6bac5161is an ancestor of this head, and a squash/merge keeps it reachable frommain), but "is the whole question of whether it still speaks for this tree" overstates the command's scope. The run depends onmoq-relay's ownsrc/,rs/moq-lite, andCargo.locktoo; 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 revertsrs/moq-net— correct today (0574f5b60..maintouches onlyrs/moq-netplusjs/net/src/ietf/priority.test.tsand this file), but it is a property of today'smain, 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 onmainbefore this merges (squash puts it on whatevermainis then). "mainat 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, sogit statusshowsMfor 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_BLOCKconst plusconst _: () = assert!(FETCH_BLOCK < BLOCKS, ...)turns a silentfetch timeoutinto a compile error at the edit that causes it; every use site (fetch_group, the SBN assert, thegroupskey, and the panic/report label) is derived from it, so no literal1survives.- 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
- Address Important issues this cycle.
- 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>
|
Addressed Ally review 5487650868 (@336d9fe1) at head
Comment-only diff; no executable change. |
There was a problem hiding this comment.
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:30and:34— header now readspublisher.rs +376 -41and#3 ... publisher.rs +84 -7. Independently re-measured via the compare API:0574f5b60...a6bac5161→publisher.rs +376 -41,priority.rs +38 -0; commit83eb8bdcf→publisher.rs +84 -7.38 + 376 = 414now 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 onlyrs/moq-net. That is correct today (0574f5b60..a6bac516touches onlyrs/moq-net,js/net/…priority.test.ts, and this file), and the widenedgit diff a6bac516..HEAD -- rs/ Cargo.lockline will surface a later Blockcast change elsewhere underrs/, so a reader is warned. Optional: one clause noting the recipe's pathspec is sized to today's delta, so whoever sees a non-emptyrs/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.lockwith the reason stated, the time-relative parenthetical dropped, and "on screen" narrowed to "in the test output". - The pathspec rationale ("narrowing to
rs/moq-netwould hide a change that matters") is the right justification and keeps the attestation from overstating itself.
Recommended Action
- No blocking changes requested.
- Merge once the remaining required CI checks finish green.
|
Merged by kkroo drive session 7ee27e at |
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 timeSuggestion 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, …)andgroups.entry(1)were literals coupled toBLOCKSby an unstated1 < 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: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; atFETCH_BLOCK = 1it is byte-identical to the old literal.2. The re-run recipe now closes
It ended with
rs/moq-netreverted and no way back. Added the restore line.One correction to the suggestion itself:
git restore rs/moq-netdoes 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: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
45cd0856washead~1of #5 and is now neither upstream nor anything a reader onmainis looking at. It now namesa6bac516—mainas 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:Re-run today at
a6bac516, both ways:git diff 0574f5b60 --stat -- rs/moq-netrs/moq-netreverted to0574f5b60Counts identical across both and to #4/#5:
Arm B's zero-diff claim holds.
Finding: the header was already stale on
mainIt named #2 alone —
publisher.rs +292 −34. That was true of #5's head, and Ally verified exactly that atbfb7262f. But #3 merged between #4 and #5, somaincarries two files:publisher.rs +292 −34priority.rs +38,publisher.rs +91 −70574f5b60..mainNeither is an arm-B carried patch — both are Blockcast's own
moq-network 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
mainthe moment it lands. It is why (3) records a diff command and not only a SHA.Verification
cargo fmt -p moq-relay -- --checkclean.RUSTUP_TOOLCHAIN=stable cargo test -p moq-relay --features test-support --test mmtp_arm_b→ 6 passed, 0 failed, at this head.git diff --statvsmain: one file,rs/moq-relay/tests/mmtp_arm_b.rs. Nothing underrs/moq-net.🤖 Generated with Claude Code