You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surfaced during CODE phase of PR for #781/#786/#760/#738 bundle (capture-shape HARD GATE), session pact-7642b0c9, 2026-05-19. Out of scope for that bundle — these files were already oversized before the bundle work began; that bundle's edits are minimal string-pin syncs, not the cause.
Affected files (current line counts at issue-file time)
The production hook (wake_lifecycle_emitter.py) is the most actionable — it consolidates Arm/Teardown directive emission, transition detection, lead-session guarding, session_init delegation, and journal-event paired-write logic in one file. Per the maintainability-warning hook's own recommendation:
Single Responsibility: does wake_lifecycle_emitter.py do one thing? Currently combines directive emission + transition detection + lead-session guard + session_init delegation + journal-event coordination.
SEC-AC-2 disk-verify discipline applies: re-grep usage of every extracted symbol against pact-plugin/ to enumerate import sites before module reshuffle.
Context
Surfaced during CODE phase of PR for #781/#786/#760/#738 bundle (capture-shape HARD GATE), session pact-7642b0c9, 2026-05-19. Out of scope for that bundle — these files were already oversized before the bundle work began; that bundle's edits are minimal string-pin syncs, not the cause.
Affected files (current line counts at issue-file time)
pact-plugin/hooks/wake_lifecycle_emitter.pypact-plugin/tests/test_wake_inbox_drain.pypact-plugin/tests/test_inbox_wake_lifecycle_emitter.pypact-plugin/tests/test_wake_lifecycle_emitter.pypact-plugin/tests/test_wake_lifecycle_arm_edge_cases.pyThe production hook (
wake_lifecycle_emitter.py) is the most actionable — it consolidates Arm/Teardown directive emission, transition detection, lead-session guarding, session_init delegation, and journal-event paired-write logic in one file. Per the maintainability-warning hook's own recommendation:wake_lifecycle_emitter.pydo one thing? Currently combines directive emission + transition detection + lead-session guard + session_init delegation + journal-event coordination.shared/wake_directives.py—_ARM_DIRECTIVE/_TEARDOWN_DIRECTIVEconstants + anti-softening guardsshared/wake_transitions.py—_decide_directive/_arm_or_none/ count_active_tasks logicshared/wake_journal.py—scan_armed/scan_disarmedpaired-write coordinationScope discipline
Suggested approach
/PACT:plan-modeconsultation with pact-architect (the maintainability-warning hook's explicit recommendation) once TaskCompleted actor-discriminator empirical capture + teardown_request_emitter.py migration (follow-up to #611/#778) #781 bundle merges.pact-plugin/to enumerate import sites before module reshuffle.Falsifier
Refactor lands; production hooks still behave byte-identically (same
scan_armed/scan_disarmedevents written, same_ARM_DIRECTIVE/_TEARDOWN_DIRECTIVEstrings emitted, same lead-session guard semantics); test cardinality unchanged.Provenance