Skip to content

Apply queued actions through a checkpoint - #238

Draft
ndisidore wants to merge 3 commits into
mainfrom
nathan/action-apply-through-foundation
Draft

Apply queued actions through a checkpoint#238
ndisidore wants to merge 3 commits into
mainfrom
nathan/action-apply-through-foundation

Conversation

@ndisidore

@ndisidore ndisidore commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

This PR adds a batch applyActionsThrough contract to gatekeepers and migrates Confluence + Notion to it. The overseer-side driver comes in #241; until that lands the new method is inert, so no production behavior changes yet.

The old per-action applyAction(id) / rejectAction(id) round-trips are now @deprecated (they stay until every gatekeeper migrates, then go away), and revertAction loses its dead restart return field — six gatekeepers computed it, nobody read it. In their place, applyActionsThrough(actionId, vetoes) resolves the whole queued prefix in one call: deliver the vetoes, then apply everything pending up to actionId. It returns stopped: {at, reason} if an apply fails mid-way (the reason must be display-safe and specific — only the message survives the RPC hop), and invalidatedByVeto for actions a veto cascade-deleted, so the UI can attribute them.

The mapping is safe because the call is idempotent (retries are free — settled actions and stale vetoes are ignored) and a gatekeeper may never silently skip an in-range action: it applies it or reports it via stopped, which is what lets the caller soundly conclude "everything ≤ N was applied" despite ID holes.

User-visible approval/rejection doesn't change in this PR. Once #241 lands: approving an action applies everything queued before it in one pass under your authority (the semantics the UI already implies), and rejecting a content creation cascade-rejects the pending actions that depended on it — now with attribution, so those cards can say why instead of silently vanishing.

Coordination: #198 rebases on top (stale-action sentinel travels in stopped.reason); #203 is closed in favor of this series.

@github-actions github-actions Bot added backend/utils Changes to shared backend utilities gatekeeper Changes to a gatekeeper integration workshop/shared Changes to shared Workshop APIs labels Aug 17, 2026
@ask-bonk

ask-bonk Bot commented Aug 17, 2026

Copy link
Copy Markdown

@ndisidore Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@ndisidore ndisidore closed this Aug 17, 2026
@ndisidore ndisidore reopened this Aug 17, 2026
@ndisidore
ndisidore force-pushed the nathan/action-apply-through-foundation branch 2 times, most recently from 4f876d2 to ebbb08e Compare August 17, 2026 20:48
@ndisidore
ndisidore force-pushed the nathan/action-apply-through-foundation branch from ebbb08e to 8bbfdfe Compare August 17, 2026 21:14
@ask-bonk

ask-bonk Bot commented Aug 17, 2026

Copy link
Copy Markdown

github run

@ndisidore
ndisidore force-pushed the nathan/action-apply-through-foundation branch from 8bbfdfe to f204f6a Compare August 18, 2026 17:21
@ask-bonk

ask-bonk Bot commented Aug 18, 2026

Copy link
Copy Markdown

APIError: Invalid Anthropic API Key

github run

2 similar comments
@ask-bonk

ask-bonk Bot commented Aug 18, 2026

Copy link
Copy Markdown

APIError: Invalid Anthropic API Key

github run

@ask-bonk

ask-bonk Bot commented Aug 18, 2026

Copy link
Copy Markdown

APIError: Invalid Anthropic API Key

github run

@cloudflare cloudflare deleted a comment from ask-bonk Bot Aug 18, 2026
@cloudflare cloudflare deleted a comment from ask-bonk Bot Aug 18, 2026
@cloudflare cloudflare deleted a comment from ask-bonk Bot Aug 18, 2026
@cloudflare cloudflare deleted a comment from ask-bonk Bot Aug 18, 2026
@cloudflare cloudflare deleted a comment from ask-bonk Bot Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend/utils Changes to shared backend utilities gatekeeper Changes to a gatekeeper integration workshop/shared Changes to shared Workshop APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant