Skip to content

Run test_parse_basic_strategy on the engine's verified corpus from any working directory - #198

Merged
luisleo526 merged 2 commits into
mainfrom
win-w049-glob
Oct 11, 2026
Merged

luisleo526 merged 2 commits into
mainfrom
win-w049-glob

Conversation

@luisleo526

Copy link
Copy Markdown
Contributor

test_parse_basic_strategy resolved 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 is validation, 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

  • Full test suite against engine v1.5.0-rc.1 (fa5f8c5c, corpus b40aa8e) on this branch's tree 72d83c64: 9905 passed, 36 skipped, 0 failures; 312 test_parse_basic_strategy cases ran and passed.
  • The same case count (312) is collected when pytest runs from the repository root, from a temporary directory and from a parent workspace directory.

🤖 Generated with Claude Code

luisleo526 and others added 2 commits October 11, 2026 20:52
…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>
@luisleo526
luisleo526 marked this pull request as ready for review October 11, 2026 14:03
@luisleo526
luisleo526 merged commit 276d19a into main Oct 11, 2026
9 of 15 checks passed
@luisleo526
luisleo526 deleted the win-w049-glob branch October 11, 2026 14:16
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