own-VPS gateway: build-time kanidm assertions absent from the full-install path — no eval guard (GOTCHAS #12, DIV-3) #454

Closed
opened 2026-08-11 22:48:32 +00:00 by ben · 4 comments
Owner

Divergence class

GOTCHAS #12 (VM-vs-full-install divergence) — pre-filed by the #450 audit.

(Note: this issue's original write-up was accidentally submitted as the
title field and silently truncated at the tracker's title-length limit;
the title has been corrected and the full content restored below from
docs/vm-full-install-divergence.md, DIV-3.)

The gateway's build-time assertions (invariants: generators declared,
bind-port agrees, kanidm provisioned) are emitted by the VM-mode gateway
render but omitted from the full-install control-plane surface — deliberately,
per the control-plane surface's own doc comment, because they read the
VM-shaped kanidm config attributes which the front-door kanidm shapes
differently. The public/full-install gateway therefore has no build-time
eval guard
for this invariant class — the guard that would have caught #452
at eval time.

See docs/vm-full-install-divergence.md Table A (gatewayAssertions row) and
Open divergences DIV-3.

## Divergence class GOTCHAS #12 (VM-vs-full-install divergence) — pre-filed by the #450 audit. *(Note: this issue's original write-up was accidentally submitted as the **title** field and silently truncated at the tracker's title-length limit; the title has been corrected and the full content restored below from `docs/vm-full-install-divergence.md`, DIV-3.)* The gateway's build-time `assertions` (invariants: generators declared, bind-port agrees, kanidm provisioned) are emitted by the VM-mode gateway render but omitted from the full-install control-plane surface — deliberately, per the control-plane surface's own doc comment, because they read the VM-shaped kanidm config attributes which the front-door kanidm shapes differently. The public/full-install gateway therefore has **no build-time eval guard** for this invariant class — the guard that would have caught #452 at eval time. See `docs/vm-full-install-divergence.md` Table A (`gatewayAssertions` row) and Open divergences DIV-3.
ben changed title from GOTCHAS #12 (VM-vs-full-install) — pre-filed by the #450 audit gatewayAssertions (internal/clan/vmguest.go:434-471) emits the gateway's build-time assertions — the generators+files are declared, the front-door sign-in route and the kanidm b… to own-VPS gateway: build-time kanidm assertions absent from the full-install path — no eval guard (GOTCHAS #12, DIV-3) 2026-08-12 02:04:39 +00:00
Author
Owner

This was generated by AI during triage.

Triage: bug → ready-for-agent.

Redundancy check: searched the control-plane surface renderer for build-time
assertions — none present; confirmed via its own doc comment, which lists the
"VM-shaped build-time assertions" among what it deliberately omits, because
they read config attribute paths the front-door's kanidm module shapes
differently (confirmed by reading the front-door kanidm renderer: it sets
different attribute paths than the VM assertions check). No prior rejection
found in .out-of-scope/. Not a UI/UX-flow change, so the design-tier gate
does not apply.

This is genuinely just an attribute-path adaptation, not a design decision:
the assertion content (generators declared, bind-port agreement, kanidm
enabled+provisioned) is identical in intent on both paths — only the concrete
config attribute paths differ because front-door's kanidm module is shaped
differently than the VM's inline kanidm block. An agent reading both
renderers can derive the correct attribute paths directly; flagging this
ready-for-agent rather than ready-for-human because there is no product
judgment call here, only implementation detail resolvable by reading the two
render paths.

Agent Brief

Category: bug
Summary: The full-install/own-VPS gateway has no build-time eval guard
for the invariants that keep its kanidm wiring self-consistent — the guard
that exists on the VM path is not portable as-is because the two paths shape
their kanidm config differently.

Current behavior:
The VM-mode gateway render emits a set of build-time assertions checking:
(1) every generator/secret file the kanidm wiring dereferences is declared,
(2) the sign-in route's target port agrees with the port kanidm actually
binds, and (3) kanidm is both enabled and provisioned before anything routes
sign-in to it. The full-install/own-VPS control-plane surface renderer emits
no equivalent — its own doc comment says so explicitly, because the VM
assertions check config attribute paths that belong to the VM's inline
kanidm declaration, not the front-door module's kanidm declaration.

