provision: a failed portal-link write is only a gateway log line — deploy reports green, members never get the link #293

Closed
opened 2026-08-05 23:10:35 +00:00 by ben · 1 comment
Owner

internal/provision/portal.go:77 — ServiceUp has no error channel, so a failed portal-link write is logged and nothing else. A health-passed service goes live, deploy reports green, and members never get a portal link. The type doc (line 36) says the failure "is logged loudly, not swallowed" — accurate, but a log line on the gateway is unreachable from the operator app.

Acceptance

  • The publication failure reaches an operator-visible surface: either ServiceUp grows an error channel the deploy leg records as a non-fatal-but-visible fault on the service, or the portal ledger exposes a failed-publication state the services read renders.
  • Test: failing ledger write ⇒ the failure is readable where the operator looks, deploy outcome unchanged.

Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code).

`internal/provision/portal.go:77` — `ServiceUp` has no error channel, so a failed portal-link write is logged and nothing else. A health-passed service goes live, deploy reports green, and members never get a portal link. The type doc (line 36) says the failure "is logged loudly, not swallowed" — accurate, but a log line on the gateway is unreachable from the operator app. **Acceptance** - The publication failure reaches an operator-visible surface: either `ServiceUp` grows an error channel the deploy leg records as a non-fatal-but-visible fault on the service, or the portal ledger exposes a failed-publication state the services read renders. - Test: failing ledger write ⇒ the failure is readable where the operator looks, deploy outcome unchanged. --- _Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code)._
Author
Owner

Fixed in 059299b (on origin/main).

provision.PortalLinks.ServiceUp now returns an error — the FilePortalLedger still logs the durable read/save fault loudly AND propagates it. The deploy leg (healthGate) records a non-fatal-but-visible PortalFault on the still-Healthy service (deploy outcome unchanged: device stays active, service stays healthy), and RetryService re-attempts a stuck publish and clears the fault on success. The fault rides the Outcome/ServiceHealth the P4-S5 surface renders and the Deploy/Retry HTTP endpoints already serialise, so it reaches where the operator looks instead of only the gateway log.

Acceptance: option 1 taken (error channel → visible fault on the service). Tests: internal/provision/portal_test.go (durable-write fault propagates) and internal/provision/health_test.go (visible PortalFault on a failing publish, deploy unchanged; retry record-then-clear). go test/go vet/golangci-lint green across provision, controlapi, monitor, control-plane.

Fixed in `059299b` (on `origin/main`). `provision.PortalLinks.ServiceUp` now returns an error — the `FilePortalLedger` still logs the durable read/save fault loudly AND propagates it. The deploy leg (`healthGate`) records a non-fatal-but-visible `PortalFault` on the still-`Healthy` service (deploy outcome unchanged: device stays active, service stays healthy), and `RetryService` re-attempts a stuck publish and clears the fault on success. The fault rides the `Outcome`/`ServiceHealth` the P4-S5 surface renders and the Deploy/Retry HTTP endpoints already serialise, so it reaches where the operator looks instead of only the gateway log. Acceptance: option 1 taken (error channel → visible fault on the service). Tests: `internal/provision/portal_test.go` (durable-write fault propagates) and `internal/provision/health_test.go` (visible `PortalFault` on a failing publish, deploy unchanged; retry record-then-clear). `go test`/`go vet`/`golangci-lint` green across provision, controlapi, monitor, control-plane.
ben closed this issue 2026-08-06 01:32:59 +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#293
No description provided.