Skip to content

fix(kanban): enforce target skill capability before start - #80638

Closed
sinabahram wants to merge 3 commits into
NousResearch:mainfrom
sinabahram:fix/kanban-skill-capability-preflight
Closed

fix(kanban): enforce target skill capability before start#80638
sinabahram wants to merge 3 commits into
NousResearch:mainfrom
sinabahram:fix/kanban-skill-capability-preflight

Conversation

@sinabahram

Copy link
Copy Markdown

Summary

Kanban task-level skills are a hard worker capability requirement, but the current dispatch path can accept a task and later start a worker that cannot actually load them. This closes that bug class at each authoritative boundary:

  • validate forced skills at task creation against the target assignee profile;
  • use the same forced-skill resolver as runtime, including disabled skills, plugin and legacy sources, external skill directories, and target-profile dotenv settings;
  • revalidate immediately before claim, binding both claim and capability-block writes to the observed ready/unclaimed/assignee/serialized-skills snapshot;
  • perform one final claim-bound child-startup check before CLI/model/tool construction, so filesystem changes after claim cannot start a worker without its required skills;
  • classify pre-start failures as typed capability blocks without consuming retry/failure budget; and
  • emit an explicit not_started event discriminator so notifications say "blocked before start" only for authoritative pre-start gates, while runtime capability blocks say only "blocked."

No schema, migration, service, endpoint, or generalized state-machine change is introduced.

Relationship to #33747

I reviewed #33747 before preparing this PR. It addresses the same user-visible symptom with a dispatcher-time local skill scan in hermes_cli/kanban_db.py plus focused tests. That is useful coverage, but it does not cover the full failure window reproduced here: creation-time validation, runtime-equivalent disabled/plugin/legacy/external resolution, snapshot-bound claim/block CAS, post-claim filesystem drift at child startup, retry/failure accounting, or the explicit notification discriminator.

This PR therefore is not a duplicate of that two-file preflight proposal; it fixes the broader capability-invariant and race class while keeping the implementation bounded to the existing Kanban, skill-loading, CLI-startup, and notifier paths.

Test plan

  • scripts/run_tests.sh tests/hermes_cli/test_kanban_assignee_skill_preflight.py tests/cli/test_cli_preloaded_skills.py tests/gateway/test_kanban_notifier.py -q — 24 passed
  • scripts/run_tests.sh tests/hermes_cli/test_kanban*.py tests/cli/test_cli_preloaded_skills.py tests/gateway/test_kanban_notifier.py -q — 185 passed
  • uv run ruff check agent/skill_commands.py cli.py gateway/kanban_watchers.py hermes_cli/kanban_db.py tests/cli/test_cli_preloaded_skills.py tests/gateway/test_kanban_notifier.py tests/hermes_cli/test_kanban_assignee_skill_preflight.py — passed
  • git diff --check upstream/main...HEAD — passed

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery comp/cron Cron scheduler and job management tool/skills Skills system (list, view, manage) sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Aug 6, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related: #33747 and #59793 provide earlier dispatcher-side skill preflight. This PR adds target-profile runtime resolution, create-time validation, CAS-bound preflight/claim handling, and a final child-startup guard; these are competing scope choices rather than duplicate patches.

@sinabahram

Copy link
Copy Markdown
Author

Closing immediately: this PR was opened without the repository owner's authorization. Please disregard.

@sinabahram sinabahram closed this Aug 7, 2026
@sinabahram
sinabahram deleted the fix/kanban-skill-capability-preflight branch August 7, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants