fix(selfhost): mirror the engine's JSON->YAML retry in private-config parsing - #10120
Conversation
… parsing
parseConfigMapping and validateConfigWriteContent detected JSON vs YAML the
same way parseFocusManifestContent does but never got its retry: a leading
`{`/`[` document that's valid YAML flow-mapping syntax but invalid strict
JSON was treated as unparseable, silently dropping a per-repo config layer
from the merge (or, with only one layer mounted, applying it correctly while
still firing a false "malformed" warning and metric increment). The write
validator had the identical gap, rejecting documents the read path already
merges. Both now retry as YAML on a JSON parse failure before giving up,
matching the engine parser byte-for-byte.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-31 08:02:10 UTC
Review summary Nits — 6 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed 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://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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10120 +/- ##
==========================================
+ Coverage 79.79% 79.86% +0.06%
==========================================
Files 282 283 +1
Lines 58690 58907 +217
Branches 6892 6960 +68
==========================================
+ Hits 46832 47046 +214
Misses 11570 11570
- Partials 288 291 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
fix(selfhost): mirror the engine's JSON->YAML retry in private-config parsing
parseConfigMapping and validateConfigWriteContent detected JSON vs YAML the
same way parseFocusManifestContent does but never got its retry: a leading
{/[document that's valid YAML flow-mapping syntax but invalid strictJSON was treated as unparseable, silently dropping a per-repo config layer
from the merge (or, with only one layer mounted, applying it correctly while
still firing a false "malformed" warning and metric increment). The write
validator had the identical gap, rejecting documents the read path already
merges. Both now retry as YAML on a JSON parse failure before giving up,
matching the engine parser byte-for-byte.
Closes #10057