Skip to content

feat: add object coordination and stateless runtime lifecycle - #113

Open
arvindh123 wants to merge 6 commits into
mainfrom
feat/object-coordination
Open

arvindh123 wants to merge 6 commits into
mainfrom
feat/object-coordination

Conversation

@arvindh123

@arvindh123 arvindh123 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Object coordination lets clients commit related entity/resource changes atomically with revision checks, replay protection, and fenced leases. The runtime lifecycle changes let operators replace an Atom process while its durable state remains in PostgreSQL, with a bounded drain on termination.

The combined branch preserves transactional coordination, migration 002, tenant lock ordering, canonical lease keys, API contracts, and audit/event semantics. Runtime startup is extracted into the library, HTTP/gRPC/enrollment and background tasks share cancellation, and shutdown drains tracked work before closing the database pool. Workspace provisioning and idle policy remain outside Atom.

Validation on the combined implementation:

  • cargo fmt --check and cargo clippy -- -D warnings passed.
  • Unit tests: 344 passed; 35 database-gated tests ignored in that invocation.
  • Coordination integration tests: all 9 passed against disposable PostgreSQL, including concurrent revision/lease tests. The observation test now uses a stable subscriber and matches each object's ID to avoid a parallel log-capture race.
  • Real-process replacement: passed after both SIGTERM and SIGKILL, verifying sessions, signing keys, data, revisions, replay records, fenced leases, and replay responses.
  • Migration 001 → 002 preserved an existing resource and advanced its revision on update.
  • V1 contract/migration manifest checks and all 13 contract-tool tests passed.

The original stateless work is preserved as snapshot commit 8cc29ddbc. Integration preserves the published branch history; the PR remains unmerged.

@arvindh123
arvindh123 marked this pull request as ready for review September 16, 2026 06:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-16T06:21:46.434592Z 681f37d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@arvindh123

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 681f37d233

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/object_changes.rs Outdated
Comment thread src/object_changes.rs Outdated
Comment thread src/object_changes.rs
@arvindh123 arvindh123 changed the title feat: add transactional object coordination APIs feat: add object coordination and stateless runtime lifecycle Sep 17, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 17, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
atom-docs bac8d6c Commit Preview URL

Branch Preview URL
Sep 18 2026, 10:55 AM

Keep main's refresh-token migration at version 002 and move the new
coordination migration to 003. Preserve the frozen launch manifest while
checking all forward migration names and versions.

Validate the merged GraphQL contract and add regression coverage for the
refresh-token worker's shutdown and runtime failure handling.

Account for both refresh-token and coordination events in the catalog
regression assertion.
@arvindh123
arvindh123 force-pushed the feat/object-coordination branch from e26d0a0 to bac8d6c Compare September 18, 2026 10:53
Sign up for free to 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