Preserve YAML string types and explicit numeric evidence
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Shared reporting and PromptKit adoption remediation
|
||||
|
||||
Status: four open findings; R1–R3 complete. R1–R3 are from the architectural review of
|
||||
Status: three open findings; R1–R4 complete. R1–R3 are from the architectural review of
|
||||
`f83866e44a8a9066db52cbd2aa5cccde0d69a839`. R4–R7 are from the algorithmic
|
||||
audit of `f5b2d1f80c4720b762f3301c29d5050710c210d0`; R4 is a correctness
|
||||
issue and R5–R7 are efficiency opportunities for consideration.
|
||||
@@ -165,6 +165,13 @@ selected; their implementations below were not prescribed by the plan.
|
||||
|
||||
## R4 — P2: YAML conversion reclassifies native strings as numbers
|
||||
|
||||
**Complete.** Decoding now honors resolved string tags; core YAML emission
|
||||
explicitly retains numeric tags for overflow tokens instead of relying on
|
||||
heuristic decoding. String values/keys and explicit large numbers round-trip
|
||||
through YAML and JSON. The independent core suite passes, and temporary native
|
||||
ConfigKit consumer probes pass for whole/focused display and detailed difference
|
||||
snapshots with Go 1.27.0. No optional-library dependency was added to core.
|
||||
|
||||
**Location:** [report_value.go](../../report_value.go), yamlReportValue
|
||||
lines 106–118.
|
||||
|
||||
@@ -190,8 +197,8 @@ The shared decoder also serves focused display and difference snapshots.
|
||||
problem is type correctness, not its running time. Preserve native resolved
|
||||
string tags rather than inferring numeric intent from spelling. Continue to
|
||||
preserve numeric precision when numeric evidence exists, such as `!!int` or
|
||||
`!!float` nodes and the core's JSON number representation. Core-generated YAML
|
||||
already retains explicit numeric tags when needed. Do not compensate by changing
|
||||
`!!float` nodes and the core's JSON number representation. Retain explicit numeric tags in core-generated YAML when needed; the emitter
|
||||
can otherwise omit them for overflow tokens. Do not compensate by changing
|
||||
upstream loading or by reparsing mutable runtime configuration. Review tests
|
||||
that currently require numeric promotion of resolved plain strings; they cannot
|
||||
override the selected string-versus-number preservation contract.
|
||||
|
||||
Reference in New Issue
Block a user