Proof Portal

Projects

jsonparser

ProbeLabs36 findings · 123 requirements
SYS-REQ-116SystemApproved

A ReaderParser shall provide path-based access to JSON data from an io.Reader stream, supporting Get, GetString, and ArrayEach without requiring the entire document to be loaded into memory.

PriorityshallTypeguaranteeCategoryfunctionalComponentparserAssuranceBFindingsnone open

Specification

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

Description

A ReaderParser shall provide path-based access to JSON data from an io.Reader stream, supporting Get, GetString, and ArrayEach without requiring the entire document to be loaded into memory. The parser shall buffer data incrementally and yield values as they are found.

FRETish formula
the parser shall always satisfy reader_parser_provides_incremental_stream_access

Rationale & tags

Why this requirement exists, and how it is categorised.

Large JSON documents can exceed available memory even when callers need only one path or need to process array elements sequentially. ReaderParser preserves jsonparser's path-based access model while bounding retained stream data to the current window or value.

streamingio_readerincrementalnominalboundaryempty_inputmalformed_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, 13:58 UTC
v1.5.0: Config + lenient parsing (SYS-REQ-115), streaming ReaderParser (SYS-REQ-116)

History

Created
Jul 28, 2026, 00:00 UTC · agent:codex
Modified
Jul 28, 2026, 13:58 UTC · human:buger

Obligations

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

4 obligations · 3 discharged · 1 not yet witnessed

Browse the catalogue
Discharged

Happy-path behavior with valid inputs.

Worst case if violatedMedium

ReaderParser returns a different value or ValueType than the byte-slice parser for the same path because incremental matching loses nesting or quote state at a read boundary.

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

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

Worst case if violatedMedium

A key, escape sequence, scalar, string, or composite value crossing the sliding-window boundary is truncated, duplicated, or skipped, returning corrupt value bytes or retaining the whole stream.

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

Behavior when inputs are absent, nil, zero-length, or blank.

Worst case if violatedMedium

An empty or nil reader causes a panic or an unbounded read loop instead of returning the defined not-found or malformed-input result.

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

Behavior when inputs are syntactically or structurally invalid.

Worst case if violatedHigh

A truncated string, array, or object is treated as complete and yielded to the caller, or the parser loops forever waiting for a delimiter after stream EOF.

Discharging evidence1/2 required witnessed
  • negativerequirednot yet witnessed
    Required evidence not yet witnessed — no covering test recorded.
  • 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 reader_parser_provides_incremental_stream_access

Variables

NameTypeDirectionDescription
reader_parser_provides_incremental_stream_accessTrue when ReaderParser resolves paths and iterates root arrays from an io.Reader while retaining only the active sliding window or value and reporting empty or malformed streams without panicking or looping.

Witnesses· 2 scenarios total

  • TestReaderParserGet
    reader_parser_test.go:12
  • TestReaderParserLargeFile
    reader_parser_test.go:135
  • TestReaderParserMalformed
    reader_parser_test.go:164
  • TestReaderParserChunkBoundary
    reader_parser_test.go:179
  • TestReaderParserConfig
    reader_parser_test.go:197
  • TestReaderParserEmpty
    reader_parser_test.go:219
  • TestReaderParserGetString
    reader_parser_test.go:74
  • TestReaderParserArrayEach
    reader_parser_test.go:93
  • TestMCDC_SYS_REQ_116_Row2_ReaderParserGetsFromStream
    v150_mcdc_witness_test.go:37exercises 1 condition scenario
  • TestMCDC_SYS_REQ_116_Row1_PackageGetRequiresByteSliceNotReader
    v150_mcdc_witness_test.go:52exercises 1 condition scenario

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
1
Tests
2
At-risk contracts
0

Files to re-check (1)

  • reader_parser.goreader_parser.go

Tests to re-run (2)

  • reader_parser_test.goreader_parser_test.go
  • v150_mcdc_witness_test.gov150_mcdc_witness_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