Skip to content

fix(supervisor): the press gate caches only what has no live owner (#338) - #339

Merged
dbgeek merged 1 commit into
mainfrom
claude/gh-issue-338-d68323
Jul 29, 2026
Merged

fix(supervisor): the press gate caches only what has no live owner (#338)#339
dbgeek merged 1 commit into
mainfrom
claude/gh-issue-338-d68323

Conversation

@dbgeek

@dbgeek dbgeek commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Closes #338.

The Talk Key press gate consulted capture_enabled, published once per ~3 s Supervisor tick as configured AND backend_available AND !paused — and the last two terms have live owners that move them between ticks, so the gate went silently stale: the Talk Key stayed dead for up to 3 s after every tick-straddling Utterance and after every un-pause, and the status line read reconnecting through every ordinary dictation.

Each term of the gate is now read from the owner that can act on it (ADR-0013):

  • Selection.isReady() is warmth only — the lease term is gone, so Router.available() stays true across an Utterance (which also retires defect 3). The staleness probe states its drained term explicitly.
  • supervisor.Facts loses backend_available; the capture-enable action reduces to the Configuration Phase's configured and is renamed capture_configured. Pause is read live at the tap, as it already was.
  • Backend readiness is not consulted by the gate at all: the Utterance Coordinator's lease acquisition owns that refusal — it logs and fires the error cue where the gate's stale copy silently pre-empted it. menuSelectBackend's hand-sync store of the gate is deleted with the pattern.

New tests pin the regression (availability under a live lease — verified red before the fix) and the staleness probe's drained-route requirement; the Supervisor truth-table test is rewritten to configured exactly, unmoved by the pause flag.

Lands ADR-0013 (byte-identical to the issue's text) and the CONTEXT.md Capture-Enable Gate entry plus the Supervisor / Utterance Coordinator updates in the same change, per the issue's deliverables.

Both zig build test (669 tests) and plain zig build pass.

🤖 Generated with Claude Code

)

The Talk Key press gate consulted capture_enabled, published once per
~3 s Supervisor tick as configured AND backend_available AND !paused —
and the last two terms have live owners that move them between ticks,
so the gate went silently stale: the Talk Key stayed dead for up to 3 s
after every tick-straddling Utterance and after every un-pause, and the
status line read reconnecting through every ordinary dictation.

Each term is now read from the owner that can act on it (ADR-0013):

- Selection.isReady() is warmth only — the lease term is gone, so
  Router.available() stays true across an Utterance (also the defect-3
  fix). The staleness probe states its drained term explicitly.
- supervisor.Facts loses backend_available; the capture-enable action
  reduces to the Configuration Phase's configured and is renamed
  capture_configured. Pause is read live at the tap, as it already was.
- The Coordinator's lease acquisition is the sole owner of the
  backend-not-ready refusal — it logs and fires the error cue where the
  gate's stale copy silently pre-empted it. menuSelectBackend's
  hand-sync store of the gate is deleted with the pattern.

Lands ADR-0013 and the CONTEXT.md Capture-Enable Gate entry in the same
change, per the issue.
@dbgeek
dbgeek enabled auto-merge (squash) July 29, 2026 19:25
@dbgeek
dbgeek merged commit 6dffb18 into main Jul 29, 2026
2 checks passed
@dbgeek
dbgeek deleted the claude/gh-issue-338-d68323 branch July 29, 2026 19:29
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.

The Talk Key goes dead for up to 3 s after an Utterance, and after every un-pause: the press gate caches facts that have live owners

1 participant