Skip to content

refactor: separate doctor safety boundaries - #36

Merged
abruption merged 1 commit into
mainfrom
refactor/16-doctor-boundaries
Sep 22, 2026
Merged

abruption merged 1 commit into
mainfrom
refactor/16-doctor-boundaries

Conversation

@abruption

Copy link
Copy Markdown
Owner

Summary

  • split default option/thread validation, evidence inspection, pure safety policy, and unlock execution into focused internal modules
  • keep doctor.ts as a compatibility facade while preserving CLI-only package exports and JSON schema v1 behavior
  • restrict SIGTERM to a narrow function that accepts only fully revalidated private evidence
  • extract reusable real advisory-lock owner fixtures and add deterministic policy and transcript test suites
  • document the internal review boundaries without presenting them as a supported JavaScript API

Safety and compatibility

  • preserves the operation lease, complete pre-signal reinspection, exact owner checks, post-signal lock/process/transcript verification, and fail-closed outcomes
  • does not delete native lock files, add force/SIGKILL, change commands, alter exit mappings, or change the JSON schema
  • policy tests inject evidence without spawning a process; safety-critical integration tests continue to use real advisory locks

Verification

  • npm ci (0 vulnerabilities)
  • npm run check
  • npm run lint
  • npm test (41 passed)
  • npm run smoke:package

Closes #16

@abruption
abruption merged commit 253498f into main Sep 22, 2026
13 checks passed
@abruption
abruption deleted the refactor/16-doctor-boundaries branch September 27, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: separate inspection, safety policy, unlock execution, and test fixtures

1 participant