Desired behavior:
The full-install/own-VPS gateway should fail eval with a clear, actionable
message under the same three invariant classes, phrased against the
front-door kanidm module's own config attribute paths (enable, bind
port/address, provisioning status) rather than the VM's. Where the front-door
render doesn't expose an equivalent invariant (e.g. no single "sign-in route
target port" concept on this path), that invariant can be dropped with a
one-line note rather than forced to fit.

Key interfaces:

  • The gateway control-plane surface renderer — needs its own assertions
    block, parallel to the VM path's, but reading the front-door kanidm
    module's actual config surface (its enable flag, its bind address setting,
    its provisioning enable flag) rather than the VM's nested equivalents
  • The generator-declared checks (kanidm-tls / kanidm-admins files) can likely
    be reused verbatim — they're generator names, not kanidm-shape-specific

Acceptance criteria:

  • A full-install/own-VPS gateway missing a required kanidm generator file
    fails eval with a message naming the missing generator/file
  • A full-install/own-VPS gateway where kanidm is enabled but not
    provisioned (or vice versa) fails eval with a message explaining the
    mismatch
  • A correctly-configured full-install/own-VPS gateway evals cleanly
  • Unit/eval-smoke tests pin at least one red case per invariant
  • docs/vm-full-install-divergence.md's DIV-3 row is updated to CLOSED
    with the closing issue, in the same commit (ADR 0042 same-commit law)

Out of scope:

  • Changing the VM-mode assertions
  • Adding new invariants beyond the three the VM path already checks
  • Any front-door routing/Caddy changes
> *This was generated by AI during triage.* **Triage: bug → ready-for-agent.** Redundancy check: searched the control-plane surface renderer for build-time assertions — none present; confirmed via its own doc comment, which lists the "VM-shaped build-time assertions" among what it deliberately omits, because they read config attribute paths the front-door's kanidm module shapes differently (confirmed by reading the front-door kanidm renderer: it sets different attribute paths than the VM assertions check). No prior rejection found in `.out-of-scope/`. Not a UI/UX-flow change, so the design-tier gate does not apply. This is genuinely just an attribute-path adaptation, not a design decision: the assertion *content* (generators declared, bind-port agreement, kanidm enabled+provisioned) is identical in intent on both paths — only the concrete config attribute paths differ because front-door's kanidm module is shaped differently than the VM's inline kanidm block. An agent reading both renderers can derive the correct attribute paths directly; flagging this ready-for-agent rather than ready-for-human because there is no product judgment call here, only implementation detail resolvable by reading the two render paths. ## Agent Brief **Category:** bug **Summary:** The full-install/own-VPS gateway has no build-time eval guard for the invariants that keep its kanidm wiring self-consistent — the guard that exists on the VM path is not portable as-is because the two paths shape their kanidm config differently. **Current behavior:** The VM-mode gateway render emits a set of build-time `assertions` checking: (1) every generator/secret file the kanidm wiring dereferences is declared, (2) the sign-in route's target port agrees with the port kanidm actually binds, and (3) kanidm is both enabled and provisioned before anything routes sign-in to it. The full-install/own-VPS control-plane surface renderer emits no equivalent — its own doc comment says so explicitly, because the VM assertions check config attribute paths that belong to the VM's inline kanidm declaration, not the front-door module's kanidm declaration. **Desired behavior:** The full-install/own-VPS gateway should fail eval with a clear, actionable message under the same three invariant classes, phrased against the front-door kanidm module's own config attribute paths (enable, bind port/address, provisioning status) rather than the VM's. Where the front-door render doesn't expose an equivalent invariant (e.g. no single "sign-in route target port" concept on this path), that invariant can be dropped with a one-line note rather than forced to fit. **Key interfaces:** - The gateway control-plane surface renderer — needs its own `assertions` block, parallel to the VM path's, but reading the front-door kanidm module's actual config surface (its enable flag, its bind address setting, its provisioning enable flag) rather than the VM's nested equivalents - The generator-declared checks (kanidm-tls / kanidm-admins files) can likely be reused verbatim — they're generator names, not kanidm-shape-specific **Acceptance criteria:** - [ ] A full-install/own-VPS gateway missing a required kanidm generator file fails eval with a message naming the missing generator/file - [ ] A full-install/own-VPS gateway where kanidm is enabled but not provisioned (or vice versa) fails eval with a message explaining the mismatch - [ ] A correctly-configured full-install/own-VPS gateway evals cleanly - [ ] Unit/eval-smoke tests pin at least one red case per invariant - [ ] `docs/vm-full-install-divergence.md`'s DIV-3 row is updated to CLOSED with the closing issue, in the same commit (ADR 0042 same-commit law) **Out of scope:** - Changing the VM-mode assertions - Adding new invariants beyond the three the VM path already checks - Any front-door routing/Caddy changes
Author
Owner

