fix(supervisor): the press gate caches only what has no live owner (#338) - #339
Merged
Conversation
) 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #338.
The Talk Key press gate consulted
capture_enabled, published once per ~3 s Supervisor tick asconfigured 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, soRouter.available()stays true across an Utterance (which also retires defect 3). The staleness probe states its drained term explicitly.supervisor.Factslosesbackend_available; the capture-enable action reduces to the Configuration Phase'sconfiguredand is renamedcapture_configured. Pause is read live at the tap, as it already was.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
configuredexactly, 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 plainzig buildpass.🤖 Generated with Claude Code