Skip to content

[rehearsal] feat: touchless display build for screen+button boards (display-keys) - #2

Open
IsayIsee wants to merge 17 commits into
mainfrom
pr/board-display-keys
Open

IsayIsee wants to merge 17 commits into
mainfrom
pr/board-display-keys

Conversation

@IsayIsee

@IsayIsee IsayIsee commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Fork-internal CI rehearsal for TheMaxMur#123. Head and base are as in the
first rehearsal — base main equals upstream/main, so the checks below are
the upstream PR's.

Do not merge. main here must stay equal to upstream/main.

Since the red CI (11 platform_gate findings, hidden behind the bcd row):

  • display and display-keys stole the same CS/DC/RST pads with the same five
    tokens, so site_keys() fell back to a positional ~2. The four steals now
    go through one panel_pad helper — one site, one name.
  • assurance/platform.toml: PLAT-UNSAFE-004 gains the ninth cover and states
    the helper; PLAT-UNSAFE-013 registers the keygen screen's shared-panel
    pointer (display_keys.rs), pending, refining PLAT-TOOLCHAIN-002.
  • docs/unsafe.md: Runtime sites 22 -> 24, pad row ×9 / ### 5-13, keygen
    handle ### 14, later sections renumbered.
  • device_release 0x09DB -> 0x09DC with its CHANGELOG entry (refactor, no
    behaviour change).
  • formal/citations.lock, assurance/board/PLAT-TIMER-00{2,3}.toml,
    scripts/token_refinement_gate.py: the line numbers the helper and the bump
    moved; the lock's nine entries are relocations of unchanged text.

Since the second red CI — the check job and
flavors (board-waveshare-geek, --features display-keys, BOARD=waveshare-geek)
both failed — the helper's declared return type was the defect: AnyPin::steal
hands back Peri<'static, AnyPin>, and erasing that to AnyPin left
Output::new without the token it asks for. The display build passes the same
expression inline, where nothing erases it, which is why only the display-keys
flavor broke. Fixed, and device_release 0x09DC -> 0x09DD: a line that can
reach the image owes the bump, behaviour change or not.

dependabot Bot and others added 2 commits September 25, 2026 21:06
Bumps the actions group with 2 updates: [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action).


Updates `github/codeql-action/init` from 4.38.0 to 4.38.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@b96794f...1c5b675)

Updates `github/codeql-action/analyze` from 4.38.0 to 4.38.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@b96794f...1c5b675)

---
updated-dependencies:
- dependency-name: github/codeql-action/init
  dependency-version: 4.38.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.38.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
…ions/actions-c83b7ed659

ci: bump the actions group with 2 updates
@IsayIsee
IsayIsee marked this pull request as ready for review September 28, 2026 03:58
dependabot Bot and others added 4 commits October 2, 2026 21:06
Bumps the actions group with 2 updates: [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action).


Updates `github/codeql-action/init` from 4.38.1 to 4.38.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@1c5b675...2892aa5)

Updates `github/codeql-action/analyze` from 4.38.1 to 4.38.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@1c5b675...2892aa5)

---
updated-dependencies:
- dependency-name: github/codeql-action/init
  dependency-version: 4.38.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.38.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps the python group in /tools with 1 update: [cryptography](https://github.com/pyca/cryptography).


Updates `cryptography` from 50.0.1 to 50.0.2
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](pyca/cryptography@50.0.1...50.0.2)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 50.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python
...

Signed-off-by: dependabot[bot] <support@github.com>
…ython-cddbe02dfc

deps: bump cryptography from 50.0.1 to 50.0.2 in /tools in the python group
IsayIsee added a commit that referenced this pull request Oct 14, 2026
cargo fmt on the status_tests wrap rustfmt wanted; the bundle gate's
test fixtures re-derive with the transcribed line (39 build
configurations / 1599 cells / 112 out-of-scope / 1303 gap).
dependabot Bot and others added 11 commits October 16, 2026 21:07
Bumps the actions group with 3 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action).


