Repository navigation
Exempt the BuildKit check= Parser Directive in the Prose Gate - #3446
Conversation
A Dockerfile opening on a BuildKit `check=` line drew comment-case, and comment-added in diff mode, although BuildKit reads the directive only in lowercase. Add `check=` beside `syntax=` and `escape=` in the gate's tool-directive list, with a test running both scan modes over a constructed Dockerfile and a prose line as the control. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An exported PROSE_ALLOW_COMMENTS dropped comment-added from the test's control row. The docstring also claimed BuildKit reads the directive only in lowercase, where the Dockerfile reference says directive keys are not case-sensitive. It now names the real reason the line is not prose. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
There was a problem hiding this comment.
🟢 Approval recommended
The change is a one-entry exemption with a test that fails without it and passes with it, and the only open item is an optional naming nit.
No open issues 🎉
What changed in this PR
This PR stops the prose gate from flagging a Dockerfile's BuildKit check= parser directive. The gate already exempts syntax= and escape= directives, and check= was missing from the same list. The fix is a one-entry data change, and the directive is still checked for the line position where it appears in a Dockerfile. It closes the downstream report in issue #3372.
Changes:
- Adds
check=to thetool_directivesexemption list in the prose gate config, besidesyntax=andescape=. - Adds a test that runs the gate in whole-tree and diff modes over a Dockerfile. The directive line must draw no findings, and a lowercase prose line in the same position must still fail in both modes.
| File | Description |
|---|---|
| tests/test_prose_lint.py | Adds a test that checks the check= directive is exempt in both scan modes, with a prose line as the control. |
| .github/actions/prose-gate/prose-gate.json | Adds check= to tool_directives so the gate treats that line as a directive rather than prose. |
Review effort: Lite
|
Answer to the Copilot round on 0a0efea (review 5641051070), suppressed-finding count (0).
No change needed. The headline is the only place the round mentions a nit. Its body states "No open issues", its overview counts 0 findings, and it opens no thread, so no nit is named to act on. The test name and the data key both follow the file's existing shape: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3446 +/- ##
==========================================
Coverage ? 80.76%
==========================================
Files ? 23
Lines ? 8839
Branches ? 0
==========================================
Hits ? 7139
Misses ? 1700
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…nd Nine Fixes to Main (#3472) ## Summary Promotes the pull requests merged into develop since release 2.0.1166. - [#3444](#3444): keeps untracked files out of the pre-commit snippet's prose gate. - [#3446](#3446): exempts the BuildKit `check=` parser directive in the prose gate. - [#3448](#3448): compares intent staleness against the hub's own copy and names the moved canonical. - [#3450](#3450): says only the prose gate is diff-scoped in the commit hook. - [#3453](#3453): reclassifies HolidayLights as an operational config repository in the registry. - [#3455](#3455): classifies the remaining subprocess failures by status rather than by prose. - [#3464](#3464): splits the semicolon series in WORKFLOW.md's filesystem output-seam bullet. - [#3466](#3466): audits a caller's `workflow-model` input against the registry. - [#3469](#3469): emits one snapshot shape from the skills report's cannot-read paths. - [#3462](#3462): splits `pr_review.py`'s pure check and round readers into the leaf modules `pr_review_checks.py` and `pr_review_rounds.py`. - [#3470](#3470): holds a covered held `wait` while any workflow run on the head has not completed. - [#3473](#3473): answers this promotion's review. The `wait` help and `scripts/README.md` now say what a held head's exit `0` does not prove: a `CHECKS UNREADABLE` payload, the conditions the unregistered-required-check hold reads, and the reach of the completed-run read. The exit code itself stays for #3471. Closes #3370 Closes #3372 Closes #3371 Closes #3369 Closes #3378 Closes #3454 Closes #3332 Closes #1759 Closes #3451 ## Constituent coverage Each change this promotion carries had coverage on its own pull request into develop, at its merged head: | Pull request | Merged head | Coverage | | --- | --- | --- | | [#3444](#3444) | `a61d1e2a` | attested local pass at the merged head, base `develop` | | [#3446](#3446) | `0a0efea1` | attested local pass at the merged head, base `develop` | | [#3448](#3448) | `c2c71ea7` | attested local pass at the merged head, base `develop` | | [#3450](#3450) | `4ec37c34` | attested local pass at the merged head, base `develop` | | [#3453](#3453) | `f20a543c` | a Copilot round on the merged head, its one changed file, no open findings | | [#3455](#3455) | `85f0ce60` | attested local pass at the merged head, base `develop` | | [#3464](#3464) | `fcd48e2d` | attested local pass at the merged head, base `develop` | | [#3466](#3466) | `3426a19c` | attested local pass at the merged head, base `develop` | | [#3469](#3469) | `ea4b0bb7` | attested local pass at the merged head, base `develop` | | [#3462](#3462) | `236eceab` | attested local pass at the merged head, base `develop` | | [#3470](#3470) | `3545ba46` | attested local pass at the merged head, base `develop` | | [#3473](#3473) | `46010530` | attested local pass at the merged head, base `develop`, and a Copilot table on an earlier head naming exactly the changed files | 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
A Dockerfile opening on a BuildKit
check=parser directive, such as# check=skip=CopyIgnoredFile, drewcomment-casein a whole-tree scan andcomment-addedin diff mode. The directive vocabulary lives in.github/actions/prose-gate/prose-gate.json, wheresyntax=andescape=sat intool_directivesandcheck=did not..github/actions/prose-gate/prose-gate.json:check=now sits besidesyntax=andescape=inexemptions.tool_directives.prose_lint.pyis unchanged.tests/test_prose_lint.py: a new test runsmainin both scan modes over a constructed Dockerfile. The directive line draws nothing, and a lowercase prose line in the same position, the control, fails both modes. The test pinsPROSE_ALLOW_COMMENTSoff, as its sibling diff-mode tests do.One correction to the issue's premise. The Dockerfile reference says "Parser directive keys, such as
syntaxorcheck, aren't case-sensitive, but they're lowercase by convention." So capitalizing the line would not stop BuildKit reading it. The exemption is still the fix. A# Check=skip=CopyIgnoredFileline still drawscomment-added, which asks for a deletion that changes the build, and the test's docstring gives that reason.Verification
Dockerfile:1: comment-case: comment sentence opens in lowercase.(0, 0) != (1, 1). With it in place the test passes, also withPROSE_ALLOW_COMMENTS=1exported.python -m unittest discover -s tests -p 'test_prose*.py'passes, andruff format --checkandruff checkare clean on the test file.Local review
Three recorded
local-strict-reviewpasses. Round 1 found the unpinnedPROSE_ALLOW_COMMENTSand the docstring's wrong claim that BuildKit reads the directive only in lowercase, both fixed. Round 2 found one over-length docstring sentence the fix added, fixed. Round 3 found nothing.Closes on promotion: #3372
🤖 Generated with Claude Code