Repository navigation
docs: opencode reports waiting for any prompt, not one event - #223
Merged
Merged
Conversation
The opencode column of the state table named `permission.asked`, which was the whole client until a session asking an interactive question was found waiting behind a card that showed a spinner: a question rides an event of its own, and enumerating names is how it went unreported. The plugin (v0.9.1) now matches any type ending in `.asked` — four spellings today, and the catalogue is not exhaustive enough to enumerate against: a real run emits types the 94 event schemas opencode publishes do not list. The contract is canonical here, so the rule is written here. Nothing about the contract itself moves: `waiting` is an existing state, the payload is unchanged, and the fixtures are untouched. Per the versioning rule in README.md this is a change *within* a contract — a plugin-only release, which is why lich needs no code change. Also records a ceiling the audit turned up. Two `waiting` reports for one prompt are two toasts and two desktop notifications: the toast reads the raw event on purpose, and decideStatusNotice weighs `previous` for `done` but never for `waiting`. Harmless while a harness raises one event per prompt, which they all do — but it names where a duplicate has to be dropped, which is the client, not here.
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.
The opencode column of the state table named
permission.asked— which was the whole client, until an opencode session asking an interactive question turned up waiting behind a card that showed a spinner. A question rides an event of its own (question.asked), and enumerating names is how it went unreported.lich-plugin#14 fixed the client (shipped in v0.9.1); this writes the rule where the contract is canonical.
Why a rule instead of two names
opencode asks in four spellings today —
permission.asked,question.asked, and a.v2.variant of each — and its catalogue is not exhaustive enough to enumerate against: a realopencode serve1.18.16 run emitsserver.heartbeat, which appears in none of the 94 event schemas its own/docpublishes.Measured on that run, and why the answer needs no event of its own:
No contract change
waitingis an existing state, the payload is unchanged,fixtures/is untouched — so per the versioning rule inREADME.mdthis is a change within a contract: plugin-only release, no lich code. That is also why the plugin release could land first without breaking the lockstep the rule reserves for changes to a contract.One ceiling the audit turned up
Two
waitingreports for one prompt are two toasts and two desktop notifications. The toast reads the raw event deliberately (projects.tsx— a repeat state is no change to the store, which would swallow the second one), anddecideStatusNotice(session-events.ts:346) weighspreviousfordonebut never forwaiting.Nothing raises it today — every harness sends one event per prompt — but the suffix rule makes a duplicate cheaper to hit than a named list did, so the ceiling names where it has to be dropped: the client, not here. No behaviour change in this PR.
Gate
gofmt -lclean ·go vet ./...clean ·go test ./...green (30 packages). Docs-only, no frontend file touched.