Updates `actions/upload-artifact` from 7.0.1 to 7.0.2
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@043fb46...cf430e0)

Updates `github/codeql-action/init` from 4.38.2 to 4.38.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@2892aa5...24c5418)

Updates `github/codeql-action/analyze` from 4.38.2 to 4.38.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@2892aa5...24c5418)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: github/codeql-action/init
  dependency-version: 4.38.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.38.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
…ions/actions-5b90254856

ci: Bump the actions group with 3 updates
Waveshare RP2350-GEEK is the first target: a 1.14" 240x135 ST7789V2 panel
over the shared PIO transport, driven by one physical button. The screen shows
the ambient status, a trusted one-key confirm page naming the pending
operation, and approve/decline feedback; a short press approves, a hold past
0.8 s declines. No touch pad means no on-device PIN entry, so `uv` stays
unadvertised and the CCID pinpad stays off — PINs are host-side, as on a
button-only key.

`display-keys` is a cargo feature parallel to `display` (the two are
`compile_error!`-exclusive) and shares only `display_panel`; `rsk-display`,
`rsk-bip39`, `rsk-slip39` and the touch flow are not pulled in. The arbitration
the new build waits on is host-tested: `rsk_device::presence::GestureWait`
carries the same `spent` latch and scoped cancel as `ButtonWait`, with unit
tests and Kani proofs beside it — which is what moves the
`BugNoDropStaleCancelAtEntry` comutant's anchor onto the `wait` signature, the
two entry preambles now being identical.

The partial glass needs board keys: `display.madctl_scan`, `display.win_x` and
`display.win_y` (all default 0, so every existing board is unchanged) plus the
full ST7789V2 init register set and a GRAM blank before display-on, without
which the 240x135 frame lands on the controller's larger GRAM and is clipped.
The GEEK board file and the `firmware-display-keys` nix package (with the
`-strong-pin` / `-always-uv` posture variants the default board has) join the
release matrix, fourteen flavors become seventeen; `bcdDevice` moves to 0x09DB.

The assurance matrix gains the four new columns as `gap` cells with settling
questions, the pages the new code moved are regenerated, and the citations are
re-locked.
`display_keys.rs`: the nested `if let` collapses into a let-chain, and the two
divisibility tests (`% 2 == 0`, `% 3 == 0`) become `is_multiple_of`. These are
what the gate's clippy reports; no other file changes.
`docs/releases.md`'s `display-keys` row sends a reader to
`guides/display.md`, and the guide had nothing to say about the touchless
build: the one-key flow lived only in the README and the CHANGELOG.

- `guides/display.md`: a "The touchless variant" section — ambient status,
  the confirm page naming the pending operation, a short press against the
  ~0.8 s hold, PINs host-side — with the See-also line naming both features.
- `hardware.md`: the board beside the touch one, photo and label.
- `build.md`: the feature's own row and `waveshare-geek` in the `BOARD`
  list, which is what the See-also line now points at.

