docs: the trigger is not persisted, so the condition is not either

The spec described the new condition fields as appended session keys. LayoutState
carries no trigger field at all -- the trigger is built from --holdoff and the
panel's defaults on every launch -- so there was nothing to append to. Persisting it
is a separate feature nobody asked for, and a session that silently restored an armed
pulse-width condition would surprise rather than help. The statistics toggle stays as
the one session key this design adds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martino FerrariandClaude Opus 4.6 committed 2026-10-07 11:11:30 +02:00
1 parent 6770c6a648
commit 19aad492eb
1 file changed
+12 -7
@@ -78,7 +78,7 @@ These bind every task below and are not restated in each one.
| `src/measure.hpp` / `.cpp` | `MeasureStatsAccum` (Welford) beside the existing result types. | | `src/measure.hpp` / `.cpp` | `MeasureStatsAccum` (Welford) beside the existing result types. |
| `src/plot_host.hpp` / `.cpp` | `kSearchMarks` cursors per row, created in `install()`, placed by a new `set_search_marks()`. | | `src/plot_host.hpp` / `.cpp` | `kSearchMarks` cursors per row, created in `install()`, placed by a new `set_search_marks()`. |
| `src/ui.cpp` | The trigger panel's type and parameter rows, the `Search` expander, the statistics toggle and second line, the chunk pump in the frame tick, and the four probes. | | `src/ui.cpp` | The trigger panel's type and parameter rows, the `Search` expander, the statistics toggle and second line, the chunk pump in the frame tick, and the four probes. |
| `src/session.cpp` | The new `TriggerConfig` fields and the statistics toggle. | | `src/layout_store.hpp` / `.cpp` | One new `LayoutState` field: the statistics toggle. The trigger is not persisted today and is not persisted by this design. |
| `tools/mock_udpstreamer.py` | `--glitch-at` / `--glitch-width` / `--quiet-at`. | | `tools/mock_udpstreamer.py` | `--glitch-at` / `--glitch-width` / `--quiet-at`. |
| `README.md`, `docs/claude/*` | What was built, and the invariants it adds. | | `README.md`, `docs/claude/*` | What was built, and the invariants it adds. |
@@ -186,11 +186,16 @@ No plot instrument is added. The trigger level has never been drawn on the plot
button (`src/ui.cpp:135`, `:1604`) — so a band needs no second ruler. button (`src/ui.cpp:135`, `:1604`) — so a band needs no second ruler.
`TriggerConfig` gains one `EventCondition` member; its `level` and `edge` replace the `TriggerConfig` gains one `EventCondition` member; its `level` and `edge` replace the
`TriggerConfig` fields of those names, and every reader moves with them. The session file gains `TriggerConfig` fields of those names, and every reader moves with them.
the new keys **appended**, since the order is load-bearing
(`docs/claude/invariants-session-and-export.md`); a file without them loads as **The condition is not persisted, because the trigger is not persisted.** `LayoutState`
`TriggerType::Edge` with the level, edge, hold-off, pre-% and mode it already carries, which is (`src/layout_store.hpp:19-63`) carries the window, rows, calibration, colours, enabled signals,
exactly today's behaviour. No version bump, no migration. the source, the math graphs and the measurements — and no trigger field at all; the trigger is
built from `--holdoff` and the panel's own defaults on every launch. Adding persistence for it
is a separate feature nobody asked for, and a session that silently restored an armed
pulse-width condition would be a surprise rather than a convenience. The only session key this
design adds is the measurements pane's **statistics toggle**, which belongs beside the
`measures` it governs.
The level's existing default — the middle of the signal's declared range until the user edits it The level's existing default — the middle of the signal's declared range until the user edits it
(`src/ui.cpp:2016-2054`) — applies to `Window` as a band about that middle, and `level2` (`src/ui.cpp:2016-2054`) — applies to `Window` as a band about that middle, and `level2`
@@ -423,7 +428,7 @@ instant. Both are permanent regression cases, like `--time-glitch-at`.
## Risks ## Risks
- **`TriggerConfig`'s `level`/`edge` move into `EventCondition`**, so every reader changes — - **`TriggerConfig`'s `level`/`edge` move into `EventCondition`**, so every reader changes —
the panel, the session, the probes and the status line. Mechanical, but wide, and the the panel, the probes and the status line. Mechanical, but wide, and the
mitigation is that `Edge` behaviour must be bit-identical afterwards: the existing trigger mitigation is that `Edge` behaviour must be bit-identical afterwards: the existing trigger
probes are the regression test and are run before anything new is added. probes are the regression test and are run before anything new is added.
- **The scan's worst chunk is a latency the producer pays.** The chunk size is the one knob, it - **The scan's worst chunk is a latency the producer pays.** The chunk size is the one knob, it