Skip to content

test(api): freeze legacy wire contract (Phase N-0)#37

Merged
revtex merged 1 commit intodevfrom
feat/native-api-n0-contract-freeze
Apr 26, 2026
Merged

test(api): freeze legacy wire contract (Phase N-0)#37
revtex merged 1 commit intodevfrom
feat/native-api-n0-contract-freeze

Conversation

@revtex
Copy link
Copy Markdown
Owner

@revtex revtex commented Apr 26, 2026

Tests-only. Pins the current REST + WebSocket wire format so the upcoming /api/v1/* native-API work cannot drift the legacy surface accidentally.

REST: /api/call-upload (all 3 API-key transports), /api/trunk-recorder-call-upload alias, test=1 check, /api/calls{,/:id/audio,/:id/transcript}, share CRUD + /api/shared/:token{,/audio}, bookmarks, auth (login/refresh/logout/password/me/tg-selection — including os_session + refresh_token cookie behaviour), admin imports, admin radioreference preview, admin transcriptions status.

WebSocket: byte-exact JSON pin for every server-emitted legacy command constructor; structural pin for ADM_EVT (volatile timestamp).

No production code changed. Skip-changelog (no user-visible behaviour change).

Phase N-0 of the Native API plan: adds table-driven regression tests pinning the current REST and WebSocket wire shapes so the upcoming /api/v1/* work cannot drift the legacy surface accidentally.

REST contract tests cover: /api/call-upload (all three legacy API-key transports: X-API-Key header, ?key= query, key= form), /api/trunk-recorder-call-upload alias, test=1 connectivity check, /api/calls envelope, /api/calls/:id/audio, /api/calls/:id/transcript, /api/calls/:id/share CRUD, /api/shared/:token{,/audio}, /api/bookmarks{,/calls,POST}, /api/auth/{login,refresh,logout,password,me,tg-selection} including os_session/refresh_token cookie issuance and clearance, /api/admin/import/{talkgroups,units,groups,tags}, /api/admin/radioreference/preview/csv, /api/admin/transcriptions/status.

WS contract pins byte-exact JSON for every server-emitted legacy command constructor in internal/ws (CAL/CFG/VER/LSC/XPR/MAX/LFM/TRN, ADM_RES, ADM_RES error) plus a structural pin for ADM_EVT (volatile timestamp asserted as positive int64).

Tests-only; no production code changes. Skips CHANGELOG per project policy for pure internal refactor / regression-test additions.
@revtex revtex added the skip-changelog PR has no user-visible impact; skip CHANGELOG check label Apr 26, 2026
@revtex revtex merged commit 7a42677 into dev Apr 26, 2026
7 checks passed
@revtex revtex deleted the feat/native-api-n0-contract-freeze branch April 26, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog PR has no user-visible impact; skip CHANGELOG check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant