seam(validator): wire I_DISPLACED into the RULES registry #101

Merged
patrick merged 1 commit from seam/wire-i-displaced-into-validator into main 2026-09-11 14:20:35 +00:00
Owner

Description

Resolves seam request #92: wires I_DISPLACED (PH5.5, validator/rules/displaced.py) into
polaris.validator.RULES and its two shared test files, which were outside PH5.5'''s own owned
paths.

What changed

  • polaris/validator/__init__.py: import displaced, add displaced.check_displaced to
    RULES, drop I_DISPLACED from the module docstring'''s not-implemented-here list.
  • tests/unit/validator/test_rules.py: add the I_DISPLACED case.
  • tests/unit/validator/test_validate.py: remove I_DISPLACED from
    DEFERRED_TO_LATER_TICKETS.
  • tests/fixtures/bad_plans/displaced.py: dropped_without_reason() also shrinks the shift'''s
    span so it stays isolated to I_DISPLACED when the whole rule registry runs against it —
    the original fixture also tripped W_IDLE_CREW once check_displaced was actually wired in
    (a real fixture-isolation bug this seam request'''s own test exists to catch).

Test Plan

Full backend suite green: 682 unit tests, ruff, mypy --strict all clean.

Checklist

  • Conventional commit
  • Tests added/updated, all passing
  • No hard deletes; no direct status updates outside polaris.domain
  • No new dependency

Closes #92

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoNrSy7Reyp7evkfcdHeLX

## Description Resolves seam request #92: wires `I_DISPLACED` (PH5.5, `validator/rules/displaced.py`) into `polaris.validator.RULES` and its two shared test files, which were outside PH5.5'''s own owned paths. ## What changed - `polaris/validator/__init__.py`: import `displaced`, add `displaced.check_displaced` to `RULES`, drop `I_DISPLACED` from the module docstring'''s not-implemented-here list. - `tests/unit/validator/test_rules.py`: add the `I_DISPLACED` case. - `tests/unit/validator/test_validate.py`: remove `I_DISPLACED` from `DEFERRED_TO_LATER_TICKETS`. - `tests/fixtures/bad_plans/displaced.py`: `dropped_without_reason()` also shrinks the shift'''s span so it stays isolated to `I_DISPLACED` when the *whole* rule registry runs against it — the original fixture also tripped `W_IDLE_CREW` once `check_displaced` was actually wired in (a real fixture-isolation bug this seam request'''s own test exists to catch). ## Test Plan Full backend suite green: 682 unit tests, `ruff`, `mypy --strict` all clean. ## Checklist - [x] Conventional commit - [x] Tests added/updated, all passing - [x] No hard deletes; no direct status updates outside `polaris.domain` - [x] No new dependency Closes #92 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LoNrSy7Reyp7evkfcdHeLX
PH5.5 (#37) implemented check_displaced fully but left it unwired —
polaris/validator/__init__.py's RULES tuple and the two shared
validator test files are outside that ticket's owned paths (T-D's
already-merged row), so it filed this as a seam request rather than
editing them.

- validator/__init__.py: import displaced, add check_displaced to
  RULES, drop I_DISPLACED from the module docstring's
  not-implemented-here list.
- test_rules.py: add the I_DISPLACED case.
- test_validate.py: remove I_DISPLACED from DEFERRED_TO_LATER_TICKETS.
- tests/fixtures/bad_plans/displaced.py: dropped_without_reason()
  shrinks the shift's span to 6:00-10:00 so it clears
  check_idle_crew's 30% utilisation floor — running the *whole*
  registry (not just check_displaced in isolation) against the
  original fixture also tripped W_IDLE_CREW, which the isolation test
  this seam request completes is specifically designed to catch.

Closes #92

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoNrSy7Reyp7evkfcdHeLX
patrick deleted branch seam/wire-i-displaced-into-validator 2026-09-11 14:20:35 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
patrick/Polaris!101
No description provided.