fix: exclude epic and child-only containers from allocator selection (Closes #844) #848

Open
jcwalker3 wants to merge 1 commits from fix/issue-844-exclude-epic-containers into master
Owner

Summary

Closes #844. The controller/allocator was selecting epic #631 for direct author implementation even though its body delegates work to children and forbids product implementation on the epic itself.

Changes

  • Add classify_epic_or_child_only_container and pre-rank skip reason epic_or_child_only_container.
  • Exclude epics / child-only containers before ranking so they cannot receive assignments or leases.
  • Prefer structured evidence: epic labels and body markers (child-only / no direct implementation). Title-only "Epic:" without body evidence is not excluded; incidental "epic" wording stays eligible.
  • Pass issue body through live inventory (_allocator_candidates_from_gitea) and WorkCandidate.
  • Regression tests: #631-shaped epic excluded, child remains selectable, incidental epic wording stays eligible, containers never leased.

Validation

venv/bin/python -m pytest tests/test_allocator_epic_container_exclusion.py tests/test_allocator_pre_rank_exclusions.py tests/test_allocator_service.py tests/test_cross_role_queue_allocation.py tests/test_allocator_inventory_mcp.py -q
# 90 passed

Worktree

  • Branch: fix/issue-844-exclude-epic-containers
  • Path: branches/fix-issue-844-exclude-epic-containers
  • Head: c3f282ba44a788f24fc281ce39edddbfe0fdea8e

Risk

Low. Selection-only change; no mutation path for existing PRs. Over-exclusion only when body/label evidence matches the documented markers.

Next role

needs-reviewer

## Summary Closes #844. The controller/allocator was selecting epic #631 for direct author implementation even though its body delegates work to children and forbids product implementation on the epic itself. ## Changes * Add `classify_epic_or_child_only_container` and pre-rank skip reason `epic_or_child_only_container`. * Exclude epics / child-only containers **before** ranking so they cannot receive assignments or leases. * Prefer structured evidence: epic labels and body markers (child-only / no direct implementation). Title-only "Epic:" without body evidence is **not** excluded; incidental "epic" wording stays eligible. * Pass issue `body` through live inventory (`_allocator_candidates_from_gitea`) and `WorkCandidate`. * Regression tests: #631-shaped epic excluded, child remains selectable, incidental epic wording stays eligible, containers never leased. ## Validation ``` venv/bin/python -m pytest tests/test_allocator_epic_container_exclusion.py tests/test_allocator_pre_rank_exclusions.py tests/test_allocator_service.py tests/test_cross_role_queue_allocation.py tests/test_allocator_inventory_mcp.py -q # 90 passed ``` ## Worktree * Branch: `fix/issue-844-exclude-epic-containers` * Path: `branches/fix-issue-844-exclude-epic-containers` * Head: `c3f282ba44a788f24fc281ce39edddbfe0fdea8e` ## Risk Low. Selection-only change; no mutation path for existing PRs. Over-exclusion only when body/label evidence matches the documented markers. ## Next role needs-reviewer
jcwalker3 added 1 commit 2026-07-23 03:57:33 -05:00
Epics and parent issues whose body delegates implementation to children are
skipped before ranking with structured reason epic_or_child_only_container.
Title-only "epic" mentions without body/label evidence remain eligible.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/issue-844-exclude-epic-containers:fix/issue-844-exclude-epic-containers
git checkout fix/issue-844-exclude-epic-containers
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#848