Proof Portal

Projects

jsonparser

ProbeLabs23 findings · 123 requirements

The fastest JSON parser for Go — formally verified with ReqProof (real library, master).

All requirements
RequirementSYS-REQ-008SystemReview

When EachKey is called with one or more requested key paths, the parser shall emit callback results for found paths, omit found-value callbacks for missing paths, surface malformed-input errors, and complete the requested multi-path scan.

This requirement changed after its last recorded review, so approval is stale. Automated checks pass and 1/1 obligations are satisfied.
PriorityshallTypeguaranteeCategoryfunctionalComponentparserAssuranceEFindingsnone open

Specification

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

Description

When EachKey is called with one or more requested key paths, the parser shall emit callback results for found paths, omit found-value callbacks for missing paths, surface malformed-input errors, and complete the requested multi-path scan. EachKeyErr is the io.EOF-aware EachKey variant where the callback may stop iteration by returning an error; io.EOF stops iteration gracefully while any other non-nil error stops iteration and is propagated to the caller.

FRETish formula
the parser shall always satisfy !multipath_requests_are_provided | eachkey_callback_receives_found_values | missing_multipath_request_does_not_emit_callback | eachkey_malformed_input_returns_error | eachkey_completes_requested_scan
View full formal model

Rationale & tags

Why this requirement exists, and how it is categorised.

EachKey is the documented single-pass multi-path lookup helper and needs explicit contract coverage for both found and missing path behavior.

Verification & provenance

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

Assurance levelE
Formalizationvalid
Realizabilityrealizable
Vacuitychecked_ok
Strategyfretish

Review

Status
approved
Reviewer
Leonidbugaev
Reviewed
Apr 23, 2026, 00:00 UTC

History

Created
Apr 13, 2026, 17:10 UTC · Created via CLI
Modified
Jul 26, 2026, 14:54 UTC · Created via CLI

Change history

Every recorded revision of this requirement's source file — newest first, each with its commit message and the diff for that change.

Every recorded revision of this object's source — newest first, each with the commit message and its file-level diff.

Obligations

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

1 obligation · 1 discharged

Browse the catalogue
Discharged

Behavior for unusual but valid input combinations.

If it were violatedLow

EachKeys with one requested path plus one malformed sibling emits a found-callback for the good path but loses or mis-routes the malformed-input error, leaving the caller with an incomplete scan and no error surfaced.

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

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 !multipath_requests_are_provided | eachkey_callback_receives_found_values | missing_multipath_request_does_not_emit_callback | eachkey_malformed_input_returns_error | eachkey_completes_requested_scan

Variables

NameTypeDirectionDescription
multipath_requests_are_providedTrue when EachKey is called with one or more requested key paths.
eachkey_callback_receives_found_valuesTrue when EachKey invokes the callback with the value and type for each requested path that is found during the scan.
missing_multipath_request_does_not_emit_callbackTrue when EachKey does not emit a found-value callback for a requested path that is absent.
eachkey_malformed_input_returns_errorTrue when EachKey surfaces an error for malformed or unusable input during the scan.
eachkey_completes_requested_scanTrue when EachKey completes the requested multi-path scan and stops once the requested results have been determined.

Witnesses· 6 scenarios total

  • TestMCDC_SYS_REQ_008_Row1_TriggerFalse
    exercises 1 condition scenario
  • TestPanickingErrors
    exercises 1 condition scenario
  • TestEachKey
    exercises 4 condition scenarios

MC/DC truth table· 6 rows

Each row assigns the formula's conditions (T/F) and shows the Result— the formula's value for that input row, not a test pass/fail. A row proves a condition when flipping only that condition flips the outcome. The test that covers each row is linked.

Covereda test exercises this rowExempteda reviewed mcdc:ignoreNo-actionfalse-result row satisfied by designUncoveredneeds a covering test
#eachkey_callback_receives_found_valueseachkey_completes_requested_scaneachkey_malformed_input_returns_errormissing_multipath_request_does_not_emit_callbackmultipath_requests_are_providedResultProvesCovering test
1FFFFFTmultipath_requests_are_provided
2FFFFTFeachkey_callback_receives_found_values
3FFFTTTmissing_multipath_request_does_not_emit_callback
4FFTFTTeachkey_malformed_input_returns_error
5FTFFTTeachkey_completes_requested_scan
6TFFFTTeachkey_callback_receives_found_values

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
14
At-risk contracts
0

Files to re-check (2)

  • fuzz.gofuzz.go
  • parser.goparser.go

Tests to re-run (14)

  • array_each_err_test.goarray_each_err_test.go
  • coverage_closure_test.gocoverage_closure_test.go
  • dead_code_audit_test.godead_code_audit_test.go
  • empty_key_path_test.goempty_key_path_test.go
  • fuzz_native_test.gofuzz_native_test.go
  • issues_56_107_229_test.goissues_56_107_229_test.go
  • mcdc_spec_witnesses_test.gomcdc_spec_witnesses_test.go
  • mcdc_supplement_test.gomcdc_supplement_test.go
  • obligation_evidence_test.goobligation_evidence_test.go
  • parser_error_test.goparser_error_test.go
  • parser_test.goparser_test.go
  • path_fuzz_test.gopath_fuzz_test.go
  • property_test.goproperty_test.go
  • v131_regression_test.gov131_regression_test.go

What this rests on

Changes

Semantic changes that move or scope this requirement — the intended work touching it. Each links to the full change.

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