Proof Portal

Projects

jsonparser

ProbeLabs36 findings · 123 requirements
SYS-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.

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

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
human:leonidbugaev
Reviewed
Apr 23, 2026, 00:00 UTC

History

Created
Apr 13, 2026, 17:10 UTC · human:cli
Modified
Jul 26, 2026, 14:54 UTC · human:cli

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.

Worst case if 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

  • TestFuzzEachKeyHarnessCoverage
    coverage_closure_test.go:16
  • TestRemoval4_EachKey_SkipNestedObject
    dead_code_audit_test.go:287
  • TestRemoval4_EachKey_SkipDeeplyNestedObject
    dead_code_audit_test.go:312
  • TestRemoval4_EachKey_SkipNestedArray
    dead_code_audit_test.go:332
  • TestRemoval4_EachKey_SkipMultipleNestedObjects
    dead_code_audit_test.go:352
  • TestRemoval4_EachKey_NestedObjectWithString
    dead_code_audit_test.go:372
  • TestStress_EachKey_LargeNestedSkip
    dead_code_audit_test.go:619
  • TestRemoval4_EachKey_TracePath
    dead_code_audit_test.go:675
  • TestRemoval4_EachKey_SkipVariousValueTypes
    dead_code_audit_test.go:723
  • TestEachKeyEmptyKeyPathComponent
    empty_key_path_test.go:134
  • FuzzEachKeyNative
    fuzz_native_test.go:128
  • TestMCDC_SYS_REQ_008_Row1_TriggerFalse
    mcdc_spec_witnesses_test.go:209exercises 1 condition scenario
  • TestEachKeySupplementalCoverage
    mcdc_supplement_test.go:110
  • TestCodeMCDC_EachKeyNonObjectUnmatchedValue
    mcdc_supplement_test.go:565
  • TestCodeMCDC_EachKeyLoopBound
    mcdc_supplement_test.go:755
  • TestObligation_SYS_REQ_008
    obligation_evidence_test.go:153
  • TestKeyDepthArray
    parser_error_test.go:103
  • TestKeyCountArray
    parser_error_test.go:123
  • TestEachKeyArray
    parser_error_test.go:146
  • TestLargeArray
    parser_error_test.go:171
  • TestArrayOutOfBounds
    parser_error_test.go:192
  • TestPanickingErrors
    parser_error_test.go:26exercises 1 condition scenario
  • TestEachKeyNoRequests
    parser_error_test.go:48
  • TestKeyDepth
    parser_error_test.go:60
  • TestKeyCount
    parser_error_test.go:80
  • TestEachKey
    parser_test.go:1990exercises 4 condition scenarios
  • TestPropertyEachKeyDispatch
    property_test.go:401
  • TestApiConsistencyEachKeyMatchesGet
    property_test.go:468
  • TestEachKeyDescendsIntoArrayIndexAtEndOfPath
    v131_regression_test.go:102

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

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