redeploy-services: the Grist team-site access seed 403s on a REDEPLOY of a founded community, so data-collections stands FAILED and monitoring paints it down #1574

Closed
opened 2026-09-18 06:50:03 +00:00 by matou-build-agent · 2 comments

The failure

Drive 20260918T055605Z (run dir /home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260918T055605Z) redded at redeploy-services on a harness navigation defect, now healed in 14bb8f67. Underneath it the same leg's evidence carries a separate, substantive product fault that the heal does not touch: during the redeploy's deploy-time reconcile, data-collections (Grist) failed its health check on every one of its 36 warm-up attempts, across a full six minutes.

The evidence

logs/droplet-journal.txt, 06:36:05 → 06:41:59, attempts 1/36 through 36/36, the identical error each time:

service=data-collections node=gateway attempt=36 attempts=36 verdict=failed
error="grist: could not set the community team site's default access (the operator an owner, every member an editor) (HTTP 403) — the register is not serving"

This is not a warm-up tail. It is 36 consecutive refusals with no drift, and every other service on the same box probed healthy on attempt 1 — archive 06:36:04, document-archive/files/surveys 06:42:03, whakapapa/newsletters 06:42:04. systemctl --failed is empty (logs/droplet-units.txt:1); nothing on the box crashed.

Where the 403 comes from

  • The failing step is dataCollectionsEnsureOrgAccess — control-plane/cmd/control-plane/datacollectionshealth.go:251, reached as the check's last step at :232. The refused call is the PATCH at :256-257 against /api/orgs/data-collections/access (dataCollectionsOrgAccessPath, :239-241), seeding operator → owners and everyone@getgrist.com → editors (:252-255). The message text is minted at :532.
  • Everything before it in the same check passed on the same credential: the fixture register, the row-level access rule, the owner read-back and the non-owner withheld read (:200-228). So the owner API key is valid, Grist is serving, and the door is reachable — the refusal is specific to the org-access WRITE.
  • The check therefore never reaches its own read-back asserts (:269-274), so we have no picture of what the org's access list actually held at that moment. That is the first thing the fix should capture.

What is different about a redeploy

The founding stood this service up fine: the services-row leg wrote artifacts/services-rows.json at 06:32 with {"service":"data-collections",…,"status":"done","address":"https://data-collections.roles-proof.idss.nz"} — foundingServiceRows off the founding's own S11 deploy rows (app/tests/e2e/journey.rented-services.spec.ts:366-380).

Between that done row and the 06:36 refusal the only community change is the add-member (06:33:0x) and grant-operator (06:33:34, POST /v1/group/operators/_attr/member for proof-operator) legs — and #1537's grant fan-out includes Grist's own port, which PATCHes the same endpoint with the same owner key: internal/datacollectionssvc/datacollectionssvc.go:222-249 (setRole), path at :278. That is the prime suspect: a role reconcile that leaves the org access list in a shape the check's seeding delta can no longer be applied to.

Note the reconciler is silent either way here — setRole returns a bare no-op when the key is unminted (:223-225) or when have == want (:231-233), and only logs on an actual PATCH (:245). grep "org access reconciled" logs/droplet-journal.txt returns nothing, so we cannot tell from this drive whether Grist's port ran, short-circuited, or was skipped. That silence is itself worth closing.

Also worth testing directly: the health check's own docstring at :245-246 asserts "It is idempotent: PATCHing the same delta is a no-op" — this drive is a counter-example on a community that has taken a grant.

Consequence

runCheck (internal/provision/health.go:447-514) stands the row FAILED with the honest Detail and lets the deploy reach Active with a P4-S5x fault — that part is the designed behaviour, not the bug. The visible damage is:

  1. Monitoring paints ● data collections down on the panel. It is right there in the red leg's own artifacts/journey.rented-services-pr-f12e2-journey-on-a-rented-gateway/error-context.md page snapshot, on the gateway device row.
  2. Ben's #1535 sentence 1 is unproven for Grist after a redeploy: the operator's org-owner and the every-member editor default are exactly what this step exists to establish, and it did not.
  3. data-collections is in ROLES_PROOF_SERVICES (app/tests/e2e/fixtures/rolesProof.ts:44-52), so the drive's later operator-data-collections / member-data-collections door legs walk a Grist whose team-site access was never seeded. With the navigation heal landed, the next drive will run straight into them.

Suspected layer

The Grist org-access seam, across its two writers: the deploy-time health check (control-plane/cmd/control-plane/datacollectionshealth.go:251) and the #1537 roles reconciler port (internal/datacollectionssvc/datacollectionssvc.go:222). Both drive PATCH /api/orgs/data-collections/access on the same install-admin key with different deltas, and nothing reconciles the two. Reproducible offline against the existing faithful Grist double — control-plane/cmd/control-plane/datacollectionshealth_integration_test.go and the port's own contract tests — by replaying the order this drive took: founding seed → an operator grant through the reconciler → the seed again.

