Answer prose round 1: 0 🔴, 5 🟡 (0 misread); reword the help paragraph, the changelog bullet and the decision, and restore the entry's old sentence
This commit is contained in:
@@ -8,17 +8,18 @@ subagent. The rules:
|
||||
|
||||
{rules}
|
||||
|
||||
A file a Bash command writes, such as through `cat > Dockerfile`, is checked when a `git commit` would commit it, not
|
||||
when written: the file rules (action-pin, image-pin, ignorefile-sorted, no-ai-attribution) hold each file that differs
|
||||
from HEAD in the index or the work tree, or is untracked and not ignored, to the lines it adds. A `# rule-override` line
|
||||
in that file or in the commit command overrides its breach.
|
||||
|
||||
A call overrides a rule with `# rule-override <rule>: <reason>`:
|
||||
|
||||
- anywhere in a Bash command, such as a trailing comment
|
||||
- in a file, as a comment line in the text the edit writes
|
||||
- in Markdown, as `<!-- rule-override <rule>: <reason> -->`
|
||||
|
||||
A file a Bash command writes, such as through `cat > Dockerfile`, is checked when a `git commit` runs, not when written.
|
||||
The commit checks every file that differs from HEAD, in the index or the work tree, and every untracked file that is
|
||||
not ignored, even one the commit leaves out. It holds each to the rules that name a file (action-pin, image-pin,
|
||||
ignorefile-sorted, no-ai-attribution), judged on the lines the file adds. A marker among those lines, or in the commit
|
||||
command, overrides the file's breach.
|
||||
|
||||
Each override that let a call through is appended to rule-overrides.tsv in the git directory of
|
||||
the checkout it touched: UTC time, branch, the commit checked out, rule, reason, and the file
|
||||
written or the command's first line. An override outside any git checkout is not logged.
|
||||
|
||||
@@ -104,7 +104,7 @@ class Breach:
|
||||
detail: str
|
||||
# The checkout whose log records an override of this breach.
|
||||
directory: str
|
||||
# Text beyond the call's own whose markers override this breach: the file a commit holds, as an Edit's text is for its file.
|
||||
# The lines a commit adds to the breach's file: its markers override this breach, as a Write's text overrides its own file's.
|
||||
marked: str = ""
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ def overrides(written: str) -> tuple[dict[str, str], list[str]]:
|
||||
|
||||
def check(breaches: list[Breach], written: str, markdown: bool, bash: bool) -> Checked:
|
||||
granted, malformed = overrides(written)
|
||||
# Each breach is overridden by the call's markers and by its own file's.
|
||||
# A marker overrides a breach when it is in the call's own text or in the breach's file.
|
||||
grants = [granted | overrides(breach.marked)[0] for breach in breaches]
|
||||
blocking = [breach for breach, grant in zip(breaches, grants) if breach.rule not in grant]
|
||||
messages = [f"`{marker}` names no rule below, or gives no reason." for marker in malformed] if blocking else []
|
||||
|
||||
Reference in New Issue
Block a user