DA-S2 refusal's 'Go to <community>' door loops back into the refusal — production passes no RefusalBrand, so the portal door is / on admin.<apex> #1345

Closed
opened 2026-09-09 04:17:26 +00:00 by ben · 3 comments
Owner

Symptom

A signed-in plain member refused at the control panel (DA-S2, DDR 0172) clicks the refusal's community door and lands on the same refusal again.

Cause

Production wires the refusal page with no RefusalBrand (control-plane/cmd/control-plane/main.go ~1428), so the portal door renders as / (internal/controlapi/refusal.go ~156-159). On admin.<apex> that path is behind the same forward_auth gate → refused again. Nothing on the public path composes hostnames.Portal(apex) today (zero callers).

Found by the Portal map's apex-cutover research (#1338, docs/research/2026-09-08-portal-apex-cutover.md on research/portal-apex-cutover).

Fix shape

Wire RefusalBrand{PortalURL: hostnames.Portal(apex), …} in the composition root whenever the apex is known, so the door is the absolute https://<apex> — the community's Portal (map #1336), which today is the ungated apex root.

Proof

The refusal-page test asserts the absolute apex door when an apex is configured; the dashboard-auth drive leg (DA-S2) follows the door and lands off admin.<apex>.

## Symptom A signed-in plain member refused at the control panel (DA-S2, DDR 0172) clicks the refusal's community door and lands on the same refusal again. ## Cause Production wires the refusal page with no `RefusalBrand` (`control-plane/cmd/control-plane/main.go` ~1428), so the portal door renders as `/` (`internal/controlapi/refusal.go` ~156-159). On `admin.<apex>` that path is behind the same `forward_auth` gate → refused again. Nothing on the public path composes `hostnames.Portal(apex)` today (zero callers). Found by the Portal map's apex-cutover research (#1338, `docs/research/2026-09-08-portal-apex-cutover.md` on `research/portal-apex-cutover`). ## Fix shape Wire `RefusalBrand{PortalURL: hostnames.Portal(apex), …}` in the composition root whenever the apex is known, so the door is the absolute `https://<apex>` — the community's Portal (map #1336), which today is the ungated apex root. ## Proof The refusal-page test asserts the absolute apex door when an apex is configured; the dashboard-auth drive leg (DA-S2) follows the door and lands off `admin.<apex>`.

This was generated by AI during triage.

Agent Brief

Category: bug
Summary: The DA-S2 refusal page's community door renders as the relative path / in production (no RefusalBrand composed), so a refused member on admin.<apex> loops straight back into the same gated refusal.

Verification (confirmed against the tree): The refusal renderer defaults its portal door to / whenever RefusalBrand.PortalURL is empty (portalURL == "" → "/"). Production's control-plane composition root wires the refusal surface with no RefusalBrand at all (no WithRefusal/RefusalBrand call exists in the composition root), so the empty-string default is always taken. hostnames.Portal(apex) exists but has zero non-test callers — nothing on the public path composes the community's Portal address today. The claim reproduces from reading alone: on admin.<apex> the / door is behind the same forward_auth gate that produced the refusal, so it re-refuses.

Current behavior:
A signed-in plain member refused at the control panel (DA-S2, DDR 0172) clicks the refusal page's "Go to " door and lands on the same refusal again, because the door is the relative / on the gated admin.<apex> host.

Desired behavior:
When the composition root knows the community apex, the refusal page's community door is the absolute Portal URL https://<apex> (the community's Portal, map #1336 — today the ungated apex root), so following it leaves the gated admin.<apex> host and reaches an ungated surface. When no apex is known (resting), the existing default is unchanged.

Key interfaces:

  • The refusal surface's brand/config carrier (the RefusalBrand-shaped value with a PortalURL field) — must be populated in the control-plane composition root when the apex is configured, with PortalURL set to the community's Portal address derived via hostnames.Portal(apex).
  • hostnames.Portal(apex string) string — the existing (currently uncalled on the public path) derivation of the Portal address; this is its first production caller.
  • The refusal renderer's empty-PortalURL fallback to / stays as the resting default — do not remove it.

Acceptance criteria:

  • When the composition root is configured with an apex, the refusal page's community door is https://<apex> (absolute), not /.
  • The refusal-page test asserts the absolute apex door when an apex is configured, and asserts the / fallback when it is not.
  • hostnames.Portal(apex) gains a production caller (the composition root).
  • go build ./..., go vet, and the relevant go test packages are green.

