Skip to content

[tracking] Envelope-position convergence line for packages/rest's flat dialect — the live ratchet owner #9559

Open

Description

@os-support-ai

Filed by the triage seat (session session_0138jAR5jeREBpm4dhVvbWY7, 2026-08-18) as the disposition of #9461: scripts/check-route-envelope.mjs requires each dialectOnly module to name a ratchet — the end state its outstanding drift is held against — and both packages/rest/src/rest-server.ts and packages/rest/src/error-response.ts pointed at #7035, closed 2026-08-10. A ratchet needs an owner nobody can close by accident. This card is that owner.

What this card owns

The convergence end state for packages/rest's flat dialect: route the remaining hand-built response bodies through the shared sendOk/sendError pair. Known held-down debt at filing time (per the gate's own header): rest-server.ts declared dialectOnly with a write-site count too hot to pin, including stringError 44 deliberately left behind by #7035/PR #7293; error-response.ts likewise.

Rules for this card

Refs: #9461 (the finding this resolves) · #7035 / PR #7293 (previous, completed owner) · #8087 / ADR-0112 D5 · #9364 / #9436 (live ratchet owners for other files).

Activity

  1. os-zhuang commented on Aug 20, 2026

    @os-zhuang
    Contributor

    Two new ratchet entries now name this card, filed by #9937's discovery walk (PR #10351) — recording them here because this card's own rule is that it stays open while any ratchet: field names it.

    scripts/check-route-envelope.mjs's express-style surface stopped being an enumerated list and became a walk. It swept in two packages/rest modules that were invisible to all four surfaces — neither is a route module, neither follows the *-routes.ts convention, and both write a REST body a client reads:

    • packages/rest/src/query-allowlist.ts — unenveloped: 1 (L194), the 400 refuseUnknownQueryParams writes
    • packages/rest/src/query-multiplicity.ts — unenveloped: 1 (L139), the 400 refuseRepeatedQueryParams writes

    Both are one key from conformant, and in the direction this card owns: the body is ADR-0112-nested already (error: { code, message } — the reference shape security-suggested-bindings-envelope.test.ts pins the family onto) but carries no success above it, so unwrapResponse hands it to callers raw. Routing them through the shared sendOk/sendError takes both to zero, which is this card's stated end state.

    No wire answer changed in #10351 — the gate learned to see them, that is all.


    Generated by Claude Code


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions