Skip to content

Fix: cairn librarian silently drops status=error stale-branch findings (crn-kq7tz) - #132

Merged
quad341 merged 3 commits into
mainfrom
deploy/crn-kq7tz-gate
Aug 20, 2026
Merged

quad341 merged 3 commits into
mainfrom
deploy/crn-kq7tz-gate

Conversation

@quad341

@quad341 quad341 commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

cairn stale-branches reports two distinct finding shapes on the same
review-branch check: status == "escalate" (a reviewer exists but hasn't
acted) and status == "error" (cairn itself failed to evaluate the branch —
a reviewer-lookup failure, or ListReviewBranches erroring). evaluateBranch
sets exactly one of .reviewer / .error, never both. The
stale-review-branch-recovery step's jq filter selected only
status=="escalate", so error-status findings — arguably the ones most
needing a human's attention, since cairn couldn't even evaluate the branch —
were silently dropped every sweep cycle instead of filed.

Widens the filter to select(.status == "escalate" or .status == "error")
in both formulas/mol-cairn-librarian.formula.toml and
formulas/mol-cairn-librarian-rig.formula.toml, adds ERROR_TEXT extraction
(.error // empty) included in the filed bead body when present, and guards
the "reminder mail already sent to $REVIEWER" sentence behind a
non-null-$REVIEWER check — error findings never carry .reviewer, so an
unconditional interpolation would render "sent to " (a crn-w4c6-shaped
defect). New test: TestLibrarianStaleReviewBranchRecoveryStepHandlesErrorStatus.

  • Deploy bead: crn-kq7tz
  • Review bead: crn-lhchy, verdict: PASS
  • Build bead: crn-4j0pa (plan: crn-zg69q)

Gate result

PASS (7/7) — see release-gates/crn-kq7tz-gate.md
for full per-criterion evidence.

Independently re-verified on the deployer side against the deploy commit
(detached checkout, clean tree; no self-rebase needed — criterion 6's
merge-tree came back clean directly against origin/main): go build ./...,
go vet ./..., golangci-lint run ./... (isolated cache), golangci-lint fmt -d ./..., gofmt -l . all clean; go test ./... -race -count=1 — all 7
packages PASS, 0 FAIL, 0 SKIP, including a direct re-run by name of the
diff-owned test (TestLibrarianStaleReviewBranchRecoveryStepHandlesErrorStatus).

Diff scope independently confirmed single-themed via the triple-dot
(merge-base-relative) diff: 3 files (formulas/formulas_test.go,
formulas/mol-cairn-librarian-rig.formula.toml,
formulas/mol-cairn-librarian.formula.toml), +94/-16, 1 source-adjacent test
file + 2 formula files carrying the identical fix.
assert_deploy_ancestry_scope against crn-4j0pa (the build bead the
commits actually cite) — clean, no foreign commits, no out-of-scope paths.
Zero open findings on the review side ("No blocking findings"); no
HIGH/blocking findings anywhere in the chain.

Merge authority

quad341/cairn — standing self-merge authorization applies (mayor ruling
gm-wisp-2yhv7u, 2026-08-19). This bead's own description carries only the
generic recycled "route to mayor" boilerplate already covered by that
ruling, nothing bead-specific. Deployer will merge directly
(gh pr merge --squash --delete-branch, plain, no --auto) once CI is
green, then independently verify the merge landed.

Test plan

  • go build ./...
  • go vet ./...
  • golangci-lint run ./... (isolated cache)
  • golangci-lint fmt -d ./... (no diff)
  • gofmt -l . (empty)
  • go test ./... -race -count=1 (all 7 packages)
  • Diff-owned test re-run individually by exact name
  • CI (build-test, lint) — to be confirmed green post-open

🤖 Opened by cairn/deployer on a green release gate.

cairn-reviewer-scratch added 3 commits August 20, 2026 02:45
@quad341
quad341 merged commit 7cc79ab into main Aug 20, 2026
2 checks passed
@quad341
quad341 deleted the deploy/crn-kq7tz-gate branch August 20, 2026 21:01
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