Commit 4e090ec
fix(service-automation): decide the claim capability before the compare-and-set, never after it (#16128)
* fix(service-automation): decide the claim capability before the compare-and-set, never after it
`ObjectStoreSuspendedRunStore.claimSuspension` decided `'unsupported'` — "no
cross-replica advance guarantee is offered by this store" — from the SHAPE of
the return value, one line after the conditional delete had already gone out.
On an engine whose multi-delete does not resolve an affected-row count that
made the refusal a statement about a write that had already landed: the
compare-and-set was performed against the shared row and its verdict discarded,
`claimAdvance` read `'unsupported'` as `unguarded`, and a replica that actually
LOST the claim resumed anyway — the doubled side effect #14333 exists to
prevent, on the one composition that declares itself unable to prevent it.
Two arms, because `ObjectQL.delete` declares `Promise<any>` and there is no
read-only instrument for "does this engine's multi-delete return a count":
- a one-time capability probe down the same route, against a sentinel predicate
that matches no row, so an engine that cannot count is refused with nothing
consumed and `claimAdvance`'s `unguarded` reading is true when it is taken;
- after the write, `'unsupported'` is retired: a committed compare-and-set with
an unreadable verdict is UNKNOWN, so the store throws and `claimAdvance`
answers STORE_UNAVAILABLE — the resume is refused, not continued.
The guarantee itself is not restored for an uncounted engine and the change
does not claim it is; the count is contracted at `IDataDriver.deleteMany` and
erased to `any` at the engine boundary, which is #16033.
Refs #15832 (Note 2)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpTx2tbq3pZRYAdoGt6E6Y
* wip(#15832): preserve in-progress Note 2 pin work after a container restart
NOT a finished change and NOT verified by the PM. The dispatched os-dev seat was
extending the claim-probe pins and the engine-double ledger when the container
restarted and killed it. This commit preserves that work; the merge of
origin/main below it was the seat's own.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpTx2tbq3pZRYAdoGt6E6Y
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent d5d8d50 commit 4e090ec
5 files changed
Lines changed: 772 additions & 10 deletions
File tree
- .changeset
- packages/services/service-automation/src
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments