Skip to content

fix(triage): skip parent issues with sub-issues before evaluation#169

Merged
keinstn merged 3 commits into
developfrom
agent/keinstn__baton-166
Jun 24, 2026
Merged

fix(triage): skip parent issues with sub-issues before evaluation#169
keinstn merged 3 commits into
developfrom
agent/keinstn__baton-166

Conversation

@keinstn

@keinstn keinstn commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add hasSubIssues: boolean to TriageIssue in scripts/triage/fetcher.ts
  • Replace fetchOpenSubIssues + separate hasAnySubIssues with a single fetchSubIssueInfo that detects any sub-issues (open or closed) in one API call and also returns openSubIssues for the open ones
  • Filter out issues where hasSubIssues === true in scripts/triage/index.ts before passing to the evaluator, logging each skipped issue at info level

Issues with any sub-issues (open or closed) are parent/umbrella issues and should never be assigned to an agent. This is a deterministic rule enforced in code rather than left to LLM judgment.

Fixes #166

Test plan

  • npm run test — all 337 tests pass
  • npm run typecheck — clean
  • npm run lint — clean
  • Issues with sub-issues (open or closed) get hasSubIssues=true and are filtered out with an info log
  • Issues with no sub-issues proceed to evaluation unchanged

🤖 Generated with Claude Code

Add `hasSubIssues: boolean` to `TriageIssue` and populate it via a
single `fetchSubIssueInfo` call that detects any sub-issues (open or
closed). Filter out parent issues in `scripts/triage/index.ts` before
passing to the evaluator, logging each skipped issue at info level.

Closes #166

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread scripts/triage/fetcher.ts
Comment thread scripts/triage/fetcher.ts
- Set `hasSubIssues: true` when the `/sub_issues` REST call returns
  non-200 or a malformed body, so parent-check failures are treated as
  blockers rather than silently assumed to be leaf issues.
- Add `hasSubIssues: false` to the `makeIssue` factory in
  `test/triage-evaluator.test.ts` so the fixture satisfies the full
  `TriageIssue` shape.
- Update the two error-case tests in `triage-fetcher.test.ts` to assert
  `hasSubIssues: true` and rename them to reflect the fail-closed intent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@keinstn

keinstn commented Jun 24, 2026

Copy link
Copy Markdown
Owner Author

[Baton Reviewer] PR reviewed: implementation matches issue #166 and is ready for human review.
Managed by Baton; do not edit the marker line manually.

@keinstn keinstn self-assigned this Jun 24, 2026
Comment thread scripts/triage/fetcher.ts Outdated
Comment thread test/triage-fetcher.test.ts Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@keinstn
keinstn merged commit 6228607 into develop Jun 24, 2026
4 checks passed
@keinstn
keinstn deleted the agent/keinstn__baton-166 branch June 24, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(triage): skip issues with open sub-issues before evaluation

1 participant