Skip to content

fix: require actual tests in generation and prefix answers - #13

Merged
cppbear merged 1 commit into
mainfrom
fix/require-generated-tests
Oct 8, 2026
Merged

cppbear merged 1 commit into
mainfrom
fix/require-generated-tests

Conversation

@cppbear

@cppbear cppbear commented Oct 8, 2026

Copy link
Copy Markdown
Owner

A model reply such as fn helper() {} previously parsed as Rust and let generation finish successfully with zero tests. Direct-test and prefix generation now require at least one extracted #[test] function, using a single parse/extraction pass and the existing three-attempt format retry loop. Prefixes remain valid without assertions.

Each returned answer is saved before code-fence cleanup and parsing, with stage/attempt filenames under the existing answer directory. Accepted code retains its previous layout. Network retries, shared request limits, compilation checks, and existing caches are unchanged; separate trials continue to use fresh copies.

Validation: workspace build and 46 tests passed (the credentialed live test remains opt-in), along with the minimal generation/repair/coverage pipeline. Six real-CLI local-HTTP cases passed for direct-test and prefix recovery, format exhaustion, and request-budget interruption, checking saved raw replies, request/token counts, successful candidates and source restoration. The existing scheduling and failure-cleanup matrix also runs in CI. No real model request is needed for these regressions.

@cppbear
cppbear marked this pull request as ready for review October 8, 2026 08:06
@cppbear
cppbear merged commit c6e7414 into main Oct 8, 2026
2 checks passed
@cppbear
cppbear deleted the fix/require-generated-tests branch October 11, 2026 14:49
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.

1 participant