[DRAFT] Run conformance tests as one whole-suite invocation per module - #253
Draft
pedjaradenkovic wants to merge 7 commits into
Draft
[DRAFT] Run conformance tests as one whole-suite invocation per module#253pedjaradenkovic wants to merge 7 commits into
pedjaradenkovic wants to merge 7 commits into
Conversation
Degenerate case (root conformance_tests.go / cypress.config.*) preserves today's single-suite behavior byte-for-byte. Otherwise the runner iterates non-hidden subfolders that look like suites, runs each with an '=== conformance suite: <name> ===' header, keeps going past failures so the full failure set is reported, and exits with the first failure's code (exit 1 when no suites are discovered). Preparation work for whole-module conformance execution; the renderer still passes per-FRID folders, so behavior is unchanged.
The conformance script now receives the module's suite folder (own module) or the required module's copied suite root instead of a per-FRID subfolder. The current-FRID phase's single run covers every prior FRID of the module, so the regression phase reduces to one run per required module (plus a re-run of the own module's suite when code changed while fixing). On failure, the run output is attributed to the implicated functionalities by matching suite folder names; the running context is pointed at the earliest implicated FRID so the existing fix loop, memory keying, and conflict detection work unchanged, and the failure evidence sent to the fix flow is scoped to that FRID (other implicated FRIDs appear only as a summary note). Layout-level failures (suites that cannot be discovered together, e.g. from projects rendered before whole-suite execution) fail fast with a regeneration hint instead of entering the fix loop.
Deletes the per-FRID regression iteration (get_first/next running-context walk, _get_next_test_to_run, _has_reached_implementation_frid, _should_run_current_frid_tests) now that regression runs one whole suite per module.
…er guard The client now requests module-root-relative output paths (tests in the functionality's subfolder, shared setup files allowed at the suite root) and stores render responses relative to the module's conformance tests folder. Existing-tests context sent to the API now includes shared root files. A two-tier guard validates every response before storing: files in other functionalities' subfolders (or required-module copies) and changes to the definition file are rejected, and existing shared root files may only be extended by inserting lines (difflib opcode check). One retry on violation, then the render fails with a clear error.
The summaries' only consumer was the plan-stage dedup section of the conformance test render prompt, which since the previous-files change receives the actual test files - a lossy derivative adds nothing (verified by A/B renders: identical dedup quality without summaries). Removes the SUMMARY postprocessing state, the SummarizeConformanceTests action, and the API client method, saving one LLM call per functionality. The folder_name/functional_requirement entries in conformance_tests.json stay - failure attribution and fix routing depend on them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Iteration 2 of the conformance-testing improvement plan (see CONFORMANCE_TESTING_IMPROVEMENT_PLAN.md on this branch): conformance tests execute as one script invocation per module instead of one per functionality, with shared setup files allowed at the module suite root. Per-FRID subfolders and the test-script contract ("run all tests under
$2") are preserved.Stacked on #252 (Iteration 1); pairs with Codeplain-ai/plain2code_rest_api#123 (backend). Deployment order: backend first (its changes are gated by request flags/fields, so old clients are unaffected).
Changes
test_scripts/run_conformance_tests_{golang,cypress}.{sh,ps1}): handle$2being a folder of suites — degenerate single-suite case preserves today's behavior byte-for-byte; loop case runs each non-hidden suite subfolder with=== conformance suite: <name> ===headers, reports all failures, exits with the first failure's code. Cypress's npm install/build/app-start now runs once per invocation instead of once per suite.RunConformanceTestspasses the module suite folder (own module) or the required module's copied suite root. The current-FRID run covers all prior FRIDs, so the regression walk collapses to one run per required module (plus an own-suite re-run when code changed during fixing). ~100 lines of FRID-walk machinery removed.render_machine/failure_attribution.py): failed runs are attributed to FRIDs by matching suite folder names against the output; the running context is pointed at the earliest implicated FRID, so the existing fix loop, memory keying, and conflict detection work unchanged. Failure evidence sent to the fix flow is scoped to that FRID (other implicated FRIDs appear as a summary note only, preserving the multi-FRID diagnostic signal). A conservative migration guard fails fast with a regeneration hint on layout-level failures (pre-flip projects, non-recursive custom scripts).summarize_finished_conformance_testsLLM call is removed — its only consumer was the plan-stage dedup section, which now receives the actual test files (A/B renders showed identical dedup quality). Saves one LLM call per functionality. Thefolder_namemap inconformance_tests.jsonstays (attribution and fix routing depend on it).Testing
.ps1variants by review).