Skip to content

Test infra: pytest-timeout and gui/slow markers; pin the app/region coupling decision - #139

Merged
williajm merged 1 commit into
mainfrom
dev
Aug 6, 2026
Merged

Test infra: pytest-timeout and gui/slow markers; pin the app/region coupling decision#139
williajm merged 1 commit into
mainfrom
dev

Conversation

@williajm

@williajm williajm commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Bundles the two small infra issues deferred from #128.

#131 — pytest-timeout + registered markers

  • pytest-timeout added through make deps (lockfile churn isolated to this PR; the cooldown cutoff moved to 2026-07-30 and filelock/hypothesis/pip picked up in-cooldown upgrades).
  • Per-test default timeout of 120s: safely above the GUI suite's 60s worker-pool waits, but a wedged worker now fails fast instead of hanging CI for the runner limit.
  • gui and slow markers registered (--strict-markers was on with no project markers). Every test under tests/gui/ is auto-marked gui by a conftest collection hook so new GUI test files cannot forget it; the Monte Carlo, backtest, and retirement-solver sweep modules are marked slow at module level. -m 'not gui' / -m 'not slow' now deselect cleanly (166 and 104 tests respectively), ready for local skips and CI sharding — and for the heavier hypothesis suite planned in Property-based tests over the engine (hypothesis) #132.

#134 — app-layer/region coupling decision

  • Decision recorded in planning §4.7: the app layer's direct glidepath.regions.uk imports are accepted for the UK-first shell. §4.2's isolation promise protects the core (already guard-tested); the app layer is region-shaped presentation plumbing a second region would rework anyway. A region-selection Protocol now would be an abstraction with one implementation and no second customer — revisit when a second region is real.
  • What is newly pinned by a guard test (test_gui_shell_never_imports_regions, alongside the existing §4.2 guards): the coupling stays confined to the app layer — the gui shell keeps reaching region data through glidepath.app, so a future seam has exactly one layer to cut into.

Testing

  • make check green: ruff, ruff format, mypy --strict, 1910 tests at 99.07% coverage, dep-age gate OK.
  • Marker selection verified: -m gui collects 166, -m slow collects 104, remainder 1640.

Fixes #131
Fixes #134

🤖 Generated with Claude Code

…n coupling decision

- Add pytest-timeout (via make deps) with a 120s per-test default so a
  wedged worker-pool wait fails fast instead of hanging CI (#131).
- Register gui and slow markers (--strict-markers): every test under
  tests/gui/ is auto-marked gui by the conftest, and the Monte Carlo,
  backtest, and retirement-solver sweep modules are marked slow, so both
  sets can be deselected locally and sharded in CI (#131).
- Record the app-layer/region coupling decision in planning section 4.7:
  the direct app -> regions.uk imports are accepted for the UK-first
  shell, and a new boundary guard pins the confinement - the gui shell
  must keep reaching region data through the app layer (#134).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

@williajm
williajm merged commit 62d8ff4 into main Aug 6, 2026
3 checks passed
@williajm
williajm deleted the dev branch August 6, 2026 10:05
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.

Decide and pin the app-layer / region coupling Add pytest-timeout and registered gui/slow markers

1 participant