refactor(engine): ambiguity burn-down batch 4 — ZERO ambiguities, gate enforced #149

Merged
funman300 merged 1 commits from refactor/ambiguity-tail into master 2026-07-07 04:14:00 +00:00
Owner

Final #143 batch: the last 47 pairs → 0. The ratchet is now a hard gate (assert_eq!(count, 0)).

Highlights:

  • Deterministic keyboard consumption: restore prompt → HUD buttons/popovers (now one HudButtons chain) → FocusKeys → settings toggle. Previously Esc handling order was whatever the scheduler picked.
  • Logic-before-paint: check_no_moves + new AutoComplete set ordered before BoardVisuals.
  • HUD text updaters chained; HudVisibility write→apply→layout-read fixed order; new UndoRequestWriters/InfoToastWriters/MarkerVisuals sets; remaining cross-domain disjointness declared explicitly.

302 → 0 in four batches (PRs #146, #147, #148, this). Every future system with conflicting access must declare ordering or disjointness to pass CI.

Gates: schedule gate green at 0, clippy --all-targets -D warnings clean, full workspace suite green.

Closes #143

🤖 Generated with Claude Code

Final #143 batch: the last 47 pairs → **0**. The ratchet is now a hard gate (`assert_eq!(count, 0)`). Highlights: - **Deterministic keyboard consumption**: restore prompt → HUD buttons/popovers (now one `HudButtons` chain) → `FocusKeys` → settings toggle. Previously Esc handling order was whatever the scheduler picked. - **Logic-before-paint**: `check_no_moves` + new `AutoComplete` set ordered before `BoardVisuals`. - HUD text updaters chained; `HudVisibility` write→apply→layout-read fixed order; new `UndoRequestWriters`/`InfoToastWriters`/`MarkerVisuals` sets; remaining cross-domain disjointness declared explicitly. **302 → 0 in four batches** (PRs #146, #147, #148, this). Every future system with conflicting access must declare ordering or disjointness to pass CI. Gates: schedule gate green at 0, clippy `--all-targets -D warnings` clean, full workspace suite green. Closes #143 🤖 Generated with [Claude Code](https://claude.com/claude-code)
funman300 added 1 commit 2026-07-07 04:13:59 +00:00
Clears the final 47 pairs and turns the ratchet into a hard gate
(AMBIGUITY_BASELINE = 0, assert_eq):

- HudButtons: the 14 HUD button/popover handlers run as one chain,
  before ui_focus::FocusKeys — Esc/keyboard consumption order is now
  defined (restore prompt → buttons/popovers → focus navigation →
  settings toggle) instead of scheduler-dependent.
- HUD text updaters (update_hud, update_selection_hud,
  update_won_previously) chained, in UiTextFx, after the new
  AutoComplete set (update_hud reads AutoCompleteState).
- restore_hud_on_modal → apply_hud_visibility chained before
  UpdateOnResize: HudVisibility writes, application, and the layout
  read happen in a fixed order.
- New writer sets UndoRequestWriters / InfoToastWriters (same
  self-ambiguous pattern as NewGameRequestWriters).
- Logic-before-paint: check_no_moves and the AutoComplete chain order
  before BoardVisuals; SettingsMutation after UpdateOnResize.
- MarkerVisuals set wraps the table painter chain; chrome fx declare
  disjointness from it.
- update_hud_typography after BoardVisuals; avatar/settings-toggle
  interaction handlers declared disjoint from HudButtons.

302 → 198 → 171 → 47 → 0 in four batches, one day. New systems now
fail CI unless they declare their ordering or their disjointness.

Closes #143

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
funman300 merged commit a6b22df666 into master 2026-07-07 04:14:00 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#149