catalogue: deploy-routing — the gateway front-door public route for helper-placed ports (fleet-wide union, the S5x→S5 closer) #1172

Closed
opened 2026-09-02 21:55:16 +00:00 by matou-build-agent · 2 comments

Parent

Feature #1073 / spec #1116. Filed from #1168 (deploy-routing) as its named remaining frontier.

What to build

#1168 made the shipped forward-auth ports (community-archive #1145, document-archive #1146, newsletters #1147, whakapapa #1148, video #1149, surveys #1150) and data-collections (Grist #1166) deploy through their REAL render onto a helper (no more phantom, P4-S2 gate lifted). But a helper-placed port has no public front-door route yet: the gateway front door only ever routes the single files service today (attachMemberFilesPlacement / memberFrontDoorLiveSet pass []clan.LiveService{files}). So a routed port's deploy-time health check — which reaches it through the derived public door (https://<slug>.<apex>, e.g. surveyshealth.go) — has no route to hit and the service stands at the honest S5x ("active — a service failed") until this lands.

Wire the gateway front-door PUBLIC ROUTE for helper-placed forward-auth ports so a deployed port goes green (S5), reachable at <slug>.<apex> exactly as files is:

  • After AttachPort + ComposeMemberModules for a member-device port placement (see provision.attachRoutablePort), drive AttachFrontDoor with the port's LiveService — MeshTarget = <device-mesh-addr>:<servePort> (each port declares its wt0 serve port: surveysServePort=8083, videoServePort=9000, archiveServePort=8086, dataCollectionsServePort=8087, paperlessServePort=28981, whakapapa/newsletters likewise), ExemptPaths = the port's exported <Port>ExemptPaths (ADR 0074).
  • The union problem is the crux: AttachFrontDoor whole-rewrites front-door.nix from the passed Services, so a single-service call would DROP every other route. The route set must be the fleet-wide union of every routable deployed service (files on its node + every port on every helper) with each one's correct mesh target — assembled from fleet state + a per-slug (servePort, exemptPaths) lookup the clan package exposes. Reproduce memberFrontDoorLiveSet's identity-path / mesh / kanidm facts (the #557/#529 stale-flag class) so the whole-rewrite reverts nothing.
  • Two-node apply (device first, gateway second) — generalize memberFilesGateway / selectionTouchesFiles / placementApplyNodes beyond files to any routable port.
  • Security pin (already landed #1167): the front door STRIPS inbound X-Idss-Identity on a header-trusting service's exempt paths — data-collections is the first to make it matter; keep that green when the route lands.

Acceptance criteria

  • A helper-placed shipped port gets a <slug>.<apex> front-door route to its mesh serve port on deploy, and its public-door health check now PASSES → S5 active (not S5x)
  • Adding one port's route never drops another routed service's route (fleet-wide union, whole-rewrite safe) — a fleet with files + N ports keeps all N+1 routes
  • The route set is service-agnostic: a future port (Radicale #1151) needs no routing change beyond its (servePort, exemptPaths) registration
  • X-Idss-Identity is stripped inbound on the exempt paths of a header-trusting port once its route is public (#1167 stays green)
  • A composition test at the deploy seam proves the union + one port going green end to end

Blocked by

None — #1168 landed the render routing this builds the public reachability on top of.

## Parent Feature #1073 / spec #1116. Filed from #1168 (deploy-routing) as its named remaining frontier. ## What to build #1168 made the shipped forward-auth ports (community-archive #1145, document-archive #1146, newsletters #1147, whakapapa #1148, video #1149, surveys #1150) and data-collections (Grist #1166) deploy through their REAL render onto a helper (no more phantom, P4-S2 gate lifted). But a helper-placed port has **no public front-door route** yet: the gateway front door only ever routes the single `files` service today (`attachMemberFilesPlacement` / `memberFrontDoorLiveSet` pass `[]clan.LiveService{files}`). So a routed port's deploy-time health check — which reaches it through the derived public door (`https://<slug>.<apex>`, e.g. `surveyshealth.go`) — has no route to hit and the service stands at the honest **S5x** ("active — a service failed") until this lands. Wire the gateway front-door PUBLIC ROUTE for helper-placed forward-auth ports so a deployed port goes **green (S5)**, reachable at `<slug>.<apex>` exactly as `files` is: - After `AttachPort` + `ComposeMemberModules` for a member-device port placement (see `provision.attachRoutablePort`), drive `AttachFrontDoor` with the port's `LiveService` — `MeshTarget = <device-mesh-addr>:<servePort>` (each port declares its wt0 serve port: `surveysServePort`=8083, `videoServePort`=9000, `archiveServePort`=8086, `dataCollectionsServePort`=8087, `paperlessServePort`=28981, whakapapa/newsletters likewise), `ExemptPaths` = the port's exported `<Port>ExemptPaths` (ADR 0074). - **The union problem is the crux:** `AttachFrontDoor` whole-rewrites `front-door.nix` from the passed `Services`, so a single-service call would DROP every other route. The route set must be the **fleet-wide union** of every routable deployed service (files on its node + every port on every helper) with each one's correct mesh target — assembled from fleet state + a per-slug (servePort, exemptPaths) lookup the clan package exposes. Reproduce `memberFrontDoorLiveSet`'s identity-path / mesh / kanidm facts (the #557/#529 stale-flag class) so the whole-rewrite reverts nothing. - Two-node apply (device first, gateway second) — generalize `memberFilesGateway` / `selectionTouchesFiles` / `placementApplyNodes` beyond files to any routable port. - Security pin (already landed #1167): the front door STRIPS inbound `X-Idss-Identity` on a header-trusting service's exempt paths — data-collections is the first to make it matter; keep that green when the route lands. ## Acceptance criteria - [ ] A helper-placed shipped port gets a `<slug>.<apex>` front-door route to its mesh serve port on deploy, and its public-door health check now PASSES → S5 active (not S5x) - [ ] Adding one port's route never drops another routed service's route (fleet-wide union, whole-rewrite safe) — a fleet with files + N ports keeps all N+1 routes - [ ] The route set is service-agnostic: a future port (Radicale #1151) needs no routing change beyond its (servePort, exemptPaths) registration - [ ] `X-Idss-Identity` is stripped inbound on the exempt paths of a header-trusting port once its route is public (#1167 stays green) - [ ] A composition test at the deploy seam proves the union + one port going green end to end ## Blocked by None — #1168 landed the render routing this builds the public reachability on top of.
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=16667
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=16667 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1172 — status success

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

envelope
{
  "issue": 1172,
  "status": "success",
  "commits": [
    "f001bd9f"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/clan/portroute.go",
    "internal/clan/portroute_test.go",
    "internal/provision/deploy.go",
    "internal/provision/deploy_ports_test.go",
    "internal/provision/takeover.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/... ./internal/provision/...",
      "exit_code": 0
    },
    {
      "command": "go test ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/clan/... ./internal/provision/...",
      "exit_code": 0
    },
    {
      "command": "gofmt -l (touched files)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A helper-placed shipped port gets a <slug>.<apex> front-door route to its mesh serve port on deploy, and its public-door health check now PASSES -> S5 active (not S5x)": "attachRoutablePort now drives AttachFrontDoor after render+compose (internal/provision/deploy.go); TestDeploy_HelperPortGetsPublicFrontDoorRoute (deploy_ports_test.go) asserts every shipped port gets its route to 100.83.1.22:<servePort>, a two-node apply device-first, and run.Outcome.State == StateActive (S5)",
    "Adding one port's route never drops another routed service's route (fleet-wide union, whole-rewrite safe) - a fleet with files + N ports keeps all N+1 routes": "fleetFrontDoorServices builds the fleet-wide union used by every front-door rewrite path; TestDeploy_PortRouteUnionKeepsEveryOtherRoute proves files (rimu) + surveys (totara) + newly-added video (totara) are all present after the video deploy",
    "The route set is service-agnostic: a future port (Radicale #1151) needs no routing change beyond its (servePort, exemptPaths) registration": "clan.PortServeFacts / portServe registry is the ONE lookup; routableLiveService + fleetFrontDoorServices dispatch through it with no per-slug branch; TestPortServeCoversEveryAttacher (portroute_test.go) pins the registry key-set to portAttachers so a new port must register in both",
    "X-Idss-Identity is stripped inbound on the exempt paths of a header-trusting port once its route is public (#1167 stays green)": "the data-collections route lands with DataCollectionsExemptPaths (asserted in TestDeploy_HelperPortGetsPublicFrontDoorRoute/data-collections); the render strips X-Idss-Identity on exempt paths - TestRenderFrontDoor_ExemptPathStripsInboundIdentityHeader (internal/clan/frontdoor_test.go) stays green",
    "A composition test at the deploy seam proves the union + one port going green end to end": "TestDeploy_HelperPortGetsPublicFrontDoorRoute (union + route + two-node apply + S5 green) and TestDeploy_PortRouteUnionKeepsEveryOtherRoute (union keeps all N+1) at the provision deploy seam"
  },
  "summary": "A helper-placed forward-auth catalogue port now gets its <slug>.<apex> gateway front-door public route via a fleet-wide union, so a deployed port goes green (S5) exactly as files does.",
  "blockers": []
}
**close-report** for #1172 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1172, "status": "success", "commits": [ "f001bd9f" ], "changed_files": [ "STATUS.md", "internal/clan/portroute.go", "internal/clan/portroute_test.go", "internal/provision/deploy.go", "internal/provision/deploy_ports_test.go", "internal/provision/takeover.go" ], "tests": [ { "command": "go test ./internal/clan/... ./internal/provision/...", "exit_code": 0 }, { "command": "go test ./...", "exit_code": 0 }, { "command": "go vet ./internal/clan/... ./internal/provision/...", "exit_code": 0 }, { "command": "gofmt -l (touched files)", "exit_code": 0 } ], "criteria": { "A helper-placed shipped port gets a <slug>.<apex> front-door route to its mesh serve port on deploy, and its public-door health check now PASSES -> S5 active (not S5x)": "attachRoutablePort now drives AttachFrontDoor after render+compose (internal/provision/deploy.go); TestDeploy_HelperPortGetsPublicFrontDoorRoute (deploy_ports_test.go) asserts every shipped port gets its route to 100.83.1.22:<servePort>, a two-node apply device-first, and run.Outcome.State == StateActive (S5)", "Adding one port's route never drops another routed service's route (fleet-wide union, whole-rewrite safe) - a fleet with files + N ports keeps all N+1 routes": "fleetFrontDoorServices builds the fleet-wide union used by every front-door rewrite path; TestDeploy_PortRouteUnionKeepsEveryOtherRoute proves files (rimu) + surveys (totara) + newly-added video (totara) are all present after the video deploy", "The route set is service-agnostic: a future port (Radicale #1151) needs no routing change beyond its (servePort, exemptPaths) registration": "clan.PortServeFacts / portServe registry is the ONE lookup; routableLiveService + fleetFrontDoorServices dispatch through it with no per-slug branch; TestPortServeCoversEveryAttacher (portroute_test.go) pins the registry key-set to portAttachers so a new port must register in both", "X-Idss-Identity is stripped inbound on the exempt paths of a header-trusting port once its route is public (#1167 stays green)": "the data-collections route lands with DataCollectionsExemptPaths (asserted in TestDeploy_HelperPortGetsPublicFrontDoorRoute/data-collections); the render strips X-Idss-Identity on exempt paths - TestRenderFrontDoor_ExemptPathStripsInboundIdentityHeader (internal/clan/frontdoor_test.go) stays green", "A composition test at the deploy seam proves the union + one port going green end to end": "TestDeploy_HelperPortGetsPublicFrontDoorRoute (union + route + two-node apply + S5 green) and TestDeploy_PortRouteUnionKeepsEveryOtherRoute (union keeps all N+1) at the provision deploy seam" }, "summary": "A helper-placed forward-auth catalogue port now gets its <slug>.<apex> gateway front-door public route via a fleet-wide union, so a deployed port goes green (S5) exactly as files does.", "blockers": [] } ``` </details>
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#1172
No description provided.