Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Reference
Matou/idss#1575
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The failure
Drive
20260918T074206Z(sig03347fc9985d, commit357813df) red atredeploy-services, 29/30 legs green:Thrown at
app/tests/e2e/journey.rented-services.spec.ts:628. The assertion is honest and is catching a real product defect — nothing in the harness is wrong.The decisive new evidence: the access-list snapshot
#1574 (commit
357813df) added the access-list snapshot to a refused org-access write. This drive is the first to carry it, and it disproves that commit's hypothesis.logs/droplet-journal.txt:1845–1971— data-collections failed all 36 warm-up attempts of the redeploy (08:18:12 → 08:24:05), every one identical:Read that list carefully. It holds exactly two principals:
operator=owners— Grist's own bootstrap of the single org fromGRIST_DEFAULT_EMAIL(internal/clan/datacollections.go:370), not something we wrote.idss-health-nonowner@data-collections.local=guests— the health fixture's doc-level grant (PATCH /api/docs/<id>/access,datacollectionshealth.go:498-504, identity atinternal/clan/datacollections.go:140). Grist surfaces a doc-guest in the org list asguests.Absent from it:
everyone@getgrist.com(the #1535 seed) andproof-operator(the #1537 grant). Both of those are org-level writes.So: doc-level access writes land; org-level access writes are refused 403. No
PATCH /api/orgs/data-collections/accesshas ever succeeded on this box.Why #1574's fix could not have helped
dataCollectionsEnsureOrgAccess(control-plane/cmd/control-plane/datacollectionshealth.go:254-284) now reads first and PATCHes only the genuinely-missing entries. Buteveryone@getgrist.comis never in the read-back (it is not in the snapshot), sodataCollectionsOrgRoleOf(access, everyone)is""on every single run, the delta is never empty, the PATCH always fires, and it always 403s. The read-first seed is a genuine improvement and should stay; it just was not the fault.It went green in tests because the double does not model the box.
gristFake.patchOrgAccess/writeOrgAccess(control-plane/cmd/control-plane/provision_datacollections_health_test.go:236-283) accept any org-access PATCH and echoeveryone@getgrist.comstraight back out of the GET. Real Grist does neither. Whatever fix lands must move that double onto the box's observed behaviour first, or the next drive reds the same way.Defect 1 (the red's root): Grist refuses org-level access writes
The same 403 hits both writers on the same endpoint:
datacollectionshealth.go:271-279) — data-collections never reaches healthy;setRole(internal/datacollectionssvc/datacollectionssvc.go:241-248) —proof-operator→ownersnever lands, which is why they are missing from the snapshot at 08:24:05.Corroborating:
setRolegained three Info log lines in #1574 (datacollectionssvc.go:228,:239,:250). None of the three appears anywhere in the journal (105 control-plane lines harvested, no-ntruncation) — the port ran and returned on its error path, the only path that logs nothing. That is consistent with a refused PATCH, and is the direct cause ofdata-collectionslanding inRoleReconcile.Outstandingat grant time (internal/member/roles.go:259-261, folded at:271) and surfacing asnot_appliedon the member detail (internal/member/detail.go:399).Artifact trail across the two reads:
artifacts/roles/detail-proof-operator-granted.json—surveysanddata-collectionsbothnot_applied: true.artifacts/roles/detail-proof-operator-after-redeploy.json—newslettersapplied (Super Admin),surveyscleared,data-collectionsstillnot_applied: true.Suspected layer — needs a ruling
The render (
internal/clan/datacollections.go:350-384) setsGRIST_SINGLE_ORG,GRIST_IN_SERVICE,GRIST_FORWARD_AUTH_HEADER,GRIST_DEFAULT_EMAIL,GRIST_SANDBOX_FLAVOR— and no product/seat env. grist-core assigns a team site created this way a default product whose features deny adding users, andupdateOrgPermissionsthen refuses the write;GRIST_DEFAULT_PRODUCTis the usual lever. That is a hypothesis, not a verified fact — it must be confirmed against live Grist 1.7.18 (the pinned image, journal line 517) by reading the 403's response body, which neither writer currently captures.Why this needs Ben, not a swarm worker acting alone. Both candidate repairs are product-surface, one-way-ish decisions about what a community's Grist means:
GRIST_DEFAULT_PRODUCTin the render. This changes what a deploy does and what the community's data-collections site is, on every existing and future community.A third option — capture the 403 body first and re-drive to learn the real reason before choosing — is cheap and may be the right first move.
Defect 2 (stacked): the deploy-time reconcile can never clear the tail for a per-person port
This one reds the leg even after Grist is fixed, so it must be fixed in the same arc.
ReconcileService(internal/member/roles.go:298-338) has two paths:AppliesAtDeployports (surveys) →clearRoleTail(service)(:323-324). This is whysurveyscleared between the two artifacts above. It works._ = o.catalogue.ReconcileRole(service, m.PersonID, true)(:335). The result is discarded and the role tail is never touched.So once a per-person port lands in
RoleReconcile.Outstandingvia a failedReconcileRoles, only another fullReconcileRoles(grant/revoke/member-add) can clear it — a deploy never can, no matter how successfully the per-person verb reconciles. Theredeploy-servicesleg's premise (spec comment atjourney.rented-services.spec.ts:557-562: 'a P4 add of one more service so #1537's deploy-time reconcile runs for an operator that already exists') is therefore only true forAppliesAtDeployports today.The fix shape is small but is a judgement call: should
ReconcileServiceclear the service from the member's tail on a successful per-personReconcileRole, and add it on failure? That is a decision about what 'outstanding' promises on the member detail — a trust-moment surface — so it wants the same ruling.Why I refused to heal
Refusal rule 3 (product-behaviour surface as a design decision). Defect 1's repair is a new deploy default (
GRIST_DEFAULT_PRODUCT) or a re-shaping of #1535's access posture for Grist — a one-way door about what a deploy does and what a community sees. Defect 2's repair changes what the member-detail tail promises. Neither is a mechanical repair that merely makes the code do what it already meant, so the fast lane does not apply.I also cannot test either fix here: there is no live Grist on this workstation, and the only in-repo Grist is the
gristFakedouble that is itself wrong about the box (it accepts the very writes Grist refuses). A greengo test ./control-plane/...here would prove nothing — that is precisely the trap #1574 fell into.Finally, the healer history for sig
03347fc9985dshows two prior in-lane heals (2864527ajournal harvest,9ad4cd80Services-tab nav) that each repaired how this fault presented and left it red. This signature has resisted a heal twice; it is swarm/ruling work.Re-drive note
The drive's box is released; the live leg needs a rented droplet and re-proves on the next drive. Both defects must land together — fixing Grist's 403 alone still leaves
data-collectionsnamed in the tail (defect 2), and fixing the tail alone leaves the operator genuinely not an owner in Grist (defect 1).drive
20260918T074206Zred atredeploy-services:role posture not honest on 1 door(s) — proof-operator's role on data-collections reads "not yet applied" (org owner) — the reconcile is still owedevidence:
/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260918T074206Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedSession-runner report (ADR 0174) — the two-way half landed; the product-surface repair routes to Ben.
Landed on
maininf541461c(pushed;git build/vet/gofmt + fullgo test ./...green — golangci-lint not run, it lives innix develop .#go-ciand is unavailable on this host):1. The diagnostic #1574 lacked (both org-access writers now carry Grist's OWN 403 body). The ticket's decisive finding — the #1574 access-list snapshot shows doc-level writes land and all org-level writes are refused — is correct, but why the box 403s is still unknown because neither writer captured Grist's response body. Now:
dataCollectionsDo(control-plane/cmd/control-plane/datacollectionshealth.go) read the body then threw it away; its refusal error now carries it (— Grist said: <body>). This is the writer whose failure the drive journals 36/36.setRole/request(internal/datacollectionssvc/datacollectionssvc.go) returned a bareHTTP 403and logged nothing on the error path — "the only path that logs nothing", exactly as the ticket notes. It now both surfaces the body in the error AND logs it (the fourthsetRolelog line #1574 never had).Proof:
TestDataCollectionsHealth_OrgAccessFailureCarriesGristReason,TestDataCollectionsPort_RefusedWriteCarriesGristReason(error + log carry the body), against a double modelling the box's refusal — not the #1574 trap (the double 403s, it does not accept-and-echo).2. Defect 2 (stacked) — the deploy-time reconcile can now clear a per-person port's tail.
ReconcileService's per-person HTTP branch discardedReconcileRole's result and never touched the tail (internal/member/roles.go), so a per-person port (data-collections/document-archive) outstanding via a failed grant could ONLY be cleared by a later fullReconcileRoles— a deploy that healed the port left the member reading "not yet applied" forever. It now clears the service from a member's tail on a landed per-person reconcile and keeps it on a still-failing one (newsetServiceOutstanding), the same honest footing theAppliesAtDeploybranch (#1554) already had.Proof:
TestReconcileService_PerPersonSuccessClearsOutstandingTail(red before, green after),…FailureKeepsOutstandingTail(the honest data-collections-still-403 guard).Ruled by agent under ADR 0174 — veto anytime. Both are revertible, off no one-way-door line, and offline-provable at the seam. #1574's read-first seed stays (a genuine improvement); it was never the fault.
Why human
Defect 1 — WHY Grist 1.7.18 refuses every org-level access write — is a one-way-door ruling I cannot make or prove here.
go testhere would prove nothing — the #1574 trap. The real reason needs the next live re-drive (a rented droplet), which the diagnostic above now makes it capture. This is not a two-box live drive a one-shot session runs.GRIST_DEFAULT_PRODUCTin the render (internal/clan/datacollections.go) — changes what a deploy does and what every community's data-collections site IS. A new deploy default.Proposed default ruling (adopt whichever you prefer, or a third):
GRIST_DEFAULT_PRODUCT(the "Free"/team product that permits user adds) to the render — smallest change, preserves the #1535 promise — pending confirmation from the next drive's captured 403 body that a default-product denial is in fact the cause.You already own the whakatohea-demo Grist org, so you may be able to rule now without the re-drive.
Re-drive note: the leg only goes green once Defect 1's repair also lands — Defect 2 alone correctly leaves data-collections outstanding while it genuinely 403s. The drive's box is released; the live leg re-proves on the next drive.
Leaving
ready-for-humanfor the Defect-1 ruling.Evidence from the kept box (
170.64.140.199, drive20260918T074206Z) — Grist's own 403 body, read live 2026-09-18 ~13:35Z. No ruling here; this is the fact the ticket said was missing.Replayed the health seed's exact write on the box's local serve port with the minted owner key (
/var/lib/data-collections/state/owner-api-key):And the org record (
GET /api/orgs/data-collections):What this settles:
GRIST_DEFAULT_PRODUCThypothesis (proposed ruling A) is disproved. The team site already rides theFreeproduct with team features and no share caps. The refusal is not a product/seat limit.everyone@getgrist.comon a top-level resource; any other owner gets exactly this 403. Because the operator is alreadyownerson the box, the read-first seed (#1574) computes a delta of onlyeveryone → editors, so every one of the 36 attempts is this one refused write.proof-operator → ownerswrite is refused too. The ticket infers it from the missingsetRolelog lines; nobody has observed its response. I did not replay it (it would likely succeed and mutate the box).f541461c's body capture will show it on the next drive.So the real choice for #1535's "every member an editor" on Grist is between:
everyone— the member-orbit port (#1551) already reconciles a person into the org; seed each member aseditorsat add/approve and drop theeveryoneseed + its health assert. Keeps org-owner for operators. Needs the unverified per-person write to work.GRIST_SUPPORT_EMAIL= the install owner) so it MAY share with everyone at top level — keeps the current posture, but the support user carries other special-cased behaviour in grist-core that would need reading first.everyoneis open to ordinary owners.Ruled by Ben (in session, 2026-09-18): option 1 — per-person, no
everyone. Landed as8d69f1b3.gristFakedouble was moved onto the box FIRST: it now refuses any org-leveleveryone@getgrist.comgrant with the box's own403 {"error":"This user cannot share with everyone at top level"}— red against the old seed, exactly the drive's failure.everyone → editorsseed and its assert are gone.member.RoleMapping.MembersAtDeploy(set by the Grist port):ReconcileServicenow seeds every CURRENT member (active / yet to sign in — never removed, suspended or awaiting approval) when the port deploys, beside the member add/approve reconcile that already wrote a plain member in per person.Still unverified live: that Grist accepts the per-person
PATCHkeyed by a bare kanidm username — drive20260918T074206Zshowedproof-memberandproof-operatorbothnot_appliedon data-collections, on a build that did not yet log refusals. If that write is refused too,f541461c's body capture will name why on the next drive and it comes back as its own ticket. Closing this so the #1547 blocker lifts and the armed cron queue re-fires.