You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(company-os): budget alerts and handoff notices are published to a channel nothing subscribes to, so no one sees them #21080
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
Budget soft-alert, hard-stop and handoff notices reach the company:{id} live channel through the router, with the company derived from the channel name or carried in the payload. There is one routing path, not a second subscriber.
A router test publishes each of these notices on its real channel and asserts that it is republished.
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.
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.pytest_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.
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.
Activity
github-actions commentedon Nov 7, 2026
needs-structure: this issue is missing:Parent: #Nin the body), unless this is an umbrella with sub-issuesThe label clears on the next issue event once all three are present (#19522).
fix(llc): notifications channel trusts only the channel company, stri…
fix(llc): publish handoff notifications only after the transaction co…
refactor(llc): one after-commit primitive for commit_publish and the …
mrveiss commentedon Nov 8, 2026
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.
fix(llc): route llc:notifications:{company} budget and handoff events…
mrveiss commentedon Nov 21, 2026
Closure check against
origin/main(code evidence, quoted):company:{id}autobot-backend/llc/notifications/router.py:38-45subscribes tollc:notifications:*andllc:budget:*. Atrouter.py:83-87, "on notifications channels the payload's company_id is ignored in favour of the channel's". Atrouter.py:263,LLCEvent(company_id=company_id, ...)is republished. The producers arebudget_watchdog.py:235(llc:notifications:{company_id}) andhandoff.py:41. Searchingautobot-backend(excluding tests) forllc:notificationsandllc:budget:finds no other subscriber. Delivered by #21176 (commits a5d0fba and b05edf2).llc/tests/test_notification_router.pytest_notifications_channel_republished_with_channel_companyis parametrized overbudget.soft_alert,budget.hard_stop,work_item.handoff_readyandwork_item.handoff. Two notices the watchdog produces,budget.company_soft_alert(budget_watchdog.py:214) andbudget.company_hard_stop(:203), are not covered. The fix is to add both to the parametrize list.autobot-frontend/src/composables/useLlcCompanyNotices.ts:84-89maps all six event types.LlcCompanyLayout.notices.test.ts:163-168tests all six. Delivered by #21090.This stays open until the router test covers the two company-level budget notices.
test(company-os): publish company notices with the watchdog's real pa…
Merge pull request #21978 from mrveiss/issue-21080-router-test
mrveiss commentedon Nov 22, 2026
AC2 evidence (merged in #21978, 927bf0b, ancestor of main):
autobot-backend/llc/tests/test_notification_router.pyon main —test_notifications_channel_republished_with_channel_company(L265) is parametrized overbudget.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.test(company-os): cover company-level budget notices in router test (m…