more audit work
This commit is contained in:
@@ -176,12 +176,35 @@ public static class CanonJson
|
||||
w.WriteEndArray();
|
||||
break;
|
||||
|
||||
case JsonValueKind.Number:
|
||||
if (TryWriteNormalizedNumber(el, w))
|
||||
{
|
||||
break;
|
||||
}
|
||||
el.WriteTo(w);
|
||||
break;
|
||||
|
||||
default:
|
||||
el.WriteTo(w);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool TryWriteNormalizedNumber(JsonElement element, Utf8JsonWriter writer)
|
||||
{
|
||||
if (element.TryGetDouble(out var doubleValue))
|
||||
{
|
||||
var bits = BitConverter.DoubleToInt64Bits(doubleValue);
|
||||
if (bits == unchecked((long)0x8000000000000000))
|
||||
{
|
||||
writer.WriteNumberValue(0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Computes SHA-256 hash of bytes, returns lowercase hex string.
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,6 @@ Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| AUDIT-0130-M | DONE | Maintainability audit for StellaOps.Canonical.Json; revalidated 2026-01-06. |
|
||||
| AUDIT-0130-T | DONE | Test coverage audit for StellaOps.Canonical.Json; revalidated 2026-01-06. |
|
||||
| AUDIT-0130-A | TODO | Revalidated 2026-01-06; open findings pending apply. |
|
||||
| AUDIT-0047-M | DONE | Revalidated 2026-01-08; open findings tracked in audit report. |
|
||||
| AUDIT-0047-T | DONE | Revalidated 2026-01-08; open findings tracked in audit report. |
|
||||
| AUDIT-0047-A | TODO | Requires MAINT/TEST + approval. |
|
||||
|
||||
Reference in New Issue
Block a user