The `display-keys` matrix row also stops advertising the no-host idle menu,
which this PR does not build; the menu PR restores the mention (TheMaxMur#126).

Docs only: no `bcdDevice` move, no wire surface.
`display` and `display-keys` both steal the same CS/DC/RST pads, and both
wrote the steal as the same five tokens, so `site_keys()` had no word
sequence to name them apart and fell back to a positional `~2` — a key the
registry cannot cite. `display-keys` now takes its four control pads through
one `panel_pad` helper, which is one site.

The helper is a refactor of shipped code, so `device_release` moves to
0x09DC with a CHANGELOG entry that says so. What it moves besides is the
audit surface:

- `assurance/platform.toml`: PLAT-UNSAFE-004 states the helper and counts
  the one site as its ninth cover; PLAT-UNSAFE-013 registers the keygen
  screen's shared-panel pointer in `display_keys.rs`, `pending`, refining
  PLAT-TOOLCHAIN-002.
- `docs/unsafe.md`: Runtime sites 22 -> 24, the pad row is `×9` and `### 5-13`,
  and the keygen handle becomes `### 14` with the sections after it
  renumbered.
- `formal/citations.lock` and `assurance/board/PLAT-TIMER-00{2,3}.toml`: the
  line numbers the helper and the bump moved; the lock's nine entries are
  relocations of unchanged text.
- `docs/platform-assumptions.md` regenerated from the registry.
`docs/platform-assumptions.md` is written from the rows in
`assurance/platform.toml`, and the LED-task row still carried the numbers from
before the citation pass: `firmware/src/main.rs:1071/1009/1017` where the
registry, and the file itself, say 1072/1010/1018. The page was generated
before that relocation, so the region generated from the registry went stale
by three numbers — the bcd comment above the spawns is the one line that moved
them.

`scripts/platform_gate.py --write`, one line. The registry and the tree agreed
already; only the copy generated from them did not.
`AnyPin::steal` hands back `Peri<'static, AnyPin>`, so a helper declared
`-> AnyPin` erased the token `Output::new` needs. Only the `display-keys`
flavor compiles through the helper — the `display` build passes the same
expression inline, where nothing erases it.
… build

`AnyPin::steal` hands back `Peri<'static, AnyPin>`, so a helper declared
`-> AnyPin` erased the token `Output::new` needs. Only the `display-keys`
flavor compiles through the helper — the `display` build passes the same
expression inline, where nothing erases it. A line that can reach the image
owes the bump, so `bcdDevice` moves to 0x09DD.
The `display-keys` packages and the `waveshare-geek` board took the matrix
from 31 configurations to 35 and its 1240 cells to 1400 (37 covered, 143
equivalent, 109 out-of-scope, 1111 gap). The eleven slices kept the old
line, so `bundle_gate` read 88 stale transcriptions and the check job
stopped on its row; the cases pinning the same numbers were stale with it,
and the generated page carried the pre-board input counts.

Gate, tests and docs only: `assurance/`, `scripts/` and `docs/` carry no
line the image is built from, so no `bcdDevice` bump.
The `waveshare-geek` board and its three `display-keys` packages took the
matrix from 19 flake packages to 22 and its boards from 6 to 7, and the
touchless build added a ninth `AnyPin::steal` site, a thirteenth PLAT-UNSAFE
row and a ninth `cargo doc` row. Four pins still held the pre-board counts,
so `pytest (gate scripts)` read three failures — `matrix_gate.FLOOR_PACKAGES`
at 19 against a derivation of 22, `len(steals)` at 8 against 9, and the
`cargo doc` row count at 8 against 9 — and the check job stopped on its row.
The floors sit AT the count by design (upstream's `583e58eb`), and this PR's
own `docs/unsafe.md` already numbers the ninth steal — ×8 → ×9 — so the pins
were stale, not the tree.

The prose carrying the same counts follows them, in the same diff: the
`matrix_gate` docstring and the matrix page's template sentence, that page
regenerated with `--write`; `docs/formal.md`'s sentence naming packages,
features and boards; `check.sh`'s comment on the matrix row; the two test
comments quoting the old figures; and `PLAT-TOOLCHAIN-002`'s statement,
discharge and header comment, which still counted twelve rows over
thirty-one sites with eight of them GPIO steals — its page regenerated with
`--write` as well. `12 against 19` stays where it is: that is the history of
where the floor came from, not a count of this tree.

Gate, tests and docs only: `scripts/`, `docs/` and `assurance/` carry no line
the image is built from, so no `bcdDevice` bump.
@IsayIsee
IsayIsee force-pushed the pr/board-display-keys branch from 3113a77 to f14f242 Compare October 19, 2026 01:10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants