mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 10:58:10 +00:00
* fix(opencode2): only treat the question tool's form as a pane blocker OpenCode 2 has one form primitive and several producers, and Orca's setup bridge mapped every `form.created` to `question.asked` — the un-evictable "the pane owner must answer this" blocker. Against opencode v2.0.12 only `metadata.kind === "question"` is the agent's question tool; `websearch.provider` is a provider picker and `mcp-elicitation` is an MCP server prompt raised on sessionID "global", which is not a session and so can never be retired by that session going idle. Admit only the question kind, remember the admitted form ids, and drop `form.replied`/`form.cancelled` for forms that were never admitted so an ignored form's resolution cannot retire a live blocker. Evidence (live v2.0.12 capture, real TUI in a PTY against `opencode serve`) in docs/bug-reproductions/opencode2-form-created-kinds. That capture also shows the reported Subagents/Shell/Terminals dock and the agent picker emit no server event at all, so they were never the `form.created` source. Refs #22371 * refactor(opencode2): drop the unreachable form-resolution guard Review was right that the admitted-form-id set defended against nothing. `clearAttentionForResolution` builds the exact key [factoryID, "AskUserQuestion", form.id, sourceSessionID] and returns null on a miss, with no session-wide fallback, and form ids are unique — so a resolution for a form Orca ignored already matches no live blocker. The guard's comment claimed a collision the key structure rules out, which is worse than no comment. Removes the set, its FIFO eviction helper, and the claim; the kind check on form.created is the whole fix. The end-to-end test stays: it pins the behavior that an MCP form raised and cancelled leaves a live question blocker standing, which is the property worth holding regardless of how it is achieved.
44 lines
1.0 KiB
JSON
44 lines
1.0 KiB
JSON
{
|
|
"id": "evt_0cc7238ae002BOODuEn2h3Ro0N",
|
|
"created": 1790136432814,
|
|
"type": "form.created",
|
|
"location": {
|
|
"directory": "/private/tmp/oc2-evidence"
|
|
},
|
|
"data": {
|
|
"form": {
|
|
"id": "frm_0cc7238ae001iZeN97tf8v3xTs",
|
|
"sessionID": "ses_f33905de7ffeBFKvVC2HupLfJq",
|
|
"title": "Questions",
|
|
"metadata": {
|
|
"kind": "question",
|
|
"tool": {
|
|
"messageID": "msg_0cc723557001aL7j9XWmdbIFh1",
|
|
"id": "tool_1611fbde530a4443b5f11c67a4cd3d91"
|
|
}
|
|
},
|
|
"fields": [
|
|
{
|
|
"key": "q0",
|
|
"title": "Color Preference",
|
|
"description": "Which color do you prefer, red or blue?",
|
|
"type": "string",
|
|
"options": [
|
|
{
|
|
"value": "Red",
|
|
"label": "Red",
|
|
"description": "The color red"
|
|
},
|
|
{
|
|
"value": "Blue",
|
|
"label": "Blue",
|
|
"description": "The color blue"
|
|
}
|
|
],
|
|
"custom": true
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|