fix: use detected default branch instead of hardcoded main in CEO workflow#731
fix: use detected default branch instead of hardcoded main in CEO workflow#731osilkin98 wants to merge 2 commits into
Conversation
…kflow Replace 7 hardcoded 'main' references in CEO prompt with $TARGET_BRANCH and always inject the resolved target branch in _build_ceo_task, even when no --branch override is provided. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sentrux Quality Report |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #731 +/- ##
=======================================
Coverage 87.83% 87.84%
=======================================
Files 70 70
Lines 10699 10704 +5
=======================================
+ Hits 9398 9403 +5
Misses 1301 1301 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Factory Review: KEEPVerdict: KEEP Experiment: #3 Score Comparison
Guard Checks
Precheck GateCode Review Notes
Posted by Factory CEO |
If .factory/config.json doesn't exist, the cat command fails and TARGET_BRANCH becomes empty. Add 2>/dev/null to suppress errors from both cat and python3, and fall back to "main" if the pipeline fails entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Factory Review: KEEPVerdict: KEEP Experiment: #3 Score Comparison
Guard Checks
Posted by Factory CEO |
|
Closing this as it was posted on version 1 factory |
Closes #730
Changes
mainreferences infactory/agents/prompts/ceo.mdwith$TARGET_BRANCH(PR targets, baseline SHA lookups, guard violation checkout)TARGET_BRANCHresolution instruction near the start of the CEO prompt so the variable is set from.factory/config.jsoneach cycle_build_ceo_taskinfactory/cli.pyto always inject the resolved target branch (via_read_target_branch), not only when--branchis explicitly passed_read_target_branchto gracefully fall back to"main"ifdetect_default_branchfails