Skip to content

Deploy crn-27con.4: attach needs-investigation label on librarian stale-review-branch escalation - #126

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

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

Conversation

@quad341

@quad341 quad341 commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes cairn stale-branches's escalation path so review-branch beads actually
enter a real work queue. 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 needs-investigation added alongside the
existing dim:review-branch,source:cairn-librarian,needs-pm labels — no
label removed or renamed. The per-file guard block is extended symmetrically
to assert needs-investigation's presence.

  • Deploy bead: crn-nc9te
  • Review + implementation bead: crn-27con.4 (epic: crn-27con), verdict: PASS
  • Root cause: no role's work_query anywhere in the fleet included
    dim:review-branch/source:cairn-librarian as an inclusion filter, and
    source:cairn-librarian is an active exclusion in labeller's own
    unlabeled-work health check — so escalated review-branch beads were
    invisible to both normal routing and the safety net meant to catch
    unrouted work. needs-investigation was chosen because investigator's
    work_query already 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.md
for 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 packages
PASS, 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_scope against crn-27con.4 — clean, no foreign
commits; 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 to
mayor.

Test plan

  • go build ./...
  • go vet ./...
  • gofmt -l .
  • golangci-lint run ./... (isolated cache)
  • go test ./... -race -count=1 (all 7 packages)
  • 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 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.
@quad341
quad341 merged commit 6b45121 into main Aug 20, 2026
2 checks passed
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