swarm-claim host=matou-dev-server-01 run=4894
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=4894 (automated multi-host claim — lowest live claim id works this ticket)
Author
Owner

close-report for #454 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 59747c3 is not reachable from origin/main (not landed on main)
  • changed_files: 'internal/clan/vmguest.go' is not in the diff of the claimed commits
  • changed_files: 'internal/clan/vmguest_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/clan/seedcommunity_eval_test.go' is not in the diff of the claimed commits
  • changed_files: 'docs/vm-full-install-divergence.md' is not in the diff of the claimed commits
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
envelope
{
  "issue": 454,
  "status": "success",
  "commits": [
    "59747c3"
  ],
  "changed_files": [
    "internal/clan/vmguest.go",
    "internal/clan/vmguest_test.go",
    "internal/clan/seedcommunity_eval_test.go",
    "docs/vm-full-install-divergence.md",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go build ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go vet ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go test ./internal/clan/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A full-install/own-VPS gateway missing a required kanidm generator file fails eval with a message naming the missing generator/file": "gatewayControlPlaneAssertions invariant 1 (vmguest.go) asserts the kanidm-tls/kanidm-admins generators+files are declared with a message naming them; red case 'a required kanidm generator file missing' in TestOwnVPSGateway_EvalSmoke (seedcommunity_eval_test.go) drops kanidm-tls's ca file and requires the message among the failing assertions",
    "A full-install/own-VPS gateway where kanidm is enabled but not provisioned (or vice versa) fails eval with a message explaining the mismatch": "gatewayControlPlaneAssertions invariant 3 asserts config.services.kanidm.enableServer && config.services.kanidm.provision.enable (front-door attrpaths); red cases 'enabled-but-not-provisioned' and 'provisioned-but-not-enabled' in TestOwnVPSGateway_EvalSmoke each require the 'enabled AND provisioned' message",
    "A correctly-configured full-install/own-VPS gateway evals cleanly": "the existing green toplevel eval in TestOwnVPSGateway_EvalSmoke forces every assertion to HOLD; TestRenderControlPlaneSurface_EmitsAssertions pins the correct front-door attrpaths so a well-formed config satisfies them",
    "Unit/eval-smoke tests pin at least one red case per invariant": "render seam: TestRenderControlPlaneSurface_EmitsAssertions + _NilPublicOmitsKanidmStateAssertion (vmguest_test.go, always-run); eval-smoke: assertControlPlaneGuardFires red case per emitted invariant in TestOwnVPSGateway_EvalSmoke (seedcommunity_eval_test.go)",
    "docs/vm-full-install-divergence.md's DIV-3 row is updated to CLOSED with the closing issue, in the same commit (ADR 0042 same-commit law)": "DIV-3 row + Table A gatewayAssertions row updated to CLOSED #454 in commit 59747c3, same commit as the implementation and STATUS.md"
  },
  "summary": "renderControlPlaneSurface now emits gatewayControlPlaneAssertions — the full-install/own-VPS gateway's build-time eval guard (generators declared + kanidm enabled-AND-provisioned, read against the front-door kanidm shape), closing DIV-3.",
  "blockers": []
}
**close-report** for #454 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 59747c3 is not reachable from origin/main (not landed on main) - changed_files: 'internal/clan/vmguest.go' is not in the diff of the claimed commits - changed_files: 'internal/clan/vmguest_test.go' is not in the diff of the claimed commits - changed_files: 'internal/clan/seedcommunity_eval_test.go' is not in the diff of the claimed commits - changed_files: 'docs/vm-full-install-divergence.md' is not in the diff of the claimed commits - changed_files: 'STATUS.md' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 454, "status": "success", "commits": [ "59747c3" ], "changed_files": [ "internal/clan/vmguest.go", "internal/clan/vmguest_test.go", "internal/clan/seedcommunity_eval_test.go", "docs/vm-full-install-divergence.md", "STATUS.md" ], "tests": [ { "command": "nix develop .#go-ci --command go build ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go vet ./internal/clan/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go test ./internal/clan/", "exit_code": 0 } ], "criteria": { "A full-install/own-VPS gateway missing a required kanidm generator file fails eval with a message naming the missing generator/file": "gatewayControlPlaneAssertions invariant 1 (vmguest.go) asserts the kanidm-tls/kanidm-admins generators+files are declared with a message naming them; red case 'a required kanidm generator file missing' in TestOwnVPSGateway_EvalSmoke (seedcommunity_eval_test.go) drops kanidm-tls's ca file and requires the message among the failing assertions", "A full-install/own-VPS gateway where kanidm is enabled but not provisioned (or vice versa) fails eval with a message explaining the mismatch": "gatewayControlPlaneAssertions invariant 3 asserts config.services.kanidm.enableServer && config.services.kanidm.provision.enable (front-door attrpaths); red cases 'enabled-but-not-provisioned' and 'provisioned-but-not-enabled' in TestOwnVPSGateway_EvalSmoke each require the 'enabled AND provisioned' message", "A correctly-configured full-install/own-VPS gateway evals cleanly": "the existing green toplevel eval in TestOwnVPSGateway_EvalSmoke forces every assertion to HOLD; TestRenderControlPlaneSurface_EmitsAssertions pins the correct front-door attrpaths so a well-formed config satisfies them", "Unit/eval-smoke tests pin at least one red case per invariant": "render seam: TestRenderControlPlaneSurface_EmitsAssertions + _NilPublicOmitsKanidmStateAssertion (vmguest_test.go, always-run); eval-smoke: assertControlPlaneGuardFires red case per emitted invariant in TestOwnVPSGateway_EvalSmoke (seedcommunity_eval_test.go)", "docs/vm-full-install-divergence.md's DIV-3 row is updated to CLOSED with the closing issue, in the same commit (ADR 0042 same-commit law)": "DIV-3 row + Table A gatewayAssertions row updated to CLOSED #454 in commit 59747c3, same commit as the implementation and STATUS.md" }, "summary": "renderControlPlaneSurface now emits gatewayControlPlaneAssertions — the full-install/own-VPS gateway's build-time eval guard (generators declared + kanidm enabled-AND-provisioned, read against the front-door kanidm shape), closing DIV-3.", "blockers": [] } ``` </details>
Author
Owner

