You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Doc example ledger should report the furthest meaningful harness failure #588
scripts/check_doc_examples.py currently keeps the first failure seen for an ordinary unverified block. Because standalone is tried before stmt-wrap and split-wrap, many fragment examples are recorded with a superficial top-level parse error even when a later harness mode gets substantially further and fails for the real reason.
This is especially visible in the large family of ledger entries reported as Top-level 'let' ... must be 'let mut', Unexpected declaration: IF, FOR, MATCH, HANDLE, WHILE, and similar. Those are often expected when a statement fragment is first attempted as a compilation unit. The checker then tries wrappers, but for ordinary unverified results it ultimately returns best_noop or first[1] with stage=first[0]. The more meaningful later type/codegen/clang failure is therefore lost.
The checker already has the machinery to distinguish stages and it already prefers a meaningful rejection for expect-error. Apply the same principle to ordinary failures: retain the furthest meaningful stage reached across applicable harness modes and record the corresponding diagnostic, plus modes_tried where useful.
Do not turn a later wrapper failure into a false pass. This issue is diagnostic/reporting only: the verifier should still require a genuinely successful mode.
Acceptance: an unverified fragment that fails standalone parsing but reaches types/codegen/clang under a harness is reported at that later stage with that diagnostic. This should make the remaining #583 backlog actionable instead of grouping unrelated root causes under top-level parse noise.
Activity
Record the furthest meaningful failure for unverified examples too (#588