Skip to content

Harden durable Yieldstar reconciliation - #37

Closed
djgrant wants to merge 1 commit into
yieldstar-integration-build-1from
yieldstar-integration-review-1
Closed

Harden durable Yieldstar reconciliation#37
djgrant wants to merge 1 commit into
yieldstar-integration-build-1from
yieldstar-integration-review-1

Conversation

@djgrant

@djgrantdjgrant commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #36. Review pass over the durable Yieldstar 0.5.0 integration, verified against the installed 0.5.0 runtime sources.

Fixes

  • Emits reconciler.drift.detected as a durable step before a drift-update decision, restoring event parity with the synchronous reconciler.
  • Emits a durable update skip lifecycle event (update-not-implemented) when a resource has no update operation, instead of silently returning.
  • Removes an unreachable dryRun check after the provider mutation.
  • YieldstarStateBackend now reads a store snapshot in one round trip and treats a store deleted mid-read as resource absence, instead of calling listStores before every get, update, and delete.
  • YieldstarStateBackend.update returns the committed store version from updateStoreFrom rather than a locally computed revision.

Tests

  • Orphan deletion through the resource registry on the durable path (previously untested): a resource removed from the desired set has its provider delete called once and its store removed.
  • Drift repair: a drifted remote read produces one reconciler.drift.detected event with the patch diff, one drift-update decision, and one provider update call.

Docs

  • Documents that a deployment which crashed while holding the coordination store is resumed by re-running the same execution ID, which reclaims the acquisition through the applied-step ledger and releases it on completion.

Verified as sound

  • Store identity: conditional workflow update and delete go through updateFrom/deleteFrom with the snapshot's UUIDv7 instanceId and version, with stepId supplied by the workflow store handle for exactly-once replay.
  • Crash replay: provider calls, state reads, and emits are keyed durable steps; the crash-resume and durable-wait tests exercise the heap replay path.
  • No compatibility fallbacks: reconcileWithYieldstar does not use leases or the synchronous step runner; the synchronous Reconciler remains only as the documented CLI path for this release slice.

Remaining for a later loop

  • CLI deploy/destroy still run the synchronous Reconciler; moving them onto the resident workflow runtime is the next stacked phase per the RFC.
  • Durable destroy is not yet a first-class workflow operation.
  • docs/manual/reconciler.md fails prettier --check because prettier rewraps markdown mid-sentence, which project docs style forbids; pre-existing on the parent branch.

Checks run: pnpm build (13/13), pnpm typecheck (11/11), pnpm test:once (109 passed, 4 skipped).

- Emit reconciler.drift.detected as a durable step before a drift-update
decision, restoring event parity with the synchronous reconciler.
- Emit a durable update skip lifecycle event when a resource has no update
operation instead of returning silently.
- Remove an unreachable dryRun check after the provider mutation.
- Read store snapshots in one round trip in YieldStarStateBackend and treat
a store deleted mid-read as resource absence, instead of listing every
store before each get, update, and delete.
- Return the committed store version from YieldStarStateBackend.update
rather than a locally computed revision.
- Test orphan deletion through the registry and drift repair with events on
the durable path.
- Document resuming a crashed deployment with the same execution ID to
release deployment coordination through replay.
@djgrantdjgrant mentioned this pull request Jul 22, 2026
@djgrant

Copy link
Copy Markdown
CollaboratorAuthor

Closing this review-only PR. Its fixes are included in build PR #38, which is now stacked directly on #36.

@djgrantdjgrant closed this Jul 22, 2026
@djgrantdjgrant changed the title Harden durable YieldStar reconciliationHarden durable Yieldstar reconciliationJul 22, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@djgrant