Repository navigation
Run test_parse_basic_strategy on the engine's verified corpus from any working directory - #198
Merged
Merged
Conversation
…trategy test_parse_basic_strategy globbed pineforge-engine/corpus/basic/*/strategy.pine against the working directory, so a run started anywhere but a directory holding a pineforge-engine checkout collected no case, and pytest reported the empty parameter set as one silent skip (the 1.5.0 proof's tests/test_parser.py::test_parse_basic_strategy[NOTSET] row). The corpus now comes from the engine checkout the suite already resolves (tests/_e2e.py engine_root(): PINEFORGE_ENGINE_INCLUDE, else a sibling checkout), whatever directory pytest starts in. The public corpus has no basic/ bucket (its clean-room rewrite dropped it; the corpus README lists the 312 verified strategies under validation/), so the test reads corpus/validation/*/strategy.pine, with the directory name as the case id. An engine checkout that holds none of them (corpus submodule not initialised, a renamed bucket) is one failing case naming the path, and no engine checkout at all is one skip with a reason. The test body is unchanged. tests/test_parser_corpus_collection.py drives pytest itself as a subprocess from several working directories (one holding the old glob's layout as a decoy) against throwaway engine checkouts, and reads each outcome off pytest's report: the exact collected set for 1, 3 and 17 strategies, every case parsing its strategy, five empty-corpus layouts failing with the path, and a missing or invalid engine include skipping once. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
test_parse_basic_strategyresolved its corpus glob from the current working directory, so it collected nothing and was always skipped as[NOTSET]unless pytest happened to run from one particular directory. It now finds the corpus through the engine checkout and parses the corpus's 312 verified strategies (corpus/validation) from any working directory.What changes
tests/test_parser.py: the strategy list comes from the engine checkout's corpus, independent of the cwd. The bucket isvalidation, the 312 verified strategies; the staged draft probes are not verified strategies and are left to the compile sweep. With no engine checkout, the test skips once as[no-engine-checkout].tests/test_parser_corpus_collection.py(new): 11 tests that run real pytest subprocesses against throwaway engine layouts and check that collection finds the same cases from different working directories, and fails when the corpus is missing.Verification
fa5f8c5c, corpusb40aa8e) on this branch's tree72d83c64: 9905 passed, 36 skipped, 0 failures; 312test_parse_basic_strategycases ran and passed.🤖 Generated with Claude Code