--resource: the third name a hand-built box does not share with you #23
No reviewers
Labels
No labels
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-triage
ready
release
scope:apply
scope:capture
scope:coolify-api
scope:fleet
scope:manifest
scope:secrets
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/cast#23
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/resource-aliases"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#20 shipped the refusal without shipping the resolution.
capturecorrectly refuses when a manifest resource does not exist on thesource — and then there was no way to say "it's over there, under another
name." That gap was found within the hour, on the box that motivated the
whole thing.
coreIncubator Stack v2landingIncubator LandingpostgresIncubator Database v2redisIncubator Redis v2umamiIncubator UmamiNeither is wrong. One names things for a human reading a UI, the other for a
machine reading a diff. Neither gets to overwrite the other — so the mapping
is stated at the call site:
Applied at the boundary: live resources are renamed into the manifest's
vocabulary once, immediately after the lookup, so
computeDiff/classify/reconcileall keep matching by name exactly as before, and none of them needsto know a hand-built box was ever involved.
diffneeded this as much ascapturedidThis is the part worth reviewing carefully. Without an alias, a
--fulldiffagainst a box whose resources are named differently reports every manifest
resource as "to create" and never mentions the live ones. That is the D-237 lie
by another route: a confident full-create plan against a box that has all of it,
running, under other names.
That diff is the staleness gate of a live migration — the last check before
the clock starts. It would have passed by reporting that production did not
exist.
applyrefuses it, up frontBefore a clone, a decrypt, or a single call.
applycreates under themanifest's names, so an alias there could only mean adopt the existing one
instead — updating in place rather than creating. That is a different
operation, nobody has asked for it, and guessing would silently create a
duplicate beside the very resource the operator was pointing at.
Two smaller things, both the same principle
inventory, when nothing matched and yet the box is full of resources, nowsays so plainly and prints the
--resourcelines to paste. "The box isempty" is exactly the wrong conclusion, and it was the easy one to draw from
the old output — which is how a full-create plan gets laundered into a pass.
resource.
An alias whose left side names no manifest resource is an error, not a
no-op — a typo would otherwise map nothing, leave the real resource looked up
under its own name, and refuse with no hint that the flag had missed.
And
inventorykeeps the box's own name beside ours:A document that renamed the box's resources into our vocabulary and then never
mentioned theirs would be unusable against the UI it describes.
That
box only:line is the entire point of the verb, incidentally: on the realbox it surfaced a live config var the manifest had never declared (
MAX_ROUNDS,a round cap that defaults to 3 in code) and a retired flag still set on the box
(
STAGING_TOOLS) — neither of which any other tool would have shown us.Checks
npm run check(biome),npm run build(tsc),npm test— 169 passing(was 164). New coverage: capture through an alias, inventory showing both names
and diffing the pair's keys, the nothing-matched hint, the typo refusal, and
applyrefusing the flag.🤖 Generated with Claude Code