Skip to content

bug(company-os): budget alerts and handoff notices are published to a channel nothing subscribes to, so no one sees them #21080

Closed

Description

@mrveiss

Budget alerts and work-item handoff notices are published, but no user ever receives them.

  • autobot-backend/llc/scheduler/budget_watchdog.py publishes budget.soft_alert and the hard-stop notice, and llc/services/handoff.py publishes work_item.handoff_ready and work_item.handoff. Both publish to llc:notifications:{company_id}.
  • The Company OS notification router (llc/notifications/router.py, _PATTERNS) subscribes only to llc:company|budget|approval|sprint|agent:*. Nothing subscribes to llc:notifications:*.
  • The payloads carry no company_id, which _dispatch requires. They would be dropped even if the router subscribed.

Found while designing #21045. Related: #20885 (per-user addressing).

Acceptance criteria

Activity

  1. added
    bugSomething isn't working
    area: company-osWave 4 · cluster A — Company OS & LLC canvas
    phase:M2.3Goals and work hierarchy
    on Nov 7, 2026
  2. added
    needs-structureMissing goal milestone, matching phase label or native parent (#19522)
    on Nov 7, 2026
  3. github-actions commented on Nov 7, 2026

    @github-actions
    Contributor

    needs-structure: this issue is missing:

    • a native parent issue (add one, or write Parent: #N in the body), unless this is an umbrella with sub-issues

    The label clears on the next issue event once all three are present (#19522).

  4. mrveiss commented on Nov 8, 2026

    @mrveiss
    OwnerAuthor

    Code from #21097 landed on main via #21176 (merge train T96b, merge commit 250ddc4). This issue is left open: the PR used Refs, so its remaining acceptance criteria and any host-behaviour evidence (a merge is not host evidence) are not verified here.

  5. mrveiss commented on Nov 21, 2026

    @mrveiss
    OwnerAuthor

    Closure check against origin/main (code evidence, quoted):

    AC Status Evidence
    One router path to company:{id} ✔ ticked autobot-backend/llc/notifications/router.py:38-45 subscribes to llc:notifications:* and llc:budget:*. At router.py:83-87, "on notifications channels the payload's company_id is ignored in favour of the channel's". At router.py:263, LLCEvent(company_id=company_id, ...) is republished. The producers are budget_watchdog.py:235 (llc:notifications:{company_id}) and handoff.py:41. Searching autobot-backend (excluding tests) for llc:notifications and llc:budget: finds no other subscriber. Delivered by #21176 (commits a5d0fba and b05edf2).
    Router test covers each notice ✘ open llc/tests/test_notification_router.py test_notifications_channel_republished_with_channel_company is parametrized over budget.soft_alert, budget.hard_stop, work_item.handoff_ready and work_item.handoff. Two notices the watchdog produces, budget.company_soft_alert (budget_watchdog.py:214) and budget.company_hard_stop (:203), are not covered. The fix is to add both to the parametrize list.
    Frontend map renders each ✔ ticked autobot-frontend/src/composables/useLlcCompanyNotices.ts:84-89 maps all six event types. LlcCompanyLayout.notices.test.ts:163-168 tests all six. Delivered by #21090.

    This stays open until the router test covers the two company-level budget notices.

  6. mrveiss commented on Nov 22, 2026

    @mrveiss
    OwnerAuthor

    AC2 evidence (merged in #21978, 927bf0b, ancestor of main): autobot-backend/llc/tests/test_notification_router.py on main — test_notifications_channel_republished_with_channel_company (L265) is parametrized over budget.soft_alert, budget.hard_stop, budget.company_soft_alert, budget.company_hard_stop, work_item.handoff_ready, work_item.handoff (L257-262), each published on the real notifications channel and asserted republished; a company-level case uses the real watchdog body shape (L326-330). All 3 ACs now ticked.

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: company-osWave 4 · cluster A — Company OS & LLC canvasbackendbugSomething isn't workingneeds-structureMissing goal milestone, matching phase label or native parent (#19522)phase:M2.3Goals and work hierarchy

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions