Skip to content

fix: distinguish shared extraction coordination from project access - #539

Merged
guangyu-reflexio merged 1 commit into
mainfrom
team/project-retention-binding
Sep 26, 2026
Merged

guangyu-reflexio merged 1 commit into
mainfrom
team/project-retention-binding

Conversation

@guangyu-reflexio

@guangyu-reflexio guangyu-reflexio commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extraction leases and backlog discovery access the shared learning_work scheduler table without a project. Distinguish these operations from project-data access so storage adapters can apply accurate project-binding diagnostics.

Changes

Add a private coordination flag to the extraction SQL adapter seam and pass it only from the seven shared-table operations. SQLite accepts the flag without changing its locking or transactions; ordinary extraction operations keep the default path.

Test Plan

  • 30 extraction-stream storage contract tests passed against SQLite.
  • Scoped Ruff, formatting, and Pyright passed.
  • Reviewed every coordination caller for shared-table-only access.

Summary by CodeRabbit

  • Bug Fixes
    • Improved coordination for extraction stream operations, including lease handling, organization discovery, backlog checks, and setup deferrals. Read-only operations retain their existing behavior.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 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-26T08:52:59.800967Z c6d0a22 Manual request
🔒 Security Review ✅ Completed 2026-09-26T08:50:41.678797Z c6d0a22 PR opened
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: ReflexioAI/reflexio/.coderabbit.yaml

Review profile: CHILL

Plan: Essentials

Run ID: 0d661214-afa6-47f3-a750-35a61eca0042

📥 Commits

Reviewing files that changed from the base of the PR and between 17623f8 and c6d0a22.

📒 Files selected for processing (2)
  • reflexio/server/services/storage/sqlite_storage/_extraction_stream.py
  • reflexio/server/services/storage/storage_base/_extraction_stream.py

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 1 remain after this review. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC.


📝 Walkthrough

Walkthrough

The extraction stream SQL context methods now accept a coordination flag. Lease, discovery, backlog-age, and manual lease operations use coordination-mode contexts.

Changes

Extraction stream coordination

Layer / File(s) Summary
Add the coordination parameter
reflexio/server/services/storage/storage_base/_extraction_stream.py, reflexio/server/services/storage/sqlite_storage/_extraction_stream.py
Both SQL context methods accept a coordination keyword argument. SQLite does not use it to select a separate role.
Enable coordination for extraction operations
reflexio/server/services/storage/storage_base/_extraction_stream.py
Lease claim and renewal, organization discovery, backlog-age reads, and manual lease actions enable coordination mode. Discovery and backlog-age reads retain read-only mode.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to c6d0a

The coordination calls are compatible with the supported storage implementation; no actionable merge risk remains after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: separating shared extraction coordination from project access through a coordination flag.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@guangyu-reflexio

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: c6d0a2262f

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

@guangyu-reflexio
guangyu-reflexio merged commit 6dfc75d into main Sep 26, 2026
5 checks passed
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