Repository navigation
Commit f8ee491
fix(pm): guard-governed-enqueue reads a rename's old path too (#17531)
The changed-files reader emitted `filename` alone, so a renamed entry
contributed only its NEW path to the list handed to the register's `--test`.
A rename OUT of a governed path therefore read as NOT governed at the hook:
a diff moving AGENTS.md to docs/AGENTS.md, or skills/x.md to docs/x.md,
enqueued freely. A dropped path can only REMOVE governance, never add it,
which is the one direction a governed reading must never be wrong in.
The `filenames` mode now also prints `previous_filename` when it is present
and differs, as its own line, so the register receives it as a path argument
like any other. The two other readers of the same diff already see both
paths — the queue guard decomposes per commit with `--no-renames`, and
`check-governed-merges.mjs --pr` derives the list three-dot — so this is the
hook catching up to them. No predicate moves: the hook still decides nothing
and asks the same two single sources.
Claude-Session: https://claude.ai/code/session_01YKEjmbYNvYWJvWGSWx26zK
Co-authored-by: Claude <noreply@anthropic.com>1 parent d8de599 commit f8ee491
2 files changed
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
| |||
86 | 94 | | |
87 | 95 | | |
88 | 96 | | |
| 97 | + | |
| 98 | + | |
89 | 99 | | |
90 | 100 | | |
91 | 101 | | |
| |||
201 | 211 | | |
202 | 212 | | |
203 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
204 | 228 | | |
205 | 229 | | |
206 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
| 403 | + | |
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| |||
0 commit comments