fix: I2 root-distance grace period — warning then hard error (musehub#226)
Audit: investigating musehub#226 revealed push_validator.py's I2 check was warning-only with no path to a hard error, and separately — while confirming #227's audit table claim that this validator is "wired into wire_push" — discovered IdentityPushValidator has zero production call sites at all (filed as musehub#230, deferred, scoped separately from this fix).
Design decision (confirmed via AskUserQuestion): orphaned identity nodes (no path to any human root) stay a soft warning for a 30-day grace period, covering mid-construction identities and bulk-import-then-wire-later workflows, then become a hard error — push rejected — once that grace period has elapsed with the node still orphaned. Age is measured from the identity's own registered_at timestamp.
TDD: wrote TestI2GracePeriodHardError (5 new tests) first, confirmed genuine RED via muse-dev shelf save/pop isolation (4 failed on missing `now` kwarg, 1 assertion failure). Implemented GRACE_PERIOD_DAYS=30, _parse_registered_at() helper, and now= parameter on validate(). Confirmed GREEN: 38/38 passed on tests/test_identity_push_validator.py. 5 pre-existing tests needed an explicit now=_dt(2026, 4, 21) pin since their fixture's fixed registered_at date is now >30 days before the real wall clock.
Regression: ran 15 identity/graph test files (255 tests) — 3 pre-existing failures in test_identity_repo_phase4.py::TestRemoveOrgMember (member-removal endpoint returning 403), confirmed via shelf isolation to be unrelated to this change (same failures occur with this fix shelved aside).
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Semantic Changes
27 symbols
Files Changed
~2
1100 in snapshot
0 comments
muse hub commit comment sha256:8e4c8bd4ea4700e122c6bebe3dba821e95ae972b0a547762415ac3e72f60ebe3 --body "your comment"
No comments yet. Be the first to start the discussion.