fix: make lint:markdown a read-only gate + codify the standard#44
Merged
Conversation
Sync the harmon-init lint:markdown fix (harmon-init#151). It ran
`markdownlint-cli2 --fix` -- the only lint:* task that mutated files:
- In CI, --fix repairs the ephemeral checkout, the task exits 0, and the fix is
discarded with the runner -- green while the branch stays unformatted.
- In the pre-commit hook (`task lint:markdown -- {staged_files}`, no
stage_fixed), --fix edits the working tree but the commit captures the unfixed
staged blob -- commits the broken version and leaves a dirty tree.
Drop --fix so it reports + fails like lint:prettier (--check) / lint:shell
(shfmt -d). Auto-fix is unchanged (`task format` / `task format:file` / `fix`).
Matches the template's new form, so a future `copier update` 3-way merges clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Make the lint-vs-format discipline auditable so `audit` mode flags regressions: add a "Lint vs. format discipline (read-only gates)" standard to the Taskfile section — every lint:* and check/verify is read-only, all auto-fix lives in format/format:file/fix, no lint:* body runs --fix/--write/-w/-i, and the markdown hook has no stage_fixed. Names the classic regression to flag (lint:markdown carrying markdownlint-cli2 --fix). Also corrects the stale `lint:markdown` command body in the catalog, which still documented the old `--fix` form (now check-only, matching the template). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Syncs harmon-init (#151). Two commits: fix the repo's task, then codify the standard in the skill.
1.
lint:markdown→ read-only gate (drop--fix)It ran
markdownlint-cli2 **--fix**— the onlylint:*task that mutates files. In CI that discards the fix while reporting green; in the pre-commit hook (nostage_fixed) it commits the unfixed staged blob and leaves a dirty tree. Drop--fixso it reports + fails likelint:prettier/lint:shell. Auto-fix stays intask format/format:file/fix. Forward-compatible withcopier update.2. Codify it in the standards-catalog (makes
auditenforce it)lint:*/check/verifyis read-only; auto-fix only informat/format:file/fix; nolint:*runs--fix/--write/-w/-i; the markdown hook has nostage_fixed. Names the classic regression to flag.lint:markdowncommand body still documented the old--fixform.Verified
task verify→ exit 0;lint:markdownover 74 Markdown files (catalog in scope) → 0 errors.🤖 Generated with Claude Code