fix(opencode): track whether the session-URL notice is still pending before steering feedback (#1536)
#1518 made the OpenCode 2 client post the session-URL notice as a "steer" and, while a notice had been posted, admit the reviewer's feedback as a "steer" too, so the two share one promotion (#1515). The flag behind that, `noticePending`, meant "we posted a notice during this review" rather than "our notice is still an un-promoted inbox row", and nothing ever observed promotion. The two diverge as soon as anything else wakes the session: a user typing an unrelated message promotes every pending steer as one batch (`SessionInbox.promote`), our notice included, and starts a turn. Feedback arriving minutes later was still admitted as a steer, landing in the middle of that unrelated turn — exactly the late-arrival case `FEEDBACK_DELIVERY = "queue"` exists to prevent. `createNoticePendingTracker` now answers the question from the host itself. It subscribes to `ctx.event.subscribe()` before the notice is posted and clears the flag when the host reports that row settled, speaking both live vocabularies: `session.inbox.delivered` / `session.inbox.cancelled` with `data.inboxID` (v2.0.x and dev) and the pre-rename `session.input.promoted` with `data.inputID` (the `0.0.0-next-*` host this package pins). The row id comes from `session.synthetic`'s own response. A host that reports no id, exposes no event domain, or whose stream never delivers degrades to exactly the previous behavior. The client gains `dispose()`, called in a `finally` by both call sites, so a review that ends without delivering a prompt does not leave an event subscription open on the host. A notice stranded by a review closed without feedback is unchanged: the plugin session domain exposes no way to withdraw a pending row.
M
Michael Ramos committed
02ce55f004720b5885c1ea40fb70391bea873234
Parent: bfb3a55
Committed by GitHub <noreply@github.com>
on 9/15/2026, 10:16:54 AM