# Protocol 026: decisions over three steps
Status: draft, to be declared by recording the frozen manifest's SHA-256 in HANDOFF.md before any run of pynn_seed 18 to 21
Date: 2026-11-21

## Goal
Protocol 025 found that the two-signal rule is not uniform where the two strengths differ by 7.5 points: single-step decisions took the stronger signal's action in 66 of 72 steps and held in 6. This protocol tests one remedy, fixed now: show the same pair of signals for three steps in a row and decide from the mean of the three readings. It asks whether that rule takes the stronger signal's action in the close cells, on fresh instances, while still holding on equal signals.

The open risk, and the reason this needs runs and not arithmetic on 025's data: in 025 the repeats of a cell were spread over the sequence. Here they are consecutive, 147 ms apart. The model has short-term synaptic depression, and protocol 021 found gain changes after stimulation. A repeated stimulus may give a smaller or shifted reading than its first presentation, while the calibration steps are single presentations.

## Non-goals
- No change to the per-step readout, the calibration, v or T = 0.32 (protocols 017 and 024).
- No market data and no action of any kind. No lesion runs, so no claim about the cortex's own connections.
- No test of a third orientation, of other block lengths or of other ways to combine steps.
- No claim about cat cortex.

## Design
- **Signals and timing** as in protocol 025: A a grating at 45°, B one at 135°, each step 210 ms on and 147 ms grey, after a 504 ms grey lead-in.
- **Block:** the same cell (a, b) for three steps in a row. **Single:** one calibration step.
- **Steps per instance:** one warm-up step [45°, 30 %], not analysed; 28 blocks (84 steps); 24 singles (blank, A alone at 30, B alone at 30, 8 each). 109 steps.

| Kind | Cells | Blocks per instance | Intended |
|---|---|---|---|
| close | A 15 + B 7.5, A 22.5 + B 15, A 30 + B 22.5 and their mirrors | 12 (2 per cell) | the stronger's action |
| equal | 7.5, 15, 22.5, 30 % on both | 8 (2 per cell) | hold |
| clear | A 15, B 15, A 30 + B 15, A 15 + B 30, A 22.5 + B 7.5, A 7.5 + B 22.5 | 6 (1 per cell) | the stronger's action |
| weak | A 7.5 alone, B 7.5 alone | 2 (1 per cell) | none: described |

- **Order:** two halves, each with one block of every two-block cell, three clear blocks, one weak block and four singles of each calibration cell, shuffled; the first seed from 260000 + 100 K on in which no two neighbouring units show the same cell. So a block is never followed by a block of its own cell, and no calibration step directly repeats or directly follows the warm-up's cell: every calibration step is a single presentation. Each instance has its own order. Files `work/controller-026/sequences/sequence-026-sK.json`, hashes in the frozen manifest and in `decide_026.py`.
- **Instances:** pynn_seed 18, 19 and 20, reserve 21, built as every instance since protocol 017. Seed 18 was protocol 025's reserve and was never built (025's queue log and status files: three seeds settled, no reserve run). On 21 November a search of the Mac's run folders and of the workspace (code, records, specs, packages) for a pynn_seed of 18 to 21 and for run names s18 to s21 found only a synthetic test fixture of protocol 023 revision 2 (`test_check_instance_023.py`) and protocol 025's declaration of its unused reserve. The lost research server cannot be searched; no plan of this project named a seed above 18.
- **Runs, the paired rule, limits per job:** exactly protocol 025's. The queue `queue_026.sh` is 025's script with the names, the seeds and the folder changed and the rehearsal mode removed (the diff is those lines); `compare_026.py` and `archive_mozaik_026.py` are 025's with the names changed. Model and run files are protocol 023 revision 2's, checked against its list at setup.
- **Checks before scoring** (`decide_026.py`, refusals): as in 025 (declared seed, declared sequence and timing, LGN lead-in equal to protocol 023's reference, S at least 1,500, frozen readout at its hash, the export is the earlier run of the queue's agreeing pair), and every block is three consecutive steps of one cell.

