Commit Graph

8 Commits

Author SHA1 Message Date
teknium1 9541317aee fix(kanban): trim auto-decompose scope shim and add an invariant test
Salvage follow-up to #107955 (Alex Tu) and #109494 (EloquentBrush0x):

- _default_profile_secret_scope: drop the import try/except, the
  current_secret_scope() short-circuit and the build-failure fallthrough.
  The tick always runs in a fresh Context (no scope can be present) and a
  failure to build the launch profile scope must surface, not silently
  degrade to an unscoped tick.
- Regression test proven red on origin/main: run the real
  auto_decompose_tick through _to_thread_process_service under multiplex
  and assert the decomposer reads the launch profile .env value; ports the
  contract from #57837 (srojk34) to the post-refactor dispatcher.
- Trim the #109494 test docstring to the invariant.
2026-09-13 14:43:19 -07:00
Alex Tu ae076bc465 fix(kanban): scope the auto-decompose tick to the default profile under multiplex
With gateway.multiplex_profiles on, agent.secret_scope.get_secret() fails closed
whenever no profile secret scope is installed. auto_decompose_tick runs through
_to_thread_process_service in a fresh context, so the decomposer's credential
read raised UnscopedSecretError on every tick before the aux LLM was called,
and every triage card stayed in triage forever (logged at INFO only).

Wrap the tick in _default_profile_secret_scope(): when multiplexing is active
and no scope is installed, build the gateway default profile's scope (the same
home load_gateway_config_for_runner uses) for the duration of the tick. No-op
for single-profile gateways and when a scope is already active.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit c47e3ea6f8a5750182b7534160184210b8d5a110)
2026-09-13 14:43:19 -07:00
Teknium e3ab65fe80 simplify(compat): kanban_db — drop 73 re-exports/aliases, repoint 794 callers 2026-09-03 13:48:14 -07:00
Teknium e83816a4d1 review-fix(comments): restore lost #NNNN rationale comments across non-test source (mechanical sweep, condensed, code unchanged)
For each issue anchor present in BASE 63279301bc non-test .py and absent on HEAD, the BASE comment/docstring block was re-attached at the HEAD location of the code it explained (matched by the distinctive code line / enclosing def). Sentences already covered by an existing HEAD comment were deduped; the issue number always survives. Insert-only: no code lines changed.
2026-09-03 09:44:26 -07:00
Teknium 4dd0c22bd7 refactor(gateway): compact kanban notifier collector and dispatcher log call sites 2026-09-02 19:36:31 -07:00
Teknium 23453cb4f2 refactor(gateway): kanban dispatcher passes settings via asdict; artifact path collection without closure 2026-09-02 19:09:27 -07:00
Teknium 7a1a36a12f refactor(gateway): unify kanban watcher settings/lock helpers in kanban_watchers_common, split notifier board collection into phase helpers 2026-09-02 18:28:02 -07:00
Teknium fd2bfa1893 refactor(gateway/kanban): lift notifier delivery into _KanbanNotification + event-formatter table, dispatcher into _DispatcherSettings/_KanbanDispatcher; unify board enumeration/tick sleep 2026-09-02 15:57:11 -07:00