Skip to content

Own registered Store work lifecycle - #145

Open
lynnswap wants to merge 4 commits into
mainfrom
codex/store-close-registry-pr
Open

Own registered Store work lifecycle#145
lynnswap wants to merge 4 commits into
mainfrom
codex/store-close-registry-pr

Conversation

@lynnswap

@lynnswap lynnswap commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Purpose

Introduce the package-internal lifecycle foundation for synchronously closing admission to registered Store-owned work and deterministically draining work already admitted.

Changes

  • Add ReviewStoreWorkRegistry with monotonic admission ordinals, one replayable drain result, and ordered typed failure aggregation.
  • Register review mutations, workers, waiters, account actions, and rate-limit work with centralized pre-entry cancellation and cleanup-critical finalization.
  • Own and drain current and retiring network debounce tasks when the registered-work owner closes.
  • Finalize interrupt-request failures with matching failed lifecycle and terminal state while retaining the exact cancellation request separately.
  • Preserve the existing Live and direct runtime-stop detachment and bounded-drain compatibility boundary.

Non-goals

  • This is not a public or application-wide Store close API and is not wired into Host shutdown.
  • Runtime stop does not adopt the registered-work close contract; its existing timeout and detachment behavior remains unchanged.
  • Auth and settings service work, backend resources, and MCP shutdown remain with their existing owners.
  • Runtime transition tasks and recovery cutover remain separate lifecycle scopes.

Testing

  • swift test --build-system swiftbuild --no-parallel
  • Bounded runtime-stop and registered-work race tests repeated 25 times
  • scripts/check-compatibility.sh
  • ReviewMonitor xcodebuild test
  • Independent owner and scope audits

Screenshots

Not applicable.

Centralize admission and ordered draining for registered Store work. Join review cleanup, network debounce, account, and rate-limit tasks without timeout detachment while preserving typed failure and terminal semantics.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@lynnswap lynnswap changed the title refactor(store): own registered work lifecycle Own registered Store work lifecycle Aug 22, 2026
@lynnswap

Copy link
Copy Markdown
Owner 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: 10f5f73ed2

ℹ️ 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 Sources/CodexReview/Store/CodexReviewStoreCancellation.swift Outdated
Restore the established runtime-stop detachment and bounded-drain boundary while keeping ReviewStoreWorkRegistry scoped to explicit package-internal registered-work closure. Cover cancellation-ignoring backend work without extending the shutdown timeout.
@lynnswap

Copy link
Copy Markdown
Owner 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: eb8c2c9379

ℹ️ 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 Sources/CodexReview/Store/CodexReviewStoreReviews.swift Outdated
@lynnswap

Copy link
Copy Markdown
Owner 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: 6761f1ca15

ℹ️ 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 Sources/CodexReview/Store/CodexReviewStore.swift
Comment thread Sources/CodexReview/Store/CodexReviewStore.swift Outdated
Comment thread Sources/CodexReview/Store/CodexReviewStoreReviews.swift
@lynnswap

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@lynnswap

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@lynnswap

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@lynnswap

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: c4dd3d76a2

ℹ️ 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".

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