Skip to content

feat(kanban): allow scheduled initial tasks - #67577

Open
adrianabezerrabessa-source wants to merge 2 commits into
NousResearch:mainfrom
adrianabezerrabessa-source:feat/kanban-scheduled-initial-status
Open

feat(kanban): allow scheduled initial tasks#67577
adrianabezerrabessa-source wants to merge 2 commits into
NousResearch:mainfrom
adrianabezerrabessa-source:feat/kanban-scheduled-initial-status

Conversation

@adrianabezerrabessa-source

Copy link
Copy Markdown

Summary

  • allow create_task(..., initial_status="scheduled") to atomically park a task outside the dispatcher queue
  • expose scheduled through hermes kanban create --initial-status and the kanban_create tool schema
  • verify parked tasks are not promoted by recompute_ready() and are released only through the existing unblock_task() path

Why

Pre-dispatch routers need a stable state while they persist routing and audit metadata. triage is not a fail-closed lock when auto-decomposition is enabled, and a raw blocked row without a sticky block event may be recovered by recompute_ready().

scheduled already has the desired lifecycle semantics in the Kanban core:

  • it is outside the dispatcher queue;
  • recompute_ready() ignores it;
  • unblock_task() explicitly transitions it to todo or ready while preserving parent gating.

Allowing it at creation time removes the create-then-park race without adding a new status or dispatcher branch.

This complements #67518, which adds the model_override write surface. This PR intentionally does not duplicate those changes.

Compatibility

  • existing defaults remain unchanged (running)
  • existing blocked and triage behavior is unchanged
  • no database migration or new status is introduced

Verification

python3 -m pytest -q \
  tests/hermes_cli/test_kanban_db.py \
  tests/hermes_cli/test_kanban_cli.py \
  tests/hermes_cli/test_kanban_core_functionality.py \
  tests/hermes_cli/test_kanban_worker_spawn_toolsets.py \
  tests/tools/test_kanban_tools.py

572 passed in 18.28s
python3 -m ruff check \
  hermes_cli/kanban_db.py \
  hermes_cli/kanban.py \
  tools/kanban_tools.py \
  tests/hermes_cli/test_kanban_db.py \
  tests/hermes_cli/test_kanban_cli.py \
  tests/tools/test_kanban_tools.py

All checks passed!

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the focused lifecycle extension. The current-main premise is valid: hermes_cli/kanban_db.py:103 excludes scheduled from initial statuses, while recompute_ready() only scans todo/blocked (hermes_cli/kanban_db.py:3428-3431) and unblock_task() already releases scheduled tasks (hermes_cli/kanban_db.py:5162-5225).

Problems

  • tests/tools/test_kanban_tools.py:1031 asserts the entire schema enum. This is a change-detector snapshot; AGENTS.md:80-83 requires behavior/invariant coverage rather than frozen enumeration lists.
  • The public Kanban command references do not mention --initial-status: website/docs/reference/cli-commands.md:588 and website/docs/user-guide/features/kanban.md:659-668 list the create surface.

Suggested changes

  • Assert that scheduled is included in the schema enum, while keeping the end-to-end parked-task behavior test.
  • Add --initial-status running|blocked|scheduled to the existing CLI references, including that scheduled requires explicit unblock/release.

Automated hermes-sweeper review.



def test_create_schema_exposes_scheduled_initial_status():
from tools.kanban_tools import KANBAN_CREATE_SCHEMA

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid freezing the whole enum here. AGENTS.md prohibits change-detector enumeration snapshots; assert that scheduled is exposed instead, while the handler behavior test proves the actual contract.

@adrianabezerrabessa-source

Copy link
Copy Markdown
Author

Addressed the review feedback:

  • changed the schema assertion to the behavioral invariant (scheduled is included) instead of freezing the full enum
  • documented --initial-status running|blocked|scheduled in both public Kanban command references
  • documented that scheduled remains outside dispatch until an explicit unblock releases it with parent gating preserved

Revalidated the affected suite: 572 passed; ruff check and git diff --check also pass.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 19, 2026
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management labels Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants