feat(miner-discovery): add tolerant MinerGoalSpec parser#2658
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-03 02:44:25 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 5 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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2658 +/- ##
==========================================
+ Coverage 96.09% 96.10% +0.01%
==========================================
Files 237 237
Lines 26446 26521 +75
Branches 9588 9614 +26
==========================================
+ Hits 25414 25489 +75
Misses 425 425
Partials 607 607
🚀 New features to boost your workflow:
|
…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.
…2294) (#2685) * feat(miner-foundation): MinerGoalSpec file discovery + example doc (#2294) The tolerant parser (parseMinerGoalSpec / parseMinerGoalSpecContent) landed via #2652/#2658; this adds the remaining #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. * refactor(miner-foundation): assert discovery short-circuit + ASCII-only example (#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. --------- Co-authored-by: Nick M <274344962+nickmopen@users.noreply.github.com> Co-authored-by: ghost <49853598+JSONbored@users.noreply.github.com>
Summary
parseMinerGoalSpecandparseMinerGoalSpecContentwith tolerant JSON/YAML parsing, safe-default normalization, and explicit warnings for dropped or invalid fields@jsonbored/gittensory-engineCloses #2301.
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
npm run test:ci, which includes the full repo gate plusnpm run build:miner,npm run rees:test,npm run ui:test, and the remaining CI checks.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
Not applicable; this PR does not change visible UI, docs pages, or extension surfaces.
Notes
test/unit/mcp-cli-packets.test.tstimeout increase is a test-only stabilization change. The existing assertion already passed in isolation, but the fullnpm run test:coveragegate intermittently hit anAbortErrorat the default 1s API timeout under full-suite load.