docs(ahti-emitter): sync Cargo.toml block to what actually shipped#107
Merged
Conversation
Closes the doc-vs-implementation drift Yair flagged on polku#106
review (finding labeled "docs/ahti-emitter.md is stale vs. the
implementation"). The doc landed in the PR; the implementation
diverged during Yair's review-fix commit; the doc was partially
caught up to reflect the changes Yair made but the Cargo.toml
example block was not.
Concrete drift fixed:
- Pins tightened to `=0.14.5` for tonic / tonic-prost (was `"0.14"`
in the doc, but the actual crate uses `=0.14.5` because 0.14.6
raises MSRV to Rust 1.88 while Polku CI is pinned to 1.85). The
strict-pin rationale is now stated in-doc.
- Cargo.toml block reformatted to show workspace inheritance
(`version.workspace = true` etc.) which is how the package
metadata is actually declared.
- Added missing deps to the example: `tokio` (with `["sync"]`
features), `ulid`, plus the `[build-dependencies]` section with
`tonic-prost-build = "=0.14.5"`.
- Added a sentence about the `.bytes(".")` prost configuration in
`build.rs` — that's what lets `OccurrenceRecord.payload` accept a
zero-copy `bytes::Bytes` clone rather than a `Vec<u8>` copy. The
mapping table further down already says `payload: Bytes`; this
fills in why.
- Made the dual-version split with `polku-gateway`'s `tonic = "0.12"`
/ `prost = "0.13"` explicit (was implicit before).
The rest of the doc (the Surface block, the Batching / Backpressure /
Mapping / Authentication / Worked-example sections, the
"intentionally does not do" list, cross-references) already reflects
the shipped code thanks to Yair's earlier touch-ups. Verified by
spot-checking each cited API exists.
Doc-only; no code touched. `cargo fmt --check` passes. No clippy /
test impact possible since no Rust changed.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
yairfalse
approved these changes
May 31, 2026
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.
TL;DR
Closes the doc-vs-implementation drift you flagged in your polku#106 review ("docs/ahti-emitter.md is stale vs. the implementation: it shows `prost = "0.13"`, an `ahti-append-proto` path crate, `anyhow`, `fn name() -> &'static str`, and newtype configs..."). You caught up most of it during the review-fix commit; the Cargo.toml example block was the remaining gap.
Doc-only, +33/-7 in one file, no code touched.
What was stale
The doc's Cargo.toml block showed:
```toml
[package]
name = "polku-ahti-emitter"
version = "0.1.0"
edition = "2024"
[dependencies]
polku-core = { path = "../core" }
tonic = "0.14"
tonic-prost = "0.14"
prost = "0.14"
prost-types = "0.14"
async-trait = "0.1"
thiserror = "2"
tracing = "0.1"
```
The actual shipped `Cargo.toml` uses workspace inheritance for package metadata, strict `=0.14.5` pins on tonic / tonic-prost, includes `tokio` + `ulid`, and declares `tonic-prost-build` in `[build-dependencies]` — none of which the doc reflected.
What this PR does
Replaces the example with what actually shipped:
```toml
[package]
name = "polku-ahti-emitter"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
[dependencies]
polku-core = { version = "0.1.0", path = "../core" }
tonic = "=0.14.5"
tonic-prost = "=0.14.5"
prost = "0.14"
prost-types = "0.14"
tokio = { version = "1", features = ["sync"] }
async-trait = "0.1"
ulid = "1"
thiserror = "2"
tracing = "0.1"
[build-dependencies]
tonic-prost-build = "=0.14.5"
```
Plus an in-doc note explaining the strict pin rationale (Rust 1.88 MSRV bump in 0.14.6 vs CI pinned to 1.85), and one sentence about the `.bytes(".")` prost configuration in `build.rs` — which is what lets `OccurrenceRecord.payload` accept a zero-copy `bytes::Bytes` clone rather than a `Vec` copy.
What was already accurate
Your earlier touch-ups during the review fix caught most of the drift. The Surface block (no `Arc<Mutex<...>>`, correct struct shape), the Batching / Backpressure / Mapping / Authentication / Worked-example sections, the "intentionally does not do" list, and the cross-references all match what's in `lib.rs`. Spot-checked each cited API (`with_failure_capture`, `with_default_retry`, etc.) — all exist in the gateway resilience layer.
Validation
🤖 Generated with Claude Code