Migrate Google and Spotify action resolution - #248
Conversation
|
@ndisidore Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
|
Review of #241 turned up a correctness bug in the foundation branch that this PR copies: The foundation branch (#238) has been amended: a When rebasing this PR onto the amended foundation, apply the same staged→stopped fix (and matching tests) to the gatekeepers here. |
8bbfdfe to
f204f6a
Compare
f204f6a to
ec85728
Compare
Stacked on #238. Migrates the Google (Docs, Gmail, Calendar) and Spotify gatekeepers to
applyActionsThrough, using the shared@gadgets/backend-utils/gatekeeper-actionhelpers. All resolution methods serialize through per-gatekeeperSerialTaskQueues; legacy per-action methods keep their existing semantics.Google
PendingActionStoregains a staged marker:submit()stages the record (still overlaid on reads) andmarkSubmitted()flips it oncesubmitAction()completes, so the batch sweep never applies an action the overseer hasn't accepted.invalidatedBy) and get reported asinvalidatedByVeto; without a stored snapshot the read path still invalidates lazily, unattributed, which the contract permits. Already-invalidated edits keep resolving as no-op drops, as on the legacy path.stopped.reason.Spotify
"failed"records as retryable (matching the legacy path) and skips"staged"ones.invalidatedByVetoattribution on the retired records, so repeated requests re-report it; retention rides the existing retired-record pruning window.submitActionForApproval: the staged→pending flip now reads the live record only, so a record retired by a concurrent veto cascade can no longer be flipped back to pending through the retired-keyspace fallback.Tested with
pnpm buildandpnpm lint:check(neither package has a test suite).