Summary
When the orchestrator finishes all task groups for a spec that originated from a GitHub issue, it should apply the af:implemented label after posting the summary comment. The issue stays open for manual verification.
This was implemented in commit b3ddcfa9 but reverted to re-approach.
Scope of changes
1. Engine — post_issue_summaries (packages/agentfox/agentfox/engine/engine.py)
After successfully posting the summary comment to the source issue, the engine calls platform.assign_label() with the af:implemented label. On failure, it logs a warning but does not block — the spec is still recorded as posted. A continue was added after the existing comment-post error handler so the label assignment is skipped when commenting fails.
2. Label registry (packages/agentfox/agentfox/platform/labels.py)
- New constant:
LABEL_IMPLEMENTED = "af:implemented"
- New
LabelSpec entry in REQUIRED_LABELS with color #0969da and description "Spec implementation complete — awaiting manual verification"
3. Tests (packages/agentfox/tests/unit/engine/test_issue_summary.py)
test_assigns_implemented_label_on_success — verifies assign_label is called with the correct issue number and label after a successful post.
test_label_failure_does_not_block_posting — verifies that a RuntimeError from assign_label is caught, logged as a warning, and the spec still appears in the posted set.
- Existing test fixture
_make_mock_platform updated to include assign_label = AsyncMock().
Files changed (3 files, +71 lines)
packages/agentfox/agentfox/engine/engine.py (+14)
packages/agentfox/agentfox/platform/labels.py (+8)
packages/agentfox/tests/unit/engine/test_issue_summary.py (+49)
Summary
When the orchestrator finishes all task groups for a spec that originated from a GitHub issue, it should apply the
af:implementedlabel after posting the summary comment. The issue stays open for manual verification.This was implemented in commit
b3ddcfa9but reverted to re-approach.Scope of changes
1. Engine —
post_issue_summaries(packages/agentfox/agentfox/engine/engine.py)After successfully posting the summary comment to the source issue, the engine calls
platform.assign_label()with theaf:implementedlabel. On failure, it logs a warning but does not block — the spec is still recorded as posted. Acontinuewas added after the existing comment-post error handler so the label assignment is skipped when commenting fails.2. Label registry (
packages/agentfox/agentfox/platform/labels.py)LABEL_IMPLEMENTED = "af:implemented"LabelSpecentry inREQUIRED_LABELSwith color#0969daand description "Spec implementation complete — awaiting manual verification"3. Tests (
packages/agentfox/tests/unit/engine/test_issue_summary.py)test_assigns_implemented_label_on_success— verifiesassign_labelis called with the correct issue number and label after a successful post.test_label_failure_does_not_block_posting— verifies that aRuntimeErrorfromassign_labelis caught, logged as a warning, and the spec still appears in the posted set._make_mock_platformupdated to includeassign_label = AsyncMock().Files changed (3 files, +71 lines)
packages/agentfox/agentfox/engine/engine.py(+14)packages/agentfox/agentfox/platform/labels.py(+8)packages/agentfox/tests/unit/engine/test_issue_summary.py(+49)