Seam: register I_DISPLACED in validator/__init__.py RULES (PH5.5 follow-up) #92

Closed
opened 2026-09-11 14:01:26 +00:00 by patrick · 0 comments
Owner

Context

PH5.5 (#37, feature/api-diff) implements polaris/validator/rules/displaced.py (check_displaced, the I_DISPLACED finding) fully, with its own bad-plan fixtures and unit tests calling check_displaced directly. It is not wired into polaris.validator.validate().

polaris/validator/__init__.py's RULES tuple (and its module docstring's "codes intentionally not implemented here" list) belong to T-D's already-merged polaris/validator/** row (docs/12-implementation-plan.md), which is outside PH5.5's owned paths (domain/planning/diff.py, api/routers/plans/diff.py, validator/rules/displaced.py only). tests/unit/validator/{test_rules,test_validate}.py are the same situation — test_validate.py's DEFERRED_TO_LATER_TICKETS set currently lists FindingCode.I_DISPLACED and needs it removed once this lands, with a matching CASES entry added to test_rules.py.

What needs to change

In polaris/validator/__init__.py:

  • Import displaced from polaris.validator.rules.
  • Add displaced.check_displaced to the RULES tuple.
  • Remove the I_DISPLACED bullet from the module docstring's "intentionally not implemented" list.

In tests/unit/validator/test_rules.py:

  • Import tests.fixtures.bad_plans.displaced and polaris.validator.rules.displaced.
  • Add a ("I_DISPLACED", displaced_fixtures.dropped_without_reason, displaced.check_displaced, FindingCode.I_DISPLACED) case (fixtures already exist at tests/fixtures/bad_plans/displaced.py, written for PH5.5).

In tests/unit/validator/test_validate.py:

  • Remove FindingCode.I_DISPLACED from DEFERRED_TO_LATER_TICKETS.

Why this is a separate issue

CLAUDE.md's file-ownership rule: "Touch only files your ticket created or that its row explicitly owns... A file that already existed when your session started and is not in your row's Owns column belongs to someone else." These three files pre-date PH5.5 and are outside its Owns column, so PH5.5 implements+tests check_displaced directly rather than editing them.

Blocks #37.

## Context PH5.5 (#37, `feature/api-diff`) implements `polaris/validator/rules/displaced.py` (`check_displaced`, the `I_DISPLACED` finding) fully, with its own bad-plan fixtures and unit tests calling `check_displaced` directly. It is **not** wired into `polaris.validator.validate()`. `polaris/validator/__init__.py`'s `RULES` tuple (and its module docstring's "codes intentionally not implemented here" list) belong to T-D's already-merged `polaris/validator/**` row (`docs/12-implementation-plan.md`), which is outside PH5.5's owned paths (`domain/planning/diff.py`, `api/routers/plans/diff.py`, `validator/rules/displaced.py` only). `tests/unit/validator/{test_rules,test_validate}.py` are the same situation — `test_validate.py`'s `DEFERRED_TO_LATER_TICKETS` set currently lists `FindingCode.I_DISPLACED` and needs it removed once this lands, with a matching `CASES` entry added to `test_rules.py`. ## What needs to change In `polaris/validator/__init__.py`: - Import `displaced` from `polaris.validator.rules`. - Add `displaced.check_displaced` to the `RULES` tuple. - Remove the `I_DISPLACED` bullet from the module docstring's "intentionally not implemented" list. In `tests/unit/validator/test_rules.py`: - Import `tests.fixtures.bad_plans.displaced` and `polaris.validator.rules.displaced`. - Add a `("I_DISPLACED", displaced_fixtures.dropped_without_reason, displaced.check_displaced, FindingCode.I_DISPLACED)` case (fixtures already exist at `tests/fixtures/bad_plans/displaced.py`, written for PH5.5). In `tests/unit/validator/test_validate.py`: - Remove `FindingCode.I_DISPLACED` from `DEFERRED_TO_LATER_TICKETS`. ## Why this is a separate issue CLAUDE.md's file-ownership rule: "Touch only files your ticket created or that its row explicitly owns... A file that already existed when your session started and is not in your row's Owns column belongs to someone else." These three files pre-date PH5.5 and are outside its Owns column, so PH5.5 implements+tests `check_displaced` directly rather than editing them. Blocks #37.
Sign in to join this conversation.
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.

Reference
patrick/Polaris#92
No description provided.