feat(miner-foundation): MinerGoalSpec file discovery + example doc (#2294)#2685
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2685 +/- ##
=======================================
Coverage 96.13% 96.13%
=======================================
Files 239 239
Lines 26739 26739
Branches 9699 9699
=======================================
Hits 25705 25705
Misses 424 424
Partials 610 610 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-03 06:12:30 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 4 non-blocking
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.
|
3f25dfe to
818c566
Compare
…SONbored#2294) The tolerant parser (parseMinerGoalSpec / parseMinerGoalSpecContent) landed via JSONbored#2652/JSONbored#2658; this adds the remaining JSONbored#2294 pieces that were still missing on main: - discoverMinerGoalSpecPath(exists) + MINER_GOAL_SPEC_FILENAMES in miner-goal-spec.ts: the documented discovery order (.gittensory-miner.yml → .github/… → .json variants, first match wins). Pure — the existence check is injected, so it stays IO-free; a caller reads the returned path and feeds it to parseMinerGoalSpecContent. Exported from the barrel. - .gittensory-miner.yml.example at the repo root, matching .gittensory.yml.example's header + per-field "Default: X" style. Tests: discovery order, first-match-wins, null when absent, and that only the listed candidates are probed. Engine package: 37/37 pass.
818c566 to
b4832ea
Compare
…ly example (JSONbored#2294) - Add a probe-recording test that discoverMinerGoalSpecPath stops after the first match (.github yml), asserting the later .json variants are never probed — so a regression that keeps probing would be caught. - Replace the Unicode arrows/em-dashes in .gittensory-miner.yml.example with ASCII (-> and -) for copy/paste-friendly, diff-friendly config docs. Engine package: 38/38 pass.
Closes #2294.
The tolerant parser for
.gittensory-miner.yml(parseMinerGoalSpec/parseMinerGoalSpecContent) landed in the meantime via #2652 and #2658. This PR adds the remaining #2294 deliverables that are still missing on main — file discovery and the example doc — built directly on the merged parser (no duplication).Deliverables
discoverMinerGoalSpecPath(exists)+MINER_GOAL_SPEC_FILENAMESinminer-goal-spec.ts(exported from the barrel): the documented discovery order —.gittensory-miner.yml→.github/gittensory-miner.yml→.gittensory-miner.json→.github/gittensory-miner.json, first match wins. Pure — the existence check is injected, so it stays IO-free and unit-testable; a caller reads the returned path and feeds its content toparseMinerGoalSpecContent..gittensory-miner.yml.exampleat the repo root, matching.gittensory.yml.example's header + per-fieldDefault: Xstyle.Validation
npm testinpackages/gittensory-engine: 37/37 pass (new: discovery order, first-match-wins, null when absent, and that only the listed candidates are probed — the parser itself is already covered by #2652/#2658's tests).tscclean understrict.