Skip to content

fix(kanban): type goal-loop blocks as transient - #71088

Open
yinkev wants to merge 4 commits into
NousResearch:mainfrom
yinkev:fix/kanban-goal-loop-transient
Open

fix(kanban): type goal-loop blocks as transient#71088
yinkev wants to merge 4 commits into
NousResearch:mainfrom
yinkev:fix/kanban-goal-loop-transient

Conversation

@yinkev

@yinkev yinkev commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • thread the optional Kanban block kind through the quiet goal-worker CLI callback
  • classify both machine-generated goal-loop exits as kind="transient"
    • turn budget exhausted
    • output judged complete, but the worker did not call kanban_complete after the finalize nudge
  • add behavior-contract coverage for both exits and for propagation through the CLI wrapper into kanban_db.block_task

This changes classification only. It does not add a new retry policy, routing rule, schema, or configuration surface.

Contributor credit / relationship to #71071

This cleanly salvages the focused #71050 commit from @webtecnica and preserves their authorship in git history. PR #71071 currently carries an earlier unrelated parent commit; this branch isolates the reported bug and adds the missing end-to-end callback regression coverage.

Fixes #71050.

Verification

  • python -m pytest tests/hermes_cli/test_kanban_goal_mode.py tests/hermes_cli/test_kanban_block_kinds.py -q -o addopts=28 passed
  • python -m ruff check cli.py hermes_cli/goals.py tests/hermes_cli/test_kanban_goal_mode.py
  • python -m py_compile cli.py hermes_cli/goals.py tests/hermes_cli/test_kanban_goal_mode.py
  • git diff --check upstream/main...HEAD

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management needs-decision Awaiting maintainer decision before any implementation labels Jul 25, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to #71071 and #71050: this PR isolates the transient-kind forwarding fix and tests CLI propagation, while #71071 also changes kanban lifecycle policy and includes unrelated changes. Please choose which scope to retain.

yinkev commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

I’m keeping this one narrow. #71088 only fixes propagation of kind="transient" through the existing CLI goal-loop path and pins that contract with focused coverage. It does not take on the broader kanban lifecycle changes in #71071, so I don’t think the two scopes should be combined unless maintainers explicitly prefer that policy change.

@yinkev yinkev closed this Jul 30, 2026
@yinkev yinkev reopened this Jul 30, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for keeping the salvage focused. The current-main goal loop calls block_fn without a kind at hermes_cli/goals.py:1751 and :1767, while the only production wrapper drops that metadata before kanban_db.block_task() at cli.py:17404-17407. The proposed changes cover both exits and the propagation boundary; the tracked caller search found no additional production goal-loop wrapper.

Suggested changes

  • Update the injected block_fn contract in hermes_cli/goals.py:1692-1694: after this change it accepts the optional kind keyword, but the docstring still describes it as (reason: str -> None).

Automated hermes-sweeper review.

@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 30, 2026
@alt-glitch alt-glitch removed needs-decision Awaiting maintainer decision before any implementation sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Aug 1, 2026
@GottZ

GottZ commented Aug 3, 2026

Copy link
Copy Markdown

This was generated by AI during triage.

Summary

Two PRs address Issue #71050 by classifying both machine-generated goal-loop exits as transient and forwarding that kind through the CLI callback to Kanban. #71088 isolates this cause-level fix and adds focused behavior and propagation coverage; #71071 contains the same core change but also carries unrelated lifecycle, dashboard, and provider edits.

Related pull requests

Duplicates

#71071 and #71088 implement the same core transient-kind classification and CLI propagation. #71071 is superseded by #71088 and can remain closed.

Suggested consolidation

keep open with a salvage path: retain #71088 as the focused implementation, address the stale block_fn contract documentation noted in its maintainer-bot review, and then let maintainers evaluate that narrow branch. Keep #71071 closed as superseded by #71088, consistent with its contributor author's explicit closure and authorship-preservation note.

Complex graph

flowchart LR
    classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
    classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
    classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
    classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
    classDef best stroke-width:3px,stroke:#b45309
    classDef target stroke-width:3px,stroke:#4338ca
    I71050(["issue #71050 (open)"])
    subgraph Dup71071 ["PRs duplicating each other"]
        P71071["PR #71071 (closed)"]
        P71088["PR #71088 (open)"]
    end
    P71088 -->|best fix| I71050
    class I71050 open
    class P71071 closed
    class P71088 open
    class P71088 best
    class P71088 target
    click I71050 "https://github.com/NousResearch/hermes-agent/issues/71050"
    click P71071 "https://github.com/NousResearch/hermes-agent/pull/71071"
    click P71088 "https://github.com/NousResearch/hermes-agent/pull/71088"
Loading

Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label).

Cross-PR triage: Reviewed 2 pull requests and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 12 kB of PR diffs, 6 kB of issue/PR text, 2 kB of discussion (6 comments), 3 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

yinkev commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Author-status audit — 2026-08-05: this PR is cleanly mergeable and its current-head CI completed successfully. The only remaining review item is documentation-only: in hermes_cli/goals.py, update the injected block_fn contract from (reason: str -> None) to state that the callback accepts reason: str and optional keyword kind: str | None = None. No implementation or test change is otherwise requested. The current GitHub installation cannot update the fork branch, and maintainer_can_modify remains false.

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 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 type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kanban goal loop emits untyped blocks, stranding cards outside every automated recovery path

5 participants