drive 20260918T055605Z red at redeploy-services: the Services-tab catalogue shows no newsletters card expect(locator).toBeVisible() failed Locator: locator('[data-field="catalogue-card"][data-service="newsletters"]').first() Expected: visible Timeou
evidence: /home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260918T055605Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure Drive `20260918T055605Z` (run dir `/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260918T055605Z`) redded at `redeploy-services` on a harness navigation defect, now healed in `14bb8f67`. Underneath it the same leg's evidence carries a **separate, substantive product fault** that the heal does not touch: during the redeploy's deploy-time reconcile, `data-collections` (Grist) failed its health check on **every one of its 36 warm-up attempts**, across a full six minutes. ## The evidence `logs/droplet-journal.txt`, 06:36:05 → 06:41:59, attempts 1/36 through 36/36, the identical error each time: ``` service=data-collections node=gateway attempt=36 attempts=36 verdict=failed error="grist: could not set the community team site's default access (the operator an owner, every member an editor) (HTTP 403) — the register is not serving" ``` This is not a warm-up tail. It is 36 consecutive refusals with no drift, and **every other service on the same box probed healthy on attempt 1** — `archive` 06:36:04, `document-archive`/`files`/`surveys` 06:42:03, `whakapapa`/`newsletters` 06:42:04. `systemctl --failed` is empty (`logs/droplet-units.txt:1`); nothing on the box crashed. ### Where the 403 comes from - The failing step is `dataCollectionsEnsureOrgAccess` — `control-plane/cmd/control-plane/datacollectionshealth.go:251`, reached as the check's last step at `:232`. The refused call is the `PATCH` at `:256-257` against `/api/orgs/data-collections/access` (`dataCollectionsOrgAccessPath`, `:239-241`), seeding `operator → owners` and `everyone@getgrist.com → editors` (`:252-255`). The message text is minted at `:532`. - **Everything before it in the same check passed on the same credential**: the fixture register, the row-level access rule, the owner read-back and the non-owner withheld read (`:200-228`). So the owner API key is valid, Grist is serving, and the door is reachable — the refusal is specific to the org-access WRITE. - The check therefore never reaches its own read-back asserts (`:269-274`), so we have no picture of what the org's access list actually held at that moment. That is the first thing the fix should capture. ### What is different about a redeploy The founding stood this service up fine: the `services-row` leg wrote `artifacts/services-rows.json` at 06:32 with `{"service":"data-collections",…,"status":"done","address":"https://data-collections.roles-proof.idss.nz"}` — `foundingServiceRows` off the founding's own S11 deploy rows (`app/tests/e2e/journey.rented-services.spec.ts:366-380`). Between that `done` row and the 06:36 refusal the only community change is the `add-member` (06:33:0x) and `grant-operator` (06:33:34, `POST /v1/group/operators/_attr/member` for `proof-operator`) legs — and **#1537's grant fan-out includes Grist's own port**, which PATCHes the *same* endpoint with the *same* owner key: `internal/datacollectionssvc/datacollectionssvc.go:222-249` (`setRole`), path at `:278`. That is the prime suspect: a role reconcile that leaves the org access list in a shape the check's seeding delta can no longer be applied to. Note the reconciler is silent either way here — `setRole` returns a bare no-op when the key is unminted (`:223-225`) or when `have == want` (`:231-233`), and only logs on an actual PATCH (`:245`). `grep "org access reconciled" logs/droplet-journal.txt` returns nothing, so we cannot tell from this drive whether Grist's port ran, short-circuited, or was skipped. That silence is itself worth closing. Also worth testing directly: the health check's own docstring at `:245-246` asserts "It is idempotent: PATCHing the same delta is a no-op" — this drive is a counter-example on a community that has taken a grant. ## Consequence `runCheck` (`internal/provision/health.go:447-514`) stands the row FAILED with the honest Detail and lets the deploy reach Active with a P4-S5x fault — that part is the designed behaviour, not the bug. The visible damage is: 1. Monitoring paints **`● data collections down`** on the panel. It is right there in the red leg's own `artifacts/journey.rented-services-pr-f12e2-journey-on-a-rented-gateway/error-context.md` page snapshot, on the gateway device row. 2. Ben's #1535 sentence 1 is unproven for Grist after a redeploy: the operator's org-owner and the every-member editor default are exactly what this step exists to establish, and it did not. 3. `data-collections` is in `ROLES_PROOF_SERVICES` (`app/tests/e2e/fixtures/rolesProof.ts:44-52`), so the drive's later `operator-data-collections` / `member-data-collections` door legs walk a Grist whose team-site access was never seeded. With the navigation heal landed, the next drive will run straight into them. ## Suspected layer The Grist org-access seam, across its two writers: the deploy-time health check (`control-plane/cmd/control-plane/datacollectionshealth.go:251`) and the #1537 roles reconciler port (`internal/datacollectionssvc/datacollectionssvc.go:222`). Both drive `PATCH /api/orgs/data-collections/access` on the same install-admin key with different deltas, and nothing reconciles the two. Reproducible offline against the existing faithful Grist double — `control-plane/cmd/control-plane/datacollectionshealth_integration_test.go` and the port's own contract tests — by replaying the order this drive took: founding seed → an operator grant through the reconciler → the seed again. drive `20260918T055605Z` red at `redeploy-services`: `the Services-tab catalogue shows no newsletters card expect(locator).toBeVisible() failed Locator: locator('[data-field="catalogue-card"][data-service="newsletters"]').first() Expected: visible Timeou` evidence: `/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260918T055605Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 03347fc9985d -->
Author
Member

