Drift v0.2.3 — Wave-2 Audit Fixes
Fixed
doctor --fixno longer fails withFOREIGN KEY constraint failedwhen
deleting an intent that has children —deleteByIdnow reparents the
dependants to the deleted intent's parent first (transactional, with
rollback on error).- CLI usage errors stay machine-readable under
--json— an empty prompt
(-p "") or missing arguments previously printed plain-text usage to
stdout, which broke MCP tool callers. They now emit
{ "status": "error", "type", "message", "exitCode" }like every other
failure. drift blame/drift contextreject paths that escape the repository
root —../traversal, absolute and cross-drive paths (and symlinks
escaping the repo, via realpath) are rejected with a clean error before
any filesystem read. Previouslyblameread the file first, leaking
absolute paths in error messages and probing arbitrary files.
Tests
81 passing tests (was 77): +4 — deleteById reparenting (FK no longer fails),
the MCP JSON error contract (empty prompt / unknown intent), and path
containment coverage (absolute path, ../ traversal, --function, context).