Decomposition of docs/reviews/002-post-remediation-review.md per its 5-unit remediation plan: - Unit 1 (security-critical): gw15-publish-body-cap, prj16-schema-via-call (CF-004 filed alkcall-side), fwd13-dot-segments, fwd16-missing-capability, oai11-ref-memoization - Unit 2 (timeout/terminality): ws13-idle-progress, fwd15-stream-timeout, cli01-retry-after-budget, con17-mcp-pagination, con18-wss-sweep-exit - Unit 3 (projection/docs): projection-truthfulness, mcp-batch-cap, gw16-status-drift - Unit 4 (spec-import): yaml-normalization, oai13-path-item-wildcards, import-loudness-cluster, js01-placeholder-check, fwd17-19-contract-decisions - Unit 5 (WS polish + tests): con18b-ws-polish, client-policy-wire-tests, cov-deployment-knobs, cov13-dead-code, srv11-srv12-router-ordering - review-002-bracketed-followup: tentatively planned post-bulk pass (stale-check, OQA-18 enforcement decision, CON-08/09 close() lever, cross-crate re-checks) — deliberately not serialized against the bulk Also: review-002 numbering repair (CON-14 was double-booked; MCP pagination now CON-14, from_wss monitor renumbered CON-18, missing CON-14 section added). taskgraph: 66 valid, no cycles; 24 pending (all review-002); gen-1/gen-2 parallel waves identified; workflow-cost hotspots are prj16 (12.8) and ws13 (11.1), both carrying the reviewed slicing guidance in their Notes.
3.2 KiB
3.2 KiB
id, name, status, depends_on, scope, risk, impact, level, tags
| id | name | status | depends_on | scope | risk | impact | level | tags | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| review-002-fwd17-19-contract-decisions | Forwarding contract decisions — non-JSON SSE payloads, double-routed placeholders, percent preservation (FWD-17/18/19 decide+document or fix) | pending |
|
narrow | low | component | implementation |
|
Description
Three review-002 forwarding findings that are design decisions more than bugs — decide, document, and fix where the decision says so:
- FWD-17: non-JSON SSE payloads silently degrade to JSON strings
(
forward.rs:774-781,unwrap_or(Value::String)) and the parser'sevent:field is discarded (:977-979). A consumer cannot extract fields from a legitimately non-JSON stream, and an upstream's SSEevent: errorconvention is indistinguishable from data. Decide: (a) document the JSON-or-string contract as-is, or (b) carry the raw payload + theevent:field name in the envelope for non-JSON payloads (e.g.{data, event}object wrapper). - FWD-18: non-scalar path-placeholder values double-route —
rendered into the path (as JSON text) and appended as a query
param (
forward.rs:144-157). Fix the routing rule: a key that matched a placeholder never also emits as query, regardless of value shape (plus a spec-decision on whether object/array path values are an error instead). - FWD-19 [info]: preserved literal
%in template/base text is upstream-semantics-changing (%2Fsurvives; most stacks route it differently from/). Inputs are assembly-supplied (ADR-066 trust); document the trade-off in the module doc (+ ADR-066 note) — or reject raw%in template text while allowing it in values (the strict shape).
Acceptance Criteria
- A decision per finding, recorded (module doc + ADR-066 section as appropriate); doc-only outcomes still need the doc change + a doc-asserting test where applicable
- FWD-17: whichever shape is chosen, non-JSON payload behavior is pinned by a test (string case, number-vs-string distinction, event-field presence if option (b))
- FWD-18: placeholder keys never double-emit (query test with an object value under a placeholder key) — and the object-in-path outcome (error vs JSON-segment) decided and tested
- FWD-19: documented (and if the reject-raw-% shape is chosen, its import- or call-time error tested)
cargo test,cargo clippy --all-targets -- -D warnings,cargo fmt --checkpass
References
- docs/reviews/002-post-remediation-review.md (Part D', FWD-17/18/19)
- src/adapters/forward.rs:774-781, :977-979, :144-157, :353-370, :481-505
- docs/architecture/decisions/066-from-jsonschema-as-http-adapter.md
- tasks/adapters/review-002-fwd13-dot-segments.md (adjacent template-renderer work — sequence or coordinate to avoid churn in the same helpers)
Notes
Deliberately a decide-first task: none of the three is a crash or leak; each is a contract the code half-implies. Keep the decisions small and documented rather than building speculative machinery (e.g. no new envelope schema unless (b) is actually chosen). Coordinate with review-002-fwd13-dot-segments (same helpers, different concerns).