Skip to content

Probeable spec: one generated version and the same test ladder as probeable code - #190

Merged
CoffeePoweredComputers merged 1 commit into
masterfrom
probeable-spec-ladder
Oct 16, 2026
Merged

CoffeePoweredComputers merged 1 commit into
masterfrom
probeable-spec-ladder

Conversation

@CoffeePoweredComputers

Copy link
Copy Markdown
Owner

What

Probe & Explain now grades by generating one LLM code version and shows the same ordered test ladder as Probe & Code. EiPL and Prompt are untouched: they keep five versions, the version pass rate, and their existing panel.

Backend

  • variation_count is a handler property (5 default, 1 for ProbeableSpecHandler). The generation prompt and the dev mock LLM honour it. The count-5 prompt is byte-identical to before.
  • Scoring is a handler policy, score_generated_code. EiPL keeps the version pass rate; spec uses the tests-passed ratio like probeable_code. Note: the saved submission.score was already a tests-passed ratio for both; only the published progress message changes for spec.
  • ProbeableSpecHandler.serialize_result emits the probeable_code shape: student_code, explanation, one truncated test_results entry with lockedCount, and segmentation. Extraction plus first-failure truncation now live in one shared helper, handlers/ladder.py, used by both probeable types.
  • Submission history locks after the first failure for both probeable types and fills comprehension_level for spec. The "10/10 attempts for a 2-test problem" symptom is gone.

Frontend

  • One ProbeableFeedback.vue registered for both types, wrapping CodeSubmissionFeedback in ladder layout. Spec shows the explanation in the top panel instead of code, hides the debug button, and renders the Abstraction card under the ladder when segmentation is enabled.
  • ExplanationQuote.vue and AbstractionCard.vue extracted from Feedback.vue and reused there.
  • ProblemSet.vue routes both probeable types through the probeable result branch. The two old wrapper components are deleted.

Verification

  • Backend: 19 new tests failed before implementation and pass after. Unit 1417 passed, integration 1052 passed, architecture 51 passed, ruff clean.
  • Frontend: Vitest 622 passed, eslint 0 errors, stylelint clean, i18n parses.
  • E2E against the local stack: probeable-spec and probeable-feedback 16 passed; submission-eipl, submission-probeable, probeable-probing, probeable-budget 37 passed.
  • Screenshots of the live spec panel in both themes match the design.

Noted, not changed

🤖 Generated with Claude Code

…beable code

Probe & Explain graded by generating five LLM code versions and showing
the EiPL panel (versions bar, Abstraction card, View Analysis). The two
probeable types now share one feedback: the ordered test ladder.

Backend
- variation_count is a handler property (5 by default, 1 for
  ProbeableSpecHandler); the generation prompt and the mock LLM honour it.
  The count-5 prompt is byte-identical to before, so EiPL and Prompt are
  unchanged.
- Scoring is a handler policy (score_generated_code): EiPL keeps the
  version pass rate, spec uses the tests-passed ratio like probeable_code.
- ProbeableSpecHandler.serialize_result emits the probeable_code shape
  (student_code, explanation, one truncated test_results entry with
  lockedCount, segmentation). Extraction and first-failure truncation live
  in one shared helper, handlers/ladder.py, used by both probeable types.
- Submission history locks after the first failure for both probeable
  types and fills comprehension_level for spec.

Frontend
- One ProbeableFeedback.vue registered for both types, wrapping
  CodeSubmissionFeedback in ladder layout. Spec shows the explanation in
  the top panel instead of code, hides the debug button, and renders the
  Abstraction card under the ladder when segmentation is enabled.
- ExplanationQuote.vue and AbstractionCard.vue are extracted from
  Feedback.vue and reused there, no duplicated markup.
- ProblemSet.vue routes both probeable types through the probeable result
  branch; the old spec wrappers and their test are deleted.

Tests: backend tests written first (19 failing, then passing); frontend
unit suite 622; E2E spec tests rewritten to the ladder shape.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@CoffeePoweredComputers CoffeePoweredComputers added the needs-senior-review Must be reviewed/paired with a maintainer before merge label Oct 16, 2026
@codecov-commenter

codecov-commenter commented Oct 16, 2026 •

Copy link
Copy Markdown

@CoffeePoweredComputers
CoffeePoweredComputers merged commit 8dc49c4 into master Oct 16, 2026
18 checks passed
@CoffeePoweredComputers
CoffeePoweredComputers deleted the probeable-spec-ladder branch October 16, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-senior-review Must be reviewed/paired with a maintainer before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants