Skip to content

spec(042): per-decision parallel requests in the service configuration (3.5.4, 3.15) - #414

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

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

Conversation

@bartekus

Copy link
Copy Markdown
Contributor

Amends approved spec 042, sections 3.5.4 and 3.15. The owner ratifies it before it is implemented.

Why

The approved text makes the runtime's bounds configuration but names no member for per-decision parallelism. 3.5.4 says: "max_in_flight, max_queued and the per-backend concurrency of spec 003 3.4 are configuration." 3.15 says rustev.serve-config/1 holds "limits; runtime configuration". So the service runs every decision with one request in progress (spec 003 3.4.2's max_parallel_requests = 1).

Five runtime golden cases of the shared suite (runtime.admission, runtime.cancel, runtime.cancel-stop, runtime.deadline, runtime.retry) set max_parallel_requests: 3. The service can't express their configuration, so it can't meet 3.17.1: "runs every golden case: the response's judgment bytes and the run record bytes the sink receives must equal the case's expected bytes under spec 027 3.12.3's comparison."

The amendment

  • 3.5.4: max_parallel_requests (the requests in progress within one decision, spec 003 3.4.2) joins the runtime bounds that are configuration.
    • It is optional, from 1 to 65,536, matching max_in_flight and per_backend_concurrency.
    • Absent, it is 1, which is today's behavior.
    • A configuration without the member keeps its configuration digest. One that states it, 1 included, is a different configuration.
  • 3.15: the runtime configuration's members are listed, the new one included.

After ratification

In order:

  1. Contract: RuntimeConfig.max_parallel_requests, its schema and TypeScript types.
  2. Service: pass the member to the runtime instead of the fixed 1.
  3. The five runtime cases through serve-http and serve-grpc under the test clock (3.17.1).

Alternatives the owner may prefer

  • A required member with no default. Every existing configuration would then be refused, and every digest would change.
  • A smaller upper bound, for example the plan's max_semantic_requests ceiling.

@github-actions

Copy link
Copy Markdown

AI review (no-findings)

The diff adds max_parallel_requests as an optional runtime-bounds configuration member to spec 042, with a range of 1–65,536, an implicit default of 1 (backward-compatible), and explicit digest-identity semantics distinguishing absent from explicit-1. The config-schema enumeration in the later section is updated consistently to name the new member and cross-reference section 3.5.4.

Reviewing for concrete defects:

  • Cross-reference consistency. "spec 003 3.4.2" is cited as the home of max_parallel_requests (requests in progress within one decision), and "spec 003 3.4" for per-backend concurrency. These are distinct sub-locations and the distinction is coherent with their roles. I have not been given spec 003, so I cannot verify the sub-section numbers, but there is no internal contradiction within the supplied diff to report.
  • Range semantics. 1–65,536 (2^16) excludes 0, consistent with the concept of at-least-one-request-at-a-time.
  • Digest behavior. The spec explicitly states that omitting max_parallel_requests preserves the existing digest, while adding it (even as 1) produces a different digest. This is a deliberate canonical-form rule, not a bug.
  • Back-reference "3.5.4". In the schema description added near line 822, the parenthetical 3.5.4 refers to item 4 of section 3.5 (the runtime-bounds paragraph just edited). This is the standard inline cross-reference style used in this spec and is internally consistent.

No concrete defects found.

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

Subject: d2a496f...e70baed, diff digest 6972c46d5c16ef00e423783eef842458ec6bf800a7ca0adb68cab989f9b05143, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus added this pull request to the merge queue Oct 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 30, 2026
@bartekus
bartekus force-pushed the spec/042-parallel-requests branch from e70baed to db9b207 Compare October 30, 2026 16:27
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

The diff adds max_parallel_requests as a new optional configuration field to the runtime bounds section (3.5 item 4) and updates the rustev.serve-config/1 description in section 3.8 to enumerate it alongside the existing fields.

Reviewing for concrete defects:

Digest/identity claim: The spec states "A configuration without it keeps its configuration digest; one that states it, 1 included, is a different configuration." This distinguishes omitted-field identity from explicitly-stated identity even when the semantic value is identical. This is consistent with a content-hash approach and constitution principle IV (byte-identical output for identical inputs), and is explicitly documented rather than implicit — no defect.

Range specification: 1 to 65,536 (2^16). The minimum of 1 is consistent with "absent, it is 1" default. The refused-whole rule in 3.8 covers out-of-range values. No defect.

Cross-reference to spec 003 3.4.2: The existing text already references "spec 003 3.4" for per-backend concurrency; adding "3.4.2" for the sub-item is consistent with that existing citation style. I cannot verify the sub-section numbering of spec 003 from the supplied context, but I am not given grounds to call it invalid.

Section 3.8 enumeration: The parenthetical (max_in_flight, max_queued, the optional max_parallel_requests and per_backend_concurrency, 3.5.4) is internally consistent — 3.5.4 refers to item 4 within section 3.5, where all four fields appear. No defect.

No concrete defects found.

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

Subject: b258132...db9b207, diff digest 4268d2fe612e12a2086d359954318cad1bc8cfb570e01a86fec0f8bed3b98665, 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 8b57c7d Oct 30, 2026
30 checks passed
@bartekus
bartekus deleted the spec/042-parallel-requests branch October 30, 2026 17:19
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