Skip to content

Coordinate concurrent reconciler state - #27

Merged
djgrant merged 3 commits into
mainfrom
reconciler-state
Jul 19, 2026
Merged

Coordinate concurrent reconciler state#27
djgrant merged 3 commits into
mainfrom
reconciler-state

Conversation

@djgrant

@djgrantdjgrant commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add revisioned state writes, renewable leases, and a SQLite state backend.

The reconciler uses resource leases and compare-and-swap writes to coordinate concurrent mutations. Orphan deletion is serialised through its own lease. The file, memory, and SQLite backends implement the same state contract.

Every mutation must provide the revision it observed. Revision 0 asserts that the resource does not exist. SQLite stores resources and their leases in the resources and resource_leases tables.

Stack

Depends on #26. The PR base points at that branch so this diff contains only state and concurrency work.

Validation

  • pnpm build
  • pnpm typecheck
  • pnpm test:once – 97 passed, 4 skipped

This was referenced Jul 19, 2026
@djgrant
djgrantforce-pushed the reconciler-resource-collection branch from cd6b7f0 to aeec987CompareJuly 19, 2026 17:06
Base automatically changed from reconciler-resource-collection to mainJuly 19, 2026 17:08
@djgrant
djgrant marked this pull request as ready for review July 19, 2026 17:29
@djgrant
djgrant merged commit d5b8951 into mainJul 19, 2026
1 check failed
@djgrant
djgrant deleted the reconciler-state branch July 19, 2026 21:31
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