Skip to content

[Phase 4] Reconciliation: GitHub Issue State Sync #406

Description

@frankbria

Summary

Extend the reconciliation engine to check GitHub issue state for tasks that are linked to GitHub issues, and adjust batch execution accordingly.

Parent issue: #403

Scope

Changes to core/reconciler.py

  1. Add GitHubReconciler that extends the base reconciler:

    • For tasks with a linked GitHub issue (via cf pr or task metadata)
    • Fetch current issue state from GitHub API
    • Map GitHub states to CodeFrame actions:
      • Issue closed → recommend SKIP (task no longer needed)
      • Issue open with new comments → recommend logging (context update)
      • PR merged → recommend SKIP (work already done)
      • PR closed (not merged) → recommend FAIL
  2. GitHub API integration:

    • Use existing codeframe/git/github_integration.py module
    • Rate-limit aware (don't exceed GitHub API limits during reconciliation)
    • Cache issue state for check_interval_ms to avoid repeated API calls
  3. Configuration:

    • reconcile_github: true/false (default: true if GitHub remote detected)
    • Requires GITHUB_TOKEN in environment

Changes to core/reconciler.py (base)

  1. Add ReconcilerRegistry to chain multiple reconcilers:

Acceptance Criteria

  • GitHub issue state fetched for linked tasks during reconciliation
  • Closed GitHub issues → tasks skipped in batch
  • Merged PRs → tasks marked done
  • API calls rate-limited and cached
  • Works without GitHub token (gracefully disabled)
  • Integration test with mocked GitHub API responses

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-4.4Phase 4.4: Batch Execution & Reconciliationsymphony-inspiredInspired by OpenAI Symphony spec analysis

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions