Add core.version stamp, core-doctor health report, and audit --changed#9
Closed
Gerrrt wants to merge 3 commits into
Closed
Add core.version stamp, core-doctor health report, and audit --changed#9Gerrrt wants to merge 3 commits into
Gerrrt wants to merge 3 commits into
Conversation
Fixed - fzf/fzf-tab previews hardcoded bat/eza -> "command not found" preview panes on Debian/Ubuntu (batcat) and bare boxes; now resolve $BAT_BIN with cat/ls fallback. New audit section locks it against regression. - fif/fbr/Alt-Z zoxide-jump now degrade in Core's voice (_core_err/_core_hint) like fcd, instead of a raw "command not found". Added - core.version stamp + core-version verb (which Core does an OS repo carry?); sync-core prints it, audit validates SemVer shape. - core-doctor: shell-side health report (detected tools, resolved fd/bat names, package manager) — the counterpart to nvim :checkhealth. - up -n/--dry-run: non-destructive "what would upgrade" inspect. - make audit-changed (audit-core.sh --changed): scope the local audit to the git diff via the same ci-classify.sh CI uses. - completions for fif/fbr/core-version/core-doctor + dry-run-aware _up; parity test extended to cover them. - .shellcheckrc for author==CI==editor lint parity. Changed - setup.sh provisions luacheck via luarocks + precise install hints. All changes gated: audit 133 pass / 1 skip / 0 fail; behavioral suite 68/0.
The new '### Fixed' under [Unreleased] duplicated an existing (mis-indented) '### Fixed', tripping markdownlint MD024/no-duplicate-heading on the CI audit (ubuntu + macos). markdownlint is skipped locally (npm unavailable in the dev sandbox) so it wasn't caught pre-push. Merged both into one de-indented section; validated with markdownlint-cli2 v0.22.1 (0 errors).
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds three complementary features to dotfiles-core: a vendored SemVer version stamp (core.version), a core-doctor shell health report, and a --changed flag for the audit that scopes runs to what the local git diff touches. It also fixes silent fzf/fzf-tab preview breakage on Debian/Ubuntu (where bat ships as batcat) and adds defensive error handling to fif/fbr/zoxide-jump widgets.
Changes:
- Introduces
core.versionfile,core-versionandcore-doctorfunctions, with associated completions, tests, manifest entry, and audit well-formedness check. - Adds
--changedtoaudit-core.sh(andmake audit-changed) which reusesci-classify.shto derive the audit scope from the working-tree diff, failing safe to a full run. - Fixes fzf previews to resolve
$BAT_BIN/$HAVE_EZAdynamically with cat/ls fallbacks, and guardsfif/fbr/zoxide-jump with_core_havechecks for graceful degradation.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
core.version |
New SemVer stamp file (0.1.0-dev) |
core.manifest |
Adds core.version to the vendored manifest |
zsh/functions.zsh |
core-version, core-doctor functions + core-help version display |
zsh/fzf.zsh |
Dynamic $BAT_BIN/$HAVE_EZA preview resolution + guards on fif/fbr/zoxide-jump |
zsh/plugins.zsh |
fzf-tab cd preview falls back to ls without eza |
zsh/update.zsh |
up --dry-run implementation |
zsh/completions/_up |
Mutual-exclusivity between -y and -n |
zsh/completions/_fif |
New completion for fif (describes the argument) |
zsh/completions/_fbr |
New completion for fbr (no-arg message) |
zsh/completions/_core-version |
New completion for core-version (no-arg message) |
zsh/completions/_core-doctor |
New completion for core-doctor (no-arg message) |
scripts/audit-core.sh |
--changed flag, _changed_scope function, section 5b (fzf preview gate), core.version check |
scripts/ci-classify.sh |
Adds core.version to the infra bucket |
scripts/sync-core.sh |
Prints core.version in fan-out log |
scripts/setup.sh |
luacheck provisioning via luarocks + hint() helper |
scripts/test-core.sh |
Tests for core-version, core-doctor, up --dry-run, fif/fbr guards, completions |
Makefile |
audit-changed target |
README.md |
Documents core.version in the tree layout |
CHANGELOG.md |
Records all new features and fixes |
.shellcheckrc |
Repo-wide ShellCheck config |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…c bucket - audit-core.sh _changed_scope: if ci-classify.sh errors or emits no/garbage output, sh/nv aren't valid true/false -> now fall back to 'all' (full run) instead of silently returning 'none', honoring the documented fail-safe. - audit-core.sh --help: usage synopsis now lists [--changed]. - ci-classify.sh: classify .shellcheckrc into the infra bucket (full run) so a change to it doesn't hit the catch-all 'unrecognised path' warning; locked with a test-core.sh assertion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
This PR adds three major features to tighten the dev loop and improve visibility:
core.version— a human-readable SemVer stamp vendored into every OS repo, plus acore-versionverb that reads it. Lets you tell which Core a given OS repo carries from inside it (the subtree squash records the commit; this records the version).scripts/sync-core.shprints it on fan-out and the audit asserts it is well-formed.core-doctor— the shell counterpart to nvim's:checkhealth gerrrt: a scannable report of which modern-CLI tools Core detected on this box and which integrations are live, including resolved binary names (fd/fdfind,bat/batcat) and the detected package manager. Read-only diagnostics.audit-core.sh --changed(make audit-changed) — scope the audit to what your local git diff touches, via the SAMEscripts/ci-classify.shCI uses. Fails safe to the full run when the diff can't be resolved, tightening the dev loop without sacrificing correctness.Also fixes two silent breakages in fzf/fzf-tab previews and adds defensive error handling to
fif/fbr/zoxide-jump so they degrade in Core's voice instead of raw "command not found" on bare boxes.Is it actually Core?
Contract & checks
core.manifestupdated to includecore.versionmake auditis green (new audit section for fzf preview binary resolution, core.version well-formedness check)scripts/audit-core.sh,scripts/sync-core.sh,scripts/setup.shremain+x;zsh/*.zshmodules not executablecore-version,core-doctor,fif,fbr;_upcompletion updated for--dry-runNotes
core.versionis a static file (no load-order impact);core-versionandcore-doctorare functions inzsh/functions.zsh(loaded early in the canonical chain).fzf preview binary resolution) locks the preview binary resolution pattern so the Debian/Ubuntubat→batcatregression can't recur.--changedfails safe to the full run when git diff can't be resolved;fif/fbr/zoxide-jump degrade gracefully on bare boxes.scripts/sync-core.shnow prints thecore.versionstamp alongside the commit SHA in the fan-out log.scripts/test-core.shcovercore-version,core-doctor,fif/fbrerror paths, andup --dry-run.https://claude.ai/code/session_01TerNRHYmC9KyvcTswAqfuP