Skip to content

Let the Prose Gate Skip Generated Trees for Named Paths So the Pre-Commit Snippet Drops Its Exclude Copy #3443

Closed

Description

@ptr727

The pre-commit snippet's prose-gate hook now passes the staged paths to the gate (the fix for #3370). discover() in .github/actions/prose-gate/prose_lint.py judges a named file even inside a generated_trees directory, where a . scan skips it. So the snippet carries exclude: (^|/)reports/, a hand-kept copy of the gate's default generated_trees, and its README tells a repo that adds to that list in .prose-gate.json to add the same names to the exclude.

That is a second copy of one setting. A repo that adds a generated tree and forgets the exclude fails commits on generated content. The failure is loud rather than silent, so this is a design cleanup rather than a defect.

A likely fix is a gate-side way to apply generated_trees to named files too, such as a flag the hook passes, after which the snippet drops its exclude and the README sentence about mirroring it. prose_lint.py sits at its line ceiling (#3441), so this waits on that headroom.

Done means the snippet carries no copy of generated_trees, and a staged file under a generated tree still passes the hook.

Raised by the local review of the #3370 fix.

Activity

  1. added
    enhancement
    prose
    on Oct 25, 2026
  2. ptr727 commented on Nov 2, 2026

    @ptr727
    OwnerAuthor

    Released (2026-11-02): PR #3823 merged to develop and its branch is deleted, so this claim holds no files. The issue closes on promotion.

    Backlog burndown claim (away run 2026-11-02, round 2, group G1). Branch: burndown/1657-staged-prose-hook. Issues: #1657, #3443.

    Predicted file set:

    • .github/actions/prose-gate/prose_lint.py, .github/actions/prose-gate/prose-gate.json, scripts/prose_lint.py
    • tests/test_prose_lint.py
    • .husky/pre-commit, catalog/snippets/husky/pre-commit, catalog/snippets/husky/README.md
    • catalog/snippets/pre-commit/.pre-commit-config.yaml, catalog/snippets/pre-commit/README.md
    • scripts/README.md, docs/pre-commit-hooks-rollout.md

    Out of bounds for this group: .github/actions/prose-gate/action.yml and every other .github/workflows/* or .github/actions/*/action.yml (open PR #3801), GOVERNANCE.md (group G3).

    Scope: develop only. The feature pull request carries Closes on promotion: for each issue it fully fixes.

    Adjudication update (2026-11-02): the claim grows by tests/test_pre_commit_hook.py, which no live group or open pull request holds. GOVERNANCE.md stays with its current holder. This group files the GOVERNANCE.md clause as a follow-up issue instead of editing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementprose

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions