Repository navigation
Fix defaultReviewer rig/role tiers + resolve-before-commit ordering (crn-9qlxu) - #127
Merged
Merged
Conversation
added 3 commits
August 19, 2026 17:46
…GC_RIG (refs crn-rott9.1)
…IG (refs crn-rott9.1) Reorder requestReview, commitForBatchReview, requestCullReview, and requestPromotionReview to call resolveReviewer before their respective commit-to-review-branch step, so a resolution failure leaves nothing committed anywhere -- true fail-closed instead of committed-but-unnotified. Fix defaultReviewer's rig-tier case to resolve from the entry's own declared rig value (from cairn.ResolvedTier) instead of $GC_RIG: an entry stored under rig:<value> is unambiguous about which rig's reviewer should see it, regardless of which rig the writing agent happens to be running in. role tier is deliberately left $GC_RIG-based -- role-tier storage carries no rig of its own, so $GC_RIG remains the only available signal there. Also relax TestRememberSharedTierReviewerResolutionFailureCommitsNothing's stdout assertion: remember.go always echoes the new entry's ID right after the loose file write, before the tier branch is even decided -- unconditional and orthogonal to this fix. The test now checks for the absence of "review branch:"/"mailed reviewer:" lines instead of total silence.
Deploy bead crn-9qlxu at b1320d7, source review crn-rott9.1: reviewer resolves before commit at all 4 call sites; rig-tier default reviewer now uses the entry's own scope value instead of $GC_RIG.
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
cmd/reviewer.goso a reviewer-resolution failure can never leave areview-branch commit that nobody was ever told about.
resolveReviewernowruns before the commit/eviction/promotion-mark step at all 4 call sites
(
requestReview,commitForBatchReview,requestCullReview,requestPromotionReview) — true fail-closed instead of committed-but-unnotified.
Also fixes
defaultReviewer's rig-tier case: it now resolves from theentry's own declared rig value (
cairn.ResolvedTier'svalue) instead of$GC_RIG. This fixes a silent-stuck-state bug flagged by deep-investigatorthis session — city-scope agents with no
$GC_RIGset previously got ahard-to-diagnose failure on rig-tier resolution, even though the entry
itself already declared which rig it belonged to. role tier is deliberately
left
$GC_RIG-based (role-tier storage carries no rig at all, so whichrig's role-holder should review is genuinely underspecified without it).
decision on crn-ry4zu (recall-vs-review-gate visibility problem); this fix
is the reviewer-notification-ordering half of that decision, not a
standalone change.
Gate result
PASS (7/7) — see
release-gates/crn-9qlxu-gate.mdfor full per-criterion evidence. Independently re-verified on the deployer
side in a fresh isolated scratch worktree (not inherited from the
reviewer's claimed results):
go build/go vet/gofmt/golangci-lint(isolated cache) all clean,
go test ./... -race -count=1— all 7 packagesPASS, 0 FAIL, including direct
-vre-runs of all 5 new/changed regressiontests (
TestDefaultReviewerRigTierIgnoresGCRig,TestDefaultReviewerRigTierRequiresNonEmptyValue,TestRememberBatchReviewerResolutionFailureCommitsNothing,TestCullEvictReviewerResolutionFailureCommitsNothing,TestPromoteMarkReviewerResolutionFailureCommitsNothing). The bead'ssecurity claim (reusing the rig value for a mail-recipient string is not a
new trust extension, since the same value already flows into
scopeDir'sfilesystem path join) was independently checked against
internal/cairn/remember.goand confirmed accurate.Diff scope independently confirmed single-themed: 7 files, all under
cmd/— the fix itself (reviewer.go), its direct regression tests(
reviewer_test.go,remember_batch_test.go,remember_test.go,cull_test.go,promote_test.go), and one necessary downstream fixturefix (
branches_test.go— an existing test could no longer force rig-tierresolution to fail via
$GC_RIG, so its fixture switched torole:tokeep testing the same failure path). Cleanly divergent from main
(
assert_deploy_ancestry_scopeagainstcrn-rott9.1— clean, no foreigncommits); one file-level overlap on
cmd/remember_test.goagainst main'sintervening changes, confirmed via
git merge-tree(clean tree, exit 0)plus manual hunk-range inspection to be genuinely disjoint edits, not a
lucky non-conflict.
Merge authority
quad341/cairn — standing self-merge authorization applies (mayor ruling
gm-wisp-2yhv7u, 2026-08-19). This bead's own description already statesthe 4 standing conditions explicitly and carries no stale mayor-routing
boilerplate. 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)-vbuild-test,lint) — to be confirmed green post-open🤖 Opened by cairn/deployer on a green release gate.