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
{{ message }}
Repository navigation
refactor: separate inspection, safety policy, unlock execution, and test fixtures #16
src/doctor.ts currently combines evidence collection, safety policy, signaling, and post-signal verification. The test suite keeps its owner fixture and all four tests in one file. This makes the security work in #9 through #13 harder to review and independently test.
Required changes
After the behavioral fixes are established:
separate evidence inspection, authorization policy, and unlock execution into focused modules
keep signaling behind a narrow function that requires fully revalidated evidence
move reusable advisory-lock owner setup into test helpers
organize tests by lock, process, transcript, doctor/policy, and CLI behavior
add CLI JSON and exit-code contract coverage
continue using real advisory locks for safety-critical integration cases
Avoid a behavior-changing rewrite. Preserve schemaVersion 1 and existing command behavior unless a linked issue explicitly changes them.
Acceptance criteria
policy tests can supply deterministic evidence without spawning a process
integration tests still prove real advisory-lock behavior
signaling tests prove that refusal paths never send SIGTERM
package and CLI smoke tests remain green on macOS and Linux
Development order: this refactor is blocked by #31, which defines and tests the supported CLI/JSON boundary required to prove behavior preservation. Start the isolated #16 worktree from main only after #31 merges.
Development gate update: PR #35 closes #24 and the newly discovered concurrent-unlock security issue #34. Start #16 from current main only after #35 merges so the refactor preserves the operation-lease and deterministic race matrix.
Activity
abruption commentedon Sep 22, 2026
Development order: this refactor is blocked by #31, which defines and tests the supported CLI/JSON boundary required to prove behavior preservation. Start the isolated #16 worktree from main only after #31 merges.
abruption commentedon Sep 22, 2026
Development gate update: PR #35 closes #24 and the newly discovered concurrent-unlock security issue #34. Start #16 from current main only after #35 merges so the refactor preserves the operation-lease and deterministic race matrix.