@cc [owner:Yassimba] row-flags.window-scope
Applies only to `keys_statement` and `close_streaks` in `statements.py`.

In a `Window` scope only rows inside the window open or close a Streak; a Lookback row changes nothing.
In a `Complete` scope every active Streak whose row is not failing closes.

@cc [owner:Yassimba] row-flags.check-window-scope
Applies only to `DatasetFlagging.run_group` in `scan.py`.

An engine group whose checks have a `last` stages with a `Window` scope of the bounds that
its scan read, also in a full run. It never stages with a `Complete` scope.

@cc [owner:Yassimba] row-flags.key-change-resets
Applies only to `StreakWork.apply` in `ledger.py`.

When the key columns of a table change, every active Streak of that table closes in the same transaction,
before any Streak of the new key opens.

@cc [owner:Yassimba] row-key.core-owned
Applies only to `row_key_expression` and `decode_row_key` in `row_key.py`.

Only Row Flags computes and decodes a Row Key. No Check Engine builds, reads, or stores one.
The database computes every stored or compared key.
An engine whose `flag_rows` gives a `VerdictRun` copies the key column that Row Flags put in its
rows statement into its verdict batches unchanged; it never builds, reads, or decodes it.

@cc [owner:Yassimba] row-flags.verdict-scope
Applies only to `stage_verdicts` in `ledger.py`.

In a `Complete` scope only rows with at least one TRUE verdict are staged. In a `Window`
scope every verdict row is staged, so a passing row in the window can close a Streak.

@cc [owner:Yassimba,label:published-structure,test:test_reopen_after_clear_makes_new_streak] row-flags.failing-row-periods
For one Datasource, table, check, and `row_id`, at most one row of `turbine_failing_rows` has an
empty `fixed_in_result_id`. A row that keeps failing writes nothing. A row that passes fills
`fixed_in_result_id`. A row that fails again later opens a new row.

@cc [owner:Yassimba,label:published-structure,test:test_key_change_closes_every_streak] row-flags.row-id-columns
Applies only to `StreakWork.apply` and `StreakWorks.row_id_columns` in `ledger.py`.

The table result of a flagged scan stores its key columns in `row_id_columns`. The insert of the
result writes them; the Streak work changes only `turbine_failing_rows`, so the save locks one table. The key of a
Streak is the `row_id_columns` of the result in its `failing_since_result_id`, so all active Streaks
of one table have the same key columns.

@cc [owner:Yassimba,test:test_every_engine_group_stages_its_own_rows] row-flags.every-engine-group
Applies only to `DatasetFlagging` in `scan.py`.

Each engine group of one Dataset that can flag stages its own Scratch Table, also after another
group of the Dataset staged. The Dataset records its Row Flags only when a scan staged, no notice
tells why rows are not flagged, and every check of the Dataset was measured.
`DatasetFlagging.finish` is the one owner of this rule.

@cc [owner:Yassimba,test:test_other_database_notice_appears_once_for_each_datasource] row-flags.notice-once
Applies only to `DatasetFlagging` in `scan.py`.

In one Check Run, the notice that a Datasource is not the database of the Run History appears one
time for that Datasource, not one time for each of its Datasets.
