Skip to content

impl(042): per-decision parallel requests in the service configuration - #415

Merged
bartekus merged 1 commit into
mainfrom
impl/042-parallel-requests
Oct 30, 2026
Merged

bartekus merged 1 commit into
mainfrom
impl/042-parallel-requests

Conversation

@bartekus

Copy link
Copy Markdown
Contributor

Implements the ratified amendment of #414 (spec 042, 3.5.4 and 3.15). Stacked on #414; I retarget to main once it merges.

  • rustev.serve-config/1 runtime.max_parallel_requests (RuntimeConfig): optional, 1 to 65,536, never null. When absent it is left out of the canonical form, so an existing configuration keeps its digest. When stated, 1 included, the digest changes.
  • rustev-serve hands it to the runtime, and uses 1 when it is absent, which is the earlier behavior.
  • The rustev.serve-config/1 JSON Schema and the Node and WebAssembly TypeScript types are regenerated (generated, not reviewed).
  • Test: parallel_requests_are_optional_bounded_and_absent_keeps_the_digest.

The five runtime golden cases that use it run through the service in the next PR (3.17.2 part 2).

Checks: make gate, scripts/check-authored-content.sh, fmt, clippy -D warnings on rustev-contract and rustev-serve, and cargo test -p rustev-contract --test 042_serve_documents (schema drift included) pass locally.

@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing each changed file in the diff:

crates/rustev-contract/src/serve.rs — max_parallel_requests: Option<Number<1, 65536>> is inserted before per_backend_concurrency. The serde attributes (default, skip_serializing_if = "Option::is_none", deserialize_with = "present") implement the stated contract: absent → None, explicit null → rejected (via the present deserializer, same pattern used elsewhere in the crate), serialization omits the field when None so the canonical form and digest are unchanged for existing configs. The #[schemars(...)] attribute remains correctly on per_backend_concurrency.

crates/rustev-contract/tests/042_serve_documents.rs — Tests cover: field absent (None, digest preserved, omitted from canonical), values 1 and 65536 (accepted), 0 and 65537 (rejected), null (rejected). Also verifies that a stated value — even 1 — produces a different digest from absent. This is thorough and consistent with the implementation.

integrations/rustev-serve/src/service.rs — map_or(1, |n| n.get() as usize) correctly defaults to 1 when the field is absent (matching the documented default) and uses the configured value otherwise. No issue.

specs/042-decision-service-and-remote-seams/spec.md — Entry describes the change accurately: optionality, bounds (1–65,536), null rejection, canonical-form behavior, default of 1, and the test that covers it. The ratification claim ("As ratified in 3.5.4 and 3.15") is review data only; I cannot verify it independently, and nothing in the supplied evidence contradicts it.

The schema files (crates/rustev-contract/schema/rustev.serve-config-1.schema.json, TypeScript types) are absent from the diff but are excluded from AI review per governance (review.exclude) and are checked by CI against their sources.

No concrete defects found.

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

Subject: e70baed...fee908c, diff digest efbdb6cf4e278cecf2a403738c8758aae7bb4f7e08f1afe0a459669625ba5aa3, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus force-pushed the spec/042-parallel-requests branch from e70baed to db9b207 Compare October 30, 2026 16:27
Base automatically changed from spec/042-parallel-requests to main October 30, 2026 17:19
@bartekus
bartekus force-pushed the impl/042-parallel-requests branch from fee908c to d4bd453 Compare October 30, 2026 17:20
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Looking at the four changed files:

crates/rustev-contract/src/serve.rs
The new max_parallel_requests: Option<Number<1, 65536>> field uses #[serde(default, skip_serializing_if = "Option::is_none", deserialize_with = "present")]. With default, an absent field yields None; the present deserializer rejects explicit null; skip_serializing_if ensures the canonical form omits it when absent. This is the right combination for the stated digest-stability requirement.

crates/rustev-contract/tests/042_serve_documents.rs
The test covers bounds (1 and 65536 accepted; 0 and 65537 rejected), null rejection, digest divergence when the field is explicitly stated (even as 1), and canonical omission when absent. The assertions are correct and consistent with the implementation.

integrations/rustev-serve/src/service.rs
config.runtime.max_parallel_requests.map_or(1, |n| n.get() as usize) correctly maps None → 1 and Some(n) → the bounded value. Number<1, 65536> guarantees the value fits in usize.

specs/042-decision-service-and-remote-seams/spec.md
The implementation note is added before the ## Decisions at approval heading, which is the correct location for a ratified spec's record of changes. Section references (3.5.4, 3.15) are internal to the spec and not contradicted by evidence in the diff.

No bugs, security issues, or governance inconsistencies found.

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

Subject: 8b57c7d...d4bd453, diff digest e0603338015773b20d8801e1bef1d96bb0bbf287d81f3902e0fcd551be891187, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 8e4dec0 Oct 30, 2026
30 checks passed
@bartekus
bartekus deleted the impl/042-parallel-requests branch October 30, 2026 18:20
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