## The rule
Per step, v is protocol 024's: z0 from the 8 single blank steps, S from the 8 + 8 single steps at 30 %, v = −Im(z − z0) / S. **The block's decision is the action of the mean of its three v:** B above +0.32, A below −0.32, hold between.

## Outcome
- **PASS:** every one of the three instances takes the intended action in at least 24 of its 26 scored blocks, and the three together in at least 75 of 78.
- **FAIL:** otherwise.
- **NOT INTERPRETABLE:** fewer than three valid instances, or a refusal of `decide_026.py`.
- The tool is run twice and the two result files must be byte-identical; if they differ, one rerun of the unchanged tool is allowed and reported, and if that differs too the outcome is NOT INTERPRETABLE. A NOT INTERPRETABLE or crashed analysis is not rerun with changed code or numbers. A run that was given a wrong file name or a malformed argument is not an analysis: the unchanged tool is run again on the right exports, and the slip is reported.
- **Reported with no decision role:** per kind, the actions the blocks took; every calibration step's v; the single-step decisions of each block's first, second and third step (the first step is the within-run single-step baseline); the decision from the first two steps; the mean v toward the stronger signal by position in the block (does the reading change over repeats); the two weak blocks; the calibration cells' v; every attempt with its receipts; the number of completed runs that disagreed.

## What is known beforehand (disclosure)
- The rule and block length were chosen on protocol 025's published data. Taking every three of the four spread repeats of a cell there, the mean decides for the stronger signal in 70 of 72 close cases (single steps: 66 of 72), and as intended in 168 of 168 cases of 025's scored cells; one signal alone at 7.5 % acts in 1 of 24. If consecutive repeats behaved like spread repeats, a PASS would be likely (about 0.98 by simulation from those counts). Under the single-step rate the pass marks would be met about 63 times in 100, so **a PASS does not by itself show that three steps are better than one**; the comparison with the first-step decisions of the same blocks is descriptive and has 36 close blocks.
- Whether consecutive repeats behave like spread repeats is not known. Protocol 017 reported no carry-over between different successive steps; protocol 021's kernels showed gain changes. A FAIL through adaptation is a real possibility.
- Equal and clear cells were all cells of 025 (168 of 168 there as single steps).
- No rehearsal run was made for this protocol. The run path is 025's, which completed six runs without a failure; the new parts (sequence with blocks, block scoring) are covered by tests, including one that runs the whole scoring tool on synthetic exports with the queue's records.

## Limits to state beside any outcome
- The first step of a block often follows a three-step block of another cell, a context protocol 025's single steps never had; it is a within-run baseline, not a repeat of 025.
- An exploratory look at 025's data (made by the reviewer of this spec, not declared) found a small positive relation between a step's deviation from its cell mean and the previous step's cell mean (r = 0.12 to 0.26 per instance, slope 0.01 to 0.024), small against the margins.
- One block length, one way to combine steps, one orientation pair, one timing, one orientation map shared by all instances, calibration from single steps of the same run, three instances, 12 close blocks per instance.
- A decision takes three steps: 1.07 s of model time instead of 0.36 s.
- The laptop's limits as stated for protocol 023 revision 2. The queue's paths for disagreeing runs, failures and the reserve were reviewed for 025 but have never been exercised.
- The rule reads the whole model, input stage and cortex together.
- Simulation only; an engineering rule; no market signal, no action.

## Test plan
- `test_026.py`: the sequence's units, counts, halves and run rule; the declared files; the kinds; a clean instance; a shrinking response over repeats fails the close blocks; one noisy step is outvoted; refusals; outcome boundaries; the comparison tool; the whole tool on synthetic exports (pass, identical bytes on a second run, a trio with the reserve, wrong pair, two instances, wrong seed). Not tested: the lead-in refusal on a changed train (025's test covers the same function), and the queue's reserve and invalid paths.

## Done when
- [ ] Manifest frozen and its SHA-256 recorded in HANDOFF.md before the queue starts
- [ ] Queue ended; three instances settled, or the reason recorded
- [ ] `decide_026.py` run twice, identical files
- [ ] Package and journal note with the outcome and every attempt
