Skip to content

fix: skip issue creation when focus mode targets an existing GitHub issue#764

Open
colehurwitz wants to merge 1 commit into
mainfrom
factory/run-c1b80b7e
Open

fix: skip issue creation when focus mode targets an existing GitHub issue#764
colehurwitz wants to merge 1 commit into
mainfrom
factory/run-c1b80b7e

Conversation

@colehurwitz

Copy link
Copy Markdown
Collaborator

Closes #693

Changes

  • Added an "Issue Reuse (Focus Mode)" subsection to the CEO prompt's Parallel Execution Protocol section in factory/agents/prompts/ceo.md
  • When the CEO task contains an ## Issue Tracking section (injected by the CLI when --focus targets an existing GitHub issue), the CEO now skips gh issue create and uses the existing issue number instead
  • Normal flow (no Issue Tracking section) remains unchanged — a new issue is created as before

…ssue

Add Issue Reuse section to CEO prompt so when --focus targets an existing
GitHub issue (indicated by ## Issue Tracking in the task), the CEO uses
that issue number instead of creating a duplicate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Sentrux Quality Report

Absolute

Scanning ....
[scan] git ls-files: 296 total, 284 kept, 12 dropped (ext:12, meta:0, big:0)
[build_project_map] 284 files, 52 unique dirs, 48 cache misses, 2.5ms
[resolve] 428 resolved, 741 unresolved (of 1169 total specs)
[resolve_imports] project_map 2.6ms, suffix_idx 0.6ms, suffix_resolve 11.6ms, total 14.7ms
[build_graphs] 284 files | maps 1.1ms, imports 14.8ms, calls+inherit 4.3ms, total 20.2ms | 427 import, 4329 call, 0 inherit edges
sentrux check — 2 rules checked

Quality: 4717

✗ [Error] max_cc: 5 function(s) exceed max cyclomatic complexity of 30
    factory/cli.py:cmd_ceo (cc=78)
    factory/cli.py:_welcome_wizard (cc=39)
    factory/cli.py:cmd_run (cc=36)
    factory/study.py:study_project_local (cc=36)
    factory/workflow/validation.py:validate_workflow (cc=31)

✗ 1 violation(s) found

Diff (vs base branch)

Scanning ....
[scan] git ls-files: 296 total, 284 kept, 12 dropped (ext:12, meta:0, big:0)
[build_project_map] 284 files, 52 unique dirs, 48 cache misses, 2.5ms
[resolve] 428 resolved, 741 unresolved (of 1169 total specs)
[resolve_imports] project_map 2.5ms, suffix_idx 0.6ms, suffix_resolve 9.1ms, total 12.2ms
[build_graphs] 284 files | maps 1.0ms, imports 12.3ms, calls+inherit 3.9ms, total 17.2ms | 427 import, 4329 call, 0 inherit edges
sentrux gate — structural regression check

Quality:      4717 -> 4717
Coupling:     0.74 → 0.74
Cycles:       4 → 4
God files:    0 → 0

Distance from Main Sequence: 0.35

✓ No degradation detected

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.83%. Comparing base (3803ea6) to head (ae92ede).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #764   +/-   ##
=======================================
  Coverage   86.83%   86.83%           
=======================================
  Files          79       79           
  Lines       11912    11912           
=======================================
  Hits        10344    10344           
  Misses       1568     1568           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

duplicate issue being opened when asked to work on an issue in focus mode

1 participant