rehearsal drive red at files-healthy #527

Closed
opened 2026-08-14 15:11:49 +00:00 by ben · 4 comments
Owner

(headless diagnosis unparseable — raw stdout saved to logs/reporter-claude.out)

drive 20260814T145526Z red at files-healthy: [data-field="service-files"] is absent but services-health is present — a failure is standing that named a different service: Files & documentsFAILEDFiles & documents is not serving — Nextcloud re
evidence: test-results/…/20260814T145526Z/ on matou-workstation (legs.json, droplet-journal.txt, trace)

(headless diagnosis unparseable — raw stdout saved to logs/reporter-claude.out) drive `20260814T145526Z` red at `files-healthy`: `[data-field="service-files"] is absent but services-health is present — a failure is standing that named a different service: Files & documentsFAILEDFiles & documents is not serving — Nextcloud re` evidence: `test-results/…/20260814T145526Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) <!-- rehearsal-sig: 1e68ed8f0b94 -->
Author
Owner

Diagnosis (by hand — the reporter's diagnosis call hit a weekly limit again; root cause of THAT found separately: a stale CLAUDE_CODE_OAUTH_TOKEN in the workstation's .sandcastle/.env shadows rehearsal-env.sh's live token because rehearsal-cycle.sh:18 sources it later; Ben has the one-line fix).

Nextcloud is healthy. The auth gate ate the health probe.

Drive 20260814T145526Z — the deepest ever: sign-in GREEN through the real apex (the #524 both-doors wait worked), co-host GREEN, deploy-files GREEN in 4 min (first live Nextcloud co-host build on a droplet). The droplet journal shows Nextcloud fully up at 15:11: setup complete, trusted_domains => files.rehearsal.idss.nz, brand applied (accent #619793, name E2E Drive). Yet S5 rests Files & documents FAILED — not serving — Nextcloud reports it is not ready.

The chain:

  • nextcloudHealthCheck (control-plane/cmd/control-plane/servicehealth.go:562) GETs https://files.<apex>/status.php through the public door — deliberately, door-fidelity is the point.
  • On the PUBLIC render, every service-route path not in the port's exempt list sits behind forward_auth (ADR 0074). FilesExemptPaths (internal/clan/files.go:65) carries only the DAV client paths — /status.php is not exempt.
  • The probe carries no community session → the gate refuses (non-2xx) → the check reds with its HTTP error → "not ready".
  • The private path never caught this because its service routes are ungated (ADR 0150) — this tooth could ONLY appear on the first public-door co-host, which is exactly what this drive is.

Fix direction

  1. Add "/status.php" to FilesExemptPaths (internal/clan/files.go). It is Nextcloud's anonymous status endpoint by design — version/maintenance metadata, no user data; monitoring probes are its purpose. The health check keeps probing through the real door (do NOT switch it to loopback — door fidelity is the feature).
  2. Seam pin: the front-door render test pins /status.php in the files route's exempt block on the public render (beside the existing DAV-path pins).
  3. Same-class sweep, same ticket: every service health check probes its own public door (/healthz for mail + static-sites, the videobridge health port, Forgejo's status endpoint, docs-editing) — check each port's exempt paths and add the missing health endpoints with the same seam pins, so this red does not repeat one service at a time as the catalogue co-hosts.

Evidence: test-results/drive-droplet/20260814T145526Z — legs.json (files-healthy red 24ms, all prior green), droplet-journal.txt 15:11:2x (nextcloud-setup/brand complete), dashboard screenshot (operator signed in through the public door, Files card FAILED with the health summary).

Diagnosis (by hand — the reporter's diagnosis call hit a weekly limit again; root cause of THAT found separately: a stale `CLAUDE_CODE_OAUTH_TOKEN` in the workstation's `.sandcastle/.env` shadows `rehearsal-env.sh`'s live token because rehearsal-cycle.sh:18 sources it later; Ben has the one-line fix). **Nextcloud is healthy. The auth gate ate the health probe.** Drive `20260814T145526Z` — the deepest ever: sign-in GREEN through the real apex (the #524 both-doors wait worked), co-host GREEN, deploy-files GREEN in 4 min (first live Nextcloud co-host build on a droplet). The droplet journal shows Nextcloud fully up at 15:11: setup complete, `trusted_domains => files.rehearsal.idss.nz`, brand applied (accent `#619793`, name `E2E Drive`). Yet S5 rests `Files & documents FAILED — not serving — Nextcloud reports it is not ready`. The chain: - `nextcloudHealthCheck` (control-plane/cmd/control-plane/servicehealth.go:562) GETs `https://files.<apex>/status.php` **through the public door** — deliberately, door-fidelity is the point. - On the PUBLIC render, every service-route path not in the port's exempt list sits behind `forward_auth` (ADR 0074). `FilesExemptPaths` (internal/clan/files.go:65) carries only the DAV client paths — **`/status.php` is not exempt**. - The probe carries no community session → the gate refuses (non-2xx) → the check reds with its HTTP error → "not ready". - The private path never caught this because its service routes are ungated (ADR 0150) — this tooth could ONLY appear on the first public-door co-host, which is exactly what this drive is. ## Fix direction 1. **Add `"/status.php"` to `FilesExemptPaths`** (internal/clan/files.go). It is Nextcloud's anonymous status endpoint by design — version/maintenance metadata, no user data; monitoring probes are its purpose. The health check keeps probing through the real door (do NOT switch it to loopback — door fidelity is the feature). 2. **Seam pin**: the front-door render test pins `/status.php` in the files route's exempt block on the public render (beside the existing DAV-path pins). 3. **Same-class sweep, same ticket**: every service health check probes its own public door (`/healthz` for mail + static-sites, the videobridge health port, Forgejo's status endpoint, docs-editing) — check each port's exempt paths and add the missing health endpoints with the same seam pins, so this red does not repeat one service at a time as the catalogue co-hosts. Evidence: `test-results/drive-droplet/20260814T145526Z` — legs.json (files-healthy red 24ms, all prior green), droplet-journal.txt 15:11:2x (nextcloud-setup/brand complete), dashboard screenshot (operator signed in through the public door, Files card FAILED with the health summary).
Author
Owner

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

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

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

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

