# Graph follow-newest correction evidence

Status: complete; A/B target proof passed and controls prepared for operator review
Type: evidence
Updated: 2026-07-26
Parent: work/tickets/ticket-graph-follow-newest-across-all-zoom-levels.md

## Result

The Graph screen now follows each newly persisted chart record at 1, 3, 6, 12,
and 24 hour zoom. Its viewport high equals the newest chart timestamp rather
than a rounded grid boundary, and a new prompt labels that actual right edge.
Pan Left holds the selected historical range while publications continue; Pan
Right reaches the exact newest record and restores following.

Both controls run the same production S-record:

- S-record SHA-256:
  `143F1941FCF43BD31A5084CF21E0BC8595880F8E58C2CBA22B98D594759C3124`
- ELF SHA-256:
  `9DD2C07240A0EF451BAEA9C58EE1266E8E7AAB533B5F86723FB9EF378056E909`
- Isolated managed Debug clean build and production-name package: PASS.
- All repository `script/check-*.ps1` suites: PASS, `20/20`.
- Focused follow-newest gate: PASS, `11/11` source invariants and `5/5`
  modeled zoom levels.

## Root cause and correction

The old Graph timer inferred following only while the viewport edge was within
one pixel of the prior newest timestamp. Zoom/pan planning rounded the right
edge down to half-hour or hour boundaries, so it permanently lost follow mode
as soon as the rounding gap exceeded one pixel. The five X labels represented
internal 120-pixel divisions; the 720-pixel edge had no label, making the
one-hour view appear an additional ten minutes stale.

The correction:

- stores explicit `followNewest` screen state;
- anchors an attached viewport exactly to the newest persisted chart record;
- preserves following through button zoom;
- disengages following for Pan Left and graph-area history inspection;
- makes Pan Right terminate at the exact newest timestamp and reattach;
- labels the actual 720-pixel right edge;
- provides exact-magic, RAM-only review commands that call the same Graph entry
  and Zoom/Pan functions as operator touch events. They clear before execution
  and mutate neither configuration nor media.

## Live all-zoom proof

Every row is an actively attached Graph screen. In each before/after pair,
publication and render sequences advance together, follow remains true, and
`viewport high = newest` with zero seconds of edge lag.

| Control | Zoom | Sequence before -> after | Newest/edge before -> after |
| --- | ---: | ---: | ---: |
| B `1751219` | 12 h | `8 -> 10` | `301831380 -> 301831440` |
| B `1751219` | 24 h | `10 -> 12` | `301831440 -> 301831500` |
| B `1751219` | 6 h | `12 -> 14` | `301831500 -> 301831560` |
| B `1751219` | 3 h | `14 -> 16` | `301831560 -> 301831620` |
| B `1751219` | 1 h | `16 -> 18` | `301831620 -> 301831680` |
| A `1751136` | 12 h | `8 -> 10` | `301832220 -> 301832280` |
| A `1751136` | 24 h | `10 -> 12` | `301832280 -> 301832340` |
| A `1751136` | 6 h | `14 -> 16` | `301832400 -> 301832460` |
| A `1751136` | 3 h | `16 -> 18` | `301832460 -> 301832520` |
| A `1751136` | 1 h | `22 -> 24` | `301832640 -> 301832700` |

Right-edge labels advanced with the records, including `10:07 -> 10:08` on B
at one hour and `10:24 -> 10:25` on A at one hour.

## History hold and reattachment

- B: Pan Left set follow false and held viewport high at `301809600` while a
  new record advanced publication/render sequence `24 -> 26` and newest
  `301831980 -> 301832040`. Two Pan Right actions reattached at exact newest
  `301832040`; the following publication advanced sequence `26 -> 28` and
  edge/newest together to `301832100`.
- A: Pan Left set follow false and held viewport high at `301829400` while a
  new record advanced publication/render sequence `24 -> 26` and newest to
  `301832760`. Pan Right reattached with follow true; edge and newest were
  equal at `301832820` with sequence/render `28/28`.
- The normal five-minute Graph inactivity timeout was observed and respected.
  A review command issued after timeout was not consumed and therefore could
  not create a false pass; Graph was reopened before testing continued.

## Cache performance

| Control | Cache total | HPT traversal | Records scanned/selected | Result |
| --- | ---: | ---: | ---: | --- |
| A `1751136` | `2.68 s` | `1.81 s` | `1,558 / 1,557` | ready, `720` chart records |
| B `1751219` | `2.60 s` | `1.75 s` | `1,500 / 1,495` | ready, `720` chart records |

B was not formatted, reinitialized, removed, or replaced. Its abnormal oldest
lane sequences remain `86 / 86 / 1`.

## SD identity

Pre-program baselines are linked at:

- `work/evidence/hpt-log-store-circular-mirror/controller-a/graph-live-refresh-diagnosis-20260726/sd-card-identity.json`
- `work/evidence/hpt-log-store-circular-mirror/controller-b/graph-live-refresh-diagnosis-20260726/sd-card-identity.json`

Post-program/reboot captures are linked at:

- `work/evidence/hpt-log-store-circular-mirror/controller-a/graph-follow-newest-20260726/sd-card-identity.json`
- `work/evidence/hpt-log-store-circular-mirror/controller-b/graph-follow-newest-20260726/sd-card-identity.json`

### Controller A

- Protocol status `6`; CID-valid `1`; representative-sector read status `0`.
- SanDisk/WD, MID `0x03`, OEM/application `SD`, product `SS08G`,
  revision `8.0`, serial `2540634244`, manufacturing date `2024-05`.
- Raw CID:
  `035344535330384780976F0084018559`.
- Identity matches the pre-program baseline.

### Controller B

- Protocol status `6`; CID-valid `1`; representative-sector read status `0`.
- SanDisk/WD, MID `0x03`, OEM/application `SD`, product `SS08G`,
  revision `8.0`, serial `2540634245`, manufacturing date `2024-05`.
- Raw CID:
  `035344535330384780976F0085018507`.
- Identity and abnormal `86 / 86 / 1` lane starts match the pre-program
  baseline.

CID is identity evidence, not proof of authenticity.

## Final operator-ready state

Both controls were reopened on Graph at 12-hour zoom after qualification:

- A: Graph active, follow true, publication/render `34/34`, newest and
  viewport high `301833060`, edge lag `0`.
- B: Graph active, follow true, publication/render `58/58`, newest and
  viewport high `301833060`, edge lag `0`.

The recorded cache-load times are `2.68 s` on A and `2.60 s` on B. The screens
will retain their normal five-minute inactivity timeout if no operator input
occurs.
