Skip to content

pm-stack(grist): no supported API path to extend a Choice column's options #1287

Closed

Description

@dezren39

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

  1. added
    kind/featureNew feature or capability request
    source/humanFiled directly by a human
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  3. added
    priority/normalOrdinary priority (the default)
    effort/sSmall: expected under 2 hours of work
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 27, 2026
  4. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    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): /apply with UpdateColumn refused 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).

  5. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    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.

  6. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 1, 2026
  7. 1 remaining item

  8. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    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.

  9. added
    mode/onlineFully doable remotely: design, config, code, cloud
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 1, 2026
  10. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    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.

  11. added a commit that references this issue on Nov 1, 2026
  12. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    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}/columns applies widgetOptions changes with read-back. Under an ACL rule granting +CRUD without S (the roadmap shape), /apply UpdateColumn reproduced 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 the CHOICE-OPTIONS.md runbook (flags the ACL behavior as version-specific — re-verify on Grist upgrades). Codex review of PR #4020: completed, no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmode/onlineFully doable remotely: design, config, code, cloudpriority/normalOrdinary priority (the default)source/humanFiled directly by a human

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions