feat(miner-scale): add fleet run-manifest for multi-repo worktree scheduling - #4402
Conversation
…eduling
Add a tolerant parser for the fleet run-manifest — the operator-side config
that declares which repos a fleet run works across and how a finite
worktree/concurrency budget is split between them. This is the operator
analogue of the maintainer-authored `.gittensory-miner.yml` goal spec and
mirrors its parser convention: every field optional, unknown keys ignored,
malformed input degrades to a documented default with a warning rather than
throwing.
- packages/gittensory-engine/src/fleet-run-manifest.ts: parseFleetRunManifest
/ parseFleetRunManifestContent (JSON or YAML), repo-list normalization
(bare "owner/repo" string or { repoFullName, maxConcurrentWorktrees }
mapping), dedupe, per-repo and total concurrency budgets, size/count caps.
- packages/gittensory-engine/src/index.ts: barrel re-export of the API.
- packages/gittensory-miner/docs/fleet-run-manifest.md: distinction doc so the
fleet run-manifest is not conflated with `.gittensory-miner.yml`.
- test/unit/fleet-run-manifest-parser.test.ts: full coverage of the parser.
Closes JSONbored#4299
|
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 #4402 +/- ##
==========================================
+ Coverage 93.96% 93.98% +0.01%
==========================================
Files 401 402 +1
Lines 36892 36967 +75
Branches 13490 13514 +24
==========================================
+ Hits 34667 34742 +75
Misses 1569 1569
Partials 656 656
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-09 17:23:12 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Closes #4299
What
Adds a tolerant parser for the fleet run-manifest — the top-level config a fleet operator authors to run the miner across many repos at once. It declares which repos are in scope for a fleet run and how a finite worktree/concurrency budget is split between them.
This is the operator-side analogue of, and deliberately not the same file as, the maintainer-authored
.gittensory-miner.ymlgoal spec (miner-goal-spec.ts). It follows the exact same tolerant-parser convention already established in this codebase:Schema
repos— a list of target repos. Each entry is either a bare"owner/repo"string (uses the default per-repo budget) or a{ repoFullName, maxConcurrentWorktrees }mapping. Invalid or duplicate entries are skipped with a warning.repoFullNameis a canonicalowner/repo, compatible with the opportunity-fanout target normalization. Default:[].repos[].maxConcurrentWorktrees— max concurrent worktrees for that repo. A positive integer (floored; sub-1 falls back to the default). Default:1.totalConcurrentWorktrees— total concurrent worktrees across the whole fleet. A positive integer. Default:1.Byte cap (64 KiB) and repo-count cap (500) match the defensive limits used elsewhere in the engine.
Scope
This module produces only the parsed, typed manifest. Driving the concurrency allocator from it, and reading the same repo list into the cross-repo backlog, are separate concerns tracked by their own issues — both consume this manifest; neither wiring lives here.
Files
packages/gittensory-engine/src/fleet-run-manifest.ts— the parser (mirrorsminer-goal-spec.ts).packages/gittensory-engine/src/index.ts— barrel re-export of the public API.packages/gittensory-miner/docs/fleet-run-manifest.md— distinction doc vs.gittensory-miner.yml.test/unit/fleet-run-manifest-parser.test.ts— parser tests (100% line and branch coverage of the new file).Testing
All 11 tests pass; typecheck clean. The new engine file is at 100% line and branch coverage.