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

Merged
sysadmin merged 2 commits from fix/issue-844-exclude-epic-containers into master 2026-07-23 14:56:53 -05:00
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]>
jcwalker3 added 1 commit 2026-07-23 12:30:55 -05:00
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #848
issue: #844
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 22106-f0c187147f5f
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr848-844
phase: claimed
candidate_head: 79256f9093
target_branch: master
target_branch_sha: 1c455b6ec0
last_activity: 2026-07-23T19:44:09Z
expires_at: 2026-07-23T19:54:09Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #848 issue: #844 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 22106-f0c187147f5f worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr848-844 phase: claimed candidate_head: 79256f90932c4621a3bc0781e07910e84ed49642 target_branch: master target_branch_sha: 1c455b6ec0f9cb761fe6248de68c17e061fb5ecd last_activity: 2026-07-23T19:44:09Z expires_at: 2026-07-23T19:54:09Z blocker: none
sysadmin approved these changes 2026-07-23 14:47:22 -05:00
sysadmin left a comment
Owner

Independent review — APPROVE (PR #848 / Issue #844)

Reviewed head: 79256f90932c4621a3bc0781e07910e84ed49642
Base: master @ 1c455b6ec0f9cb761fe6248de68c17e061fb5ecd
Author: jcwalker3 (≠ reviewer sysadmin)
Profile: prgs-reviewer / role reviewer

Acceptance criteria (#844)

AC Verdict
Epics / child-only containers excluded from direct implementation selection PASS
#631-shaped child-only epic excluded PASS
Implementable child issues remain eligible PASS
Incidental epic wording not excluded solely by title PASS
Exclusion before ranking and allocation mutation PASS
Structured skip reason epic_or_child_only_container PASS
Excluded containers cannot receive assignments/leases PASS

Scope vs #842 / #843

Selection-only. Does not reimplement #842 conflict-fix lifecycle or #843 cross-role handoff consume.

Files inspected

  • allocator_service.py
  • gitea_mcp_server.py
  • tests/test_allocator_epic_container_exclusion.py

Validation

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

Canonical PR State

STATE: approved-awaiting-merge
WHO_IS_NEXT: merger
NEXT_ACTION: Merge PR #848 at the exact approved head; do not re-review unless head moves; stop without merge if head drifts.
NEXT_PROMPT:

You are a standalone gitea-merger session for Scaled-Tech-Consulting/Gitea-Tools on remote prgs. Merge PR #848 only at expected_head_sha=79256f90932c4621a3bc0781e07910e84ed49642 (issue #844). Use gitea-merger / prgs-merger / sysadmin. Prove identity, parity (in_parity=true, restart_required=false, mutation_safe=true), adopt/acquire merger lease, re-check live head matches pin, run pre-merge gates, merge with confirmation MERGE PR 848, read-after-write verify, release lease. Do not touch PR #845, #846, or #849. Stop BLOCKED+DIAGNOSE on any gate failure.

WHAT_HAPPENED: Independent reviewer approved PR #848 after full AC and regression validation.
WHY: All #844 acceptance criteria and focused allocator regression tests passed at the pinned head; author ≠ reviewer; merge is intentionally not performed by the reviewer role.
ISSUE: #844
HEAD_SHA: 79256f9093
REVIEW_STATUS: approved / approval_at_current_head
MERGE_READY: true
BLOCKERS: none
VALIDATION: pytest passed; 90 passed (epic container + pre-rank + allocator service + cross-role allocation + inventory MCP); reviewer approved at head 79256f9093
NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=mcp_server; token_fingerprint=c68b14c0c8991481
LAST_UPDATED_BY: sysadmin / prgs-reviewer

## Independent review — APPROVE (PR #848 / Issue #844) **Reviewed head:** `79256f90932c4621a3bc0781e07910e84ed49642` **Base:** `master` @ `1c455b6ec0f9cb761fe6248de68c17e061fb5ecd` **Author:** `jcwalker3` (≠ reviewer `sysadmin`) **Profile:** `prgs-reviewer` / role `reviewer` ### Acceptance criteria (#844) | AC | Verdict | |---|---| | Epics / child-only containers excluded from direct implementation selection | **PASS** | | #631-shaped child-only epic excluded | **PASS** | | Implementable child issues remain eligible | **PASS** | | Incidental epic wording not excluded solely by title | **PASS** | | Exclusion before ranking and allocation mutation | **PASS** | | Structured skip reason `epic_or_child_only_container` | **PASS** | | Excluded containers cannot receive assignments/leases | **PASS** | ### Scope vs #842 / #843 Selection-only. Does not reimplement #842 conflict-fix lifecycle or #843 cross-role handoff consume. ### Files inspected - `allocator_service.py` - `gitea_mcp_server.py` - `tests/test_allocator_epic_container_exclusion.py` ### Validation ```text 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 ``` ## Canonical PR State STATE: approved-awaiting-merge WHO_IS_NEXT: merger NEXT_ACTION: Merge PR #848 at the exact approved head; do not re-review unless head moves; stop without merge if head drifts. NEXT_PROMPT: ```text You are a standalone gitea-merger session for Scaled-Tech-Consulting/Gitea-Tools on remote prgs. Merge PR #848 only at expected_head_sha=79256f90932c4621a3bc0781e07910e84ed49642 (issue #844). Use gitea-merger / prgs-merger / sysadmin. Prove identity, parity (in_parity=true, restart_required=false, mutation_safe=true), adopt/acquire merger lease, re-check live head matches pin, run pre-merge gates, merge with confirmation MERGE PR 848, read-after-write verify, release lease. Do not touch PR #845, #846, or #849. Stop BLOCKED+DIAGNOSE on any gate failure. ``` WHAT_HAPPENED: Independent reviewer approved PR #848 after full AC and regression validation. WHY: All #844 acceptance criteria and focused allocator regression tests passed at the pinned head; author ≠ reviewer; merge is intentionally not performed by the reviewer role. ISSUE: #844 HEAD_SHA: 79256f90932c4621a3bc0781e07910e84ed49642 REVIEW_STATUS: approved / approval_at_current_head MERGE_READY: true BLOCKERS: none VALIDATION: pytest passed; 90 passed (epic container + pre-rank + allocator service + cross-role allocation + inventory MCP); reviewer approved at head 79256f90932c4621a3bc0781e07910e84ed49642 NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=mcp_server; token_fingerprint=c68b14c0c8991481 LAST_UPDATED_BY: sysadmin / prgs-reviewer
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #848
issue: #844
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 22106-f0c187147f5f
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr848-844
phase: released
candidate_head: 79256f9093
target_branch: master
target_branch_sha: 1c455b6ec0
last_activity: 2026-07-23T19:47:45Z
expires_at: 2026-07-23T19:57:45Z
blocker: manual-release

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #848 issue: #844 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 22106-f0c187147f5f worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr848-844 phase: released candidate_head: 79256f90932c4621a3bc0781e07910e84ed49642 target_branch: master target_branch_sha: 1c455b6ec0f9cb761fe6248de68c17e061fb5ecd last_activity: 2026-07-23T19:47:45Z expires_at: 2026-07-23T19:57:45Z blocker: manual-release
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #848
issue: #844
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 40858-931d75fadace
worktree: branches/fix-issue-844-exclude-epic-containers
phase: claimed
candidate_head: 79256f9093
target_branch: master
target_branch_sha: 1c455b6ec0
last_activity: 2026-07-23T19:56:33Z
expires_at: 2026-07-23T20:06:33Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #848 issue: #844 reviewer_identity: sysadmin profile: prgs-merger session_id: 40858-931d75fadace worktree: branches/fix-issue-844-exclude-epic-containers phase: claimed candidate_head: 79256f90932c4621a3bc0781e07910e84ed49642 target_branch: master target_branch_sha: 1c455b6ec0f9cb761fe6248de68c17e061fb5ecd last_activity: 2026-07-23T19:56:33Z expires_at: 2026-07-23T20:06:33Z blocker: none
sysadmin merged commit fa6ba8a162 into master 2026-07-23 14:56:53 -05:00
Owner

Stale #332 review-decision lock cleanup (#594)

Status: APPLIED

Manual deletion of session-state files is not the workflow.
This path only clears a lock when the referenced PR is merged/closed.

## Stale #332 review-decision lock cleanup (#594) Status: **APPLIED** - actor: `sysadmin` - profile: `prgs-merger` - timestamp: `2026-07-23T19:56:55.661882+00:00` - last terminal: `approve` on PR #848 - PR state: `closed` (merged=True) - merge_commit_sha: `fa6ba8a162e2006bb2afc55f37b505486fad604f` - prior live_mutations_count: `2` - prior profile_identity: `prgs-reviewer` Manual deletion of session-state files is **not** the workflow. This path only clears a lock when the referenced PR is merged/closed.
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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