fix: blocked_reference_records unions every Blocked by clause (#184) #186

Merged
claude-bot-andresmgsl merged 1 commit from build/184-blocked-by-union into main 2026-07-25 15:40:25 +00:00
claude-bot-andresmgsl commented 2026-07-25 13:59:02 +00:00 (Migrated from github.com)

Closes #184

blocked_reference_records bound to the first blocked by occurrence and stopped at the first ./; after it — one clause, once. A repeated declaration (Blocked by #152. Blocked by #153. Blocked by #148 — …, the rig#154 body) collapsed to 152 alone and promoted to ready with two blockers open; earlier prose containing the words hijacked the parse and disarmed a well-formed declaration below it. Now every occurrence contributes a clause, each terminated at its own first ./; (unterminated → end of input, soft-wrap continuation unchanged), and the union feeds the unchanged sort -nu/sort -u, cross-repo classification, and decision table.

Acceptance criteria

  • blocked_references <<<'Part of #151. Blocked by #152. Blocked by #153. Blocked by #148 — prose. Blocks #155.'148 152 153 (the rig#154 body, verbatim — pinned as repeated blocker sentences all contribute).
  • Earlier "blocked by" prose + later Blocked by #152, #153, #148. → all three; prose refs retained too, never substituted (earlier blocked-by prose does not hijack the declaration, prose refs are retained beside the declaration, never substituted).
  • Every existing invariant-3 case passes unchanged — single clause, soft-wrap, unterminated prose, parenthesized/comma/slash-adjacent refs, both qualified-ref drops (145 passed, 0 failed).
  • Repeated declaration naming one open and one closed issue decides KEEP, not READY (repeated declaration with one open blocker keeps issue blocked).
  • mawk-compatible (verified on mawk 1.3.4); shellcheck-clean (.github/scripts/shellcheck-all.sh green); test/run.sh green (18 files, 0 failed).

Must-fail verification

Against origin/main's extraction: the repeated-declaration body yields 152 alone (the exact false promotion), and the hijack body yields empty (FLAG_UNPARSEABLE on a well-formed declaration). Both new cases are red on the old code.

Worklog

  • Multi-occurrence extraction in blocked_reference_records with the retain-bias comment
  • Tests beside the invariant-3 block: repeated sentences, prose hijack, retain-not-substitute, repeated-declaration KEEP, cross-repo in a later clause
  • changelog.d/184.md fragment (grouped, ### Fixed)
  • test/run.sh green, CI shellcheck script green, mawk verified
  • Must-fail check against origin/main extraction
  • CI green on the draft
  • Mark ready-for-review, request panel (codex, grok, kimi)
Closes #184 `blocked_reference_records` bound to the **first** `blocked by` occurrence and stopped at the first `.`/`;` after it — one clause, once. A repeated declaration (`Blocked by #152. Blocked by #153. Blocked by #148 — …`, the rig#154 body) collapsed to `152` alone and promoted to `ready` with two blockers open; earlier prose containing the words hijacked the parse and disarmed a well-formed declaration below it. Now every occurrence contributes a clause, each terminated at its own first `.`/`;` (unterminated → end of input, soft-wrap continuation unchanged), and the union feeds the unchanged `sort -nu`/`sort -u`, cross-repo classification, and decision table. ## Acceptance criteria - [x] `blocked_references <<<'Part of #151. Blocked by #152. Blocked by #153. Blocked by #148 — prose. Blocks #155.'` → `148 152 153` (the rig#154 body, verbatim — pinned as *repeated blocker sentences all contribute*). - [x] Earlier "blocked by" prose + later `Blocked by #152, #153, #148.` → all three; prose refs retained too, never substituted (*earlier blocked-by prose does not hijack the declaration*, *prose refs are retained beside the declaration, never substituted*). - [x] Every existing invariant-3 case passes unchanged — single clause, soft-wrap, unterminated prose, parenthesized/comma/slash-adjacent refs, both qualified-ref drops (145 passed, 0 failed). - [x] Repeated declaration naming one open and one closed issue decides `KEEP`, not `READY` (*repeated declaration with one open blocker keeps issue blocked*). - [x] mawk-compatible (verified on mawk 1.3.4); shellcheck-clean (`.github/scripts/shellcheck-all.sh` green); `test/run.sh` green (18 files, 0 failed). ## Must-fail verification Against `origin/main`'s extraction: the repeated-declaration body yields `152` alone (the exact false promotion), and the hijack body yields empty (`FLAG_UNPARSEABLE` on a well-formed declaration). Both new cases are red on the old code. ## Worklog - [x] Multi-occurrence extraction in `blocked_reference_records` with the retain-bias comment - [x] Tests beside the invariant-3 block: repeated sentences, prose hijack, retain-not-substitute, repeated-declaration KEEP, cross-repo in a later clause - [x] `changelog.d/184.md` fragment (grouped, `### Fixed`) - [x] `test/run.sh` green, CI shellcheck script green, mawk verified - [x] Must-fail check against origin/main extraction - [x] CI green on the draft - [x] Mark ready-for-review, request panel (codex, grok, kimi)
danmt (Migrated from github.com) reviewed 2026-07-25 13:59:02 +00:00
claude-bot-andresmgsl commented 2026-07-25 14:04:22 +00:00 (Migrated from github.com)

⟲ resuming from 0eea112d50

⟲ resuming from 0eea112d50ab61fd1e33ca3207b88c61f2d13b4a
codex-bot-andresmgsl commented 2026-07-25 14:05:42 +00:00 (Migrated from github.com)

🔎 reviewing head 0eea112d50

🔎 reviewing head 0eea112d50ab61fd1e33ca3207b88c61f2d13b4a
grok-bot-andresmgsl commented 2026-07-25 14:05:46 +00:00 (Migrated from github.com)

🔎 reviewing head 0eea112d50

🔎 reviewing head 0eea112d50ab61fd1e33ca3207b88c61f2d13b4a
grok-bot-andresmgsl (Migrated from github.com) approved these changes 2026-07-25 14:07:30 +00:00
grok-bot-andresmgsl (Migrated from github.com) left a comment

Verdict: approve

Head: 0eea112d50ab61fd1e33ca3207b88c61f2d13b4a
Issue: Closes #184 — multi-occurrence Blocked by extraction so a repeated declaration cannot promote on its first sentence alone (false ready on rig#154).

Acceptance criteria

Criterion Result
rig#154 body → 148 152 153 Verified locally
Earlier “blocked by” prose + later declaration → all three (retain, not substitute) Verified; prose-with-#9 retains 9 beside 12
Existing invariant-3 cases unchanged Full suite green; soft-wrap / unterminated / adjacent / qualified-drop cases still pass
Repeated declaration with one open blocker → KEEP Verified via blocked_decision
mawk / shellcheck / test/run.sh Default awk is mawk 1.3.4; shellcheck -x clean; 18 files, 0 failed (issueflow-reconcile: 145 passed)

Spec / load-bearing

  • Every marker occurrence contributes a clause to its own first ./;; unterminated retains to end of input; soft-wrap continuation (active across lines) preserved.
  • Union feeds unchanged sort -nu / sort -u, issue_references LOCAL/CROSS classification, and blocked_decision — no schema or decision-table change.
  • Comment states the retain bias once (#184 / rig#154), matching the issue’s conservative-error direction.
  • Must-fail against origin/main extraction: repeated body → 152 alone; hijack body → empty. Both fixed at this head.
  • changelog.d/184.md grouped ### Fixed fragment present; no hand-edit of CHANGELOG.md.

What I ran

  • Detached worktree at the head SHA.
  • bash test/run.sh (full suite).
  • Direct probes of the AC bodies through sourced blocked_references / blocked_decision / blocked_cross_references.
  • shellcheck -x actions/issueflow-reconcile/issueflow-reconcile.sh.
  • Old-awk must-fail contrast for the two promotion/hijack bodies.
  • CI on the head: test, self-guards, action/docs-sync/release-exercise jobs green.

No blocking issues. Non-blocking: none worth tracking — the change is small, pinned to the incident, and the new cases sit next to the invariant-3 block as the issue asked.

## Verdict: approve **Head:** `0eea112d50ab61fd1e33ca3207b88c61f2d13b4a` **Issue:** Closes #184 — multi-occurrence `Blocked by` extraction so a repeated declaration cannot promote on its first sentence alone (false `ready` on rig#154). ### Acceptance criteria | Criterion | Result | |---|---| | rig#154 body → `148 152 153` | Verified locally | | Earlier “blocked by” prose + later declaration → all three (retain, not substitute) | Verified; prose-with-`#9` retains `9` beside `12` | | Existing invariant-3 cases unchanged | Full suite green; soft-wrap / unterminated / adjacent / qualified-drop cases still pass | | Repeated declaration with one open blocker → `KEEP` | Verified via `blocked_decision` | | mawk / shellcheck / `test/run.sh` | Default `awk` is mawk 1.3.4; `shellcheck -x` clean; **18 files, 0 failed** (issueflow-reconcile: 145 passed) | ### Spec / load-bearing - Every marker occurrence contributes a clause to its own first `.`/`;`; unterminated retains to end of input; soft-wrap continuation (`active` across lines) preserved. - Union feeds unchanged `sort -nu` / `sort -u`, `issue_references` LOCAL/CROSS classification, and `blocked_decision` — no schema or decision-table change. - Comment states the retain bias once (#184 / rig#154), matching the issue’s conservative-error direction. - Must-fail against `origin/main` extraction: repeated body → `152` alone; hijack body → empty. Both fixed at this head. - `changelog.d/184.md` grouped `### Fixed` fragment present; no hand-edit of `CHANGELOG.md`. ### What I ran - Detached worktree at the head SHA. - `bash test/run.sh` (full suite). - Direct probes of the AC bodies through sourced `blocked_references` / `blocked_decision` / `blocked_cross_references`. - `shellcheck -x actions/issueflow-reconcile/issueflow-reconcile.sh`. - Old-awk must-fail contrast for the two promotion/hijack bodies. - CI on the head: `test`, `self-guards`, action/docs-sync/release-exercise jobs green. No blocking issues. Non-blocking: none worth tracking — the change is small, pinned to the incident, and the new cases sit next to the invariant-3 block as the issue asked.
codex-bot-andresmgsl (Migrated from github.com) approved these changes 2026-07-25 14:07:57 +00:00
codex-bot-andresmgsl (Migrated from github.com) left a comment

The implementation satisfies #184's acceptance criteria. blocked_reference_records now scans every marker-delimited clause while preserving the existing conservative retain bias, soft-wrap behavior, local/cross-repository classification, ordering, and deduplication. The added cases cover the live repeated-sentence failure, earlier-prose hijacking, retain-not-substitute behavior, the mixed open/closed KEEP decision, and a cross-repository reference in a later clause. The grouped changelog fragment is present.

Verification:

  • test/run.sh: 18 test files passed, 0 failed; test/issueflow-reconcile.test.sh: 145 passed, 0 failed.
  • .github/scripts/shellcheck-all.sh: passed for 39 tracked scripts.
  • Replaying the updated issue-flow test against base 80c0dca3 failed four new assertions, confirming the new regression coverage is red on the old extraction.
  • The current head's substantive GitHub checks are green.

I could not run the parse_labeler_config cases because yq is unavailable in this box; they are unrelated to the changed issue-flow parser, and the repository's test check is green.

The implementation satisfies #184's acceptance criteria. `blocked_reference_records` now scans every marker-delimited clause while preserving the existing conservative retain bias, soft-wrap behavior, local/cross-repository classification, ordering, and deduplication. The added cases cover the live repeated-sentence failure, earlier-prose hijacking, retain-not-substitute behavior, the mixed open/closed `KEEP` decision, and a cross-repository reference in a later clause. The grouped changelog fragment is present. Verification: - `test/run.sh`: 18 test files passed, 0 failed; `test/issueflow-reconcile.test.sh`: 145 passed, 0 failed. - `.github/scripts/shellcheck-all.sh`: passed for 39 tracked scripts. - Replaying the updated issue-flow test against base `80c0dca3` failed four new assertions, confirming the new regression coverage is red on the old extraction. - The current head's substantive GitHub checks are green. I could not run the `parse_labeler_config` cases because `yq` is unavailable in this box; they are unrelated to the changed issue-flow parser, and the repository's `test` check is green.
kimi-bot-andresmgsl commented 2026-07-25 15:28:26 +00:00 (Migrated from github.com)

🔎 reviewing head 0eea112d50

🔎 reviewing head 0eea112d50ab61fd1e33ca3207b88c61f2d13b4a
kimi-bot-andresmgsl (Migrated from github.com) approved these changes 2026-07-25 15:34:30 +00:00
kimi-bot-andresmgsl (Migrated from github.com) left a comment

Approve — head 0eea112.

Verified against issue #184's acceptance criteria in a detached worktree at the head (mawk 1.3.4, the exact engine CI ships):

  • AC1: blocked_references on the verbatim rig#154 body → 148 152 153. ✓
  • AC2: earlier "blocked by" prose + later Blocked by #152, #153, #148. → all three; prose refs retained, never substituted (blocked by #9 … + Blocked by #12.9 12, and this sub-case is pinned by prose refs are retained beside the declaration, never substituted). ✓
  • AC3: existing invariant-3 cases unchanged — test/issueflow-reconcile.test.sh passes 116 (baseline on origin/main in the same environment: 111; the +5 are this PR's new cases). ✓
  • AC4: repeated declaration with one open blocker → KEEP, pinned end-to-end through refs derived from the repeated declaration, matching the criterion's letter. ✓
  • AC5: suite run under mawk; see environment note below.
  • Must-fail: with the extraction reverted to origin/main, the new extraction cases go red — repeated blocker sentences all contribute, earlier blocked-by prose does not hijack the declaration, prose refs are retained beside the declaration, cross-repo ref in a later clause still flags. Restored after.
  • Spec's per-record cross-repo invariant is explicitly pinned (Blocked by #12. Blocked by rig#7.FLAG_CROSS_REPO; my probe agrees). Control: single clause, all closed → READY. git diff --check clean. Fragment changelog.d/184.md carries the ### Fixed heading the grouped shape sentinel requires (#182). CI green on this head.
  • The retain-bias comment is where the spec asked for it — on the function, naming rig#154/#184 and stating why over-retention is the correct direction of error.

Could not verify locally: shellcheck is not installed on this box, so .github/scripts/shellcheck-all.sh was not run here — relied on CI (test, self-guards green on this head) and on reading the awk for mawk-incompatible constructs (none found: match/RSTART/next usage is portable). The 29 failures in issueflow-reconcile.test.sh on this box are pre-existing environment gaps (no jq, no npm/node); they fail identically on origin/main and none is in the invariant-3 block this PR touches.

Non-blocking observation: the per-line loop prints a soft-wrapped clause as separate records rather than one buffered clause; downstream issue_references + sort -nu union them, so behavior is identical to #185's whole-body buffering on every probe I ran, and the shape stays closest to the original code.

Panel note (not a code defect): this and #185 both Closes #184, both are assigned on the issue, and they edit the same function, the same test block, and the same changelog.d/184.md — only one can land. I'm approving each head on its merits per the round doctrine; which of the two merges is the human's call at the merge gate, and triage may want to note the double-claim that produced it.

**Approve** — head `0eea112`. Verified against issue #184's acceptance criteria in a detached worktree at the head (mawk 1.3.4, the exact engine CI ships): - **AC1**: `blocked_references` on the verbatim rig#154 body → `148 152 153`. ✓ - **AC2**: earlier "blocked by" prose + later `Blocked by #152, #153, #148.` → all three; prose refs retained, never substituted (`blocked by #9 …` + `Blocked by #12.` → `9 12`, and this sub-case is pinned by `prose refs are retained beside the declaration, never substituted`). ✓ - **AC3**: existing invariant-3 cases unchanged — `test/issueflow-reconcile.test.sh` passes 116 (baseline on `origin/main` in the same environment: 111; the +5 are this PR's new cases). ✓ - **AC4**: repeated declaration with one open blocker → `KEEP`, pinned end-to-end through refs derived from the repeated declaration, matching the criterion's letter. ✓ - **AC5**: suite run under mawk; see environment note below. - **Must-fail**: with the extraction reverted to `origin/main`, the new extraction cases go red — `repeated blocker sentences all contribute`, `earlier blocked-by prose does not hijack the declaration`, `prose refs are retained beside the declaration`, `cross-repo ref in a later clause still flags`. Restored after. - Spec's per-record cross-repo invariant is explicitly pinned (`Blocked by #12. Blocked by rig#7.` → `FLAG_CROSS_REPO`; my probe agrees). Control: single clause, all closed → `READY`. `git diff --check` clean. Fragment `changelog.d/184.md` carries the `### Fixed` heading the grouped `shape` sentinel requires (#182). CI green on this head. - The retain-bias comment is where the spec asked for it — on the function, naming rig#154/#184 and stating why over-retention is the correct direction of error. **Could not verify locally**: shellcheck is not installed on this box, so `.github/scripts/shellcheck-all.sh` was not run here — relied on CI (`test`, `self-guards` green on this head) and on reading the awk for mawk-incompatible constructs (none found: `match`/`RSTART`/`next` usage is portable). The 29 failures in `issueflow-reconcile.test.sh` on this box are pre-existing environment gaps (no `jq`, no `npm`/`node`); they fail identically on `origin/main` and none is in the invariant-3 block this PR touches. **Non-blocking observation:** the per-line loop prints a soft-wrapped clause as separate records rather than one buffered clause; downstream `issue_references` + `sort -nu` union them, so behavior is identical to #185's whole-body buffering on every probe I ran, and the shape stays closest to the original code. **Panel note (not a code defect)**: this and #185 both `Closes #184`, both are assigned on the issue, and they edit the same function, the same test block, and the same `changelog.d/184.md` — only one can land. I'm approving each head on its merits per the round doctrine; which of the two merges is the human's call at the merge gate, and triage may want to note the double-claim that produced it.
claude-bot-andresmgsl commented 2026-07-25 15:37:05 +00:00 (Migrated from github.com)

Round summary — handoff

What shipped. blocked_reference_records (actions/issueflow-reconcile/issueflow-reconcile.sh) now unions every Blocked by occurrence in the body instead of binding to the first and stopping at the first ./; after it. Each occurrence contributes a clause terminated at its own first ./; (unterminated → end of input; soft-wrap continuation unchanged), and the union feeds the unchanged sort -nu/sort -u, cross-repo classification, and decision table. One commit (0eea112), three files: the extraction fix, five new test cases beside the invariant-3 block, and changelog.d/184.md (### Fixed).

Rounds. One. The whole panel (codex, grok, kimi) was requested on head 0eea112; all three approved that head with no changes requested, so no revision rounds were needed and the reviewed head is the merge head.

What was verified.

  • The rig#154 body, verbatim → 148 152 153 (the old parse yielded 152 alone — the exact false ready promotion).
  • Earlier "blocked by" prose no longer hijacks a later well-formed declaration; prose refs are retained beside the declaration, never substituted.
  • Repeated declaration naming one open and one closed issue decides KEEP, not READY.
  • Every pre-existing invariant-3 case passes unchanged: 145 passed / 0 failed; full test/run.sh green (18 files, 0 failed).
  • mawk 1.3.4 (the engine CI ships) and shellcheck (.github/scripts/shellcheck-all.sh) both green.
  • Must-fail check: both new headline cases are red against origin/main's extraction (repeated declaration → 152 alone; hijack body → FLAG_UNPARSEABLE).
  • Reviewers verified independently, not just read: kimi re-ran the acceptance criteria in a detached worktree at the head on mawk 1.3.4; grok verified the criteria locally.
  • CI green on the head; PR is mergeable with no blocker:*.

Post-merge residue.

  • changelog.d/184.md waits for the next release PR to assemble it into CHANGELOG.md; consumers (rig et al.) get the fix only when that release ships and their action pins advance — until then, repeated-declaration bodies on consumer boards remain exposed to the old parse.
  • rig#154 itself was already hand-flagged and held on its own thread; once a fixed reconciler runs against it, the sweep classifies it correctly. No manual label surgery owed from this PR.

Handing off per BUILDER.md: requesting @danmt's review and setting state:needs-human. The merge is yours.

## Round summary — handoff **What shipped.** `blocked_reference_records` (`actions/issueflow-reconcile/issueflow-reconcile.sh`) now unions **every** `Blocked by` occurrence in the body instead of binding to the first and stopping at the first `.`/`;` after it. Each occurrence contributes a clause terminated at its own first `.`/`;` (unterminated → end of input; soft-wrap continuation unchanged), and the union feeds the unchanged `sort -nu`/`sort -u`, cross-repo classification, and decision table. One commit (`0eea112`), three files: the extraction fix, five new test cases beside the invariant-3 block, and `changelog.d/184.md` (`### Fixed`). **Rounds.** One. The whole panel (codex, grok, kimi) was requested on head `0eea112`; all three approved that head with no changes requested, so no revision rounds were needed and the reviewed head is the merge head. **What was verified.** - The rig#154 body, verbatim → `148 152 153` (the old parse yielded `152` alone — the exact false `ready` promotion). - Earlier "blocked by" prose no longer hijacks a later well-formed declaration; prose refs are retained beside the declaration, never substituted. - Repeated declaration naming one open and one closed issue decides `KEEP`, not `READY`. - Every pre-existing invariant-3 case passes unchanged: 145 passed / 0 failed; full `test/run.sh` green (18 files, 0 failed). - mawk 1.3.4 (the engine CI ships) and shellcheck (`.github/scripts/shellcheck-all.sh`) both green. - Must-fail check: both new headline cases are red against `origin/main`'s extraction (repeated declaration → `152` alone; hijack body → `FLAG_UNPARSEABLE`). - Reviewers verified independently, not just read: kimi re-ran the acceptance criteria in a detached worktree at the head on mawk 1.3.4; grok verified the criteria locally. - CI green on the head; PR is mergeable with no `blocker:*`. **Post-merge residue.** - `changelog.d/184.md` waits for the next release PR to assemble it into `CHANGELOG.md`; consumers (rig et al.) get the fix only when that release ships and their action pins advance — until then, repeated-declaration bodies on consumer boards remain exposed to the old parse. - rig#154 itself was already hand-flagged and held on its own thread; once a fixed reconciler runs against it, the sweep classifies it correctly. No manual label surgery owed from this PR. Handing off per BUILDER.md: requesting @danmt's review and setting `state:needs-human`. The merge is yours.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: heavy-duty/ceremony#186
No description provided.