Skip to content

feat: assign af:implemented label to issues when spec completes #636

Description

@mickume

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    af:fixIssues ready to be implementedenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions