Skip to content

impl(042): increment 5 part 3, callback protocol conformance - #423

Merged
bartekus merged 1 commit into
mainfrom
impl/042-callback-conformance
Oct 30, 2026
Merged

bartekus merged 1 commit into
mainfrom
impl/042-callback-conformance

Conversation

@bartekus

Copy link
Copy Markdown
Contributor

Spec 042, 3.17.3: protocol conformance for rustev.remote-context/1 and rustev.remote-sink/1.

Split by who is tested, as the owner decided on 2026-10-30 (no amendment; the 3.17.3 text and the decision are quoted in the implementation record):

  • Endpoint suite (integrations/rustev-serve/tests/conformance/callback.rs): describe and unknown versions, unknown document versions, request and response bounds, requested fields only, describe_mismatch, idempotency repeat, conflict and expiry, cancel of unknown and finished attempts, invalidation baseline, contiguity and visible gaps, deliveries accepted, duplicate and conflict, the record bound and deduplication expiry. Runs against the Rust host server with and without a driver, and against a host endpoint by URL (RUSTEV_CALLBACK_ENDPOINT, ignored test).
  • Client suite against a scripted raw HTTP/1.1 endpoint: queue-wait, first-byte (phase ceiling) and body timeouts, transit margin, late answer discarded, counted, recorded and cancelled, cancellation outcomes per declared support, oversized bodies both ways, unknown describe version and third-party class; for the sink client a timeout after sending, a full queue, stalled and oversized answers and an unknown describe version.

The module is a submodule of the conformance runner, so make conformance runs it (3.17.4). RemoteSink::send becomes pub(crate) for the tests.

Checks: cargo test -p rustev-serve --lib conformance::callback:: (7 passed, 1 ignored), clippy -D warnings on rustev-serve, fmt, make gate, scripts/check-authored-content.sh.

Spec 042 3.17.3: an endpoint suite (bounds, versions, idempotency windows,
invalidation gaps, duplicate and conflicting deliveries) run against the
Rust host server and by URL, and a client suite against a scripted
endpoint (phase timeouts, late answers, oversized responses, cancellation
outcomes), per the owner's 2026-10-30 reading.
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the five changed paths for bugs, security issues, and governance inconsistencies.

integrations/rustev-serve/src/sinks.rs — send gains pub(crate) visibility. The spec text explicitly documents this ("RemoteSink::send becomes crate-visible for these tests"), and the change is strictly crate-internal. No defect.

integrations/rustev-serve/tests/COVERAGE.md — Coverage entry for "Late context response" updated to name the new test function. Matches the actual function added in callback.rs. Consistent.

integrations/rustev-serve/tests/conformance/runner.rs — Adds mod callback pointing at callback.rs. No defect.

integrations/rustev-serve/tests/conformance/callback.rs — Substantive review:

  • include_bytes! paths (../../../../tools/… and ../../../rustev-otel/…) resolve correctly from the file's location in integrations/rustev-serve/tests/conformance/.
  • context_invalidations: publishes retained + 1 items via 0..=driver.retained(), ensuring at least one eviction from the log. The gap assertion after.items.first().is_some_and(|i| i.sequence > first) correctly detects the eviction. No off-by-one.
  • sink_bounds / deliver return type: after the ? on deliver(…).await, the match arms Ok(DeliveryResult::Rejected{..}) and Err(400..=499) correctly handle both the 200-but-rejected and the HTTP-4xx cases.
  • exchange (scripted endpoint): the header accumulation is unbounded but acceptable for test-internal clients that won't send malformed headers; content-length parsing, body slicing, and early-return on EOF are all correct.
  • sink_client_timeouts_bounds_and_versions queue/pin/select sequence: biased select always takes the std::future::ready(()) arm while queued is pending, correctly verifying it did not resolve. Subsequent queued.await is well-formed. The lenient contains("may_have_received") assertion accommodates timing variability.
  • Answer::Oversized with bound = 0 is only reachable for describe/cancel paths, but Oversized is only ever set on fetch/deliver paths in the test scripts. No reachable bad resize.
  • context_window repeat bytes-equality check could fail against a stateless endpoint with no idempotency window, but the conformance suite's preconditions (stated in the module doc) require a window ≤ 5,000 ms.

specs/042-decision-service-and-remote-seams/spec.md — The increment paragraph accurately describes the split (endpoint suite vs. client suite), lists all covered cases, and cross-references the correct file and governance section (3.17.3, 3.17.4). The claimed owner decision is recorded within the spec text; I cannot independently verify it occurred, but that is outside review scope.

No concrete defects found.

{"head": "dca1ae329b6e9f7a4ea2ea764347e666158312f7", "verdict": "no-findings", "findings": []}

Subject: 8517df9...dca1ae3, diff digest 3958d5d57b8af942233c067b4f7c190da89a4095bd6cfbe7e64564aedf68a7d6, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus enabled auto-merge October 30, 2026 22:37
@bartekus
bartekus added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 9550e2e Oct 30, 2026
30 checks passed
@bartekus
bartekus deleted the impl/042-callback-conformance branch October 30, 2026 23:52
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.

1 participant