fix(tui): make Kanban delivery and prompt ownership durable - #69035
fix(tui): make Kanban delivery and prompt ownership durable#69035ChanPark03 wants to merge 10 commits into
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the extensive race coverage. The session-finalization premise remains valid on current main: _finalize_session() marks _finalized outside history_lock (tui_gateway/server.py:659-673), while prompt.submit later accepts work under that lock without checking it (tui_gateway/server.py:11180-11275).
Problems
- Current main already merged the TUI Kanban delivery path in
badb240ffa/ #72177:_collect_kanban_notifications()and its poller wiring live attui_gateway/server.py:11567-11716. The new parallel_poll_tui_kanban_subscriptions()implementation should not be carried forward as a second delivery path. - The PR helper's event kinds at
tui_gateway/server.py:9773omitstatus,archived, andunblocked. Current main intentionally claims all of these attui_gateway/server.py:11510-11518, including silent kinds so they cannot leave a cursor behind an unclaimed row.
Suggested changes
- Salvage the finalization/turn-acceptance guards into the current collector and prompt lifecycle paths, preserving the merged collector's event-kind and buffering behavior.
Automated hermes-sweeper review.
| return (evt_sid, evt_type) | ||
|
|
||
|
|
||
| def _poll_tui_kanban_subscriptions(sid: str, session: dict) -> bool: |
There was a problem hiding this comment.
Current main now has the merged #72177 collector at _collect_kanban_notifications() and its poller wiring. Please fold the lifecycle/transaction protections into that path rather than introducing a parallel TUI Kanban delivery implementation.
| platform=sub["platform"], | ||
| chat_id=sub["chat_id"], | ||
| thread_id=sub.get("thread_id") or "", | ||
| kinds=("completed", "blocked", "gave_up", "crashed", "timed_out"), |
There was a problem hiding this comment.
Keep the current collector's full event set here: main also claims status, archived, and unblocked, with the latter two intentionally silent so they cannot obstruct cursor progress (_KANBAN_NOTIFY_KINDS / _KANBAN_SILENT_KINDS).
Summary
Verification
scripts/run_tests.sh tests/test_tui_gateway_server.py tests/hermes_cli/test_kanban_db.pymaingit diff --check origin/main...HEADThe commits preserve their original authorship and were rebased onto current upstream main.