fix: packaging wheel target (#12) and real determinism test (#13) - #14
Merged
Merged
Conversation
Fixes #12: add an explicit [tool.hatch.build.targets.wheel] section listing the flat top-level packages so `pip install -e ".[dev]"` and `make install` succeed. Hatchling auto-detection failed because the project name does not match any importable package and the source uses a flat multi-package layout with no src/ dir. Verified in a clean venv: the editable install builds the wheel and all packages import from outside the repo (no PYTHONPATH=. needed). Fixes #13: test_different_seed_different_result previously computed its comparison into an unused `traces_match` variable and only asserted len(traces) > 0, so it would pass even if the seed were ignored. Replace it with test_different_seed_different_world (asserts seeded obstacle/ threat layouts differ across seeds, guaranteed by construction) and add test_same_seed_same_world (reproducibility). Confirmed genuinely Red when seeding is disabled, Green with proper seeding. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
#12 —
pip install -e ".[dev]"fails (no hatchling wheel target)Change: Added
[tool.hatch.build.targets.wheel]topyproject.tomllisting the actual top-level packages (core,policies,adapters,executor,telemetry,replay,plugins,llm,eval,console). The flat multi-package layout has no package matching the project name, so hatchling's auto-detection refused to build the wheel.Verification (clean venv):
python -m venv+pip install -e ".[dev]"→ builds the editable wheel and succeeds (previously:ValueError: Unable to determine which files to ship inside the wheel).import core, policies, adapters, executor, telemetry, replay, plugins, llm, eval, consolesucceeds from outside the repo (noPYTHONPATH=.).#13 — determinism test asserted nothing about its purpose
Change:
test_different_seed_different_resultcomputed its comparison into an unusedtraces_matchvariable (F841) and only assertedlen(traces) > 0, so it passed even if the seed were ignored. Replaced with:test_different_seed_different_world— asserts the seeded obstacle/threat layout differs across seeds (guaranteed by construction, the robust option a).test_same_seed_same_world— asserts identical layout for the same seed (reproducibility).Verification (Red/Green):
random.Random(0)) makestest_different_seed_different_worldFAIL (genuinely Red) — the no-op test never could.Suite verification
pytest: 61 passed (run via the editable install, noPYTHONPATH).ruff check .: 42 → 40 violations (removed the original F841traces_matchand aB905; added none). Remaining violations belong to the separate open issue Fix 42 ruff lint violations (repo is not lint-clean) #7.🤖 Generated with Claude Code