fix(config): warn on unknown top-level fields in the focus-manifest validator - #6075
Conversation
…alidator Fixes JSONbored#5929. buildFocusManifestValidation (behind loopover_validate_config / POST /v1/validate/focus-manifest) read only known fields, so a typo'd top-level block (e.g. `gates:` for `gate:`) was silently dropped with status "ok" and zero warnings — unlike the selfhost config-lint validator, which flags it. Reuses config-lint's unknownTopLevelWarnings() (now exported) so both validators share one allowlist + retired-field handling, and adds a test.
|
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 #6075 +/- ##
=======================================
Coverage 95.22% 95.22%
=======================================
Files 595 595
Lines 46998 46998
Branches 15015 15015
=======================================
Hits 44756 44756
Misses 1493 1493
Partials 749 749
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-15 08:28:45 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 3 non-blocking
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
Full command reference: https://gittensory.aethereal.dev/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.
|
Fixes #5929.
buildFocusManifestValidation(behind theloopover_validate_configMCP tool andPOST /v1/validate/focus-manifest, i.e.loopover-mcp validate-config) read only known fields off the parsed manifest, so a typo'd top-level block — e.g.gates:instead ofgate:, orpreferedLabels:forpreferredLabels:— was silently dropped withstatus: "ok"and zero warnings. The selfhostconfig-lintvalidator already flags these.Reuses config-lint's
unknownTopLevelWarnings()(now exported) so both validators share oneTOP_LEVEL_FIELDSallowlist + retired-field migration handling, and wires its warnings into the focus-manifest validator. Adds a test (typo'dgates:→warn+ "unknown top-level field"; clean manifest unaffected). 100% branch coverage on the changed file; config-lint tests still green; typecheck clean.