Repository navigation
Design: durable afterCommit for user-installed plugins (#1851) - #1888
Closed
michielbdejong wants to merge 1 commit into
Closed
michielbdejong wants to merge 1 commit into
michielbdejong wants to merge 1 commit into
Conversation
Adds planning/durable-after-commit.md: a queued, at-least-once afterCommit for extension-world plugins on tables showing their view, reading #1850's change list with a host-kept cursor per (installation, table) and writing through #1788's row grant. Points plugin-runtime-convergence.md step 4 at it. Refs #1851 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Michiel's decisions (via the coordination session), all as recommended in the design:
Implementation follows behind |
This was referenced Sep 29, 2026
Member
|
Trekmeester: included in batch #1915 (run 36779344325). It lands with it when green; if this PR's own tests fail there, I take it out and say why here. |
Member
joepio
added a commit
that referenced
this pull request
Oct 1, 2026
Member
|
Merged into develop through batch #1947 (squash Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1851
Design only, no code:
planning/durable-after-commit.md. Step 4 ofplanning/plugin-runtime-convergence.mdnow points to it, and the planning index lists it.Summary
after_commitstays for operator-installed server extensions.onResourceGetandbeforeCommitare not widened.table-views, whoseview-kindnames an app. The app must resolve to an active JS extension-world installation that declaresentrypoints.afterCommit. A server-recorded subscription must also exist, made by the same signed gestures as the Let an app shown as a table's view edit its rows through a grant (#1740) #1788 grant. A live row grant is not required; it only decides whether writes apply or wait for review.plugin-event/v1/queue, drain worker and journal. The host keeps an opaque cursor per (installation, table), hands the plugin a change-list page, and advances the cursor only in the acknowledging batch.CURSOR_EXPIREDbecomesreset: 'expired', which tells the plugin to do a full compare. A periodic sweep recovers a missing marker.export async function afterCommit(ctx)receivesctx.eventwith{table, rowClass, grant, reset, changes[{subject, kind, version, at}], hasMore, attempt}andctx.changes(table, {since}). Returning acknowledges the page; throwing retries it. Backoff runs from 30 s to 1 h; after 8 failed attempts the table's delivery stops and the person gets Retry. Pages hold 100 changes, bursts are debounced for 2 s, the loop cap is 30 runs a minute, and runs get the JS fuel limits and 60 s.check_scopeapply unattended, signed by the app agent; with Allow editing scope covers a plugin's provider extras on rows (provider id, ETag, baseline) #1849 that includes provider extras. Everything else waits for review: Apply, "Allow all edits by this view on this table" (grantvia: "hook-review"), or Decline.--plugin-after-commit(off on develop). No data migration. Views that already have a live grant are backfilled.Product questions for Michiel
These are in the doc and in a comment on #1851:
No UI changes, so there are no screenshots.
🤖 Generated with Claude Code