close-report for #454 — status success

✅ close-report gates passed — every claim verified against main; closing.

envelope
{
  "issue": 454,
  "status": "success",
  "commits": [
    "59747c3"
  ],
  "changed_files": [
    "internal/clan/vmguest.go",
    "internal/clan/vmguest_test.go",
    "internal/clan/seedcommunity_eval_test.go",
    "docs/vm-full-install-divergence.md",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go build ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go vet ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go test ./internal/clan/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A full-install/own-VPS gateway missing a required kanidm generator file fails eval with a message naming the missing generator/file": "gatewayControlPlaneAssertions invariant 1 (vmguest.go) asserts the kanidm-tls/kanidm-admins generators+files are declared with a message naming them; red case 'a required kanidm generator file missing' in TestOwnVPSGateway_EvalSmoke (seedcommunity_eval_test.go) drops kanidm-tls's ca file and requires the message among the failing assertions",
    "A full-install/own-VPS gateway where kanidm is enabled but not provisioned (or vice versa) fails eval with a message explaining the mismatch": "gatewayControlPlaneAssertions invariant 3 asserts config.services.kanidm.enableServer && config.services.kanidm.provision.enable (front-door attrpaths); red cases 'enabled-but-not-provisioned' and 'provisioned-but-not-enabled' in TestOwnVPSGateway_EvalSmoke each require the 'enabled AND provisioned' message",
    "A correctly-configured full-install/own-VPS gateway evals cleanly": "the existing green toplevel eval in TestOwnVPSGateway_EvalSmoke forces every assertion to HOLD; TestRenderControlPlaneSurface_EmitsAssertions pins the correct front-door attrpaths so a well-formed config satisfies them",
    "Unit/eval-smoke tests pin at least one red case per invariant": "render seam: TestRenderControlPlaneSurface_EmitsAssertions + _NilPublicOmitsKanidmStateAssertion (vmguest_test.go, always-run); eval-smoke: assertControlPlaneGuardFires red case per emitted invariant in TestOwnVPSGateway_EvalSmoke (seedcommunity_eval_test.go)",
    "docs/vm-full-install-divergence.md's DIV-3 row is updated to CLOSED with the closing issue, in the same commit (ADR 0042 same-commit law)": "DIV-3 row + Table A gatewayAssertions row updated to CLOSED #454 in commit 59747c3, same commit as the implementation and STATUS.md"
  },
  "summary": "renderControlPlaneSurface now emits gatewayControlPlaneAssertions — the full-install/own-VPS gateway's build-time eval guard (generators declared + kanidm enabled-AND-provisioned, read against the front-door kanidm shape), closing DIV-3.",
  "blockers": []
}
**close-report** for #454 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 454, "status": "success", "commits": [ "59747c3" ], "changed_files": [ "internal/clan/vmguest.go", "internal/clan/vmguest_test.go", "internal/clan/seedcommunity_eval_test.go", "docs/vm-full-install-divergence.md", "STATUS.md" ], "tests": [ { "command": "nix develop .#go-ci --command go build ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go vet ./internal/clan/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go test ./internal/clan/", "exit_code": 0 } ], "criteria": { "A full-install/own-VPS gateway missing a required kanidm generator file fails eval with a message naming the missing generator/file": "gatewayControlPlaneAssertions invariant 1 (vmguest.go) asserts the kanidm-tls/kanidm-admins generators+files are declared with a message naming them; red case 'a required kanidm generator file missing' in TestOwnVPSGateway_EvalSmoke (seedcommunity_eval_test.go) drops kanidm-tls's ca file and requires the message among the failing assertions", "A full-install/own-VPS gateway where kanidm is enabled but not provisioned (or vice versa) fails eval with a message explaining the mismatch": "gatewayControlPlaneAssertions invariant 3 asserts config.services.kanidm.enableServer && config.services.kanidm.provision.enable (front-door attrpaths); red cases 'enabled-but-not-provisioned' and 'provisioned-but-not-enabled' in TestOwnVPSGateway_EvalSmoke each require the 'enabled AND provisioned' message", "A correctly-configured full-install/own-VPS gateway evals cleanly": "the existing green toplevel eval in TestOwnVPSGateway_EvalSmoke forces every assertion to HOLD; TestRenderControlPlaneSurface_EmitsAssertions pins the correct front-door attrpaths so a well-formed config satisfies them", "Unit/eval-smoke tests pin at least one red case per invariant": "render seam: TestRenderControlPlaneSurface_EmitsAssertions + _NilPublicOmitsKanidmStateAssertion (vmguest_test.go, always-run); eval-smoke: assertControlPlaneGuardFires red case per emitted invariant in TestOwnVPSGateway_EvalSmoke (seedcommunity_eval_test.go)", "docs/vm-full-install-divergence.md's DIV-3 row is updated to CLOSED with the closing issue, in the same commit (ADR 0042 same-commit law)": "DIV-3 row + Table A gatewayAssertions row updated to CLOSED #454 in commit 59747c3, same commit as the implementation and STATUS.md" }, "summary": "renderControlPlaneSurface now emits gatewayControlPlaneAssertions — the full-install/own-VPS gateway's build-time eval guard (generators declared + kanidm enabled-AND-provisioned, read against the front-door kanidm shape), closing DIV-3.", "blockers": [] } ``` </details>
ben closed this issue 2026-08-12 03:05:34 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#454
No description provided.