Two review Minor findings against the brief itself, both closed:
- tests/mocks/handlers/tech-log-studio.ts silently dropped documented
query filters instead of mirroring the mock gateway it wraps:
listStudioDocuments forwarded only q/limit (dropping kind,
publicationStatus, nextAction, projectId, sort, cursor),
listStudioCatalog forwarded only type (dropping q/cursor/limit), and
listStudioPublications ignored all four of its parameters outright.
Added a shared queryParams() helper and forward every field each
operation's projectRequest actually emits, plus a regression test
that narrows the fixture set by kind through the real HTTP gateway
(confirmed it fails without the fix).
- canonicalInputIdentity (on the idempotency-safety path, reused by
Task 6) had no test. Added three tests against mutationIntent(): a
large Korean payload stays within the byte bound, the same input
retried twice yields an identical identity, and a mid-codepoint
truncation cut leaves no replacement character (confirmed the third
fails without the strip). The known collision limitation of any
bounded-length identity scheme is documented in the test file rather
than solved.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds createHttpStudioGateway, the adapter the Studio UI calls in
production. It drives every mutation through mutationIntent()
(defineMutationIntent/defineIdempotencyKey, not
createBrowserMutationIntentFactory, so the caller-supplied idempotency
key is preserved rather than regenerated) and leaves header
construction to the executor/credential collaborator entirely - the
gateway never sees or sets Idempotency-Key or x-csrf-token itself.
Also moves stable-stringify.ts out of adapters/mock/ so the mock and
http adapters share one pure function without production code
depending on the mock directory, and fixes the resulting import in
cursor.ts, mock-studio-gateway.ts, and mock-studio-gateway.test.ts.
Adds MSW handlers (tests/mocks/handlers/tech-log-studio.ts) that wrap
the reference mock-studio-gateway implementation, and a contract test
suite that drives the gateway through a thin fetch-based executor
built from the contract's own projectRequest, proving canonical
path/body/header construction without assembling the full platform
transport.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>