You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
- define one target streaming pipeline and assign transport,
normalization, ingestion, relay, and orchestration to separate owners
- add mandatory executor-streaming change rules to `AGENTS.md`,
including bounded-memory channels and measurement-gated worker placement
- add a read-only `executor-architecture-review` skill that checks
proposed changes against the repository documentation
- connect the architecture to RFC vllm-project#241 and the focused follow-ups in
vllm-project#243, vllm-project#244, and vllm-project#245 without changing runtime behavior
## Test Plan
- `quick_validate.py skills/executor-architecture-review`
- `pre-commit run --files AGENTS.md ARCHITECTURE.md
skills/executor-architecture-review/SKILL.md`
- `cargo fmt --all -- --check`
- `git diff --check`
- `cargo test --workspace` was attempted, but the machine ran out of
disk space while compiling; this PR changes no Rust code
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
| Inference transport (`inference.rs`) | HTTP request/response I/O, byte-chunk handling, SSE framing, timeouts, and `[DONE]` detection | Typed semantic-event validation, output-item lifecycle, translation, or client ordering |
380
+
| Event normalization (`events/`) | Converting one raw SSE data line into one typed `EventFrame`| Cross-event lifecycle state, response assembly, or delivery |
381
+
| Synchronous ingestion ([#243](https://github.com/vllm-project/agentic-api/issues/243)) | One entry point for normalization policy, semantic-event lifecycle validation, typed output-item slots, delta folding, tool-call shape translation, and finalization | Async task placement, client backpressure, cross-round sequencing, or persistence |
382
+
| Stream relay ([#244](https://github.com/vllm-project/agentic-api/issues/244)) | Cross-round sequence numbers, public `output_index` rebasing, lifecycle suppression, deferred-event ordering, bounded client delivery, and disconnect propagation | Re-parsing SSE data, reconstructing output items, or deciding the tool loop |
383
+
| Orchestrator (`engine.rs`) | Turn and inference-round control, tool-loop decisions, terminal-response policy, and persistence | SSE framing/parsing or a second semantic-event state machine |
384
+
385
+
The boundary contract is **one owner and one path per concern**:
386
+
387
+
- Every streamed upstream response enters the same synchronous ingestion state machine. Rejecting and compatibility
388
+
validation policies may choose different outcomes, but they must exercise the same typed transitions rather than
389
+
maintaining separate validators.
390
+
- An output item's lifecycle is scoped to one inference round and keyed by validated `output_index`; item ID and kind
391
+
must agree on every subsequent semantic event. Completed slots remain distinguishable from never-seen slots so
392
+
index reuse and duplicate completion can be detected. Finalization consumes the round's ingest state.
393
+
- Each supported output-item kind has typed in-flight state and participates in exhaustive transition/finalization
394
+
matches. Adding a kind extends those declared matches and their tests instead of adding a side path.
395
+
- Downstream stages consume the typed result of the preceding stage. They do not parse the raw line again, infer a
396
+
second lifecycle from the wire object, or reconstruct response state already owned upstream in the pipeline.
397
+
398
+
Concurrency is a deployment choice around this synchronous semantic core, not part of the core itself. Introduce a
399
+
channel only at a real task-ownership boundary. Every channel needs a bounded entry count and either a byte budget or
400
+
a maximum item size that gives a known memory ceiling. Define what happens when it is full, when the receiver
401
+
disconnects, and when either task is cancelled or fails; carry cancellation through the whole producer/consumer path
402
+
and join spawned tasks. Instrument entry and byte occupancy when tuning a capacity.
403
+
404
+
Run ingestion inline unless representative measurements show that worker placement improves the complete request
405
+
path. Benchmark [#245](https://github.com/vllm-project/agentic-api/issues/245) owns that decision and must compare
|SupportanewupstreamSSEevent| `events/types.rs` → `events/normalize.rs` → thesingleingestiondispatchertrackedby [#243](https://github.com/vllm-project/agentic-api/issues/243); do not add a caller-specific path |
|Changeclientstreamingorder, buffering, orbackpressure|Thestream-relayboundarytrackedby [#244](https://github.com/vllm-project/agentic-api/issues/244); do not add it to `inference.rs` or the response accumulator |
732
+
|Movestreamingingestiontoaworker|Benchmarktheequivalentinlineandworkerpathsunder [#245](https://github.com/vllm-project/agentic-api/issues/245) before changing executor placement |
description: Use when planning or reviewing agentic-api changes that affect executor streaming, upstream SSE handling, output-item lifecycle, stream delivery, backpressure, or worker placement.
4
+
---
5
+
6
+
# Executor Architecture Review
7
+
8
+
Perform a read-only review that protects the executor's streaming ownership boundaries. Do not edit files, create or
9
+
update issues, post comments, commit, or push.
10
+
11
+
Use `skills/pr-review/SKILL.md` instead for a broad pull-request review that does not involve these boundaries.
12
+
13
+
## Authoritative inputs
14
+
15
+
1. Read `AGENTS.md` and `TERMINOLOGY.md` completely.
16
+
2. Read `ARCHITECTURE.md`, especially "Target streaming pipeline and ownership boundaries" and the affected module
17
+
sections. Treat it as the source of truth; this skill does not replace it.
18
+
3. Resolve the exact task, diff, or pull request and inspect the complete changed path with relevant surrounding code.
19
+
20
+
## Review workflow
21
+
22
+
1. Map each changed responsibility to exactly one owner: inference transport, event normalization, synchronous
23
+
ingestion, stream relay, or engine orchestration. Flag logic that has no owner or appears in multiple stages.
24
+
2. Trace one representative streaming event from upstream bytes through client delivery. Check that each stage
25
+
consumes the previous stage's typed result instead of re-parsing or reconstructing its state.
26
+
3. Check output-item lifecycle invariants: validated `output_index`, stable item ID and kind, typed active state,
27
+
detectable index reuse/duplicate completion, exhaustive kind handling, and consuming terminal finalization.
28
+
4. Check concurrency boundaries. Every channel needs entry and memory bounds, full/disconnect behavior, cancellation
29
+
propagation, and join/error handling. Treat `spawn_blocking`, worker placement, and proposed capacities as claims
30
+
requiring representative measurements, not defaults.
31
+
5. Match tests to the changed owner. Consider malformed and out-of-order semantic events, ID/index mismatches,
0 commit comments