Repository navigation
impl(010): rustev-serve increment 2, the gRPC transport - #187
Conversation
AI review (findings)Reviewing the PR changes: gRPC transport layer for Key areas examined: Finding 1 — config.protoc_executable("/opt/homebrew/bin/protoc");
Finding 2 — - return Some((op, Some(id.into())));
+ return Some((op, Some(decode_path_id(id)?)));
{"head": "19766a695b1a68b7c94d80266df28f8a00918c76", "verdict": "findings", "findings": [{"path": "integrations/rustev-serve/tests/grpc_generation.rs", "line": 29, "summary": "protoc_executable is hardcoded to /opt/homebrew/bin/protoc (macOS Homebrew only); the test panics on Linux CI because that path does not exist and there is no skip guard."}, {"path": "integrations/rustev-serve/src/transport.rs", "line": 160, "summary": "decode_path_id is now applied to all HTTP requests, silently changing the stored ID for any plan or decision whose path segment contained percent-encoded characters, breaking clients that registered or retain handles under the previously stored literal form."}]}Subject: cbe69b4...19766a6, diff digest 518f7514b0c6fa9c235c21b7ede520a6f5c62b7790a05b5ed3f587a972462251, 1 call(s). An AI comment is not an approval. |
19766a6 to
f09134b
Compare
AI review (findings)Review
|
f09134b to
bfd0c6f
Compare
AI review (findings)ReviewSummaryThis PR adds gRPC transport to Finding 1 — Panic in streaming
|
cbe69b4 to
15be979
Compare
bfd0c6f to
0b16df8
Compare
AI review (findings)Reviewing the PR, which adds gRPC transport to Finding 1 — Panic on unexpected SSE frame in streaming path
let start = data
.windows(6)
.position(|s| s == b"data: ")
.expect("SSE event"); // panics if "data: " absent
let document = &data[start + 6..data.len() - 2];
let event = ServeEvent::parse(document).expect("shared event document"); // panics on parse failureIf the inner body delivers a frame that lacks Finding 2 —
tonic-prost-build = { version = "=0.14.6", default-features = false }
Finding 3 —
fn decode_path_id(id: &str) -> Option<String> {
...
// %2F decodes to b'/', which String::from_utf8 accepts
...
}The pre-existing validation in && !id.contains('/')checks the raw segment, so {"head": "0b16df855f83492cc658b48a6035bc34a88c5e10", "verdict": "findings", "findings": [{"path": "integrations/rustev-serve/src/grpc.rs", "line": 337, "summary": "GrpcBody::poll_frame panics via .expect() on unexpected SSE frame data in the streaming path, aborting the task without emitting gRPC status trailers and giving the client an unclassified stream reset."}, {"path": "Cargo.toml", "line": 79, "summary": "tonic-prost-build is declared as a workspace-level non-dev dependency even though it is only used in dev-dependencies of rustev-serve, creating a footgun where any future crate could pull a code-generation tool into release binaries while bypassing the SERVICE_FAMILIES boundary check."}, {"path": "integrations/rustev-serve/src/transport.rs", "line": 186, "summary": "decode_path_id accepts %2F and stores a decoded '/' in the decision ID, making decisions with that character unreachable over HTTP while accessible over gRPC, an undocumented transport asymmetry."}]}Subject: 15be979...0b16df8, diff digest fd238097d558f02142963fa792c41e6239d3dba5c0c6614c7e2e2a4d3c11faaa, 1 call(s). An AI comment is not an approval. |
0b16df8 to
fb3fe18
Compare
15be979 to
3fcef4c
Compare
fb3fe18 to
c76065b
Compare
3fcef4c to
9b1fb2c
Compare
c76065b to
563245b
Compare
9b1fb2c to
1102e6b
Compare
AI review (findings)Looking at the PR carefully, focusing on the gRPC transport implementation in Route placeholder chaining in In let Some(value) = value.filter(|v| {
!v.is_empty()
&& v.len() <= 768
&& !v.contains(['/', '?', '#']) // { and } not excluded
&& values.iter().count() == 1
}) else {
return refused(RefusalCode::InvalidRequest, &service);
};
route = route.replace(placeholder, value);The replacement loop runs sequentially over No other concrete defects were found. The boundary additions, {"head": "563245bbc530e846117df1b648ba3f56f976eb53", "verdict": "findings", "findings": [{"path": "integrations/rustev-serve/src/grpc.rs", "line": 165, "summary": "The metadata-value filter does not exclude '{' or '}', allowing a client to set rustev-plan-id to the literal string '{decisionId}' so the substitution loop resolves the plan ID from the rustev-decision-id header instead, breaking the intended one-header-per-parameter binding for plan-scoped operations."}]}Subject: 9b1fb2c...563245b, diff digest c74c33f7d917b43ec1e5cf86a4ef7ceadaabea542c95f1e2e569a9613349492e, 1 call(s). An AI comment is not an approval. |
563245b to
4137cc0
Compare
1102e6b to
98938d0
Compare
4137cc0 to
1f6fb36
Compare
AI review (findings)Reviewing the PR, which adds a gRPC transport layer to Code-level checks:
One concrete defect:
{"head": "1f6fb366da9e3148377e42337b3a4ddbf8e1d3e0", "verdict": "findings", "findings": [{"path": "integrations/rustev-serve/README.md", "line": null, "summary": "README claims protoc must be at the hardcoded path `/opt/homebrew/bin/protoc`, but grpc_generation.rs::protoc() searches $PROTOC env var and $PATH — the hardcoded path is never consulted by the code."}]}Subject: 98938d0...1f6fb36, diff digest 19e4f4da56bfdd0c95379dfdc420b91214750cc03e89bef2f7223ca8363d5f23, 1 call(s). An AI comment is not an approval. |
1f6fb36 to
4eec3ca
Compare
98938d0 to
8448653
Compare
51246e1 to
7164119
Compare
946f7eb to
f1e945b
Compare
36db0f2 to
4904ed7
Compare
AI review (no-findings)Looking at this PR carefully across the changed paths. Cargo / dependency hygiene: New gRPC crates (tonic, prost, tonic-prost-build) are pinned to exact versions and placed in the correct sections (runtime vs dev).
Spec edits ( No concrete defects found. {"head": "4904ed75f828f262d82dcb70c5e273fd96fa622a", "verdict": "no-findings", "findings": []}Subject: f1e945b...4904ed7, diff digest 89cb37dd6045fa7fb37a36aff84d844d5dd35f84963c8ff4ba51862eb27d0dcf, 1 call(s). An AI comment is not an approval. |
f1e945b to
d188a03
Compare
4904ed7 to
c3f5928
Compare
d188a03 to
4765355
Compare
c3f5928 to
6b54929
Compare
4765355 to
78eabbd
Compare
6b54929 to
367b15a
Compare
AI review (no-findings)Reviewing the gRPC transport addition to
Content-length overflow
Boundary check additions in Spec changes: No concrete defects found. {"head": "367b15abb3d3cd7474623a638cae69b39081af81", "verdict": "no-findings", "findings": []}Subject: 78eabbd...367b15a, diff digest 7108dac43e6dde1f0214a19e7feb768b1e6e18d720a429cc1a87e2c9b018b3a5, 1 call(s). An AI comment is not an approval. |
367b15a to
2777e6e
Compare
AI review (findings)Reviewing the PR, which adds a gRPC transport layer to Finding 1 — boundary test omits dev-dependencies
Finding 2 — unchecked usize addition in body-size guard
{"head": "2777e6e623f5d350b661928669dc50ae508ad349", "verdict": "findings", "findings": [{"path": "tools/rustev-boundaries/src/lib.rs", "line": 594, "summary": "The new SERVICE_FAMILIES boundary test iterates over [None, Some(\"build\")] but omits Some(\"dev\"), leaving dev-dependencies on tonic/prost family crates in non-integration packages untested and potentially unchecked."}, {"path": "integrations/rustev-serve/src/grpc.rs", "line": 88, "summary": "max + 11 and max + 6 are bare usize additions in the body-size guards; .saturating_add is used for the accumulation check one line above but not for these comparison thresholds, risking wraparound overflow on 32-bit targets or extreme configurations."}]}Subject: 15214cb...2777e6e, diff digest 7108dac43e6dde1f0214a19e7feb768b1e6e18d720a429cc1a87e2c9b018b3a5, 1 call(s). An AI comment is not an approval. |
2777e6e to
2cb84a9
Compare
AI review (findings)Reviewing this PR, which adds gRPC transport ( Scope of review: Cargo dependencies, proto/stub generation, Finding:
|
2cb84a9 to
ba715bd
Compare
AI review (findings)Looking at the diff, I'll work through the significant new files and changes systematically.
Spec updates — Both Concrete defect: missing
{"head": "ba715bd4cacb470a20fc16772eba1dc3cbe3ed6d", "verdict": "findings", "findings": [{"path": "integrations/rustev-serve/tests/grpc_generation.rs", "line": 4, "summary": "The test imports `sha2::{Digest, Sha256}` but `sha2` does not appear as a declared dependency in `integrations/rustev-serve/Cargo.toml`; without an explicit entry the test target will not compile."}]}Subject: 15214cb...ba715bd, diff digest 761a26d2a7507ffcddd1f43b5d228b92f68f78c07af848c580b7dcffc0a367ea, 1 call(s). An AI comment is not an approval. |
ba715bd to
928c6b9
Compare
AI review (no-findings)Reviewing the PR, which adds a gRPC transport to Cargo / dependency additions ( Proto definition and generated stub ( gRPC handler (
Transport refactoring ( Streaming body ( Boundary check ( Spec updates: The record in No concrete defects found. Subject: 15214cb...928c6b9, diff digest a3d2ca570adc2b28ff6adc9767ad99177729368f087add1a992c6ef1ff23bf28, 1 call(s). An AI comment is not an approval. |
…lete (#188) Stacked on #187. Maps every applicable spec 010 section 5 row to a rustev-serve test (tests/COVERAGE.md, three new regression tests), adds rustev-serve to 010's declared verification, removes the stale 'not implemented' text, and marks 010 complete: all three 3.4 records pass with owner review (R-44, A-45, A-47), each integration builds alone with minimum features, and no live qualification ran. 042's image and conformance cases remain 042's work.
Spec 042 3.9 and 3.18, stacked on #186. The .proto is generated from the rustev.serve/1 operation table and the Rust gRPC code from it with tonic-prost-build 0.14.6 at development time (both committed, drift-checked, no build script). Messages carry the canonical JSON document as bytes; refusals use the 3.5.1 gRPC codes with rustev-refusal-bin; evidence_not_delivered is INTERNAL with rustev-decision-id. Same mTLS listeners and handler layer as HTTP; a loopback differential test shows byte-identical documents across transports. Adds the integration-only gRPC and Sigstore families to rustev-boundaries. Checks: rustev-serve (57 tests incl. socket tests, run outside the sandbox), rustev-boundaries, make boundaries, clippy, fmt, make gate, couple.