swarm-claim host=bens-mac-04 run=26445
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=26445 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1574 — status success

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

envelope
{
  "issue": 1574,
  "status": "success",
  "commits": [
    "357813df"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/datacollectionshealth.go",
    "control-plane/cmd/control-plane/provision_datacollections_health_test.go",
    "docs/GOTCHAS.md",
    "internal/datacollectionssvc/datacollectionssvc.go",
    "internal/datacollectionssvc/datacollectionssvc_test.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./control-plane/cmd/control-plane/ ./internal/datacollectionssvc/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The redeploy org-access seed no longer 403s on a founded community that has taken an operator grant": "datacollectionshealth.go dataCollectionsEnsureOrgAccess now reads-first and PATCHes only the missing delta; TestDataCollectionsHealth_ReseedAfterOperatorGrantIsIdempotent (provision_datacollections_health_test.go) replays founding seed -> reconciler grant -> reseed and asserts green with zero redundant org-access PATCH against a double that 403s a no-op re-write",
    "The check captures what the access list held at a refusal": "dataCollectionsAccessSnapshot appended to the PATCH-failure error; TestDataCollectionsHealth_OrgAccessFailureCarriesTheAccessSnapshot asserts the error carries the snapshot",
    "The reconciler's silence is closed": "setRole logs both no-op branches (no key / already-converged) at Info; TestDataCollectionsPort_LogsNoOpBranches (datacollectionssvc_test.go)",
    "Idempotency the docstring claimed is now true in code": "read-first seed issues no write when the posture already holds; proven by the zero-PATCH assertion in the reseed test",
    "Hazard recorded": "docs/GOTCHAS.md #244; STATUS.md header + milestone log updated in the same commit"
  },
  "summary": "The Grist data-collections deploy-time org-access seed now reads-first and only writes the missing delta, so a redeploy of a founded community that has taken an operator grant no longer 403s; a refused write captures the access snapshot and the reconciler's no-op branches now log.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1574 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1574, "status": "success", "commits": [ "357813df" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/datacollectionshealth.go", "control-plane/cmd/control-plane/provision_datacollections_health_test.go", "docs/GOTCHAS.md", "internal/datacollectionssvc/datacollectionssvc.go", "internal/datacollectionssvc/datacollectionssvc_test.go" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./control-plane/cmd/control-plane/ ./internal/datacollectionssvc/", "exit_code": 0 } ], "criteria": { "The redeploy org-access seed no longer 403s on a founded community that has taken an operator grant": "datacollectionshealth.go dataCollectionsEnsureOrgAccess now reads-first and PATCHes only the missing delta; TestDataCollectionsHealth_ReseedAfterOperatorGrantIsIdempotent (provision_datacollections_health_test.go) replays founding seed -> reconciler grant -> reseed and asserts green with zero redundant org-access PATCH against a double that 403s a no-op re-write", "The check captures what the access list held at a refusal": "dataCollectionsAccessSnapshot appended to the PATCH-failure error; TestDataCollectionsHealth_OrgAccessFailureCarriesTheAccessSnapshot asserts the error carries the snapshot", "The reconciler's silence is closed": "setRole logs both no-op branches (no key / already-converged) at Info; TestDataCollectionsPort_LogsNoOpBranches (datacollectionssvc_test.go)", "Idempotency the docstring claimed is now true in code": "read-first seed issues no write when the posture already holds; proven by the zero-PATCH assertion in the reseed test", "Hazard recorded": "docs/GOTCHAS.md #244; STATUS.md header + milestone log updated in the same commit" }, "summary": "The Grist data-collections deploy-time org-access seed now reads-first and only writes the missing delta, so a redeploy of a founded community that has taken an operator grant no longer 403s; a refused write captures the access snapshot and the reconciler's no-op branches now log.", "reason": "", "blockers": [], "no_code_change": "" } ``` </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.

Reference
Matou/idss#1574
No description provided.