test(coach): pin the workout launch's tenancy, closure and snapshot-once

Four suites, each mutation-checked against a reverted protection:

- route-workout-scope: the workout row is read exactly once across a ten-turn
  conversation that keeps sending the id, the where clause always names
  userId, another user's id resolves to nothing and the chat proceeds, and
  the section sits inside the health-data fence.
- workout-evidence: the numbers-only closure. An instruction-shaped
  sport_type — reachable through the restore path, which types the column as
  free text — folds to "other" and never reaches the block; a free-text leaf
  at any depth throws.
- page-launch-params: an unknown ?scope= is ignored silently, and ?workout=
  yields to both ?c= and the fenced ?doc= path.
- composite-score-anatomy-coach: every score sheet carries an opener, a
  scope narrowed to the composite's inputs, and auto-send.

resolveLaunchState's shape assertion gains the workoutId field.
This commit is contained in:
Marc-André Bombeck committed 2026-07-19 14:19:33 +02:00
1 parent 096c8c799b
commit 2bf450cf17
11 files changed
+829 -7

No files matched your search

+3
View File
@@ -5576,6 +5576,9 @@ paths:
type: string
minLength: 1
maxLength: 500
workoutId:
type: string
maxLength: 64
required:
- message
responses: