Skip to content

fix(record): read a Depth line with a parenthetical note - #159

Merged
mmaclay merged 1 commit into
mainfrom
fix/record-depth-note
Dec 4, 2026
Merged

mmaclay merged 1 commit into
mainfrom
fix/record-depth-note

Conversation

@mmaclay

@mmaclay mmaclay commented Dec 4, 2026

Copy link
Copy Markdown
Member

Ticket: #146

Motivation

scripts/record.py refused a built pull request's Already checked block whose Depth: line carried a note, such as Depth: standard (review round on 5e1b699). The refusal stopped the record for the whole pull request, so its review never reached revise's finding rates, although the depth itself was valid. #146 asked for the note to be read past.

Change Summary

record.py now drops one parenthetical note after the depth value before checking it, so the line above records as standard. Any other value is still refused, with the line quoted as written: a bare (x), standard(x) with no space, a nested note, two notes, or text after the note. The Already checked block contract in docs/contracts.md moves to version 11 for the change.

Used by: nothing outside this repository

Departures

None.

Details

Design decisions

  • The note is dropped rather than kept, because nothing reads it, and inner.depth must stay one of light, standard and deep for the finding rates. The regex takes exactly one balanced note at the end of the line (\s+\([^()]*\)$), so a malformed line is still refused rather than guessed at.
  • The writers (implement-change's outcome and pr-create's body.md) still write the bare level. This change makes only the reader tolerant of the note people add by hand.

Testing

Run: bash tests/checks.sh (21 checks pass)

  • test_the_builds_depth_line_is_its_inner_depth covers the note read as standard, and the refused values listed above.
  • Downstream: none.

🤖 Generated with Claude Code. AI assistance level: 5/5 (not read by a person).

- Drop one parenthetical note after the Depth value, such as
  `standard (review round on 5e1b699)`, before checking it
- Keep refusing any other value, naming the line as written
- Bump the Already checked block contract to version 11

Closes #146

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmaclay
mmaclay marked this pull request as ready for review December 4, 2026 22:26
@mmaclay
mmaclay merged commit 080d9e4 into main Dec 4, 2026
1 check passed
@mmaclay
mmaclay deleted the fix/record-depth-note branch December 4, 2026 22:26
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.

1 participant