refactor(engine): rename worktree-allocator to worktree-plan to end the miner filename collision - #5674
Conversation
…he miner filename collision gittensory-engine's src/miner/worktree-allocator.ts (pure git-worktree path/branch planning + retention policy) and gittensory-miner's lib/worktree-allocator.js (SQLite-backed slot leasing + PID-liveness orphan reclaim) shared a filename while doing genuinely different jobs. Renames the engine-side PURE planner to worktree-plan.ts (its export is planWorktree), keeping the miner's allocator name since it is the one that actually allocates/leases slots (JSONbored#5668). Pure rename, no behavior change: exported symbols (planWorktree, WorktreePlan, etc.) are unchanged, so every @loopover/engine consumer is unaffected; only the engine's own internal import (worktree-pool.ts) + index re-export path change, plus the two comment references. Test file renamed to match. Closes JSONbored#5668
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5674 +/- ##
=======================================
Coverage 95.04% 95.04%
=======================================
Files 577 577
Lines 45987 45987
Branches 14708 14708
=======================================
Hits 43707 43707
Misses 1527 1527
Partials 753 753
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-14 02:19:24 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 4 non-blocking
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
gittensory-engine'ssrc/miner/worktree-allocator.ts(pure git-worktree path/branch planning + retention policy) andgittensory-miner'slib/worktree-allocator.js(SQLite-backed slot leasing + PID-liveness orphan reclaim) shared a filename while doing genuinely different jobs — a real source of confusion for the engine/miner split (one is pure and reusable, the other single-machine PID-coupled).What this does
Renames the engine-side pure planner to
src/miner/worktree-plan.ts(its export isplanWorktree), keeping the miner'slib/worktree-allocator.jsname since it's the one that actually allocates/leases slots — exactly the split the issue suggests.planWorktree,WorktreePlan,WORKTREE_*, …) are unchanged, so every@loopover/engineconsumer — including the whole miner package — is unaffected.worktree-pool.ts's import,index.ts's re-export path, and two comment mentions.test/unit/worktree-allocator.test.ts→worktree-plan.test.ts); its content is unchanged (it importsplanWorktreefrom the engine index).lib/worktree-allocator.jsis untouched.Validation
tsc --noEmitclean.vitest: the renamedplanWorktreesuite (8/8) +worktree-pool(7/7) pass unchanged.manifest:drift-checkOK;git diff --checkclean. Cut from latestmain.Closes #5668