DEFECT-260727-WWWY
fixed · pin green on the packaged treeKindepisode ep-DEFECT-260727-WWWY · task_family bug_fix · split demo · difficulty hard · reward type toolchain
Task
Fix Set() so that a beyond-length array index appends instead of destroying the array.
reproducer from the record: Set({"a":[1,2,3]}, 99, "a", "[9]") returned {"a":[99]} before the fix and {"a":[1,2,3,99]} after
Subject
github.com/buger/jsonparser @ 6454f95de679fdd0c623a6183f7cff82da56b442 · MIT
the packaged, post-fix tree; the affected revision is historical and public, outside the zip
Intent
SYS-REQ-110 · approved · reviewed_by human:buger, 2026-07-26
When Set targets an array index [N] with N >= len(array), the parser shall append at the end and return the mutated document, not overwrite existing elements or panic.
rests on STK-REQ-005 · formalized in FRETish · the promise this defect broke
Failure class
boundary · silent data loss · severity high
hazard row on SYS-REQ-110; the record's surface is data_integrity. Sibling hazards on the same requirement: nested_mutation (medium), element_type_partition (high)
Available context
the requirement neighbourhood: SYS-REQ-110, SYS-REQ-009, STK-REQ-005 · the implementation: parser.go Set · the historical failure: DEFECT-260727-WWWY, with KI-4 as the separate top-level partition · the public tests named in the record
Verifier
go test -count=1 -timeout 120s -run 'TestSetBeyondLengthScalarArrayPreservesElements_SYS110|TestMCDC_SYS_REQ_110' .
deterministic go test pin, no LLM judge, exit code is the verdict · run through re-run/verify.sh --pin DEFECT-260727-WWWY
Success
the known witness passes: TestSetBeyondLengthScalarArrayPreservesElements_SYS110 · the requirement’s MC/DC obligation row passes · the sibling partition (KI-4, top-level arrays) carries its own explicit status
holds on the packaged tree; a red-before run needs the pre-fix commit
Provenance
PROVENANCE.json: source licence (MIT) · subject commit · producer (Proof / ReqProof) · review policy · content-root SHA-256 and per-file SHA-256 for all 201 payload files
The packaged tree is post-fix. The affected revision is historical and public, outside the zip. findings/INDEX.md says how to reach it. Green on the packaged tree means the fixed tree still holds the pinned claim.