Rendered machine modules assert their own invariants, with remedies in domain vocabulary #419
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#419
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
The rendered Nix carries no
assertionsat all — the only render-time guard is a Go-sidepanic()inrenderGatewayGuest. Meanwhile every deploy and enrollment already runs a per-nodenix eval(the Readiness gate,internal/clan/adapter.go— the thingdocs/architecture/10-change-flow.mdcredits with inverting clan's worst property). Assertions emitted into the rendered modules would ride that existing gate for free and fail with an operator-legible message instead of a missing-var stack.The reference pattern is the mauke library's
modules/topology.nix/mesh.nix: derive membership from one source, then defend it with build-timeassertionswhose messages name the fix.Acceptance criteria
assertionsfor invariants OurCloud already holds in Go — starting set: the gateway node's required generators/files are declared; a service render's front-door route and mesh port agree; ADR 0112's "no declared check, no activation" gets a build-time echo of the Go enforcement ininternal/provision/health.go.OURCLOUD_EVAL_SMOKE=1,seedcommunity_eval_test.go) that a fixture violating an invariant fails eval with the message, and the healthy fixture still evaluates.Source: the clan-community (mauke reference fleet) lessons review,
docs/research/2026-08-10-clan-community-lessons.md(lands on main this sitting), lesson 11.Landed on main in
a41ba50.renderGatewayGuestnow emits a build-timeassertionsblock that rides the existing per-node eval gate (Adapter.readinessAtsnix eval …toplevel, run as the enrollment preflight and Deploys per-node gate) — no new machinery. The mauke pattern (modules/topology.nix): derive from one source, defend it with assertions whose messages name the fix in CONTEXT.md vocabulary.The starting set, all homed in the gateway baseline (the richest render the VM eval smoke exercises):
no declared check, no activation(internal/provision/health.go): the routed IdP must be enabled AND provisioned, never activated on hope.Proven via the eval smoke:
nix evalwith the assertion`s remedy message — new TestGatewayAssertions_EvalCatchesViolation, which asserts the failure carries the operator-legible remedy.Files: internal/clan/vmguest.go (gatewayAssertions + render seam tests in vmguest_test.go), seedcommunity_eval_test.go (negative eval), STATUS.md.