Skip to content

feat(lint): prove enabled gates reject nested defects - #1069

Open
tbhb-agent wants to merge 2 commits into
mainfrom
feat/839-nested-lint-20261101
Open

tbhb-agent wants to merge 2 commits into
mainfrom
feat/839-nested-lint-20261101

Conversation

@tbhb-agent

Copy link
Copy Markdown
Contributor

Summary

A new devtools:lint-liveness task 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-fmt and devtools:lint-curl.

Criterion Command Result
AC1 gates reject a nested defect go test ./internal/liveness -run 'TestLintLiveness/AC1' passes
AC2 narrowed selection fails and names gate and path go test ./internal/liveness -run 'TestLintLiveness/AC2' passes
AC3 nothing planted remains after a pass or a failure go test ./internal/liveness -run 'TestLintLiveness/AC3' passes
AC4 the task skips undefined gates and prints each one's name go test ./internal/liveness -run 'TestLintLiveness/AC4' passes
AC5 the covered list matches the defined gates go test ./internal/liveness -run 'TestLintLiveness/AC5' passes
Whole suite and lint mise run test-go and mise run lint pass
Size mise run run agentrepo size level soft

No 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.

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>
@tbhb-agent tbhb-agent added change:feat PR adds or changes a feature (Conventional Commit type feat) provenance:agent-assisted PR contains commits authored with AI assistance (see Assisted-by trailers) labels Nov 2, 2026
@tbhb-agent
tbhb-agent requested a review from tbhb as a code owner November 2, 2026 14:07
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>
@tbhb-agent
tbhb-agent removed the request for review from tbhb November 2, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:feat PR adds or changes a feature (Conventional Commit type feat) provenance:agent-assisted PR contains commits authored with AI assistance (see Assisted-by trailers)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant