Skip to content

feat(kanban): auto-subscribe, review-required promotion, unblock dispatch, rerun, parent workspace - #31883

Closed
crayfish-ai wants to merge 1 commit into
NousResearch:mainfrom
crayfish-ai:pr/kanban-6-fixes
Closed

feat(kanban): auto-subscribe, review-required promotion, unblock dispatch, rerun, parent workspace#31883
crayfish-ai wants to merge 1 commit into
NousResearch:mainfrom
crayfish-ai:pr/kanban-6-fixes

Conversation

@crayfish-ai

@crayfish-ai crayfish-ai commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Six kanban fixes built and tested after rebasing to latest upstream/main (commit 7e165e843, 2026-05-25).

Changes

P1/P7: Auto-subscribe on kanban_create

  • Both CLI and agent tool paths now auto-subscribe the calling conversation to task notifications by reading HERMES_NOTIFY_* env vars
  • Completion/status-change events push to the origin chat without manual subscription

P2: Review-required as promoteable parent status

  • recompute_ready and claim_task now treat review-required same as done/archived for child promotion
  • Children of workers that requested human review can proceed without waiting for unblock

P3: Auto-dispatch after unblock

  • kanban unblock calls dispatch_once(max_spawn=1) after successful unblock so newly-ready tasks don't sit idle

P5: Rerun command

  • kanban rerun resets completed/blocked/archived tasks to ready/todo
  • Clears claim state, failure counters, optionally reassigns (--reassign-to)
  • --reason flag for audit trails

P6: Parent workspace inheritance

  • Child tasks without explicit workspace_path inherit from first parent with one
  • workspace_kind upgraded (scratch→dir/worktree) so children operate in project checkout

Files Changed

  • hermes_cli/kanban_db.py — +182 lines (P1 subscribe, P2 promotion, P5 rerun, P6 workspace)
  • hermes_cli/kanban.py — +52 lines (P3 dispatch, P5 rerun CLI)
  • tools/kanban_tools.py — +15 lines (P1/P7 agent tool subscribe)
  • Total: 3 files, +246 lines

Verification

  • Each fix tested independently via Python direct API and CLI
  • kanban.db integrity check passes
  • Deployed and tested on crayfish-ai fork server for 3+ days

History

…block dispatch, rerun, parent workspace, tool subscribe

- P1/P7: auto-subscribe on kanban_create — CLI and agent tool paths now both
  auto-subscribe the calling conversation to task notifications by reading
  HERMES_NOTIFY_* env vars, so completion/status-change events push to the
  origin chat without manual subscription.

- P2: treat review-required as a promoteable parent status — recompute_ready
  and claim_task now treat 'review-required' same as 'done'/'archived' for
  child promotion, so children of workers that requested human review can
  proceed without waiting for the human to unblock.

- P3: auto-dispatch after unblock — CLI `kanban unblock` now calls
  dispatch_once(max_spawn=1) after successful unblock so newly-ready tasks
  don't sit idle until the next dispatcher tick.

- P5: rerun command — `kanban rerun` resets completed/blocked/archived
  tasks to ready (or todo if parents are still in progress), clears claim
  state, failure counters, and optionally reassigns to a different profile.
  Supports `--reason` for audit trails and `--reassign-to`.

- P6: parent workspace inheritance — when create_task has parents and no
  explicit workspace_path, inherit the first parent's workspace_path and
  mirror the workspace_kind (scratch→dir/worktree upgrade only) so child
  tasks operate in the same project checkout instead of a bare tmpdir.
@crayfish-ai

Copy link
Copy Markdown
Contributor Author

Version & Relationship to Other Open Kanban PRs

Base: upstream/main 7e165e843 (2026-05-25 latest)

Overlap analysis with current open kanban PRs:

PR Author Topic Relationship
#29984 TheoLong auto-subscribe via --subscribe flag P1 overlap — different approach (flag vs env-var auto-detect), complementary
#30848 loicnico96 session_event delivery mode P1 related — adds delivery mode, we add subscribe trigger. Non-overlapping
#28728 Dusk1e sync unblock response status P3 adjacent — fixes response, we add auto-dispatch. Different concerns
#30645 GravityTone harden sqlite durability P0 related — already upstream via #31310, no conflict
#30969 ryandidurlabs sqlite corruption handling P0 related — same as above
#30457 sergeikabuldzhanov forced kanban dispatch P3 adjacent — their forced dispatch vs our auto-dispatch
#31564 Thawpoint memory + kanban reliability Independent
#31696 houenyang-momo notification readability Independent
#31279 stefan-wisbric MCP tools for Codex workers Independent
#30639 SerenityTn profile dropdowns Independent
#30681 annguyenNous board env override Independent
#30392 ryandidurlabs truncated sqlite boards Independent
#28450 r266-tech docs: max_in_progress Independent
#30755 Chachamaru127 Slack intake Independent
#31882 bagelcode-jhkim profile routing hints Independent

No direct conflicts. Our 6 fixes (auto-subscribe, review-required promotion, unblock dispatch, rerun, parent workspace, tool subscribe) are independently tested and deployed. Other open PRs address orthogonal concerns or use different implementation approaches for auto-subscribe.

History

Replaces closed PR #28331 — same feature set, rebased to latest main after upstream had significant changes.

@crayfish-ai

Copy link
Copy Markdown
Contributor Author

Relationship with Our Other Open PRs (#31265, #31266, #31267)

All four PRs are from crayfish-ai fork.

#31265 — fix(kanban): reject late-link after child start

#31266 — fix(kanban): defer scratch cleanup until children finish

#31267 — feat(kanban): per-call subscribe API with atomic notification subscription

Detailed comparison:

Aspect #31267 (atomic-subscribe) #31883 (6-fixes)
subscribe API subscribe param in create_task subscribe param in create_task
CLI auto-subscribe --subscribe-platform / --subscribe-chat-id explicit flags Auto-detect from HERMES_NOTIFY_* env vars (no flags needed)
Agent tool auto-subscribe ❌ Not implemented _agent_subscribe_from_env() in kanban_tools.py
Env var fallback _infer_subscribe_from_env() in kanban.py _build_subscribe_from_args() reads env vars
Other features P2 review-required, P3 unblock-dispatch, P5 rerun, P6 parent workspace

Both PRs edit the same ~15 lines in kanban_db.py and kanban.py in the subscribe area. If one merges first, the other will need rebase with conflict resolution.

Recommended merge order: If #31267 merges first (standalone subscribe fix), #31883 should be rebased to drop the overlapping subscribe changes and keep only P2-P3-P5-P6. Conversely, if #31883 merges first, #31267 becomes redundant on the subscribe aspect and should be closed.

Status

All four PRs are ready for upstream review independently.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard labels May 25, 2026
@crayfish-ai
crayfish-ai deleted the pr/kanban-6-fixes branch May 26, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants