Publish D2-compatible amt-verify image - #5
Merged
Conversation
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Contributor
Author
|
🔗 Paperclip issue: BLO-15657 |
1 similar comment
Contributor
Author
|
🔗 Paperclip issue: BLO-15657 |
Contributor
Author
|
@ally Please review the D2 contract specifically: |
Contributor
Author
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Critical Issues (1)
- [gstack/review, native-codex]
.github/workflows/publish-amt-verify.yml:5,28-30— the workflow triggers on push to bothmainand this feature branch (blo-15657-amt-verify-image), but thetags:list is unconditional — every push to the feature branch also re-publishes the mutableghcr.io/blockcast/amt-verify:maintag, not just the sha-pinned tag. Any consumer pulling:mainwould get whatever was last pushed to the feature branch instead of an actually-merged commit. The PR description itself only promises "commit-pinned images ... from the source branch andmain" — the floating:maintag should only be pushed whengithub.ref == 'refs/heads/main'(e.g. gate the second tag line withif: github.ref == 'refs/heads/main'on a separate step, or usedocker/metadata-actionto compute tags conditionally).
Important Issues (1)
- [pr-review-toolkit:pr-test-analyzer]
tests/cli_json.rs:45-46— the new--packet-countmulti-packet accounting loop insrc/bin/amt-verify.rs(thewhile packet_count < args.packet_countblock) has no test exercisingpacket_count > 1. The only assertions touching the new fields (packet_count,byte_count) are against the default single-packet path, so the actual new behavior (loopingrecv_first_matchingand accumulating counts across multiple packets) is unverified.
Suggestions (1)
- [pr-review-toolkit:code-reviewer]
.github/workflows/publish-amt-verify.yml:16-23— third-party actions (docker/setup-buildx-action@v3,docker/login-action@v3,docker/build-push-action@v6) are pinned to version tags rather than commit SHAs. Since this workflow haspackages: writeand pushes to GHCR, pinning to SHA would harden against upstream tag-mutation supply-chain risk.
Strengths
- Container runs as non-root (
USER 65532:65532) and the Rust build stage is cleanly separated from the slim runtime image. - New
OneshotReportfields (packet_count,byte_count,first_data) are additive — existing JSON consumers keep working, matching the PR's stated backward-compatibility goal. - The multi-packet loop runs before
finish_gateway's leave/teardown sequence, so default (packet_count=1) behavior and the existing shutdown test are unaffected.
Recommended Action
- Fix the Critical
:maintag drift before this publishes an unreviewed image as "main". - Add a test covering
--packet-count 2+end to end. - Consider SHA-pinning the GHCR publish actions opportunistically.
Reviewed head: 0867616
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.
Summary
--packet-countand D2-compatible top-level JSON counters while preserving the existing JSON fieldsamt-verifycontainer buildmainVerification
CARGO_HOME=/runtime-cache/tmp/opencode/cargo-home cargo test --no-default-features --features native(119 unit tests plus all native integration tests passed; 2 staging tests ignored)docker build --platform linux/amd64 -t amt-verify:b15657 .docker run --rm amt-verify:b15657 --helpcontains--relay,--port,--source,--group,--no-driad,--family,--timeout,--packet-count, and--jsonSource
The successor is based directly on immutable commit
255b16b3ad16e80d1b3e64a09d1a023fd1b35328; the only runtime behavior change is bounded multi-packet accounting required by the D2 probe.Paperclip: https://paperclip.blockcast.net/BLO/issues/BLO-15657