Skip to content

pm-stack(grist): apply external doc changes live — no full server restart #1288

Closed

Description

@dezren39

pm-stack(grist): apply external doc changes live — no full server restart

Companion to the Choice-options API gap. Tonight's dropdown fix required stopping and restarting the whole Grist server to make it re-read its own document database; during the window the PM aggregator served fallbacks.

Wanted

A way to make a running Grist server pick up an externally-applied document change without a process restart, any of:

  • an admin "reload/reopen document" endpoint,
  • a file-watch on the doc store that safely reopens changed docs (with the doc idle / no active editors),
  • or a documented, safe grist CLI subcommand for offline doc edits that a running server tolerates.

Why it matters beyond tonight

The pm-stack direction is more generated content (roadmap seed sync, dashboard build-out #1239). Every generated-schema or bulk-metadata change currently costs a restart window. Live-apply turns those into routine, automatable operations. If upstream Grist can't do this, the fallback ask is a first-class maintenance mode in OUR stack: aggregator drains to fixtures, Grist restarts, health-verified return — scripted end to end instead of by hand.

Acceptance criteria

  • A running Grist server picks up an externally-applied document change (e.g. a Choice-options extension) without a full server restart — or, if upstream Grist (OSS v1.7.21, pinned in pm-stack/grist/compose.yml) cannot do this, the fallback ships instead: a scripted maintenance mode in our stack (aggregator drains to fixtures, Grist restarts, health-verified return) that runs end to end unattended.
  • During the operation the PM aggregator never serves silent stale/fallback data without signalling it.
  • The procedure is documented with the pm-stack docs and exercised once against the Program roadmap doc.

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/mMedium: expected under 1 day 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 #1287 (the Choice-options API gap that forced tonight's restart), epic #1184 (PM stack coherence).

    Notes: filed from direct experience (source/human, author dezren39) — the dropdown fix required a full Grist stop/restart and the aggregator served fallbacks during the window. Verified live this run: no open or merged PR implements a live-apply path or the scripted maintenance-mode fallback.

    Risks: a partial live-apply could leave Grist's in-memory state diverged from its document database; the fallback's drain step must not drop in-flight aggregator reads silently (the #1110 silent-failure pattern).

    Suggested approach: first check upstream Grist for a reload/re-read mechanism or webhook; if absent, build the maintenance-mode script — it is fully in our control and useful regardless.

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 1, 2026
  6. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane B
    • Session / ID: queue task 2546 (triage), repo-queue-worker-shift-b, 2026-10-31
    • Found via: queue claim
    • Task: Triage pm-stack(grist): apply external doc changes live — no full server restart #1288 — verify on current main whether a running Grist picks up external doc changes live (or whether a scripted maintenance-mode fallback already exists in our stack), then route or close with evidence.
  7. 20 remaining items

  8. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  10. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  11. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  12. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done — triage verdict: ALREADY DONE at current main (task 7688)

    • Agent: queue worker (repo-worker-code), lane B
    • Session / ID: task 7688
    • Found via: queue claim (coverage-pass triage packet for issue pm-stack(grist): apply external doc changes live — no full server restart #1288)
    • Verdict: issue pm-stack(grist): apply external doc changes live — no full server restart #1288's acceptance criteria are fully met on current main; closing as completed with evidence. No new fix task is needed — task 5008 already implemented and merged this work.
    • Evidence (fresh, this run, 2026-11-03):
      • PR fix(pm-stack): wrap Grist force-reload and verify live docs (#1288) #4021 "fix(pm-stack): wrap Grist force-reload and verify live docs (pm-stack(grist): apply external doc changes live — no full server restart #1288)" is MERGED (merged 2026-11-02T15:43:24Z; merge commit 7171463, found by fresh commit search this run).
      • pm-stack/grist/reload-doc.sh exists on main (blob 22b91c0ece09b2a2bd1853bbe07b7375d2416bc3; header: force Grist to close/reopen a document via POST /api/docs/:docId/force-reload, then verify one cell by API read-back; optional idempotent --apply).
      • pm-stack/README.md on main documents the procedure (§ "Reload a document after an external change", lines 309-340), including distinguishing a document reload from a service restart via the container start time.
      • Live exercise (recorded on this issue by task 5008, 2026-11-01): a temporary marker was applied directly to the Program roadmap doc while pm-grist ran, force-reloaded and read back through the API, then the exact original value was restored, reloaded and verified; SQLite integrity_check ok; pm-grist StartedAt unchanged (2026-10-30T11:29:48Z) before/after — no server restart.
      • Aggregator signalling: /api/health reported source.roadmap=live (Grist + projector links) before/during/after; the separate Kaneo-backed board fallback was explicitly reported as fixtures, not silent stale data.
      • Main HEAD checked this run: 659a72e.
    • Acceptance mapping: (1) running server picks up an external change without a full restart — met via the pinned build's force-reload endpoint + wrapper; (2) aggregator never serves silent stale/fallback data without signalling — met per the exercise health evidence; (3) procedure documented with the pm-stack docs and exercised once against the Program roadmap doc — met.
    • Routing: none. The 2026-11-03 coverage-pass note re-queued this as triage before PR fix(pm-stack): wrap Grist force-reload and verify live docs (#1288) #4021 merged; that merge is what resolved it.
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/mMedium: expected under 1 day 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 humantask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions