diff --git a/.abcd/work/issues/open/iss-2611262226253325-while-the-person-is-away-the-stop-hook.md b/.abcd/work/issues/open/iss-2611262226253325-while-the-person-is-away-the-stop-hook.md new file mode 100644 index 000000000..54e71dbbb --- /dev/null +++ b/.abcd/work/issues/open/iss-2611262226253325-while-the-person-is-away-the-stop-hook.md @@ -0,0 +1,15 @@ +--- +schema_version: 1 +id: "iss-2611262226253325" +slug: "while-the-person-is-away-the-stop-hook" +severity: "minor" +category: "bug" +source: "user-observation" +found_during: "manual-capture" +origin: researcher-authored +production_mode: hand-written +found_at: "internal/core/autonomy" +remedy: "Have the owed-work reader apply land's stacked check: a pull request whose branch carries commits of another open pull request not on the default branch is owed nothing until that base merges, and the stop check names it as waiting on its base (as it already does for a stacked branch with no pull request); test a stacked pull request reads as waiting, not owed an arm." +--- + +While the person is away, the stop hook names a stacked pull request as owed an arm ('pull request #1817 (reserve-comma-test-1126) is behind its base, which a merge queue guards, and auto-merge is not armed: arm it'), but abcd land refuses to arm that same pull request because its branch carries commits of another open, armed pull request (#1815) not yet on main. The session can do nothing to move the item until the base merges, so the hook holds every stop on an act land forbids (2026-11-26, 22:26 GMT). diff --git a/.abcd/work/issues/resolved/iss-2611262200106745-abcd-land-record-review-refuses-a-review.md b/.abcd/work/issues/resolved/iss-2611262200106745-abcd-land-record-review-refuses-a-review.md new file mode 100644 index 000000000..20fc8a03d --- /dev/null +++ b/.abcd/work/issues/resolved/iss-2611262200106745-abcd-land-record-review-refuses-a-review.md @@ -0,0 +1,17 @@ +--- +schema_version: 1 +id: "iss-2611262200106745" +slug: "abcd-land-record-review-refuses-a-review" +severity: "minor" +category: "ux" +source: "user-observation" +found_during: "manual-capture" +origin: researcher-authored +production_mode: hand-written +found_at: "internal/core/landing/review.go" +remedy: "Count a line as a second verdict only when the word verdict is followed, on that line, by one of the known verdict words (SHIP, FIX FIRST, BLOCK, APPROVE, NEEDS-INPUT), so a reference such as 'verdict:52' or a sentence about a verdict record is not one; test both a reference bullet (accepted) and a 'Verdict: SHIP' line outside the heading (still refused)." +resolution: "the recorder reads a word followed directly by a line number or the rest of a file name as a file reference, not a verdict (internal/core/landing/review.go, fileReference)" +impact: fix +--- + +abcd land --record-review refuses a review return whose finding bullets lead with the word verdict as a reference into the record under review, not as a verdict: a security return for an ideate verdict record opened two finding bullets with a reference into that record ('verdict:52', 'verdict:143'), and the recorder counted three Verdict sections and refused it ('it has 3 Verdict sections; one states the verdict, so reword the line ...'). The reviewer had to rename every reference to 'record:N' by hand (2026-11-26, ideate-terminal-build-1126). Any review that cites an ideate verdict record, or a file named after verdicts (verdict.md:14, verdict_head_test.go), leads a line this way; a sentence about a verdict was already accepted. diff --git a/internal/core/landing/review.go b/internal/core/landing/review.go index 3678d9117..a96ba733e 100644 --- a/internal/core/landing/review.go +++ b/internal/core/landing/review.go @@ -253,7 +253,8 @@ var verdictStatement = regexp.MustCompile("^(?:\\([^)]*\\)[ \\t]*)?(?:[:=|\\x{20 var verdictQualifier = regexp.MustCompile(`(?i)^(?:final|overall|my|our|the|last|review|reviewer'?s?|reviewers'?|security|ruthless|code|actual|formal)\b`) // verdictLines is the index of every line opening a verdict, in the shapes a reviewer -// writes one. A line that begins with the word does, whatever follows it. With words +// writes one. A line that begins with the word does, whatever follows it, unless the +// word is part of a file reference that states no verdict (fileReference). With words // before it (`Final`, `My`, `The overall`), a heading does, and so does a line whose // emphasis wraps the word (emphasisWrapsWord), and any other line does when it goes on // to state one (verdictStatement) or ends there after a qualifier: the word in a @@ -272,12 +273,27 @@ func verdictLines(lines []string) []int { return at } +// fileReference is what follows the word Verdict when the word is part of a file's +// name or a place in one, as a reviewer cites the record under review: a line +// number directly after a colon (`verdict:52`), or a dot or underscore and the rest +// of a file name (`verdict.md:14`, `verdict_head_test.go`). `Verdict: 52`, with a +// space after the colon, is no reference. +var fileReference = regexp.MustCompile(`^(?::[0-9]|[._][\pL\pN])`) + +// statesVerdictWord reports whether a verdict word stands anywhere in text, apart from +// the letters around it, so a file reference that goes on to state one +// (`verdict:1 BLOCK`, `Verdict.BLOCK`) still opens a verdict. +var statesVerdictWord = regexp.MustCompile(`(?:^|[^\pL])(?:SHIP|APPROVE|BLOCK|FIX[ _-]FIRST|NEEDS[ _-]INPUT)(?:$|[^\pL])`) + func opensVerdict(line, next string) bool { m := verdictInLine.FindStringSubmatch(numberedItem.ReplaceAllString(line, "$1")) if m == nil { return false } lead, qualifiers, rest := m[1], m[2], m[3] + if fileReference.MatchString(rest) && !statesVerdictWord.MatchString(rest) { + return false + } if qualifiers == "" { return true } diff --git a/internal/core/landing/verdict_head_test.go b/internal/core/landing/verdict_head_test.go index 4e4e534b9..c891e1110 100644 --- a/internal/core/landing/verdict_head_test.go +++ b/internal/core/landing/verdict_head_test.go @@ -117,6 +117,16 @@ func TestAQualifiedVerdictLineCounts(t *testing.T) { "Final verdict", "### Verdicts", "1. Verdict: BLOCK", + "Verdict: 52", + "Verdict:BLOCK", + "Verdict. BLOCK", + "_Verdict_ BLOCK", + "Verdict.BLOCK", + "Verdict_BLOCK", + "verdict:1 BLOCK", + "verdict.md:14 — Verdict: BLOCK", + "| Verdict.BLOCK |", + "- **verdict:52** FIX FIRST", " ### Verdict", " ### Verdict", } { @@ -237,6 +247,11 @@ func TestAFindingThatMentionsAVerdictOpensNone(t *testing.T) { "_Failure scenario:_ a verdict naming no head is refused.", "**The verdict reader drops a line.**", "*The verdict reader drops a line.*", + "- **verdict:52 and :111-116 at this head** — informational: the figures stay in history.", + "- verdict:188 no longer states the blocker as judged.", + "verdict.md:14 names the draft intent as the source.", + "- **verdict_head_test.go:20** — the reader drops a line.", + "- `verdict.go` reads the heading.", } { text := "Reviewed head: " + sha[:9] + "\n\n### Analysis\n\n" + line + "\n\n### Verdict\n\nSHIP " + sha + "\n" if word, err := ReadVerdict(text, sha); err != nil || word != "SHIP" {