Skip to content

Follow-ups from the #315–#317 reviews (drift scripts, range error tests and docs) - #318

Merged
Nic-dorman merged 3 commits into
mainfrom
nic/range-review-followups
Oct 13, 2026
Merged

Nic-dorman merged 3 commits into
mainfrom
nic/range-review-followups

Conversation

@Nic-dorman

@Nic-dorman Nic-dorman commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Small follow-ups from the reviews of #315, #316 and #317, all merged today. They were approved as they stood, so these are in their own PR rather than added to the approved branches. One commit per original PR.

What changes

From #315 (proto drift checks)

  • Py drift hint: the error message told developers to run antd-py/scripts/generate_proto.py directly, but the file isn't executable. It now says python antd-py/scripts/generate_proto.py, as the job runs it.
  • Elixir README: the regen command used its repo-root path right after mix deps.get, which runs inside antd-elixir/. It's now ./scripts/generate-protos.sh.
  • Dart plugin pinning: the script checked which protoc_plugin is activated, but protoc then ran whichever protoc-gen-dart came first on PATH. It now passes --plugin with the activated executable from the pub cache ($PUB_CACHE/bin, or the platform default).
  • Dart script on Windows: in Git Bash, protoc is a native program and couldn't open the POSIX output path. The script failed after it had already cleared the stubs. It now passes the output directory through cygpath -m there.

From #316 (gRPC 416 carries the size)

  • A test where the size trailer is present but doesn't parse: the typed error still comes back, with Size: -1.
  • A comment in rangeStreamError: errorFromGrpc returns a new error on every call, so setting Size there is safe.

From #317 (antd-rust range methods)

  • Tests for the two REST branches nothing exercised: a 206 without Content-Range is AntdError::Internal, and a 416 without it is RangeNotSatisfiable { size: None }.
  • Docs: the range methods and their README row say that a body shorter or longer than the announced length ends the stream with AntdError::Network. The RangeNotSatisfiable docs say any REST 416 maps to it, and that only the range methods send a Range header.

Left for the next antd-rust release: the 0.3.0 minor bump for the new error variant, with a "(new in 0.3.0)" README marker, an upgrade note and a "Requires antd >= X" line.

Test evidence

  • antd-rust: 130 lib tests pass (2 new), plus doc and integration tests. fmt, clippy --all-targets -D warnings and doc -D warnings are clean.
  • antd-go: go vet and go test ./... pass; TestGrpcDataStreamRangeOutOfRange covers the new case.
  • Dart script: on Windows (Git Bash, protoc 34.0 from Chocolatey, protoc_plugin 22.3.0 in a separate PUB_CACHE), the regenerated stubs match the committed ones exactly. Before this change the same run failed. shellcheck is clean, and the Linux run is the proto-drift Dart job on this PR.
  • Workflow: actionlint (with shellcheck) is clean.

🤖 Generated with Claude Code

Nic-dorman and others added 3 commits October 12, 2026 13:33
…e dart plugin

Review follow-ups from #315:

- The py drift error told developers to run generate_proto.py directly,
  but the file isn't executable. It now says `python ...`, as the job runs it.
- The Elixir README ran the regen script by its repo-root path right after
  `mix deps.get`, which runs inside antd-elixir/. It now uses
  ./scripts/generate-protos.sh.
- The Dart script checked which protoc_plugin is activated, but protoc then
  ran whichever protoc-gen-dart came first on PATH. It now passes --plugin
  with the activated executable from the pub cache ($PUB_CACHE, or the
  platform default).
- On Windows (Git Bash), protoc is a native program and could not open the
  POSIX output path, so the script failed after clearing the stubs. It now
  passes the output directory through cygpath -m there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up from #316. The mock daemon gains a "bad-trailer" key that
sends x-content-range with a size that doesn't parse; the typed error must
still come back, with Size -1. Also notes in rangeStreamError that
errorFromGrpc returns a new error on every call, so setting Size there is
safe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nge errors

Review follow-ups from #317:

- Tests for the two REST branches nothing exercised: a 206 without
  Content-Range is AntdError::Internal, and a 416 without it is
  RangeNotSatisfiable with size None.
- The range methods' docs and README row now say that a body shorter or
  longer than the announced length ends the stream with AntdError::Network.
- The RangeNotSatisfiable docs now say any REST 416 maps to it, and that only
  the range methods send a Range header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@dirvine dirvine left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Six-seat independent review panel — PR #318 (follow-ups from the #315–#317 reviews)

Reviewed head: d81cdcc02879ddc0c7312208c130bb6834872a91 (branch nic/range-review-followups → main). 10 files, +87/−14. CI on this head: all green, including all five "generated stubs match antd/proto" drift jobs and actionlint.

