Skip to content

The first Chief and duplicated Bots are created without bot.created, so plugins miss them #715

Closed as not planned

Description

@Birfy

Summary

core/src/host/hooks.js announces every new Bot with bot.created by wrapping rt.createBot. Two callers bypass that wrapper by using the module-local createBot, so no event fires:

  • bootstrap() creates the first Main Bot (Chief) on the first state request. @flybot/tree adopts Chief only through that event or through its startup timers (0/1/5/15 s). If the server had been running before the first client opened, those timers are long gone and Chief stays outside the tree — no create_team, no create_child_bot, no find_bots, no root — until a restart.
  • duplicateBot() copies a Bot with no event, so the copy stays "outside the tree" until a restart or another Bot creation.

Reproduce

  1. Start the server, then open the client so bootstrap() creates Chief (or duplicate any Bot from the roster).
  2. Ask the tree for its root: Chief (or the copy) is not a member; tree tools answer … is not available to this Bot.

Expected

Both paths create through rt.createBot, the announced path, so bot.created fires and the tree adopts them the same way it adopts a Bot created by a tool.

Acceptance

  • Two cases in core/test/flybot.test.js: onboarding on an empty home announces Chief, and duplicateBot() announces the copy — both observed through the hooks subscription, not by inspecting state.
  • Reverting either call to the module-local createBot makes its case red; the core suite gains no other failures.
  • No other behaviour changes: ids, fields and the returned shapes stay as they are.

Tier: core/src/host/hooks.js → T2.

Implemented by PR #712 (fix/announce-bootstrap-duplicate, tip bf55559f, 6 files +82/−9).

Activity

  1. self-assigned this
    on Oct 22, 2026
  2. added
    bugSomething isn't working
    agent-prPull request opened by an agent
    area:automationScheduled tasks and automation
    on Oct 22, 2026
  3. Birfy commented on Oct 22, 2026

    @Birfy
    CollaboratorAuthor

    Owner: Dev3 — branch fix/announce-bootstrap-duplicate, head 1cd5ccc2, pushed from HugoXK/FlyBot.

    Metadata brought onto the flow (nothing in the diff was touched):

    State at 1cd5ccc2 (base f111399b): 9/9 checks green, including ubuntu-latest · Node 24 · DSH 0.2.0-rc.2, tests-ok, merge-gate and package; mergeable: clean.

    Read-only limit, so nobody waits on me for it: this Bot has push: false on HugoXK/FlyBot (checked via GET /repos/HugoXK/FlyBot → permissions.push false), and the base repo cannot receive commits for this head. Any change to the diff therefore has to come from the author's machine; I own the tracking, the six-column evidence check and the merge watch, not the tip.
    The tip itself needs no change for the gates: arch-docs: OK (7 changed file(s)) and eslint reports 43 warnings and 0 errors, with zero no-control-regex reports in the job log.

  4. Birfy commented on Oct 22, 2026

    @Birfy
    CollaboratorAuthor

    Tracked in the owner's pull request #712.

    Filed from a mis-read dispatch: #712 is the owner's own branch (HugoXK/FlyBot), not a Bot that skipped the issue step, so no Bot triage flow applies to it. Closing as not_planned; agent-pr is removed from the issue and stays on the pull request where it belongs.

    Written-by: Triage

  5. removed
    agent-prPull request opened by an agent
    on Oct 22, 2026
  6. removed their assignment
    on Oct 22, 2026
  7. added a commit that references this issue on Oct 22, 2026
    82fbf6f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:automationScheduled tasks and automationbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions