Repository navigation
Description
Description
just doctor (added in #1418, extended with a core.hooksPath diagnostic in #1430) exists only in devkit's own justfile. The scaffolded consumer surface (assets/workspace/justfile, assets/justfile.d) ships no equivalent, so a consumer clone gets no host preflight at all.
That is the same gap #1430 described, in the population devkit actually ships to. A consumer contributor who clones outside the devcontainer has no way to ask whether their git identity, commit signing, ssh-agent, gh auth, or — most importantly — core.hooksPath are wired. The hooks are tracked and inert, and nothing tells them.
Proposed Solution
Ship a doctor recipe on the consumer surface, modelled on devkit's own (justfile, [group('info')]):
- Diagnostics only:
PASS/WARNlines, always exits 0. It is not a gate. - Report the same host prerequisites devkit's does — git identity, commit signing, ssh-agent,
ghauth — plus thecore.hooksPathcheck from A fresh clone does not enforce devkit's own commit rules until scripts/init.sh runs #1430. - Consumers come in two modes: the devcontainer sets
core.hooksPathduring setup, and the direnv /nix developdev shell sets it on shell entry viagithooksPathHook([BUG] direnv mode never sets core.hooksPath — commit-time hooks silently inactive until set manually #1112). The recipe must give a sensible verdict in both, and in an ad-hoc checkout outside both.
Scope notes:
- This is a new consumer-facing recipe, so it needs its own manifest/sync wiring and bats coverage — it is not a copy-paste of devkit's block.
- Devkit's own
doctorremains the SSoT for the diagnostic logic where sharing is practical; avoid two drifting implementations of the same checks (the layeredjustfilemodel is.devcontainer/justfile.basemanaged →justfile.projectteam-shared →justfile.localpersonal; a shared recipe belongs in the managed base, never injustfile.project). - The remediation hint differs by mode: devkit's says
./scripts/init.sh, which is not the consumer's entry point.
Alternatives Considered
Leaving it devkit-only, which is the status quo. Rejected because the failure mode #1430 documents ("configured, believed active, never executed") is strictly worse in consumer repos, where the person committing is least likely to know devkit's installer exists.
Additional Context
Surfaced while closing #1430, where the fix was deliberately scoped to devkit's own justfile under YAGNI / minimal-diff. This is the consumer half, filed separately as agreed there.
Activity
test: pin the scaffolded doctor recipe contract
feat(workspace): ship a doctor host-preflight recipe on the consumer …
refactor(workspace): flatten the doctor hooks-path remediation hint
docs: record the consumer doctor recipe in the changelog
chore: merge release/1.8.0 into feature/1448-consumer-doctor-recipe
feat(workspace): ship a doctor host-preflight recipe on the consumer …
c-vigo commentedon Aug 12, 2026
Implemented by #1451, merged to
release/1.8.0as f49c645 (ships in 1.8.0-rc2).just doctornow ships in the scaffolded rootjustfile— the only managed justfile layer present in every delivery mode (direnv/barecarry no.devcontainer/, andjustfile.projectis aPRESERVE_FILESentry, so a recipe there would never reach an existing consumer on upgrade). Diagnostics only:PASS/WARN, always exits 0.Mode-aware remediation. Devkit's hint is
./scripts/init.sh, a file no consumer has. The consumer hint is driven byDEVKIT_MODEin.vig-os, universal command first, mode entry point named on top:direnv(run: git config core.hooksPath .githooks); normally set on dev-shell entry: run direnv allowdevcontainer(run: …); normally set by the devcontainer setup: reopen the containerboth(run: …); normally set by the devcontainer setup (reopen the container) or on dev-shell entry (direnv allow)bare/ no.vig-os(run: git config core.hooksPath .githooks)— nothing wires it, so no entry point is named./scripts/init.shnever appears in any mode, and that is test-enforced. Verified by running the realassets/init-workspace.sh --no-prompts --mode <mode>in three modes and invoking the recipe against the produced trees.Sharing vs duplication — two implementations, drift pinned by a test. Three sharing routes were evaluated and rejected: a synced shared script (needs a brand-new always-shipped managed root path, since
.devcontainer/is absent in direnv/bare and there is no scaffolded rootscripts/); a manifest transform (scripts/manifest.tomltransforms whole files, so splicing one recipe from A into B needs a new transform type bought for a single recipe); and importing devkit's justfile (never scaffolded). The recipes also genuinely differ in behavior, not just wording. Instead of forcing the abstraction, the shared contract is pinned:consumer doctor checks exactly what devkit's doctor checksruns both recipes under one controlled environment and asserts the check-label sets are non-empty and identical, so adding a check to one and not the other now fails CI.No manifest/sync wiring was needed —
assets/workspace/justfileis authored directly in the scaffold tree, rsynced fromTEMPLATE_DIR, and already in the never-migrate managed literal list (assets/init-workspace.sh:1124); this adds no.vig-osknob, it only reads the existingDEVKIT_MODE.Evidence:
bats tests/bats/496 ok / 0 failures;prek run --all-filesexit 0;test_flake_hooks63 passed post-merge.Follow-up filed as #1454: neither doctor special-cases linked worktrees, so both report hooks inert inside a
worktree-startworktree where they are live.docs(changelog): restore the #1434 entry title bullet in 1.8.0 (#1457)
revert: restore the #1447 and #1448 content dropped by failed-run rol…
revert: restore the #1447 and #1448 content dropped by failed-run rol…
fix(workspace): report git hooks as live in a linked worktree (#1461)
fix(ci): revert only the run's own finalize commits in release rollba…
chore: release 1.8.0 (#1441)