Out of scope:

  • Anything the Portal map (#1336) owns: what the apex root actually serves signed-out vs signed-in, the two faces, the apex cutover. This ticket only makes the refusal's door point at the (already ungated) apex root.
  • Gating changes on admin.<apex> or the apex route.
  • The IDIP-tier identity/address concerns (those ride #1336 / #1342).
> *This was generated by AI during triage.* ## Agent Brief **Category:** bug **Summary:** The DA-S2 refusal page's community door renders as the relative path `/` in production (no `RefusalBrand` composed), so a refused member on `admin.<apex>` loops straight back into the same gated refusal. **Verification (confirmed against the tree):** The refusal renderer defaults its portal door to `/` whenever `RefusalBrand.PortalURL` is empty (`portalURL == "" → "/"`). Production's control-plane composition root wires the refusal surface with **no** `RefusalBrand` at all (no `WithRefusal`/`RefusalBrand` call exists in the composition root), so the empty-string default is always taken. `hostnames.Portal(apex)` exists but has **zero non-test callers** — nothing on the public path composes the community's Portal address today. The claim reproduces from reading alone: on `admin.<apex>` the `/` door is behind the same `forward_auth` gate that produced the refusal, so it re-refuses. **Current behavior:** A signed-in plain member refused at the control panel (DA-S2, DDR 0172) clicks the refusal page's "Go to <community>" door and lands on the same refusal again, because the door is the relative `/` on the gated `admin.<apex>` host. **Desired behavior:** When the composition root knows the community apex, the refusal page's community door is the **absolute** Portal URL `https://<apex>` (the community's Portal, map #1336 — today the ungated apex root), so following it leaves the gated `admin.<apex>` host and reaches an ungated surface. When no apex is known (resting), the existing default is unchanged. **Key interfaces:** - The refusal surface's brand/config carrier (the `RefusalBrand`-shaped value with a `PortalURL` field) — must be populated in the control-plane composition root when the apex is configured, with `PortalURL` set to the community's Portal address derived via `hostnames.Portal(apex)`. - `hostnames.Portal(apex string) string` — the existing (currently uncalled on the public path) derivation of the Portal address; this is its first production caller. - The refusal renderer's empty-`PortalURL` fallback to `/` stays as the resting default — do not remove it. **Acceptance criteria:** - [ ] When the composition root is configured with an apex, the refusal page's community door is `https://<apex>` (absolute), not `/`. - [ ] The refusal-page test asserts the absolute apex door when an apex is configured, and asserts the `/` fallback when it is not. - [ ] `hostnames.Portal(apex)` gains a production caller (the composition root). - [ ] `go build ./...`, `go vet`, and the relevant `go test` packages are green. **Out of scope:** - Anything the Portal map (#1336) owns: what the apex root actually serves signed-out vs signed-in, the two faces, the apex cutover. This ticket only makes the refusal's door point at the (already ungated) apex root. - Gating changes on `admin.<apex>` or the apex route. - The IDIP-tier identity/address concerns (those ride #1336 / #1342).

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

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

close-report for #1345 — status success

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

envelope
{
  "issue": 1345,
  "status": "success",
  "commits": [
    "2586356a"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "control-plane/cmd/control-plane/refusal_brand.go",
    "control-plane/cmd/control-plane/refusal_brand_wiring_test.go",
    "internal/controlapi/refusal_test.go"
  ],
  "tests": [
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/controlapi/ ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/controlapi/ ./control-plane/cmd/control-plane/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "When the composition root is configured with an apex, the refusal page's community door is https://<apex> (absolute), not /": "control-plane/cmd/control-plane/refusal_brand.go composes RefusalBrand{PortalURL: hostnames.Portal(apex)} and main.go passes it to WithAuthGate; refusal_brand_wiring_test.go TestProductionRefusalBrand_ApexGivesAbsolutePortalDoor asserts https://example.nz",
    "The refusal-page test asserts the absolute apex door when an apex is configured, and asserts the / fallback when it is not": "internal/controlapi/refusal_test.go TestRenderRefusalSurface_PortalDoorIsAbsoluteWhenApexConfigured asserts href=\"https://example.nz\"; TestRenderRefusalSurface_PortalDoorFallsBackToRootWithoutApex asserts href=\"/\"; refusal_brand_wiring_test.go TestProductionRefusalBrand_NoApexRestsAtFallback pins the empty-apex brand",
    "hostnames.Portal(apex) gains a production caller (the composition root)": "control-plane/cmd/control-plane/refusal_brand.go calls hostnames.Portal(apex) — the first non-test caller on the public path",
    "go build ./..., go vet, and the relevant go test packages are green": "all three commands exit 0 (tests array)"
  },
  "summary": "Wired productionRefusalBrand(apex) into WithAuthGate so the DA-S2 refusal's community door is the absolute community Portal https://<apex> instead of the relative / that looped back into the gated refusal.",
  "blockers": []
}
**close-report** for #1345 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1345, "status": "success", "commits": [ "2586356a" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "control-plane/cmd/control-plane/refusal_brand.go", "control-plane/cmd/control-plane/refusal_brand_wiring_test.go", "internal/controlapi/refusal_test.go" ], "tests": [ { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./internal/controlapi/ ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "go test ./internal/controlapi/ ./control-plane/cmd/control-plane/", "exit_code": 0 } ], "criteria": { "When the composition root is configured with an apex, the refusal page's community door is https://<apex> (absolute), not /": "control-plane/cmd/control-plane/refusal_brand.go composes RefusalBrand{PortalURL: hostnames.Portal(apex)} and main.go passes it to WithAuthGate; refusal_brand_wiring_test.go TestProductionRefusalBrand_ApexGivesAbsolutePortalDoor asserts https://example.nz", "The refusal-page test asserts the absolute apex door when an apex is configured, and asserts the / fallback when it is not": "internal/controlapi/refusal_test.go TestRenderRefusalSurface_PortalDoorIsAbsoluteWhenApexConfigured asserts href=\"https://example.nz\"; TestRenderRefusalSurface_PortalDoorFallsBackToRootWithoutApex asserts href=\"/\"; refusal_brand_wiring_test.go TestProductionRefusalBrand_NoApexRestsAtFallback pins the empty-apex brand", "hostnames.Portal(apex) gains a production caller (the composition root)": "control-plane/cmd/control-plane/refusal_brand.go calls hostnames.Portal(apex) — the first non-test caller on the public path", "go build ./..., go vet, and the relevant go test packages are green": "all three commands exit 0 (tests array)" }, "summary": "Wired productionRefusalBrand(apex) into WithAuthGate so the DA-S2 refusal's community door is the absolute community Portal https://<apex> instead of the relative / that looped back into the gated refusal.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#1345
No description provided.