close-report for #527 — status success

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

envelope
{
  "issue": 527,
  "status": "success",
  "commits": [
    "0bcaa29"
  ],
  "changed_files": [
    "STATUS.md",
    "docs/GOTCHAS.md",
    "internal/clan/code.go",
    "internal/clan/code_frontdoor_test.go",
    "internal/clan/files.go",
    "internal/clan/files_frontdoor_test.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go test ./control-plane/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go vet ./internal/clan/...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "files-healthy no longer reds a healthy Nextcloud on the public door": "internal/clan/files.go — /status.php added to FilesExemptPaths so the session-less deploy-time probe bypasses forward_auth on the public render; pinned by TestFilesExemptPaths_ExemptTheHealthProbe",
    "the front-door render pins /status.php in the files route exempt block on the public render": "TestFilesExemptPaths_ExemptTheHealthProbe drives AttachFrontDoor and asserts /status.php is in the rendered @files_exempt path matcher and bypasses forward_auth",
    "same-class sweep: every service health check probes its own public door — missing health endpoints added": "code /api/healthz added to CodeExemptPaths (internal/clan/code.go, pinned by TestCodeExemptPaths_ExemptTheHealthProbe + render pin in TestAttachFrontDoor_CodeGitPathsBypassTheGate); chat /api/v4/system/ping already covered by /api/v4/*; docs-editing /hosting/capabilities already exempt; mail/static-sites/meetings carry no gated public-door route seam yet (noted in GOTCHAS #30 and STATUS.md)"
  },
  "summary": "The files (and code) deploy-time health endpoint now bypasses the public door's forward_auth, so the session-less probe stops reding a fully-healthy instance.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #527 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 527, "status": "success", "commits": [ "0bcaa29" ], "changed_files": [ "STATUS.md", "docs/GOTCHAS.md", "internal/clan/code.go", "internal/clan/code_frontdoor_test.go", "internal/clan/files.go", "internal/clan/files_frontdoor_test.go" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./internal/clan/...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go test ./control-plane/...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go vet ./internal/clan/...", "exit_code": 0 } ], "criteria": { "files-healthy no longer reds a healthy Nextcloud on the public door": "internal/clan/files.go — /status.php added to FilesExemptPaths so the session-less deploy-time probe bypasses forward_auth on the public render; pinned by TestFilesExemptPaths_ExemptTheHealthProbe", "the front-door render pins /status.php in the files route exempt block on the public render": "TestFilesExemptPaths_ExemptTheHealthProbe drives AttachFrontDoor and asserts /status.php is in the rendered @files_exempt path matcher and bypasses forward_auth", "same-class sweep: every service health check probes its own public door — missing health endpoints added": "code /api/healthz added to CodeExemptPaths (internal/clan/code.go, pinned by TestCodeExemptPaths_ExemptTheHealthProbe + render pin in TestAttachFrontDoor_CodeGitPathsBypassTheGate); chat /api/v4/system/ping already covered by /api/v4/*; docs-editing /hosting/capabilities already exempt; mail/static-sites/meetings carry no gated public-door route seam yet (noted in GOTCHAS #30 and STATUS.md)" }, "summary": "The files (and code) deploy-time health endpoint now bypasses the public door's forward_auth, so the session-less probe stops reding a fully-healthy instance.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
ben closed this issue 2026-08-14 15:31:53 +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.

Reference
Matou/idss#527
No description provided.