Repository navigation
Close stale question cards and let a Main Bot void one - #1
neotechnet wants to merge 3 commits into
Conversation
A question card was cleared only when the user answered it. A Bot that moved on in a later turn left the card on screen, and nobody but the user could remove it. A completed turn that asked nothing now closes the card the turn opened on, so a turn that asks keeps its own card. A failed or stopped turn says nothing about the card and leaves it, as does the handoff turn of a fresh part, which carries it over. void_question lets a Main Bot withdraw another Bot's card; the Bot is told in a new turn. A click on a closed card takes the existing bot/stale refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e62783b98b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ### Changed | ||
|
|
||
| - A question card closes when its Bot finishes a later turn that asks nothing, so a stale card no longer stays on screen until you answer it. A click on a closed card is refused. |
There was a problem hiding this comment.
Move the changelog entries into the PR's Changelog field
This commit edits CHANGELOG.md directly, contrary to the explicit workflow rule in AGENTS.md. Revert these additions and provide the user-visible change in the pull request's Changelog field instead.
AGENTS.md reference: AGENTS.md:L51-L51
Useful? React with 👍 / 👎.
Steve's decision: a completed turn clears the card it opened only when that turn was user-facing. A hidden Bot-to-Bot turn shows the user nothing, so clearing there could remove a question before it was ever read. Hidden means what the rest of the plugin means by it: the turn is recorded in exchangeTurns, the same test ask_user and the live feed use. A request a Bot sends with reply_to "user" stays visible, so that turn still clears the card. The Bot prompt, README and changelog now say the same thing. Voiding, the refusal of a late answer, a turn that asks keeping only its own card, and a failed or stopped turn clearing nothing are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Job
Job 2 of the bot team hardening packet: question lifecycle, so stale cards can be cleared.
Why this PR is on the DS-Bot fork
The packet was written for
deepseek-harness, but the code is not there.state.questions,ask_userand the card answer route exist only in theds-botplugin (ds-bot/src/host/), so this is the only repo the fix can live in. Base isneotechnet/DS-Botmainatf823773, which is 0.2.4, the version installed.Cause
Proven live on 2026-10-31:
state.questions[<session>]was deleted only by a user message or by the card's own answer or dismiss route. A later Bot turn left it in place, and no tool could remove it. Eight open cards were in the bot store when this was written.What changed
turns.js: a turn notes the card it opened on, and a completed turn the user could see that left that same card standing deletes it. A turn that asked has a different card id, so it keeps its own.tools.js: newvoid_question, Main Bot only. It removes the card and tells the Bot in a new turn, under a newvoidedrole with a[Question voided by <name>]header (delivery.js). If telling the Bot fails, the card is still gone and the Main Bot is told to pass it on.answer-questionalready refuses a closed card withbot/stale. No new refusal was needed; two new tests pin it.privacy.js:void_questioncannot reach a private Bot.prompt.js: Bots are told a card lasts only until their next finished turn the user can see, and Main Bots are told about the tool.constants.js,install.test.js: the tool list.Steve's decision on hidden turns (commit b130e29)
The first version of this PR cleared the card on any completed turn that asked nothing, and flagged that as the one behaviour to review. Steve reviewed it and decided: a completed turn clears the card it opened only when that turn was user-facing. A hidden Bot-to-Bot turn must not clear a card waiting on the user, because the question can then vanish before Steve ever reads it.
"Hidden" uses the plugin's existing test, not a new one: the turn is recorded in
state.exchangeTurns, which is whatask_userand the live feed already check. So a request a Bot sends withreply_to: "user"is user-facing and still clears the card, and a[Reply from ...]turn, which is not recorded there, still clears it too.Unchanged by this commit:
void_questionand an explicit void clearing the card, a late answer to a closed card being refused, a turn that asks keeping only its own card, and a failed or stopped turn clearing nothing.What deliberately keeps a card
Scope
ds-bot/src/host/{constants,delivery,privacy,prompt,tools,turns}.js,ds-bot/test/{install,question-lifecycle}.test.js,ds-bot/README.md,CHANGELOG.md. No client code, no build output.Test output for the hidden turn change
Three new cases. The first is the one that bites. The other two pass on both sides by design: they guard against the fix going too far, one proving a held card still closes at the next visible turn, the other that a Bot-started turn the user can see still clears it.
Command, the same before and after, run against the built harness tree at
C:\d215:Before the fix, source at
e62783bwith only the new tests added:After the fix:
Full suite after this commit (
test/*.test.js,C:\d215): 1288 tests, 1283 pass, 3 fail, 2 skipped.at-menu,show-view-scopeandstylesfail at load withERR_MODULE_NOT_FOUND: the harness tree on this machine does not expose@deepseek-ai/dsh-session-reference,@deepseek-ai/dsh-scopeor@deepseek-ai/dsh-client-modules/clientto the resolver. This branch changes none of those three test files and no client code.Test output for the original change
Recorded against
C:\d216when the PR was opened.Before the change:
After the change: 12 tests, 12 pass, 0 fail.
npm run lintwas run on the original change and exited 0 with warnings only, none in files this PR changes. It was not rerun for b130e29. No CI ran: this fork has no registered workflows, sotest.ymldid not run, and the results above are from this Windows machine only.Not done here
Not installed. This does not reach the running app until the change is carried into the profile's
patches/ds-bot@0.2.4.patchor a release of the plugin, and the app restarts. No live bot state was written.Not merged.
🤖 Generated with Claude Code