Proof Portal

Projects

jsonparser

ProbeLabs36 findings · 123 requirements
SYS-REQ-113SystemApproved

EachKeyWildcard, ArrayEachWildcard, and SetWildcard accept [*] as a wildcard array-index component that fans out over every element of the addressed array.

PriorityshallTypeguaranteeCategoryfunctionalComponentparserAssuranceBFindingsnone open

Specification

The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.

Description

EachKeyWildcard, ArrayEachWildcard, and SetWildcard accept [*] as a wildcard array-index component that fans out over every element of the addressed array. EachKeyWildcard invokes the callback once per matched combination in document order; ArrayEachWildcard iterates an array addressed by a path that may end in [*]; SetWildcard applies Set to every concrete path produced by expanding all [*] components. Multiple wildcards compose by cartesian fan-out. If a wildcard addresses a non-array container the parser returns MalformedArrayError; an empty matched array is a no-op (SetWildcard returns data unchanged, EachKeyWildcard invokes no callback).

FRETish formula
the parser shall always satisfy wildcard_path_resolves_to_every_matched_element

Rationale & tags

Why this requirement exists, and how it is categorised.

v1.4.0 introduces [*] wildcard path components so library users can fan out over array elements without pre-walking the JSON; the contract must be explicit so future refactors preserve document order, multi-wildcard composition, and the no-panic-on-non-array guarantee.

wildcardpatharrayeach_keysetnominalboundarymalformed_input

Verification & provenance

How this requirement was checked: the review trail, edit history, and the machine-analysis status terms (each ⓘ explains what it means).

Assurance levelB
Formalizationvalid
Realizabilityrealizable
Vacuitychecked_ok
Strategyfretish

Review

Status
approved
Reviewer
human:buger · lead_engineer
Reviewed
Jul 28, 2026, 08:49 UTC
v1.4.0 added in CHG-260728-RKTS: container length accessors, wildcard path support, JSONPath compiled paths. Traced via source-native // SYS-REQ-xxx annotations; obligation hazards graded; witnesses in len_uint_test.go, wildcard_test.go, path_compiler_test.go.

History

Created
Jul 28, 2026, 08:29 UTC · human:cli
Modified
Jul 28, 2026, 08:49 UTC · human:buger

Obligations

What this requirement must witness to be considered satisfied — the required evidence, and the tests that discharge each one.

3 obligations · 3 discharged

Browse the catalogue
Discharged

Happy-path behavior with valid inputs.

Worst case if violatedMedium

EachKeyWildcard/SetWildcard emit callbacks or apply mutations in non-document order, or skip matched elements / emit extra callbacks, breaking deterministic fan-out that downstream callers rely on.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 3 tests
Discharged

Behavior at limits, thresholds, and edge-of-range values.

Worst case if violatedHigh

A [*] component matching an empty array regresses to invoke the callback once with a stale value, or SetWildcard corrupts the document on the empty-match no-op path; multi-wildcard composition drops one branch of the cartesian product.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 1 test
Discharged

Behavior when inputs are syntactically or structurally invalid.

Worst case if violatedHigh

A [*] component addressing a non-array container (object, scalar) is not rejected with MalformedArrayError and instead panics, silently skips, or mutates an unaddressed sibling; nested malformed JSON inside a matched element propagates incorrectly to the caller.

Discharging evidence2/2 required witnessed
  • negativerequiredpresent
    Covered by 2 tests
  • nominalrequiredpresent
    Covered by 2 tests

Formula evidence

The formal formula behind this requirement, the variables it is written over, and the tests that exercise it (each term is explained inline).

FRETish formula

the parser shall always satisfy wildcard_path_resolves_to_every_matched_element

Variables

NameTypeDirectionDescription
wildcard_path_resolves_to_every_matched_elementTrue when EachKeyWildcard/ArrayEachWildcard/SetWildcard fan out over every element matched by [*] components in document order (EachKeyWildcard one callback per matched combination, SetWildcard applies to every expanded concrete path), returning MalformedArrayError for a non-array container and treating an empty matched array as a no-op.

Witnesses· 2 scenarios total

  • TestMCDC_SYS_REQ_113_Row1_InvariantViolation
    mcdc_spec_witnesses_test.go:3582exercises 1 condition scenario
  • TestMCDC_SYS_REQ_113_Row2_Nominal
    mcdc_spec_witnesses_test.go:3601exercises 1 condition scenario
  • TestArrayEachWildcard
    wildcard_test.go:112
  • TestSetWildcard
    wildcard_test.go:148
  • TestEachKeyWildcard
    wildcard_test.go:9

Its place

This requirement shown inside its trace neighbourhood — the parents it satisfies, the code and tests attached to it, and its findings.

Loading graph…

Trace evidence

The concrete artifacts linked to this requirement — implementing code, verifying tests, documents, and the findings raised against it.

Impact

Blast radius — if you change this requirement, what else may need re-checking, and what it in turn depends on.

If you change this

Requirements
0
Files
2
Tests
4
At-risk contracts
0

Files to re-check (2)

  • aliases.goaliases.go
  • wildcard.gowildcard.go

Tests to re-run (4)

  • aliases_test.goaliases_test.go
  • mcdc_spec_witnesses_test.gomcdc_spec_witnesses_test.go
  • parser_test.goparser_test.go
  • wildcard_test.gowildcard_test.go

What this rests on

Discussions

Discuss this with the proof team. Nothing changes in your audit automatically — you open a request and a staff member records any outcome inside the thread.

Sign in to discuss this with the proof team.Sign in