Deactivate and reactivate a child without data loss (Feature 03, task 2) #52

Member

Proves the no-data-loss deactivation contract over the existing set_child_active business function (PR #51).

Delivered

  • Test proving a child with a quest definition, instance and completion event keeps all three rows identical through deactivate → reactivate, is excluded from (and restored to) the active list, and stays in the full list.
  • Structural no-delete guard: no module in the package carries a statement removing child rows, and ChildrenDao exposes no delete-shaped method (children are deactivated, never deleted — feature guardrail).

Verification

uv run pytest: 853 passed.

Closes task 35e97242 (Feature 03).

Proves the no-data-loss deactivation contract over the existing set_child_active business function (PR #51). ## Delivered - Test proving a child with a quest definition, instance and completion event keeps all three rows identical through deactivate → reactivate, is excluded from (and restored to) the active list, and stays in the full list. - Structural no-delete guard: no module in the package carries a statement removing child rows, and ChildrenDao exposes no delete-shaped method (children are deactivated, never deleted — feature guardrail). ## Verification uv run pytest: 853 passed. Closes task 35e97242 (Feature 03).
dev_agent added 2 commits 2026-09-15 16:32:31 -04:00
Tests for the no-data-loss deactivation contract over the existing
set_child_active business function: a child with a definition,
instance and completion event keeps all three rows byte-identical
through deactivate and reactivate, is excluded from (and restored to)
the active list, and stays in the full list. A structural guard proves
the no-delete property: no module carries DELETE targeting children
and ChildrenDao exposes no delete-shaped method. Suite: 853 passed.
The guard test's docstring contained the phrase matching the
children/admin_users leak-guard pattern; reworded. Full suite green
before commit this time: 853 passed.
overseer added 1 commit 2026-09-15 16:35:20 -04:00
Review round 1 (Codex gpt-5.6-terra): the DAO's int() silently coerced
strings and numerics (1, 0, 1.0) into an unintended active state.
The business layer now requires a real bool, before the existence
check's caller-intent can be lost, with a coercible-input test matrix;
the refused transition leaves the record untouched. Suite: 860 passed.
Member

Independent review — Codex gpt-5.6-terra

Round 1 — CHANGES_REQUIRED (1 MEDIUM): set_child_active accepted coercible non-bools ("1", 0, 1.0) which the DAO's int() silently converted into an unintended state. Fixed in cfe1609: the business layer requires a real bool before the DAO call, with a coercible-input test matrix; the refused transition leaves the record untouched.

Round 2 — APPROVED (zero findings). Full suite verified by the reviewer: 860 passed. Merged via merge commit (see below).

## Independent review — Codex gpt-5.6-terra **Round 1 — CHANGES_REQUIRED (1 MEDIUM):** set_child_active accepted coercible non-bools ("1", 0, 1.0) which the DAO's int() silently converted into an unintended state. *Fixed in cfe1609:* the business layer requires a real bool before the DAO call, with a coercible-input test matrix; the refused transition leaves the record untouched. **Round 2 — APPROVED (zero findings).** Full suite verified by the reviewer: 860 passed. Merged via merge commit (see below).
dev_agent merged commit ecffa5bb0e into feature/4f802471-1de1-4c35-844f-eebf3bea0de5-children-registry-admin-allowlist 2026-09-15 16:37:22 -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#52