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
-
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
-
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
-
Configuration:
reconcile_github: true/false (default: true if GitHub remote detected)
- Requires
GITHUB_TOKEN in environment
Changes to core/reconciler.py (base)
- Add
ReconcilerRegistry to chain multiple reconcilers:
Acceptance Criteria
Dependencies
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.pyAdd
GitHubReconcilerthat extends the base reconciler:cf pror task metadata)closed→ recommend SKIP (task no longer needed)openwith new comments → recommend logging (context update)merged→ recommend SKIP (work already done)closed(not merged) → recommend FAILGitHub API integration:
codeframe/git/github_integration.pymodulecheck_interval_msto avoid repeated API callsConfiguration:
reconcile_github: true/false(default: true if GitHub remote detected)GITHUB_TOKENin environmentChanges to
core/reconciler.py(base)ReconcilerRegistryto chain multiple reconcilers:Acceptance Criteria
Dependencies
codeframe/git/github_integration.py