Skip to content

fix(kanban): only guard open pull requests - #65948

Open
AlexeyZelenin wants to merge 4 commits into
NousResearch:mainfrom
AlexeyZelenin:zeus/t_1be067c6
Open

fix(kanban): only guard open pull requests#65948
AlexeyZelenin wants to merge 4 commits into
NousResearch:mainfrom
AlexeyZelenin:zeus/t_1be067c6

Conversation

@AlexeyZelenin

Copy link
Copy Markdown

Summary

  • query GitHub through gh pr view before applying the active-PR respawn guard
  • allow merged, closed, or unresolvable PR URLs to respawn work
  • cover open, closed/merged, failed lookup, and dispatcher behavior

Tests

  • uv run --with pytest --with pytest-xdist python -m pytest tests/hermes_cli/test_kanban_db.py -v --tb=short

- kanban_batch_planner (90s limit) + POST /tasks/batch-take
- planner links pass existing DAG validation; manual-promotion audit events
- multi-select panel: Plan & take button; API task creation defaults to worktree on git-project boards

(committed by zeus-operator: worker completed without committing — DoD rescue)
…onflicts

Operator calibration: light additive overlaps stay parallel; judge by volume
and nature of edits in the shared area.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management comp/plugins Plugin system and bundled plugins area/config Config system, migrations, profiles needs-decision Awaiting maintainer decision before any implementation sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Jul 16, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related: the active-PR guard fixes #29458, but this PR also bundles unrelated batch-planning, configuration, workspace-default, dashboard, and documentation changes. Please review the scope as a combined feature set.

@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 addressing the stale-PR respawn case. The premise is verified on current main: hermes_cli/kanban_db.py:7376 currently guards on URL presence alone.

Problems

  • hermes_cli/kanban_db.py:7288 uses re.search, so it evaluates only the first PR URL in a comment. A closed URL followed by an open URL makes _is_open_github_pr() return false and allows respawn even though the task still has an open PR. This weakens the storm-prevention purpose introduced by 264e85b3.
  • The PR combines the guard fix with batch planning, a new decomposition-budget configuration path, workspace-default behavior, dashboard bundle changes, and docs. The member triage comment also identifies this combined scope.

Suggested changes

  • Scan every URL match and guard when any matching PR is open; add the mixed closed-plus-open URL regression case.
  • Split the active-PR correction into a focused change before salvaging the independent features.

Automated hermes-sweeper review.

Comment thread hermes_cli/kanban_db.py
(task_id, pr_cutoff),
).fetchall():
if c["body"] and _RESPAWN_GUARD_PR_URL_RE.search(c["body"]):
match = _RESPAWN_GUARD_PR_URL_RE.search(c["body"] or "")

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.

re.search() examines only the first URL in this comment. If it is closed but a later URL is open, this returns false and permits a duplicate respawn. Iterate all URL matches and guard if any linked PR is open; add that mixed-status case to the regression tests.

@GottZ

GottZ commented Aug 3, 2026

Copy link
Copy Markdown

This was generated by AI during triage.

Summary

Nine PRs address or reference the active_pr respawn-guard complex. Their diffs cover PR-state validation, explicit unblock or audited continuation, an operator-clear path, first-spawn false positives, task-owned-link classification, and broad disabling or removal of the URL-derived guard.

Related pull requests

Duplicates

#62424 is a direct later duplicate of #46204's latest-unblock mechanism. #29492 overlaps the PR-state portions of #65948 and #72555; #42003 and #61196 are broad guard-disabling alternatives, while #71606 and #72555 extend the unblock family with distinct audited-resume, operator-clear, state-check, or first-spawn handling.

Suggested consolidation

Keep #72555 open with a salvage path: obtain contributor re-review of the corrected state,mergedAt and rowid/strict-order implementation, then split the operator-clear, live-state, and first-spawn corrections if a narrower patch is required. Preserve #46204 as the narrow unblock alternative through author action to rebase onto main while retaining 77db9d6, and keep #71606 open for its requested English and Chinese documentation; close #62424 as duplicate of #46204 despite its keep_open review because its diff retains the contributor-identified +1-second defect. For #35593 and #65948, author action should respectively correlate ownership with each URL and split an all-URL state-check patch from unrelated features; leave #29492, #42003, and #61196 closed as reference or rejected alternatives.

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
    I29458(["issue #29458 (open)"])
    subgraph Dup29492 ["PRs duplicating each other"]
        P29492["PR #29492 (closed)"]
        P65948["PR #65948 (open)"]
    end
    P65948 -.->|partial| I29458
    class I29458 open
    class P29492 closed
    class P65948 open
    class P65948 target
    click I29458 "https://github.com/NousResearch/hermes-agent/issues/29458"
    click P29492 "https://github.com/NousResearch/hermes-agent/pull/29492"
    click P65948 "https://github.com/NousResearch/hermes-agent/pull/65948"
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 9 pull requests and 2 issues in this complex. Each diff was read against this issue; Assessment working set: 162 kB of PR diffs, 34 kB of issue/PR text, 27 kB of discussion (24 comments), 23 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/cron Cron scheduler and job management comp/plugins Plugin system and bundled plugins needs-decision Awaiting maintainer decision before any implementation 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.

4 participants