Repository navigation
Deploy crn-27con.4: attach needs-investigation label on librarian stale-review-branch escalation - #126
Merged
Conversation
added 3 commits
August 19, 2026 18:19
…-27con.4) TestLibrarianStaleReviewBranchRecoveryStepHasNeedsInvestigationLabelAndGuard fails against the current mol-cairn-librarian.formula.toml: the escalation step's bd create --labels= has dim:review-branch,source:cairn-librarian, needs-pm but no needs-investigation, and the crn-wqgm Guard block only checks for needs-pm. needs-pm (crn-wqgm) already makes the filed bead deacon-patrol-routable, but neither dim:review-branch nor source:cairn-librarian is used as a routing inclusion filter anywhere in packs/ (the only reference is an exclusion, in labeller's own health check). needs-investigation additionally puts the filed bead directly in investigator's own pull-based ready query (packs/actual/investigator/pack.toml), giving it a second independent path into a real work queue.
…-27con.4) Both mol-cairn-librarian.formula.toml and mol-cairn-librarian-rig.formula.toml's stale-review-branch-recovery step now file the escalation bead with --labels=dim:review-branch,source:cairn-librarian,needs-pm,needs-investigation (needs-pm and the provenance pair kept, not replaced) and the crn-wqgm Guard block now also asserts needs-investigation is present. Root cause: dim:review-branch/source:cairn-librarian have zero routing inclusion-filter consumers anywhere in packs/ -- the only reference is an exclusion in labeller's own health check. needs-pm (added earlier by #64/ crn-wqgm, predating this bug) already makes the bead deacon-patrol-routable; needs-investigation additionally puts it directly in investigator's own pull-based ready query (packs/actual/investigator/pack.toml: --label-any needs-pr-response,needs-investigation), so the bead now has two independent paths into a real work queue instead of depending solely on deacon dispatch. docs/plans/cairn-librarian-stale-branch-recovery.md's "ready-to-paste" step template still shows the pre-needs-pm label set; that drift predates this bug (introduced when crn-wqgm/crn-go8o added needs-pm) and is left as-is -- updating design-doc history is out of scope here. Second ask investigated and NOT implemented here: the bug describes "the sweep's earlier notify bucket" (cmd/branches.go's sendStaleBranchReminder, which mails a reviewer directly with no queue/SLA semantics) as the source of ~24-25 unread mail in cairn/architect's mailbox. Checked `gc mail inbox cairn/architect --json` directly: 23 unread, all either "cairn cull review"/"cairn remember review" (cmd/reviewer.go's initial review-request mail, sent on every shared-tier write/cull, not just stale ones) or this session's own benign "context cycle" self-mail. Zero "cairn review branch stale" mail (sendStaleBranchReminder's actual subject) is present -- the named mechanism isn't the one generating the noise. Neither of the bug's proposed fixes (drop the reminder, or re-point it at investigator) fits the mechanism actually responsible: cmd/reviewer.go's initial notification is load-bearing (dropping it removes the only mail that a new shared-tier write ever happened), and its reviewer resolution was the subject of a recent, deliberate fix (rott9.1) that re-pointing would partially undo. Filing a separate, correctly-scoped follow-up bead for the real mechanism instead of guessing a change into the wrong file.
Deploy crn-27con.4: attach needs-investigation label on librarian stale-review-branch escalation. See release-gates/crn-nc9te-gate.md for full per-criterion evidence.
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
Fixes
cairn stale-branches's escalation path so review-branch beads actuallyenter a real work queue. Both
mol-cairn-librarian.formula.tomlandmol-cairn-librarian-rig.formula.toml's stale-review-branch-recovery stepnow file the escalation bead with
needs-investigationadded alongside theexisting
dim:review-branch,source:cairn-librarian,needs-pmlabels — nolabel removed or renamed. The per-file guard block is extended symmetrically
to assert
needs-investigation's presence.work_queryanywhere in the fleet includeddim:review-branch/source:cairn-librarianas an inclusion filter, andsource:cairn-librarianis an active exclusion in labeller's ownunlabeled-work health check — so escalated review-branch beads were
invisible to both normal routing and the safety net meant to catch
unrouted work.
needs-investigationwas chosen because investigator'swork_queryalready polls for it (--label-any needs-pr-response,needs-investigation),so this required zero new taxonomy and zero new role/pool.
A secondary, explicitly discretionary ask in the source bug (dropping or
re-pointing an ad hoc "notify" mail step) was investigated and found to be
based on a stale premise — the actual noisy mechanism doesn't match what the
bug named. Rather than guess at the wrong fix, a scoped follow-up (crn-27con.7)
was filed instead; this does not block the primary fix, which is complete
and independent.
Gate result
PASS (7/7) — see
release-gates/crn-nc9te-gate.mdfor full per-criterion evidence. Independently re-verified on the deployer
side in an isolated scratch worktree (not inherited from the reviewer's
claimed results): fresh
go build/go vet/gofmt/golangci-lint(isolated cache) all clean,
go test ./... -race -count=1— all 7 packagesPASS, 0 FAIL, including a direct re-run of the new regression test
TestLibrarianStaleReviewBranchRecoveryStepHasNeedsInvestigationLabelAndGuard.Diff scope independently confirmed single-themed: exactly 3 files
(
formulas/mol-cairn-librarian.formula.toml,formulas/mol-cairn-librarian-rig.formula.toml,formulas/formulas_test.go),symmetric across both formula files, and cleanly divergent from main
(
assert_deploy_ancestry_scopeagainstcrn-27con.4— clean, no foreigncommits; zero file-level overlap with the two commits main gained since this
branch was cut).
Merge authority
quad341/cairn — standing self-merge authorization applies (mayor ruling
gm-wisp-2yhv7u, 2026-08-19). Deployer will merge directly(
gh pr merge --squash, plain, once CI is green) rather than routing tomayor.
Test plan
go build ./...go vet ./...gofmt -l .golangci-lint run ./...(isolated cache)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.