Skip to content

Record the furthest meaningful failure for unverified examples too (#588) - #600

Merged
godofecht merged 1 commit into
mainfrom
ledger-meaningful-failure
Aug 19, 2026
Merged

godofecht merged 1 commit into
mainfrom
ledger-meaningful-failure

Conversation

@godofecht

@godofecht godofecht commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #588. Extends what #572 did for expect-error blocks to ordinary unverified ones.

The problem

standalone runs before the wrappers, so a statement fragment was recorded as:

Top-level 'let' at line 1 must be 'let mut'

That is the harness failing to wrap a fragment. It says nothing about the program. Where a later rung reached the type checker and failed for a real reason, that reason was thrown away.

After

74 of the 221 entries now carry the real reason:

stage before after
parse 173 99
types 29 103
clang 19 19
ROADMAP.md:547                     Undefined function 'Err'
ROADMAP.md:579                     Field 'x' not found on type Point
apps/http_json_cache/README.md:55  Undefined function 'http_get'

The counts are unchanged; only the diagnosis is. That matters because the ledger is the worklist for #583, and half of it was describing the harness rather than the example.

Verification

Check Result
check_doc_examples.py --check-ledger no new unverified, 221
pytest on the doc tooling tests passed

)

PR #572 did this for expect-error blocks. Ordinary unverified ones still kept
the first failure, and standalone runs before the wrappers, so a statement
fragment was recorded as

    Top-level 'let' at line 1 must be 'let mut'

which is the harness failing to wrap a fragment, not the compiler saying
anything about the program. Where a later rung reached the type checker, that
is what the ledger now carries.

74 of the 221 entries move from a superficial parse error to the real reason:

    parse 173 -> 99
    types   29 -> 103
    clang   19 -> 19

The counts are unchanged; only the diagnosis is. That matters because the
ledger is the worklist for driving the remaining blocks to zero, and half of
it was describing the harness rather than the example.

Closes #588

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@godofecht
godofecht merged commit 2d2bd3f into main Aug 19, 2026
22 checks passed
@godofecht
godofecht deleted the ledger-meaningful-failure branch August 19, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doc example ledger should report the furthest meaningful harness failure

1 participant