Repository navigation
Conversation
A Bot whose outbound message is held for the owner's approval looked idle
to a coordinator. list_bots now tags it with the number of its pending
held sends ("Writer (Write, 1 to approve)"), a count only — never the
held message's text — and the tag clears once the owner decides.
Fixes #587
Co-authored-by: rahul05ranjan <11793455+rahul05ranjan@users.noreply.github.com>
Collaborator
Author
|
Closing this as a duplicate.
Nothing from this branch is lost — it is the same seven files, and the review record for |
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.
Reproduce
At
maind5fefe01, a Bot whose outbound message is held for the owner's approval is indistinguishable from an idle one:core/src/host/tools.jsbuildslist_botstags from role / model / workDir / Main Bot / you, andstate.flybot.approvals(where the pending holds live) is never read. Solist_botsanswers- Writer (Write)for a Bot that is actually blocked waiting on the owner — the case #587 describes, and the one a coordinator needs to see.Takeover
This is the rebased successor of #646 (author
rahul05ranjan, forkrahul05ranjan/FlyBot, head0f9b144f). That branch cannot be merged any more: its base isfe79de66, main is far past it, GitHub reportsdirty, and the author's last push has no check run at all, so the queue cannot evaluate it. The fork is read-only for us (permissions.push: false), so the fix is carried over here instead of asking the author to resolve conflicts; if they push their own rebase first, that supersedes this one.What is not copied verbatim, and why: #646's branch predates several main changes, so its copies of
tools.js,flybot.test.jsand both docs files would have reverted them (create_bot's "starts no turn until the user writes to it" wording from #645/#699, the#712bot.createdannouncements and theemptyTeamharness helper, and large parts ofcore-host.md/plugin-runtime.md). Only the author's own change is carried over, re-applied to currentmain:core/src/host/tools.js: theheldSendscount built fromstate.flybot.approvals(pending entries with a stringrequest.from) and the${count} to approvetag placed after the model tag — the author's code, unchanged.core/test/flybot.test.js: the author's#587case, unchanged, placed next to the existing hold test.docs/subsystems/core-host.md: the author'slist_botsbullet, added after the approvals paragraph.docs/subsystems/plugin-runtime.md: the author's one-sentence addition in item 6 (held sends visible to coordination).changelog.d/587-list-bots-approval-tag.fixed.md: the author's fragment.patches/ds-bot/0002-flybot-api-host.patchandfiles/test/flybot.test.js: regenerated withnode scripts/ds-bot-patches.mjs generate;checkexits 0.Commit carries the author's intent and
Co-authored-by: rahul05ranjan.What changed
list_botsnow appendsN to approveto a Bot's tags while that Bot hasNpending held sends, so a coordinator sees- Writer (Write, 1 to approve). It is a count only: no held text, no state of its own, and the tag disappears as soon as the owner decides. Nothing else changes — the tag order is role, model, approval count, workDir, Main Bot, you.What I ran
At the tip
8fd25e65, on this box (Node 22.23.3,DSH_HARNESS=/opt/flybot):The three failures are identical on both runs —
empty diff passes,test/composer-label.test.js,test/read-page.test.js— so this change adds one test and one pass and changes no existing outcome. (empty diff passesneeds agitworktree this container does not provide; the other two are the documented environment-limited files.)Red without the source change
core/src/host/tools.jsreverted tomain(git checkout -- core/src/host/tools.js), the new test left in place:The red is exactly the new case, so it is pinned to the
heldSendstag and not to the fixture: with the tag restored the file is 42/42. The test also asserts the two halves that matter — the sender's line stays undelivered while held (received('c')is empty), and afterfb.approvals.decide(..., 'approve')the message arrives and the tag is gone.Not run
npm run verifyas one command (this box has no harness checkout for the plugin/interop suites); the core suite and the four gates above are run one by one, and CI'spackage,TestandMerge gatere-run the rest on the tip.Risk
T2 by path (
core/src/host/**). Read-only addition to one tool's output: it readsstate.flybot.approvalsthat the host already keeps, writes nothing, adds no state, and touches no send path — a held message still waits exactly as before. The tag is a count, so no held text can leak into a roster a coordinator reads. The only visible change is the roster line for a Bot that is already blocked, and it clears on the decision.core/andpatches/ds-bot/move together, so the package gate stays green.Fixes #587
Supersedes #646
Tip SHA: 8fd25e6