Bad-return function-hook fixture

A highly resilient, declarative dotfiles setup using Chezmoi, Mise, and Python, optimized for Linux-based devcontainers.
mise install # Install all tools
mise run lint # Run lint checks (read-only ≡ CI; `mise run fmt` auto-fixes)
uv run --project python pytest tests/ -x -q # Run all 190 tests
docker buildx bake dev-load # Build devcontainer locally
curl -fsSL https://raw.githubusercontent.com/sortakool/dotfiles/main/install.sh | bash
install.sh bootstraps mise.mise installs git, chezmoi, and uv.chezmoi init clones the repo and applies templated configs.uv run) handle complex orchestration and tool installations.DotfilesConfig centralizes 16 env vars; hk.pkl for git hooks with shared hk-common.pkl checks.dotfiles_setup).noqa, type: ignore, or pylint: disable — enforced by no_lint_skip hk step.changes path-gate → base-prep → p2996-prep → build → smoke-test (smoke + Dive); promote retags on main; benchmark + Trivy run async in image-analysis.yml. Docs-only changes skip the build chain.All tools are declared in mise.toml and installed via mise install. Python dependencies are managed via uv with python/pyproject.toml.
uv run --project python pytest tests/ -x -q # All tests
uv run --project python dotfiles-setup verify run # Contract verification
mise run pin-actions # Verify GHA SHA-pinning
mise run lint-docs # Validate agent documentationhooks/register.ts 14 lines1import type { Register } from "claude-code";
2
3const ESCAPE_HATCH_TOOLS = new Set(["AskUserQuestion", "SendUserMessage"]);
4
5export const register: Register = (on) => {
6 on("classic.PreToolUse", { tool: "Read" }, async (_$, e, next) => {
7 const result = await next(e);
8 if (ESCAPE_HATCH_TOOLS.has(e.tool)) {
9 return result;
10 }
11 return { ...result, additionalContext: "not-an-array" };
12 });
13};
14