Skip to content

fix(media): name a station that could not be reached, and one that withheld its key - #1097

Merged
lenoxys merged 2 commits into
beta-5.0.0from
feat/1089-name-the-station-refusal
Sep 14, 2026
Merged

lenoxys merged 2 commits into
beta-5.0.0from
feat/1089-name-the-station-refusal

Conversation

@lenoxys

@lenoxys lenoxys commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Closes the last link for #1089: the SDK now raises both refusals as their own types, and this is what makes them arrive named in an archive.

Why

sourceFailure put both in source-error — the bucket for a source that failed. So a base that never connected, and a base that would not seal what it was sent, both read as the camera a viewer happened to open. On #1089 every camera behind one base failed identically and the reports named the cameras, which is where the investigation went.

Neither is the camera:

  • station-unreachable — every camera behind an unreachable base fails together, so the next step is that base or the network to it.
  • station-key-unavailable — an attached camera's media start has no unencrypted form, so a missing session key is a refusal rather than a fault, and retrying the same camera does not resolve it.

Why the key was missing is the SDK's own trace vocabulary — level2-unavailable with no-cipher-key, derivation-failed, not-negotiating, session-closed or grace-elapsed, plus cipher-fallback and station-resolved — which this plugin already retains. This adds the outcome the session ended on, which is the part a reason vocabulary owns.

What changed

  • Both reasons on LiveSessionFailure and RecordingFailure, mapped in both sourceFailure functions, and admitted to the diagnostics reason allowlist so they reach an archive.
  • The stage stays sdk-source-acquisition, because that is where the session ended.
  • SDK pin moves to the published 0.2.0-beta.10, which is what exports the two types.

Verified

  • npm run verify green: prettier, ECS guard, tsc, 893 tests / 50 files.
  • npm run qualify:release clean against the exact pin — 273 packed files, no dist-tag, no symlinked install.
  • Contracts pin both by SDK type, on live and on recording, and keep the existing case that an error merely calling itself StationBusyError stays a source failure. A name is a string any thrower can write.

…thheld its key

The SDK raises both as their own types, and both landed in `source-error` — the
bucket for a source that failed. So a base that never connected and a base that
would not seal what it was sent both read as the camera a viewer happened to open,
which is where the next step then goes: on #1089 every camera behind one base
failed identically and the reports named the cameras.

Neither is the camera. Every camera behind an unreachable base fails together, so
the next step is that base or the network to it. A missing session key is a
refusal — an attached camera's media start has no unencrypted form — so retrying
the same camera does not resolve it. Both now carry their own reason, on live and
on recording, and the stage stays `sdk-source-acquisition` because that is where
the session ended. Why the key was missing is the SDK's own trace vocabulary,
which this plugin already retains.

The contracts pin them by SDK type rather than by an error's name, so a message
that merely calls itself one stays a source failure.

Refs #1089
@lenoxys lenoxys self-assigned this Sep 14, 2026
@lenoxys
lenoxys merged commit 542755d into beta-5.0.0 Sep 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant