Skip to content

Name the Exception in the Line That Claims Every Rule Gates - #622

Merged
ptr727 merged 2 commits into
developfrom
fix/gate-comment-names-the-exception
Aug 8, 2026
Merged

Name the Exception in the Line That Claims Every Rule Gates#622
ptr727 merged 2 commits into
developfrom
fix/gate-comment-names-the-exception

Conversation

@ptr727

@ptr727 ptr727 commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Fixes a defect the #621 promotion's review found. A promotion's head is develop, so the fix cannot land on that pull request and takes its own branch, which the promotion then carries.

The defect

The gating step's comment claimed every default prose rule gates, one line above the comment naming charset-unknown as the one that reports instead. Both cannot be true, and the second is.

# Every default prose rule is clean tree-wide, so each one gates rather than reporting a backlog.
# `charset-unknown` is clean too and still reports, for the reason the step below gives.

Where the overstatement came from

It is the previous fix's. Round 2 of #620 narrowed "every prose rule" to "every default prose rule", to stop the claim covering sentence-split, which sits outside DEFAULT_RULES and gates nowhere. That narrowing walked straight into charset-unknown, which sits inside DEFAULT_RULES and still does not gate.

Rule In DEFAULT_RULES Gates in CI
charset, semicolon, dash, dupword, spelling, comment-wrap, comment-case, home-path yes yes
charset-unknown yes no, warn-only by design
sentence-split no no

One phrase cannot carry both exclusions. The line now states the count and lets the next line name which rule it is.

Swept rather than patched at the reported line

The same shape was in scripts/README.md, where one sentence said being clean is what lets CI gate them and the next sentence excepted one of them. That instance was not reported and is corrected here, since a claim written in two places drifts in two places.

Verification

Check Result
Gating invocation, whole tree 0 violations across 0 files
python3 scripts/test_prose_lint.py 198 tests, OK
actionlint exit 0
editorconfig-checker exit 0

The promotion's review caught the gating step's comment saying every default
prose rule gates, one line above the comment naming `charset-unknown` as the one
that reports. Both cannot be true, and the second is.

The overstatement is the previous fix's. Round two of #620 narrowed "every prose
rule" to "every default prose rule" to stop the claim covering
`sentence-split`, which sits outside `DEFAULT_RULES`, and that narrowing walked
straight into `charset-unknown`, which sits inside it and still does not gate.
One phrase cannot carry both exclusions, so the line now states the count and
the next line names which rule it is.

Swept the phrasing rather than the reported line, which found the same shape in
`scripts/README.md`, where a sentence said being clean lets CI gate them and the
next sentence excepted one of them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 8, 2026 15:02

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.

Pull request overview

This PR corrects an overstated claim in CI/prose documentation by explicitly naming charset-unknown as the one default prose rule that remains warn-only (reports instead of gating), aligning comments with the intended tiering behavior.

Changes:

  • Reworded validate-task.yml comments to reflect that all default prose rules gate except charset-unknown.
  • Reworded scripts/README.md to name charset-unknown as the reporting (non-blocking) exception.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/README.md Clarifies prose-rule gating vs the charset-unknown warn-only exception in the scripts documentation.
.github/workflows/validate-task.yml Updates CI workflow comments to accurately describe which default prose rule does not gate.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/README.md Outdated
Comment thread .github/workflows/validate-task.yml Outdated
Two findings, both accepted.

The gating step's comment said all but one rule gate rather than reporting a
backlog, where no backlog exists anywhere and the step below now reports an
unclassified character instead. It says what the gate does to a change that adds
a finding, which is the thing a reader needs.

