Repository navigation
Fix: cairn librarian silently drops status=error stale-branch findings (crn-kq7tz) - #132
Merged
Merged
Conversation
added 3 commits
August 20, 2026 02:45
…e-branch findings too, not only escalate (refs crn-4j0pa)
…nch findings too, not only escalate (refs crn-4j0pa)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cairn stale-branchesreports two distinct finding shapes on the samereview-branch check:
status == "escalate"(a reviewer exists but hasn'tacted) and
status == "error"(cairn itself failed to evaluate the branch —a reviewer-lookup failure, or
ListReviewBrancheserroring).evaluateBranchsets exactly one of
.reviewer/.error, never both. Thestale-review-branch-recoverystep's jq filter selected onlystatus=="escalate", so error-status findings — arguably the ones mostneeding 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.tomlandformulas/mol-cairn-librarian-rig.formula.toml, addsERROR_TEXTextraction(
.error // empty) included in the filed bead body when present, and guardsthe "reminder mail already sent to $REVIEWER" sentence behind a
non-null-
$REVIEWERcheck — error findings never carry.reviewer, so anunconditional interpolation would render "sent to " (a crn-w4c6-shaped
defect). New test:
TestLibrarianStaleReviewBranchRecoveryStepHandlesErrorStatus.Gate result
PASS (7/7) — see
release-gates/crn-kq7tz-gate.mdfor 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 7packages 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 testfile + 2 formula files carrying the identical fix.
assert_deploy_ancestry_scopeagainstcrn-4j0pa(the build bead thecommits 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 thegeneric 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 isgreen, 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)build-test,lint) — to be confirmed green post-open🤖 Opened by cairn/deployer on a green release gate.