Proof Portal
jsonparser
ProbeLabs23 findings · 123 requirementsv1.6.0: Append function + KI-2/3/4 fixes
Owned by Buger
Intent
What this change sets out to do, in the author's words.
v1.6.0 adds the Append API for appending an element to a JSON array by path (clean array growth without manual buffer surgery), and resolves three audit-surfaced known issues — KI-2 (ParseInt silent false-success on sign-only input like "-"), KI-3 (Set/Delete disposition on array/object elements), and KI-4 (append onto a top-level array). New and corrected surface traces to SYS-REQ-009/015/039/058/064/110 via source-native // SYS-REQ-xxx code annotations.
Affected requirements
The requirements this change touches — each links to its full page.
Approvals
Human and AI-agent reviews of the requirements this change moves or scopes — who signed off, and why.
- Claude:spec Conformance · AI agentApprovedAug 20, 2026 · last monthSYS-REQ-039
Show justificationHide justification
The invariant
!raw_int_token_overflows_int64 | returns_parseint_overflow_errorrequires an int64-overflowing token to yield OverflowIntegerError, and ParseInt (parser.go:2168) correctly surfaces OverflowIntegerError when parseInt reports overflow. The defect is in parseInt: its fast-path digit-count gate isif l-i < 20instead of< 19(bytes.go:27), so a 19-digit value takes the unchecked int64 accumulation loop that wraps silently and returns (wrapped, true, false) with no overflow signal, so ParseInt returns a wrong value and nil error for e.g. 9999999999999999999. This is the intentional overflow defect tracked by KI-7 (CWE-190), witnessed by TestDemoKI7 and the MCDC Row2 invariant-violation test. Wrapper is correct; tracked overflow-check defect makes verification honestly fail — approvable. - Claude:spec Conformance · AI agentApprovedAug 20, 2026 · last monthSYS-REQ-064
Show justificationHide justification
The requirement is narrowly the empty-input partition: ParseInt on an empty slice must return MalformedValueError. parseInt (bytes.go) opens with
l := len(bytes); if l == 0 { return 0, false, false }, i.e. ok=false and overflow=false, and ParseInt (parser.go:2169) maps that (!ok, !overflow) case to MalformedValueError. The MCDC and boundary tests (TestParseIntEmpty, TestMCDC_SYS_REQ_064_Row2/Row3) exercise exactlyParseInt([]byte(""))and assert the malformed error. The KI-2 (sign-only-) and KI-7 (19-digit overflow) defects touch other partitions of parseInt and neither reaches the l==0 guard, so the empty-input obligation itself is genuinely met. - Claude:spec Conformance · AI agentApprovedAug 20, 2026 · last monthSYS-REQ-058
Show justificationHide justification
Both exact int64 boundaries decode correctly. Max '9223372036854775807' (19 digits) takes the fast path (bytes.go:40) and accumulates to exactly maxInt64 with no intermediate overflow; min '-9223372036854775808' (l-i=19) also takes the fast path where v=10*v+d wraps to math.MinInt64 and the neg branch's '-v' wraps back to MinInt64 (bytes.go:46,49-51), and ParseInt returns v with nil error (parser.go:2168-2176). TestParseIntBoundaryValues asserts both equal math.MaxInt64/MinInt64. KI-2 (sign-only '-') is linked here but is status=fixed via the 'if i == l' guard (bytes.go:34-36) and concerns a different partition, so no open defect affects the boundary formula.
Readiness
The conditions that must hold before this change is considered mergeable.
- Requirements reviewed
- No suspect trace links
History
This change's decision lineage — who did what, when. Most recent first.
- CreatedBugerJul 29, 2026 · 2 months ago
Change history
Every recorded revision of this change's source file — newest first, each with its commit message and the diff for that change.