● Built and verified. Here's what landed. #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "better-errors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What it does
On a mode="test" failure, the watcher now turns plgc's opaque false. into:
✗ 06-traffic
Test failed at check 3/9 (line 44):
action(green, go)
Implementation
top-level conjuncts (paren/bracket/quote-aware, comment-stripping, line-tracked), plus the monotone binary
search first_failing. No I/O, so it's fully unit-testable.
codes to Provable/Unprovable/Inconclusive.
The two load-bearing design points, both proven by tests
where the findall succeeds and the == fails — it correctly blames check 2 (the ==), which only works because S
stays bound across the prefix.
never re-probed since we already know it failed.
Guardrails honored
back to the original message (covered by multi_clause_test_bails, single_check_is_not_worth_bisecting, etc.).
Verification
Docs updated: ARCHITECTURE.md (runner + new bisect module), and the design doc flipped to implemented.
What it does On a mode="test" failure, the watcher now turns plgc's opaque false. into: ✗ 06-traffic Test failed at check 3/9 (line 44): action(green, go) false. Implementation - src/bisect.rs (new, ~220 lines incl. tests) — all the pure logic: parse the hidden test :- … clause into top-level conjuncts (paren/bracket/quote-aware, comment-stripping, line-tracked), plus the monotone binary search first_failing. No I/O, so it's fully unit-testable. - runner::bisect_failure — the orchestration: builds cumulative-prefix queries and probes plgc, mapping exit codes to Provable/Unprovable/Inconclusive. - exercise.rs — on Failed in test mode, attaches the blame line; falls back to the old message otherwise. The two load-bearing design points, both proven by tests - Prefixes, not isolated goals. blames_the_equality_not_the_findall_before_it builds a findall-then-== test where the findall succeeds and the == fails — it correctly blames check 2 (the ==), which only works because S stays bound across the prefix. - Binary search on the monotone prefix. ~3 probes for a 9-check failure, and the full conjunction (length N) is never re-probed since we already know it failed. Guardrails honored - No corpus change — tests/curriculum.rs untouched and still green; all 54 exercises validate. - Pay only on failure — bisection lives in the Failed arm; green runs do zero extra compiles. - Never worse — multi-clause test/0, single-check tests, non-test failures, and inconclusive probes all fall back to the original message (covered by multi_clause_test_bails, single_check_is_not_worth_bisecting, etc.). Verification - 18 bin tests pass (16 pure + 2 plgc-backed blame tests). - just ci green: fmt + clippy(-D warnings) clean, release build ok, all 54 exercises validated. - End-to-end demo reproduced the learner's exact bug and reported check 3/9 (line 44): action(green, go). Docs updated: ARCHITECTURE.md (runner + new bisect module), and the design doc flipped to implemented.