Skip to content

feat(collaboration): persist operation checkpoint cursors (#3067) - #3121

Draft
mikemcdougall wants to merge 2 commits into
trunkfrom
codex/issue3067-durable-cursor
Draft

feat(collaboration): persist operation checkpoint cursors (#3067)#3121
mikemcdougall wants to merge 2 commits into
trunkfrom
codex/issue3067-durable-cursor

Conversation

@mikemcdougall

Copy link
Copy Markdown
Collaborator

Pull Request

Issue Link

Related to #3067

Summary

Adds the durable saved-map operation-log and checkpoint-cursor storage foundation in one Postgres store. This is an intentionally draft, independently reviewable slice: wiring SavedMapCheckpointOperationLog into this store and proving restart behavior end to end remains stacked on PR #3035.

Changes Made

  • Add combined Postgres operation-log and checkpoint-cursor persistence with migration 092.
  • Add repository contracts, in-memory parity, and dependency-injection registration.
  • Add focused cursor/replay unit coverage and Postgres restart/pruned-prefix integration coverage.

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Architecture tests pass
  • Manual testing performed

Postgres Release build passed with zero warnings/errors; focused Core tests passed 11/11; targeted format verification and diff checks passed. Docker Desktop is unavailable on this host, so the two Postgres integration cases compiled but could not execute their assertions locally.

Gate Impact

  • PR gates (build, test, governance)
  • Nightly gates (conformance, performance, security)
  • Release gates (packaging, publishing)
  • Deploy gates (promotion, post-apply validation)
  • None ? no gate impact

Docs or Contract Impact

  • OpenAPI spec changed
  • Protobuf/gRPC contract changed
  • Control plane SDK surface changed
  • Documentation updated
  • None ? no docs or contract impact

Release/Deploy Impact

  • Requires coordinated release across repos
  • Requires database migration
  • Requires infrastructure changes
  • Requires environment variable or secret changes
  • None ? standard merge-and-release flow

Breaking Changes

None


Pre-PR Checklist

  • Ran scripts/ci/pre-pr-check.sh and all checks passed
  • Commit messages follow conventional format: type: description (#issue)
  • PR title matches main commit message
  • Issue number linked above
  • Tests added for new functionality
  • If protocol/auth behavior changed: updated compatibility contract
  • If breaking admin/control-plane API changes: updated migration guide
  • If breaking gRPC/proto wire changes: confirmed with explicit review

@mikemcdougall

Copy link
Copy Markdown
Collaborator 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: b1539e76bb

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

-- The head row is the per-map serialization point for cursor assignment. Keeping the
-- checkpoint cursor on that same row gives operation replay and checkpoint replay one
-- durability/locking story instead of pairing a durable log with process-local state.
CREATE TABLE IF NOT EXISTS honua.saved_map_operation_log_heads (

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Create operation-log tables in the configured schema

When Database:Schema is set to anything other than honua, the new DI registration passes that value to PostgresSavedMapOperationLogRepository, so every query targets the configured schema, but this migration still creates both tables only in honua. The migration therefore reports success while the first append or replay fails with relation does not exist; notably, the integration test avoids the production behavior by manually replacing honua. in the script. The migration and repository need to agree on the schema.

Useful? React with 👍 / 👎.

@mikemcdougall

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: f332f9e2c2

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