`scripts/README.md` read that being clean is what lets CI gate over the whole
tree, which drops the object and reads as incomplete. Dropping it was the
previous commit's, made to avoid saying CI gates every default rule when one of
them does not. Naming the gate rather than the rules keeps both true.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 8, 2026 15:04

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@ptr727
ptr727 merged commit 039be28 into develop Aug 8, 2026
7 checks passed
@ptr727
ptr727 deleted the fix/gate-comment-names-the-exception branch August 8, 2026 15:50
ptr727 added a commit that referenced this pull request Aug 8, 2026
…ule (#621)

Promotes three changes, 7 files. The second and third exist because this
promotion's own review found defects in the first, and a promotion's
head is `develop`, so each took its own branch and its own review before
this could carry it.

| Commit | Pull request | What it does |
| --- | --- | --- |
| `26af061` | [#620](#620)
| Gates every default prose rule whole-tree, closing
[#519](#519) |
| `039be28` | [#622](#622)
| Names the one default rule that does not gate, found by this
promotion's review |
| `674a27a` | [#624](#624)
| Carries the permission rules the review loop needs in the host
installer |

## What lands on `main`

**The prose gate now blocks.** The backlog reached zero at `20916ad`, so
the warn-only tier that `semicolon` and `dash` were given while several
hundred findings sat in the tree has expired. Both block now, and
`home-path` joins them.

`home-path` is the substantive half. It had been in `DEFAULT_RULES`
since it was written, so every bare local run included it, and it was
named by neither CI step. The rule that catches an absolute home path
naming a real account therefore ran on a developer's machine and gated
nothing in CI, which is the pattern-detectable sliver of
[`GOVERNANCE.md`](https://github.com/ptr727/ProjectTemplate/blob/develop/GOVERNANCE.md)
"Representative Data in Agent-Authored Text".
[`OPERATIONS.md`](https://github.com/ptr727/ProjectTemplate/blob/develop/OPERATIONS.md)
had recorded the hole, and this closes it and drops the record.

`charset-unknown` stays warn-only, deliberately. A finding there names a
character no tier covers, and classifying one is a fleet-law edit rather
than something the change that typed it can fix.

**The agent-safety installer carries permission rules.** It configured
`settings.json` for the hook alone, so a rule added on one machine
reached none of the others. Each rule is declared as a prefix and a
rule, ownership requires a delimiter after the prefix so a hand-written
rule for a different script is never claimed, and a re-run updates a
changed rule in place. The list holds one rule today, for
`scripts/pr_review.py`. The installer also refuses a malformed
`settings.json` at every level it descends rather than raising a
traceback partway through its edits.

## What is unchanged

The
[`prose-gate`](https://github.com/ptr727/ProjectTemplate/blob/develop/.github/actions/prose-gate/action.yml)
composite action runs `--diff` with no `--check` list, so it already
gated the full default set over the lines a change touches. A downstream
caller sees no behavior change from this promotion. Only the hub's own
whole-tree steps move.

Nothing is installed on any machine by this. Running the installer per
host stays the maintainer's action, tracked by
[#365](#365).

## One property of the gate worth stating on `main`

`validate-task.yml` is `workflow_call`, invoked by
`test-pull-request.yml` on `pull_request` to `main` and `develop`. There
is no push trigger, so a merge commit never runs it. The promoted
invocation was exercised by this pull request's own CI run on `26af061`,
where `Check prose step` and `Report unclassified characters step` both
appear and both pass.

## Review record

Twenty-one Copilot rounds across the three pull requests, 5 on #620, 2
on #622, and 12 on #624, plus 2 here. Several rounds reported no
comments while carrying findings in a `<details>` block, which is the
shape a thread-polling loop reads as a pass.

Worth recording rather than hidden in the count: nearly every finding
was in a claim the change made about itself rather than in what the code
does. A count that included the rule it was counting against, a scope
claim an absolute path would not have fixed, a "read once" that read
twice, and a "nothing was written" printed after the hook was already on
disk.

## Verification

Run on `develop` at `674a27a`:

| Check | Result |
| --- | --- |
| Gating invocation, whole tree | 0 violations across 0 files |
| `charset-unknown` and `sentence-split`, whole tree | 0 violations
across 0 files |
| `python3 scripts/test_prose_lint.py` | 198 tests, OK |
| `python3 scripts/repo_gate.py` | `eol` 0, `sha-pin` 0 |
| `python3 host-setup/agent-safety/gh-write-guard.py --selftest` | PASS
|
| `python3 spec/validate.py` | 22 cataloged, 0 backlog repos classify
cleanly |
| `editorconfig-checker` | exit 0 |
| Installer, fresh `CLAUDE_HOME` | hook registered, permission rule
added |

Merge with a merge commit rather than a squash, and without
`--delete-branch`, since this pull request's head is `develop`.
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