-
Notifications
You must be signed in to change notification settings - Fork 0
docs: record the closing-keyword trap firing through its own safeguard #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,23 +47,49 @@ Everything above now lives in [`kit-friction-log-archive.md`](kit-friction-log-a | |
| proposed fix: contract item 5 should say the restore belongs in a `finally` (or a | ||
| git-clean check) and that any harness must verify the tree is clean *after* it exits, | ||
| not only after a successful run. | ||
| - **The closing-keyword rule as written is wrong, and measuring it changed the fix.** | ||
| Last session's entry says never to write one "even negated". Acting on that, I rewrote | ||
| a PR body sentence that mentioned a backticked `` `Closes #61` ``. Then I measured: | ||
|
|
||
| ``` | ||
| PR #68 body contains `Closes #61` (backticked) → closingIssuesReferences: [] | ||
| PR #63 body contains "Does NOT close #60" → closingIssuesReferences: [58, 60] | ||
| ``` | ||
|
|
||
| **GitHub excludes inline code spans**; what it does not excuse is negating prose. So | ||
| the real rule is narrower than the entry below claims, and the obvious mechanical fix | ||
| — grep for `(close|fix|resolve)\w*\s+#\d+` — would fire on every legitimate backticked | ||
| reference and train people to ignore it. **M** — proposed fix: a `pr-watch` / `wrap-up` | ||
| check that strips fenced blocks and inline code **first**, then flags a closing keyword | ||
| within a few tokens of a negation (`not`, `n't`, `NOT`, "stays open"), which is the | ||
| actual failure mode. Correct the 2026-07-26 entry's rule at the same time; it is | ||
| currently stated more strongly than the evidence supports. | ||
| - **The closing-keyword trap fired again, because I weakened a correct rule on the | ||
| strength of an experiment that did not test what I thought.** `#61` was closed by the | ||
| squash-merge of `#68` and reopened by hand. | ||
|
|
||
| **What is actually measured** — three data points, with their confounds stated, | ||
| because two earlier write-ups of this stated more than the data supports: | ||
|
|
||
| | artifact | form | outcome | | ||
| | --- | --- | --- | | ||
| | `#68` body | `Closes #61` inside a **fenced block** | inert (`closingIssuesReferences: []`) | | ||
| | `9c6ab3a` commit message | `Closes #61` in an **inline** span | **fired** — closed `#61` | | ||
| | `#63` body | `Does NOT close #60` **and** a plain `fix #60` | fired; which one is **not isolated** | | ||
|
|
||
| **What is NOT measured, though I twice wrote as if it were:** whether an *inline* span | ||
| is inert in a PR body. The two backtick data points differ in **two** variables at once | ||
| — fenced-vs-inline *and* body-vs-commit — so "GitHub excludes inline code spans" and | ||
| "fenced blocks are inert everywhere, inline spans fire everywhere" fit the evidence | ||
| equally well. Under the second reading, the fix I proposed last round (strip inline | ||
| code from a PR body before checking) reopens the exact hole that closed `#61`. | ||
|
|
||
| Likewise the *negation* hypothesis: `#63`'s body carries a plain, non-negated `fix #60` | ||
| alongside the negated mention, so a check that only flags keywords **near a negation** | ||
| would have passed that body clean. | ||
|
|
||
| **H** — **stop deriving a mechanism; take the conservative rule.** Three attempts to | ||
| state this precisely have each been wrong, which is rule 1's threshold. The original | ||
| 2026-07-26 rule below — never write a closing keyword adjacent to an issue number you | ||
| do not intend to close, in any form, on any surface — would have prevented all three | ||
| incidents; the measurement talked me *out* of a correct rule. It stands as written, and | ||
| the proposed check follows it rather than any theory of markdown: | ||
|
|
||
| - flag **every** match on **every** surface — PR body, every commit message, and the | ||
| squash message — with **no stripping** of code spans or fenced blocks; | ||
| - cover the forms the naive regex misses and GitHub honours: `owner/repo#61`, a full | ||
| issue URL, and `Closes: #61` (a colon, not whitespace); | ||
| - check the **squash message at merge time** specifically. It is composed *after* the | ||
| PR body was reviewed, and nothing reviews it — verified: `9c6ab3a`'s message matches | ||
| neither `#68`'s title, its body, nor any of its three branch commits, and no hook in | ||
| `scripts/` inspects commit messages at all; | ||
|
Comment on lines
+85
to
+88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Name the command that establishes this verification claim. The document says this was “verified” but does not provide the command or evidence, despite the earlier 🤖 Prompt for AI Agents |
||
| - the operator confirms each match. Over-firing is the acceptable failure here. | ||
|
|
||
| Occurrence count, corrected: **three occurrences across two sessions** (`#63` and `#64` | ||
| were the same session; `9c6ab3a` is this one). | ||
| - **A review bot with an incremental model keeps a stale review across a rewrite.** | ||
| CodeRabbit reviewed the pre-split head, then declined `@coderabbitai review` | ||
| ("does not re-review already reviewed commits") and hit its Fair Usage limit on | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use surface-accurate terminology for the commit-message measurement.
The commit sample contains backtick-delimited plain text; it does not contain a Markdown inline span. This distinction matters because the incident resulted from applying rendered PR-body behavior to plain-text commit messages.
docs/kit-friction-log.md#L60-L68: replace “inline span” with “backtick-delimited text in a plain-text commit message,” and explicitly leave inline Markdown behavior unmeasured.docs/kit-handoff.md#L62-L69: replace “fenced-vs-inline” with “fenced-vs-backtick-delimited text,” while retaining the separate body-vs-commit surface distinction.📍 Affects 2 files
docs/kit-friction-log.md#L60-L68(this comment)docs/kit-handoff.md#L62-L69🤖 Prompt for AI Agents