fix(ops): a (placeholder) sentinel must never win the guardfile merge #1123
No reviewers
Labels
No labels
burndown-2026-06
pressure-test
sunday-sprint
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/ward!1123
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/placeholder-sentinels"
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?
Implements Kai's design (ward#1122). Clears the last
ward doctorplaceholder failure against the aos bundle.The bug
ward must never embed real deployment config, so its generic guardfiles have to name some host, token, and owner gate. Those values are sentinels - they exist so
ward doctorfails a deployment that never supplied its own. That intent is right.But they were indistinguishable from real config, and cli-guard's singletons are last-wins (
applyBaseURLkeeps the last non-empty;gf.Auth = aoverwrites). The bundle merge concatenates children across files, so whichever file the walk reached last decided the surface.On the coilyco bundle that produced a split result, which I measured two ways:
ward doctorresolved the effectivebase-urltogit.example.com/api/v1(the sentinel, fromops.forgejo.kdl)ward ops forgejo get repo ...actually requestedssm get-parameter --name /forgejo/coilyco-ops/api-token(the real token, fromguardfile.forgejo.kdl)So the merged ops surface paired the example host with the live credential. A sentinel that can win a merge is worse than no sentinel at all.
The fix
A node may carry a
(placeholder)type annotation. The merge drops any sentinel that a real sibling of the same name supplies - whatever the order. A sentinel with nothing to override it survives, so doctor still fails on it, which is the behavior worth keeping.No cli-guard change needed: ward reads the annotation off the KDL node during the merge, before cli-guard's parser sees it. Pairs with the aos side, which marks the sentinels.
Verification
Inside
agentic-os:latest:go build/go vetclean,go test ./...exit 0,golangci-lint0 issues. New tests cover both merge orders, the unopposed sentinel surviving, and unmarked duplicates being left alone for cli-guard to catch.Against the annotated aos bundle, doctor now reports
PASS smart defaults,PASS repo authority,PASS fleet,PASS exec bundle, and the real coilyco base-url wins.What it unmasks
One failure remains, and it is pre-existing, not caused here - the placeholder failure was short-circuiting
validateGuardfileOperationalbeforebuildForgejoOpsever ran:agentic-os#446added the commit-status verbs toguardfile.forgejo.kdl, but.ward/forgejo.swagger.lock.jsonwas never regenerated - it carries 47 operationIds and zero status ops. The lock needs a regen (make lock/ the ward-kdl driver'slock --guardfile). Tracked in aos#452.