gcfg: Read a leading BOM and continued values the way git does #16
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 196 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.316
Real PR Conversation Timeline
1 comments
"Review active on #16"
general
weight: 0.35
pjbgf
gcfg reads two things differently from git, which go-git inherits through
plumbing/format/config:illegal character U+FEFF, so go-git can't open a repository or load a global config that has one. git skips it. The scanner now ignores a BOM at the very start, asgo/scannerdoes.\, git-config documents that "the backslash and the end-of-line are stripped". gcfg kept the newline, soa = first \+<TAB>secondread as"first \n\tsecond"where git reads"first \tsecond". Inside quotes,\followed by CRLF failed as an unknown escape sequence.TestReadWithCallbackexpected the newline to be kept (from #2); it now expects git's value. The newTestReadWithCallbackMatchesGitcases use whatgit config --list(2.50.1) reports for the same text, and each fails with its part of the change reverted.Checked downstream: go-git's tests with a
replacepointing at this branch give the same results as main (plumbing/format/configandconfigpass; the only failure,TestConformanceSuite/TestIgnoreDoubleStarPrefix, fails on main too). A side-by-side of go-git andgit config --listover a set of tricky configs now differs only where go-git can't represent git's result (valueless keys,[remote ""]), plus the deprecated[section.sub]header syntax and variables after a header on the same line, which I left out.This was written with AI assistance (Claude Code) and reviewed and tested as described above.