Repository navigation
feat(lint): prove enabled gates reject nested defects - #1069
Open
tbhb-agent wants to merge 2 commits into
Open
tbhb-agent wants to merge 2 commits into
tbhb-agent wants to merge 2 commits into
Conversation
A lint gate can stay enabled and still stop reaching files below the top level after a selection or exclusion change. Every check kept passing on the files it still saw, so no one noticed. The new devtools:lint-liveness task copies the Git-visible tree into a temporary repository and confirms each defined gate passes there. Next, it plants a defect in a nested path and fails when the gate still accepts it. Coverage spans the prose, Markdown structure, Markdown wrap, shell, shell format, and curl gates, and the task skips any gate a consumer doesn't define. Stand-in tools drive the tests, so they don't depend on installed linters. Consumers get the task through the shared lint task file, and the lint exclusion guide describes how to run it and what it reports. Assisted-by: codex:gpt-6.1-sol Signed-off-by: Tony Burns <tony@tonyburns.net>
The coverage run in CI builds the test binary with instrumentation, and that binary is also the fake mise. It writes a GOCOVERDIR warning to stderr, and the task listing read stdout and stderr as one stream. The JSON decode then failed on every platform in the CI matrix while the plain local test run passed. Only stdout of the listing is JSON. The reader now takes stdout alone and reports a failed command with its own error. Assisted-by: claude:claude-sonnet-5-5 Signed-off-by: Tony Burns <tony@tonyburns.net>
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.
Summary
A new
devtools:lint-livenesstask copies the Git-visible tree into a temporary repository, confirms each defined lint gate passes there, then plants a defect at a nested path and fails when a gate still accepts it. The task skips and names any gate a consumer doesn't define.Why
A lint gate can stay enabled and stop reaching files below the top level after a selection or exclusion change. A glob change in a consumer dropped nested Markdown from the prose gate and every run passed, because a gate with no files to check has no findings to report. This task turns that silent loss into a failure that states the gate and the path.
Verification
The commands below ran on the head of this pull request. The task covers exactly these gates:
lint-prose,devtools:lint-markdown,lint-markdown-wrap,lint-shell,lint-shell-fmtanddevtools:lint-curl.go test ./internal/liveness -run 'TestLintLiveness/AC1'go test ./internal/liveness -run 'TestLintLiveness/AC2'go test ./internal/liveness -run 'TestLintLiveness/AC3'go test ./internal/liveness -run 'TestLintLiveness/AC4'go test ./internal/liveness -run 'TestLintLiveness/AC5'mise run test-goandmise run lintmise run run agentrepo sizeNo doc impact beyond
docs/shared-lint-exclusions.md, which now describes how to run the task and what it reports.No consumer impact beyond the new task: consumers receive it through the shared lint task file and no configuration changes.
Risk
Compatibility: none
Loosens: no
The task adds a check and loosens no gate. A planted defect left behind by a failed run would break later gates. AC3 pins that a finished run leaves the tree, the index, and the caches free of the planted defect. Remove the task to restore the current behavior.
Related
Part of #588.