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
{{ message }}
Repository navigation
Envelope classifier learns typed response structs (blocker for the typed-response conversion) #863
API product implementation work · roadmap #1008 · use parent dependency order; not a separate product rank.
Part of #857. Stack rank 6 of 13. Depends on: T2. Hard blocker for the typed-response conversion — nothing converts before this lands.
Color
The trap that orders the whole typed-response phase: classify_envelope parses Json(json!(…)) literals out of the handler source. Convert one handler to Json(JobsResponse { jobs }) and its ledger entry silently flips from wrapped/jobs to scalar — the envelope gate goes blind at exactly the moment the refactor needs it most. The ledger exists because of W0.5b (a BFF forward<unknown[]> against a {jobs: […]} envelope crashed the real dashboard while every mock-backed tier was green); letting it degrade during the conversion would reopen that class.
Scope
Extend er_api_spec::classify_envelope to resolve Json(<LocalStruct>) through the existing struct_fields parser into wrapped/record as appropriate (one field whose type is a collection → wrapped; several fields → record), keeping every current form working. Pin the new arms in the_classifier_reads_each_form — the test that exercises each classifier branch explicitly.
Out of scope
Converting any handler (T7). New envelope kinds.
Testing
A fixture handler in each typed form classifies identically to its json! twin; envelopes.json is unchanged in this PR (no handlers converted yet — a diff here means the classifier changed behaviour on existing code). make check.
Definition of done
Epic DoD, plus: the classifier reads both spellings of every envelope class; the pinning test covers the new arms; envelopes.json byte-identical.
Claimed — working in #1073 (draft). Closing that PR releases the claim. Continuing the API prerequisites in dependency order under the delegated selection authority.
Activity
athvin commentedon Nov 9, 2026
Claimed — working in #1073 (draft). Closing that PR releases the claim. Continuing the API prerequisites in dependency order under the delegated selection authority.
wip: claim #863 — typed response envelope classification
feat(api): classify local typed response envelopes