Summary

Small follow-up PR implementing the non-blocking items from the #315/#316/#317 reviews: the Python drift hint now runs the script via python (it isn't executable); the Elixir README regen path is fixed for its working directory; the Dart regen script binds --plugin to the activated pub-cache executable and converts the output dir with cygpath -m on Windows; antd-go gains a bad-trailer test and a comment explaining why mutating the mapped error is safe; antd-rust gains two REST error-branch tests and docs for the short/long-body AntdError::Network behaviour. All six seats found no blocking defects.

Per-seat verdicts

Seat Tool Verdict Key findings
1 gpt-5.1-codex (via OpenRouter) APPROVE REGEN hint consistent with the job's own invocation; no other drift job has the same defect
2 gpt-5.1-codex (via OpenRouter) APPROVE-WITH-CONCERNS PUB_CACHE override given as a Windows-style path (C:\...) would not be found by the POSIX -f check
3 gpt-5.1-codex (via OpenRouter) APPROVE Comment verified true against errorFromGrpc (fresh &RangeNotSatisfiableError{...} per call); bytes */lots is a good malformed value (parser returns −1)
4 gpt-5.1-codex (via OpenRouter) APPROVE Both new Rust tests exercise the real code branches; mock responses correct
5 gpt-5.1-codex (via OpenRouter) APPROVE Docs accurate and consistent across README, client.rs, grpc_client.rs, errors.rs
6 GLM-5.2 (OpenRouter, independent model seat) APPROVE-WITH-CONCERNS PLUGIN path is not cygpath-converted before being passed to native protoc (see finding 1); short/long-body behaviour untested in this diff; minor unsatisfiedSize unit-coverage gap

Dissent: none. All six seats approve.

Blocking issues

None.

Non-blocking findings (deduplicated)

  1. Windows PUB_CACHE/plugin path format (seats 2, 6) — antd-dart/tool/generate_proto.sh:39-55 builds PLUGIN from $HOME (MSYS-style, e.g. /c/Users/...); only the output dir gets cygpath -m. Whether native protoc accepts an MSYS path inside --plugin=... is unverified by CI (drift job runs on Linux); a Windows-style PUB_CACHE override would additionally fail the -f check. The author reports a successful Windows run with a separate PUB_CACHE (presumably POSIX-style under Git Bash), which is consistent with the script as written. Worth a follow-up hardening pass if Windows developers report failures — not a merge blocker given the reported evidence.
  2. Short/long-body AntdError::Network doc claim (seat 6) — the new doc sentence is verified true in code and already covered by existing tests (antd-rust/src/range.rs:22,80,98,297-318 — "carried more than the N bytes it announced" and short-body cases, both AntdError::Network). This PR documents, not changes, that behaviour; no new test required.
  3. unsatisfiedSize unit coverage (seat 6, minor) — bytes */lots is exercised end-to-end via the mock but not as a direct unit case alongside ""/bytes */1234. Cosmetic.

Claim checks (highlights)

  • Py REGEN hint matches the job's own invocation — verified (.github/workflows/proto-drift.yml:218-241).
  • Elixir README path — verified; ./scripts/generate-protos.sh is correct relative to the documented cd antd-elixir sequence (antd-elixir/README.md:100-105).
  • Dart --plugin binding + cygpath output dir — verified in script (generate_proto.sh:35-76); see finding 1 for the plugin-path caveat.
  • errorFromGrpc returns a fresh error per call — verified against the actual code, antd-go/grpc_client.go:173: return &RangeNotSatisfiableError{AntdError: base, Size: -1}. The new comment is accurate.
  • Both new antd-rust tests hit the real branches — verified: 416 without Content-Range → RangeNotSatisfiable { size: None }; 206 without Content-Range → AntdError::Internal containing "without Content-Range" (antd-rust/src/client.rs 206 arm; antd-rust/src/tests.rs:1631-1669).
  • Test/CI/Windows-run claims — CI on head d81cdcc is green (checked live, all 12+ jobs incl. drift jobs and actionlint); the Windows Git Bash reproduction is the PR author's report, not re-executed by the panel.

Limitations

  • Seats ran static inspection; execution evidence is the CI run on this exact head plus the author's reported local runs.
  • The Windows plugin-path behaviour (finding 1) could not be exercised on this machine (macOS).

Verdict

APPROVE — no blocking issues; three non-blocking notes, the one worth a future hardening pass being the Windows PUB_CACHE/plugin path format.

@Nic-dorman
Nic-dorman merged commit ec77ff4 into main Oct 13, 2026
18 checks passed
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.

2 participants