Repository navigation
Description
pm-stack(grist): no supported API path to extend a Choice column's options
Filed from direct experience, 2026-10-26 (Drew: "make an issue documenting what you wished it would do").
What happened
Adding the id area to the Program roadmap required extending the Area column's Choice list in the Grist doc. The REST API refused: /apply with UpdateColumn returns "'UpdateColumn' actions are not controlled" — the doc's access rules reject schema changes even for the SOPS-managed admin API key that can freely read/write all data. The only working route was: stop the Grist container, edit the doc's SQLite directly (_grist_Tables_column.widgetOptions), restart, verify. It worked and a backup was taken first, but no routine change should need database surgery.
What I wished it did
- A supported, authenticated way for a doc owner/admin to modify column options (at minimum Choice lists) via the API — either by making access rules able to grant schema actions to a role instead of rejecting them as uncontrolled, or a dedicated admin endpoint/CLI for column metadata.
- Access rules that distinguish data edits from schema edits, so "this key may manage schema" is an expressible policy.
To investigate first
Whether the block is our doc's access-rules configuration (fixable in config) or a Grist OSS limitation (then this becomes an upstream feature request + a documented local workaround: the stop/edit/restart runbook, kept with the pm-stack docs). Either way the end state is: scripted choice-list edits with no direct SQLite writes.
Context: doc czYHYKgG9SHcm9CPwiKEq1 (Program roadmap), Grist OSS v1.7.21 pinned in pm-stack/grist/compose.yml.
Acceptance criteria
- One of the issue's two end states is reached and recorded here: either (a) an upstream Grist path (newer version or API action) supports extending a Choice column's options via the REST API and is adopted/pinned, or (b) a documented local workaround exists — the stop/edit/restart runbook kept with the pm-stack docs — so choice-list edits are scripted end to end.
- Either way: no direct SQLite writes to the Grist document database are part of the procedure.
- The runbook/adoption note names the Grist version it was verified against (currently OSS v1.7.21).
Activity
developing-today commentedon Oct 27, 2026
CODE-410
dezren39 commentedon Oct 27, 2026
Intake review
Related: companion issue #1288 (live-apply / maintenance mode — the restart this issue's workaround requires), epic #1184.
Notes: filed from direct experience (author dezren39):
/applywithUpdateColumnrefused the Choice-options extension on the Program roadmap doc (czYHYKgG9SHcm9CPwiKEq1). Verified live this run: no PR addresses the Grist Choice API gap; the stop/edit/restart path is currently tribal knowledge from tonight's fix.Risks: low — worst case is the workaround stays manual; direct SQLite edits are the failure mode to keep out of the runbook.
Suggested approach: short upstream check first (Grist changelog/API for UpdateColumn Choice support post-v1.7.21); in parallel, write the runbook from tonight's steps while they are fresh — that alone satisfies end state (b).
dezren39 commentedon Nov 1, 2026
Pickup: Queue task 2541 claimed by repo-worker-code (openchamber scheduled lane). Revalidating current state and investigating a supported Choice-options path; no implementation in this triage.
1 remaining item
dezren39 commentedon Nov 1, 2026
Done / handoff: Triage task 2541 is complete. Follow-up task 5000 is queued to validate the supported PATCH endpoint against representative ACLs and implement a verified non-SQLite workflow if permitted. The issue remains open; the ACL behavior has not yet been tested.
dezren39 commentedon Nov 1, 2026
Agent note (task 5000, lane B): picked up. Revalidated fresh: #1287 OPEN, no hard-stop labels, no competing PR. Plan per packet: disposable pinned Grist v1.7.21 on the laptop, representative roadmap ACLs, probe GET/PATCH columns for Choice options (allowed + denied), preserve widgetOptions, idempotency + read-back; script + document the workflow if supported.
Merge pull request #4020 from developing-today/queue/5000-1287-grist-…
dezren39 commentedon Nov 1, 2026
Agent note (task 5000, lane B): done — PR #4020 merged (9ecc392), issue closed by the PR.
Verified on a disposable doc on the pinned grist-oss v1.7.21 image: the per-column PATCH route 404s (does not exist in v1.7.21); the collection
PATCH /tables/{t}/columnsapplies widgetOptions changes with read-back. Under an ACL rule granting +CRUD without S (the roadmap shape),/apply UpdateColumnreproduced the exact production error (Blocked by access rules: 'UpdateColumn' actions are not controlled) while the REST columns PATCH still applied. Deliverables:pm-stack/grist/update-choice-options.py(idempotent, preserves choiceOptions, key from env only, read-back verification; live-tested under +CRUD incl. idempotent re-run and dry-run), 5 unit tests for the merge logic, and theCHOICE-OPTIONS.mdrunbook (flags the ACL behavior as version-specific — re-verify on Grist upgrades). Codex review of PR #4020: completed, no findings.