home/log.ts:selfTest used `require("node:os")` and `require("node:crypto")`
to avoid adding top-level imports for test-only deps. Eslint's
@typescript-eslint/no-require-imports flagged both as errors. The
pre-commit hook only ran `eslint src/` so it never caught them.
Two fixes in one commit:
• Moved the imports to top-level alongside the existing fs + path
imports. randomUUID is named-imported (matches the existing
home/emit.ts style); os stays default-imported.
• Extended .husky/pre-commit's eslint step from 'src/' to 'src/ home/'
so future home/ lint regressions can't slip through.
Three remaining cryp.randomUUID() callsites and the import block all
updated together. tsc clean, eslint clean, home/log 6/6 still green.
Runs npm run smoke before push when the local server is detected.
Silent skip when server is down so offline pushes are never blocked.
Supports COCKPIT_SESSION_TOKEN for fully authenticated smoke runs.
pre-commit now documents that authenticated smoke lives in pre-push.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds husky as a dev dep and wires .husky/pre-commit to run:
npx tsc --noEmit
npx eslint src/
Both must pass for the commit to land. Smoke is intentionally NOT in
the hook because it needs a live dev server — run `npm run smoke`
manually before opening a PR.
Catches the regressions a 100-commit refactor sweep can introduce
(broken zod schema, missed import, accidentally-disabled rule)
before they reach origin/main, complementing the human / cron /
agent commit flow we've established.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>