Skip to content

Turso sync#45

Open
davidabram wants to merge 5 commits into
mainfrom
turso-sync
Open

Turso sync#45
davidabram wants to merge 5 commits into
mainfrom
turso-sync

Conversation

@davidabram
Copy link
Copy Markdown
Member

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Warning

Rate limit exceeded

@davidabram has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 45b498d0-7011-43c9-af5e-133beb552652

📥 Commits

Reviewing files that changed from the base of the PR and between 5506feb and 94d0ffd.

⛔ Files ignored due to path filters (8)
  • cli/Cargo.lock is excluded by !**/*.lock
  • context/architecture.md is excluded by !context/**/*.md
  • context/context-map.md is excluded by !context/**/*.md
  • context/glossary.md is excluded by !context/**/*.md
  • context/overview.md is excluded by !context/**/*.md
  • context/plans/turso-sync-adapter.md is excluded by !context/**/*.md
  • context/sce/agent-trace-db.md is excluded by !context/**/*.md
  • context/sce/shared-turso-db.md is excluded by !context/**/*.md
📒 Files selected for processing (11)
  • cli/Cargo.toml
  • cli/src/cli_schema.rs
  • cli/src/services/agent_trace_db/lifecycle.rs
  • cli/src/services/command_registry.rs
  • cli/src/services/config/mod.rs
  • cli/src/services/db/mod.rs
  • cli/src/services/mod.rs
  • cli/src/services/parse/command_runtime.rs
  • cli/src/services/sync/command.rs
  • cli/src/services/sync/mod.rs
  • flake.nix
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch turso-sync

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

davidabram and others added 4 commits May 20, 2026 12:13
Add `features = ["sync"]` to the turso Cargo dependency so the
turso::sync module is available at compile time.

Co-authored-by: SCE <sce@crocoder.dev>
…stants

These `pub(crate)` constants follow the established pattern from
observability env keys (LOG_LEVEL_ENV_KEY, etc.) and are the
configuration seam for dual-mode TursoDb initialization.

Co-authored-by: SCE <sce@crocoder.dev>
Extend TursoDb<M> to support Turso Cloud sync mode via
turso::sync::Builder::new_remote() when both SCE_SYNC_URL and
SCE_SYNC_TOKEN are set. Sync-mode methods (push/pull/checkpoint/stats)
are explicit — no auto-push from execute().

Wire a user-invocable sce sync push|pull CLI command behind the new
sync module (cli/src/services/sync/), connected through clap schema,
command registry, and parse runtime dispatch.

Remove the unused SYNC_PUSH_THRESHOLD_ENV_KEY constant and write-counter
auto-push approach from the earlier design.

Co-authored-by: SCE <sce@crocoder.dev>
AgentTraceDbLifecycle::setup now captures the AgentTraceDb::new() result
and performs an initial pull() when sync mode is active (both SCE_SYNC_URL
and SCE_SYNC_TOKEN set). The pull is best-effort — remote failure is logged
via tracing::warn! and setup continues without error.

Co-authored-by: SCE <sce@crocoder.dev>
Allow database specs to opt in to Turso Cloud sync and enable it for the
Agent Trace DB. Disable empty remote bootstrapping for sync connections and
use non-AUTOINCREMENT integer primary keys for compatibility with synced
trace tables.

Co-authored-by: SCE <sce@crocoder.dev>
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