● Built and verified. Here's what landed. #10

Merged
navicore merged 1 commit from better-errors into main 2026-06-19 17:06:20 +00:00
Owner

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.

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.
● Built and verified. Here's what landed.
All checks were successful
CI - Linux / CI - Linux x86_64 (pull_request) Successful in 55s
2881b2d858
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.
navicore deleted branch better-errors 2026-06-19 17:06:20 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
navicore/loglings!10
No description provided.