[claude] Add unit tests for backlog_triage.py (#1293) #1307

Merged
claude merged 1 commits from claude/issue-1293 into main 2026-03-24 01:57:45 +00:00
Collaborator

Fixes #1293

Adds tests/timmy/test_backlog_triage.py with comprehensive unit tests for the backlog triage module.

Coverage

  • _extract_tags — bracket tag parsing, label extraction, lowercasing
  • _score_scope / _score_acceptance / _score_alignment — all scoring branches including meta-tag penalties and max caps
  • score_issue — bug/feature/research/philosophy/refactor classification, P0 detection, blocked detection, age calculation, edge cases (null body, invalid date)
  • decide — all decision branches: skip (philosophy, assigned, low score), flag_alex (blocked), assign_kimi (research/kimi-ready), assign_claude (P0 bug, ready feature/refactor)
  • _build_audit_comment — all action types
  • execute_decision — dry-run (no API calls), live assign_claude (comment + patch), comment failure sets error, flag_alex (comment only)
  • BacklogTriageLoop — default state, custom interval, stop(), disabled Gitea fast-path, cycle count, full cycle with mocked HTTP
  • ScoredIssue properties and TriageCycleResult defaults

All 577 unit tests pass.

Fixes #1293 Adds `tests/timmy/test_backlog_triage.py` with comprehensive unit tests for the backlog triage module. ## Coverage - `_extract_tags` — bracket tag parsing, label extraction, lowercasing - `_score_scope` / `_score_acceptance` / `_score_alignment` — all scoring branches including meta-tag penalties and max caps - `score_issue` — bug/feature/research/philosophy/refactor classification, P0 detection, blocked detection, age calculation, edge cases (null body, invalid date) - `decide` — all decision branches: skip (philosophy, assigned, low score), flag_alex (blocked), assign_kimi (research/kimi-ready), assign_claude (P0 bug, ready feature/refactor) - `_build_audit_comment` — all action types - `execute_decision` — dry-run (no API calls), live assign_claude (comment + patch), comment failure sets error, flag_alex (comment only) - `BacklogTriageLoop` — default state, custom interval, stop(), disabled Gitea fast-path, cycle count, full cycle with mocked HTTP - `ScoredIssue` properties and `TriageCycleResult` defaults All 577 unit tests pass.
claude added 1 commit 2026-03-24 01:57:14 +00:00
test: add unit tests for backlog_triage.py
Some checks failed
Tests / lint (pull_request) Failing after 35s
Tests / test (pull_request) Has been skipped
4675203321
Covers scoring functions (_extract_tags, _score_scope, _score_acceptance,
_score_alignment), full score_issue classification, decide() triage logic
(all branches: skip, flag_alex, assign_kimi, assign_claude), execute_decision
dry-run and live paths, audit comment builder, BacklogTriageLoop lifecycle,
and ScoredIssue/TriageCycleResult dataclasses.

Fixes #1293

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude merged commit 8304cf50da into main 2026-03-24 01:57:45 +00:00
claude deleted branch claude/issue-1293 2026-03-24 01:57:45 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1307