#1156-B: fail-loud Web selection persistence truth #1180

Open
opened 2026-08-13 00:29:54 +00:00 by Ghost · 0 comments

Child of #1156. Fail-loud Web catalog/selection persistence truth.

Findings

FL-02 — malformed successful PUT is synthesized as confirmation

apps/web/src/spa/chat/chat-api.ts falls back from malformed/missing successful response content to the requested tuple (confirmed ?? requested). The UI can enable send without evidence the server stored the tuple.

FL-03 — failed/malformed GET collapses to intentionally empty state

Harness-list failure becomes []; persisted-selection failure/malformed data becomes null. Transport/auth/persistence failure is indistinguishable from a genuinely empty catalog or unset selection and may clear visible state or permit replacement.

Binding outcome

  • Use discriminated loaded/unset/unavailable/error results.
  • A successful PUT confirms only an exact validated server-returned tuple; malformed/mismatched 2xx is typed persistence failure.
  • On unknown persistence state, preserve the last known valid selection, disable send/mutation, and surface a fixed safe error.
  • Empty registry and genuinely unset selection remain distinguishable valid states.
  • Red-first cases cover non-OK, malformed, missing, mismatched, stale and valid responses with zero optimistic send enablement.
  • Full Web tests/typecheck/lint/build plus independent exact-head verification/review.

This child may align with native Tasks 7/16 but remains an explicit blocker before native stage. Split rather than widen if hydration work becomes necessary.

Child of #1156. Fail-loud Web catalog/selection persistence truth. ## Findings ### FL-02 — malformed successful PUT is synthesized as confirmation `apps/web/src/spa/chat/chat-api.ts` falls back from malformed/missing successful response content to the requested tuple (`confirmed ?? requested`). The UI can enable send without evidence the server stored the tuple. ### FL-03 — failed/malformed GET collapses to intentionally empty state Harness-list failure becomes `[]`; persisted-selection failure/malformed data becomes `null`. Transport/auth/persistence failure is indistinguishable from a genuinely empty catalog or unset selection and may clear visible state or permit replacement. ## Binding outcome - Use discriminated loaded/unset/unavailable/error results. - A successful PUT confirms only an exact validated server-returned tuple; malformed/mismatched 2xx is typed persistence failure. - On unknown persistence state, preserve the last known valid selection, disable send/mutation, and surface a fixed safe error. - Empty registry and genuinely unset selection remain distinguishable valid states. - Red-first cases cover non-OK, malformed, missing, mismatched, stale and valid responses with zero optimistic send enablement. - Full Web tests/typecheck/lint/build plus independent exact-head verification/review. This child may align with native Tasks 7/16 but remains an explicit blocker before native stage. Split rather than widen if hydration work becomes necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1180