已合并
Fix formatted repository YAML configuration parsing #146
urandon创建于 28 天前
Fix formatted repository YAML configuration parsing #146
已合并
Pull Request已成功合入, 合并人@urandon
(感谢 urandon 的贡献)28 天前 关联了issue:[Feedback/bug][setup] Repo-local YAML block sequences fail effective config parsing
28 天前 关联了issue:[Feedback/bug][setup] Repo-local YAML block sequences fail effective config parsing
28 天前 合入了pull request,合并节点 SHA:57b2359175b18c0ca08527046c05adf072b06682
Closes #149
Scope and design
Replace the custom line/colon YAML lexer with the pinned yaml.v3 decoder using the shared typed config merge schema. Standard block/flow YAML and repository-doc include lists no longer break effective config loading. Preserve JSON behavior, legacy scalar list notation, quoted numeric/boolean compatibility, existing field provenance and repo-local path restrictions. Keep repository_docs semantics in its dedicated policy parser.
Typed legacy scalar coercion is bounded and copy-on-write for shared anchors. Invalid YAML/types, duplicate known keys, additional documents and cyclic aliases produce sanitized errors without raw scalar content.
Verification
Candidate SHA: f97378943e9f98ded5441b603e51c93780896c63
Base: 646f7e5f1da549d2439cd7b3a5d4fb830502e809
Passed: go test -count=1 ./...; go test -race -count=1 ./internal/config ./cmd/gitcode-mcp; scripts/check-product-docs.sh; git diff --check.
Minimal regression reproduced on the exact base, then passed on the candidate. Public testing polygon at 399d8548ef690b8a897ee0e0d494cf2beeba8298: isolated config show succeeds and offline MCP tools/list exposes search_sources.
Risk, recovery and UX
Shared configuration startup path affects all transports. Regression tests cover standard/legacy forms, aliases/cycles, malformed inputs, scalar redaction, JSON compatibility, merge provenance, path restrictions and CLI/MCP entrypoints. No schema migration, global-cache mutation or new UI cohort. Recovery is a normal revert; no stored config rewrite.
Independent review and exact-SHA required CI are pending and remain merge gates.