Skip to content

refactor(j5): move Squadron and inbox routes to a typed HttpApiGroup #137

Closed as not planned

Description

@Jacksondr5

J5 Squadron and inbox routes currently use a raw-request delegate in packages/client-runtime/src/state/environmentHttpAuth.ts so they share upstream cookie, bearer, relay DPoP, refresh and retry behavior. This preserves behavior during the upstream integration, but leaves a small transport seam and handwritten J5 URL/error handling.

After the upstream merge, define a typed J5 HttpApiGroup appended to EnvironmentHttpApi and migrate the J5 route implementations and clients together. Keep server ownership and scoped environment identities unchanged. Remove the raw-request seam when no J5 caller needs it; do not assign J5 routes to an unrelated upstream group.

Acceptance: local-cookie, remote-bearer and relay DPoP requests retain refresh/retry and refreshed-URL behavior; unsupported older environments retain current capability/fallback behavior; Squadron and inbox reads target their owning environment; focused server/client authentication tests pass. Record the retired seam in FORK.md case 34. This is deferred from the merge because adopting a typed group changes both ends of the API.

Activity

  1. Jacksondr5 commented on Oct 13, 2026

    @Jacksondr5
    OwnerAuthor

    After #584, #586 and #593, every J5 client read except one is a WebSocket method, so this issue has narrowed to a single question.

    What is left: POST /api/j5/artifacts/read is the only J5 route a client still calls, and so the only caller of executeAuthenticatedEnvironmentRawHttpRequest (FORK.md case 34). It stays on HTTP on purpose: an artifact can be megabytes, which upstream keeps off the socket.

    The choice

    • Keep the raw helper for that one route. No new upstream edit; one recorded helper stays.
    • Or define a typed J5 HttpApiGroup with that one endpoint and append it to EnvironmentHttpApi. That removes the helper and adds an edit to an upstream contract file, carried through every upstream sync.

    The Squadron and inbox routes this issue was written for no longer exist.

  2. Jacksondr5 commented on Oct 13, 2026

    @Jacksondr5
    OwnerAuthor

    Closing: Jackson decided on 2026-10-13 to keep the raw helper for the one remaining route, POST /api/j5/artifacts/read. The routes this issue was written for are gone (#584).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions