fix(kanban): only guard open pull requests - #65948
Conversation
- 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.
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
left a comment
There was a problem hiding this comment.
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:7288usesre.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 by264e85b3.- 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.
| (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 "") |
There was a problem hiding this comment.
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.
SummaryNine 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 consolidationKeep #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 graphflowchart 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"
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. |
Summary
gh pr viewbefore applying the active-PR respawn guardTests
uv run --with pytest --with pytest-xdist python -m pytest tests/hermes_cli/test_kanban_db.py -v --tb=short