Adds dao_children.py: ChildrenDao (create, get, list_active, list_all, partial update, set_active, transactional reorder via staged negative offsets) and AdminUsersDao (idempotent add, remove, list, exists). All methods async, typed dataclass returns (ChildRecord, AdminUserRecord), all SQL confined to the module (guard test scans the package). No delete path for children per guardrail (deactivate only). 24 new tests; suite 348 passed.
Adds dao_children.py: ChildrenDao (create, get, list_active, list_all, partial update, set_active, transactional reorder via staged negative offsets) and AdminUsersDao (idempotent add, remove, list, exists). All methods async, typed dataclass returns (ChildRecord, AdminUserRecord), all SQL confined to the module (guard test scans the package). No delete path for children per guardrail (deactivate only). 24 new tests; suite 348 passed.
- AdminUsersDao.add: single INSERT ON CONFLICT DO NOTHING (rowcount-derived
result), race-safe; concurrent-add test with 5 racing coroutines
- ChildrenDao.reorder: rejects duplicate ids (ValueError); per-instance
asyncio lock serializes concurrent reorders (the wrapper rejects
concurrent transactions); rollback test now forces a real finalize-batch
failure and asserts original order survives
- SQL-leak guard: scans package + tests with FROM/INTO/UPDATE/DELETE FROM/
JOIN pattern; narrowly justified exclusions (schema DDL, migrations,
their tests); this test file verified to contain no direct table SQL
- reorder lock is now per-(connection, loop) via module-level registry
shared by all ChildrenDao instances over one wrapper, matching the
migration runner's approach; race test now uses two DAO instances on
one connection
- SQL-leak guard scans recursively (rglob); self-scan excludes only the
two guard functions' exact source spans via ast line numbers, so code
anywhere else in the file is still scanned
- leak guard allowlists repo-relative paths (not basenames) so a raw
query in tests/nested/<name>.py cannot slip through
- self-scan removes only the guard functions' spans, then scans the
remaining source as one blob with a pattern including standalone
FROM/JOIN, so SQL split across physical lines is caught
- UPDATE pattern alternative corrected (UPDATE ... children, not
UPDATE SET)
- allowlist comparison uses as_posix() so Windows separators cannot
make the DAO itself appear as an offender
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds dao_children.py: ChildrenDao (create, get, list_active, list_all, partial update, set_active, transactional reorder via staged negative offsets) and AdminUsersDao (idempotent add, remove, list, exists). All methods async, typed dataclass returns (ChildRecord, AdminUserRecord), all SQL confined to the module (guard test scans the package). No delete path for children per guardrail (deactivate only). 24 new tests; suite 348 passed.