Skip to content

Exempt the BuildKit check= Parser Directive in the Prose Gate - #3446

Merged
ptr727 merged 3 commits into
developfrom
feature/auto-3372
Oct 25, 2026
Merged

ptr727 merged 3 commits into
developfrom
feature/auto-3372

Conversation

@ptr727

@ptr727 ptr727 commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Summary

A Dockerfile opening on a BuildKit check= parser directive, such as # check=skip=CopyIgnoredFile, drew comment-case in a whole-tree scan and comment-added in diff mode. The directive vocabulary lives in .github/actions/prose-gate/prose-gate.json, where syntax= and escape= sat in tool_directives and check= did not.

  • .github/actions/prose-gate/prose-gate.json: check= now sits beside syntax= and escape= in exemptions.tool_directives. prose_lint.py is unchanged.
  • tests/test_prose_lint.py: a new test runs main in 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 pins PROSE_ALLOW_COMMENTS off, as its sibling diff-mode tests do.

One correction to the issue's premise. The Dockerfile reference says "Parser directive keys, such as syntax or check, 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=CopyIgnoredFile line still draws comment-added, which asks for a deletion that changes the build, and the test's docstring gives that reason.

Verification

  • Reproduced the issue's case with the gate before the change: Dockerfile:1: comment-case: comment sentence opens in lowercase.
  • With the JSON entry reverted, the new test fails on (0, 0) != (1, 1). With it in place the test passes, also with PROSE_ALLOW_COMMENTS=1 exported.
  • python -m unittest discover -s tests -p 'test_prose*.py' passes, and ruff format --check and ruff check are clean on the test file.

Local review

Three recorded local-strict-review passes. Round 1 found the unpinned PROSE_ALLOW_COMMENTS and 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

ptr727 and others added 3 commits October 24, 2026 18:54
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>
Copilot AI lite review requested due to automatic review settings October 25, 2026 01:59
@ptr727

ptr727 commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 0a0efea1f299690eedb33545d490deaa41572b01, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 the tool_directives exemption list in the prose gate config, beside syntax= and escape=.
  • 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

@ptr727

ptr727 commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

Answer to the Copilot round on 0a0efea (review 5641051070), suppressed-finding count (0).

the only open item is an optional naming nit.

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: test_a_known_tool_directive_is_not_prose sits beside the new test, and the entry joins the tool_directives list as syntax= and escape= already appear there.

@codecov

codecov Bot commented Oct 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@a3ff33f). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3446   +/-   ##
==========================================
  Coverage           ?   80.76%           
==========================================
  Files              ?       23           
  Lines              ?     8839           
  Branches           ?        0           
==========================================
  Hits               ?     7139           
  Misses             ?     1700           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 80.76% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727
ptr727 merged commit 383040d into develop Oct 25, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/auto-3372 branch October 25, 2026 02:11
ptr727 added a commit that referenced this pull request Oct 25, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants