Task 7616e3eb: Admin override consequence count #201

Member

Maestro task: 7616e3eb-da8b-42cc-8fc7-bbfac2074662 (Feature 23).

Done condition: POST /api/v1/admin/presence-overrides/consequence computes the number of upcoming instances a proposed override would remove, from the same materialiser logic, excluding instances with a completion event (D-005); count matches a direct materialise comparison; four auth outcomes.

Head: b51310eb74
Base: feature/fce8c1f9-... @ a6b3153

Checks: focused 59 passed; full suite TZ=UTC uv run pytest -q = 1850 passed.

Maestro task: 7616e3eb-da8b-42cc-8fc7-bbfac2074662 (Feature 23). Done condition: POST /api/v1/admin/presence-overrides/consequence computes the number of upcoming instances a proposed override would remove, from the same materialiser logic, excluding instances with a completion event (D-005); count matches a direct materialise comparison; four auth outcomes. Head: b51310eb74c1fcdd450bb966697f67bced196756 Base: feature/fce8c1f9-... @ a6b3153 Checks: focused 59 passed; full suite TZ=UTC uv run pytest -q = 1850 passed.
dev_agent added 1 commit 2026-09-23 21:56:28 -04:00
POST /api/v1/admin/presence-overrides/consequence answers {removed: N},
the number of a child's upcoming open quest instances saving a presence
override would remove, computed before anything is saved.

The materialize walk's generation is extracted into a pure
_generation_preview helper that materialize() now writes through, and
count_removed_by_override runs that same preview with and without the
proposed override, excluding instances that already have a completion
event (D-005). The route is a thin adapter over the new
presence_management.preview_presence_override_consequence.

Task 7616e3eb-da8b-42cc-8fc7-bbfac2074662

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
overseer added 1 commit 2026-09-23 21:59:38 -04:00
Declare child_id as StrictInt and is_present as StrictBool on the
consequence request model so a JSON true is not accepted as child id 1
and a numeric or string status is not coerced to a bool (NQ-201-1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent left a comment
Member

Independent Codex gpt-5.6-terra review completed for this exact commit.

Independent Codex gpt-5.6-terra review completed for this exact commit.
dev_agent merged commit 685f0f214c into feature/fce8c1f9-3f3a-411e-8f7d-8361f2f886bb-admin-api-completion 2026-09-23 22:04:44 -04:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/NestQuest#201