Skip to content

fix(engine): give fleet-run-manifest a dedicated per-repo worktree default - #9374

Closed
bitfathers94 wants to merge 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-9324
Closed

fix(engine): give fleet-run-manifest a dedicated per-repo worktree default#9374
bitfathers94 wants to merge 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-9324

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

fix(engine): give fleet-run-manifest a dedicated per-repo worktree default

The bare-string repo branch in normalizeRepoList defaulted maxConcurrentWorktrees
from DEFAULT_FLEET_RUN_MANIFEST.totalConcurrentWorktrees (a fleet-wide total),
while the object-form branch defaulted from a hardcoded literal 1. The two agree
only because the fleet-wide total default is also 1 today; changing it would
silently move the per-repo default for bare-string entries.

Introduce DEFAULT_FLEET_RUN_MANIFEST_REPO_MAX_CONCURRENT_WORKTREES as the single
source of truth for the per-repo default and use it in both branches.

Closes #9324

Validation

Verified locally on this branch before opening:

  • npm run typecheck
  • npx turbo run build:tsc build:verify
  • npm run test:coverage — patch coverage 100.0% of changed lines

…fault

The bare-string repo branch in normalizeRepoList defaulted maxConcurrentWorktrees
from DEFAULT_FLEET_RUN_MANIFEST.totalConcurrentWorktrees (a fleet-wide total),
while the object-form branch defaulted from a hardcoded literal 1. The two agree
only because the fleet-wide total default is also 1 today; changing it would
silently move the per-repo default for bare-string entries.

Introduce DEFAULT_FLEET_RUN_MANIFEST_REPO_MAX_CONCURRENT_WORKTREES as the single
source of truth for the per-repo default and use it in both branches.
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 27, 2026 14:52
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.37%. Comparing base (86c42c5) to head (0c6bf14).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
packages/loopover-engine/src/fleet-run-manifest.ts 46.15% 7 Missing ⚠️

❌ Your patch check has failed because the patch coverage (50.00%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9374      +/-   ##
==========================================
- Coverage   75.38%   75.37%   -0.01%     
==========================================
  Files         275      275              
  Lines       58023    58035      +12     
  Branches     6181     6181              
==========================================
+ Hits        43739    43746       +7     
- Misses      14014    14019       +5     
  Partials      270      270              
Flag Coverage Δ
engine 65.58% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-engine/src/index.ts 100.00% <100.00%> (ø)
packages/loopover-engine/src/fleet-run-manifest.ts 39.10% <46.15%> (+0.88%) ⬆️

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 27, 2026
@loopover-orb

loopover-orb Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-27 15:11:05 UTC

3 files · 1 AI reviewer · no blockers · CI failing · unstable

🛑 Suggested Action - Fix Blockers

Review summary
This PR extracts the per-repo worktree default into a dedicated `DEFAULT_FLEET_RUN_MANIFEST_REPO_MAX_CONCURRENT_WORKTREES` constant and uses it consistently for both the bare-string and object-form repo entry branches in `normalizeRepoList`, decoupling it from the fleet-wide `totalConcurrentWorktrees` default. The change is correct and narrowly scoped: both defaults are currently `1`, so behavior is unchanged today, but the coupling that previously existed (bare-string branch silently inheriting the fleet-wide total) is now removed. The new test explicitly drives a non-default fleet-wide total through the parser to prove the per-repo defaults don't inherit it, which is a real regression test for the described bug, not a fabricated scenario.

Nits — 3 non-blocking
  • The doc comment on the new constant (fleet-run-manifest.ts:48-51) is verbose for a single-line primitive constant; could be trimmed to state just the invariant without repeating the fleet-wide/per-repo distinction already covered in the type-level docs above it.
  • index.ts is growing into a very large barrel file (~580 lines); unrelated to this PR but worth flagging as an ongoing maintainability concern for barrel-export files in this package.
  • Consider whether `MAX_MANIFEST_REPOS` or other manifest-wide constants should eventually move to a single `constants.ts` alongside this new export, though not required for this PR.

CI checks failing

  • codecov/patch — 50.00% of diff hit (target 99.00%)
  • validate
  • validate-tests

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #9324
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 65 registered-repo PR(s), 45 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bitfathers94; Gittensor profile; 65 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The PR adds a dedicated DEFAULT_FLEET_RUN_MANIFEST_REPO_MAX_CONCURRENT_WORKTREES constant, uses it in both the bare-string and object-form branches of normalizeRepoList, leaves DEFAULT_FLEET_RUN_MANIFEST.totalConcurrentWorktrees untouched, and adds a test that varies the fleet-wide total via manifest input while asserting bare-string and object-form entries still fall back to the dedicated constan

Review context
  • Author: bitfathers94
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript
  • Official Gittensor activity: 65 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 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.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch, validate, validate-tests)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

engine: fleet-run-manifest's bare-string repo entries default maxConcurrentWorktrees from the wrong constant

1 participant