Skip to content

Add rig-tier entry point for the cairn-librarian formula#44

Merged
quad341 merged 3 commits into
mainfrom
deploy/crn-x105-gate
Jul 23, 2026
Merged

Add rig-tier entry point for the cairn-librarian formula#44
quad341 merged 3 commits into
mainfrom
deploy/crn-x105-gate

Conversation

@quad341

@quad341 quad341 commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

Adds mol-cairn-librarian-rig, a thin rig-tier wrapper around the existing
mol-cairn-librarian formula. It has identical steps to the base formula,
but its variable defaults are fixed to tier="rig", rig="cairn" instead
of the base's fleet-wide tier="global" default.

This exists because cooldown/condition-triggered order dispatch always
carries vars=nil — an order's [params] only validate that a variable is
present, they can't supply a value (only webhook/manual dispatch can).
Under vars=nil, mol-cairn-librarian would fall back to its own
tier="global" default, which is the fleet-wide, mayor-owned singleton
sweep — the wrong owner for a cairn-rig cooldown order. This new formula
supplies rig-tier defaults instead, so a bare bd mol pour mol-cairn-librarian-rig (no --var flags) already resolves to the correct
tier/rig.

bd's formula system has no alias/extends/include mechanism, so this is a
full structural duplicate of the base formula's steps rather than a
reference to it. A new test (TestLibrarianRigFormulaHasSameStepsAsLibrarian)
guards the two formulas from drifting apart.

Wiring an actual order to use this formula (flipping a pack's formula=
pointer) is a separate, out-of-scope change that lives in a different repo.

Test plan

  • go build ./...
  • gofmt -l . (clean)
  • go vet ./...
  • golangci-lint run ./... (0 issues)
  • go test ./... -race -count=1 (all packages pass)
  • New tests TestLibrarianRigFormulaHasRigTierDefaults and
    TestLibrarianRigFormulaHasSameStepsAsLibrarian pass
  • make formulas links the new formula cleanly; bd formula show mol-cairn-librarian-rig parses and renders correctly

quad341 added 3 commits July 23, 2026 14:24
…refs crn-6ef7)

TestLibrarianRigFormulaHasRigTierDefaults and
TestLibrarianRigFormulaHasSameStepsAsLibrarian assert that a new
mol-cairn-librarian-rig.formula.toml exists with phase="vapor",
vars.tier.default="rig", vars.rig.default="cairn", and steps identical
to mol-cairn-librarian.formula.toml. Both fail RED: the file doesn't
exist yet.
Cooldown/condition order dispatch carries vars=nil -- an order's
[params] only validate presence, they cannot supply values (only
webhook/manual dispatch carry vars). Under vars=nil,
mol-cairn-librarian falls back to its own defaults (tier="global"),
the fleet-wide mayor-owned singleton sweep, which is the wrong owner
for a cairn-rig cooldown order.

mol-cairn-librarian-rig is a thin wrapper: identical steps, but var
defaults fixed to tier="rig", rig="cairn". bd's formula system has no
alias/extends mechanism, so this is a full structural duplicate rather
than a reference; formulas_test.go's
TestLibrarianRigFormulaHasSameStepsAsLibrarian guards the two files
from drifting apart.

Consumer: packs/cairn-loop-orders/orders/cairn-librarian-rig-cooldown.toml
(gc-management repo, pack-author territory) -- pointing that order's
formula= at this file and flipping enabled=true is explicitly out of
scope here; see that pack's own README activation checklist.
Records the 7-criterion gate evaluation for the new
mol-cairn-librarian-rig formula, including the bounded self-rebase
required to clear divergence from main after the sibling deploy
(crn-ju4o) squash-merged ahead of it.
@quad341
quad341 merged commit 15b85b9 into main Jul 23, 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