Skip to content

fix: packaging wheel target (#12) and real determinism test (#13) - #14

Merged
williamzujkowski merged 1 commit into
mainfrom
fix/packaging-and-determinism-test
Jun 16, 2026
Merged

fix: packaging wheel target (#12) and real determinism test (#13)#14
williamzujkowski merged 1 commit into
mainfrom
fix/packaging-and-determinism-test

Conversation

@williamzujkowski

Copy link
Copy Markdown
Collaborator

#12pip install -e ".[dev]" fails (no hatchling wheel target)

Change: Added [tool.hatch.build.targets.wheel] to pyproject.toml listing 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, console succeeds from outside the repo (no PYTHONPATH=.).

#13 — determinism test asserted nothing about its purpose

Change: test_different_seed_different_result computed its comparison into an unused traces_match variable (F841) and only asserted len(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):

  • Temporarily disabling seeding (random.Random(0)) makes test_different_seed_different_world FAIL (genuinely Red) — the no-op test never could.
  • With proper seeding restored: Green.

Suite verification

🤖 Generated with Claude Code

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>
@williamzujkowski
williamzujkowski merged commit 4a15108 into main Jun 16, 2026
5 checks passed
@williamzujkowski
williamzujkowski deleted the fix/packaging-and-determinism-test branch June 16, 2026 03:34
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