Semantic branch names from available context (issue #350)#365
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The cmd_precheck function was building history dicts without the notes field, so _is_infra_revert() could never match infrastructure revert markers. This made the anti_pattern fix from the previous commit ineffective. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace opaque `factory/run-<hex8>` branch names with semantic `factory/<prefix>/<slug>-<hex4>` when a hint is available. Adds `_slugify` and `_classify_prefix` helpers (stdlib-only), a `.factory_branch` marker file for prune_stale to reconstruct branch names, and full backward compatibility when no hint is provided. Closes akashgit#364 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #365 +/- ##
==========================================
+ Coverage 87.38% 87.62% +0.23%
==========================================
Files 57 60 +3
Lines 8152 9227 +1075
==========================================
+ Hits 7124 8085 +961
- Misses 1028 1142 +114 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
✅ Factory Review: KEEPVerdict: KEEP Experiment: #1 Guard Checks
Score Comparison
Code Quality Assessment
Code Review Notes
Precheck GateReviewed by Factory Reviewer Agent |
…file The .factory_branch file was written to the worktree root, making it visible as untracked in git status and susceptible to accidental staging. Move it to a sibling file in the parent worktrees/ directory (e.g. run-abc123.branch alongside run-abc123/) where it's naturally covered by .factory/'s gitignore. Also clean up the marker in remove_worktree and prune_stale. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Factory Review: KEEPVerdict: KEEP Experiment: #1 Score Comparison
Guard Checks
Notes
Posted by Factory CEO |
Closes #364
Changes
_slugify(text, max_length)— stdlib-only (re, unicodedata) kebab-case converter_classify_prefix(hint, mode)— keyword-matches hint text to conventional branch prefixes (fix/docs/refactor/test/chore/feat)create_worktreewithhintandmodekwargs: producesfactory/<prefix>/<slug>-<hex4>when hint provided, falls back tofactory/run-<hex8>without.factory_branchmarker file in worktree dir for branch name reconstructionprune_staleto read.factory_branchmarker, falling back to oldfactory/run-pattern for legacy dirscmd_ceoand_run_single_cyclecall sites to passhintandmode_slugify,_classify_prefix, semantic naming, fallback, and prune with marker