Skip to content

single tokio runtime - #300

Merged
davidabram merged 8 commits into
mainfrom
single-tokio-runtime
Oct 11, 2026
Merged

davidabram merged 8 commits into
mainfrom
single-tokio-runtime

Conversation

@davidabram

Copy link
Copy Markdown
Member

No description provided.

davidabram and others added 8 commits October 7, 2026 11:02
Document the staged migration to one application Tokio runtime while retaining synchronous lifecycle providers and the temporary Turso adapter. Cover the atomic app, auth, sync, credential-isolation, regression-test, and durable-context work needed to preserve existing CLI contracts and concurrency behavior.
Ref: context/plans/cli-single-tokio-runtime-pr1.md (T01, T02, T03, T04, T05)

Co-authored-by: SCE <sce@crocoder.dev>
Clarify the application-level runtime boundary, classify the narrowly justified database blocking scopes, and preserve the retained Turso bridge until PR2. Tighten async telemetry, resource-lifetime, test-boundary, packaging-validation, architecture, and acceptance guidance without implementing the migration.

Ref: context/plans/cli-single-tokio-runtime-pr1.md (T01, T02, T03, T04, T05)

Co-authored-by: SCE <sce@crocoder.dev>
Document that future telemetry must follow command future polling across multi-thread Tokio workers rather than hold thread-local tracing guards across `.await`. Tie T04 validation to future-aware subscriber attachment or intentional global installation while keeping PR1 NoopTelemetry unchanged.

Plan: cli-single-tokio-runtime-pr1 (T04)

Co-authored-by: SCE <sce@crocoder.dev>
Enable Tokio macros and the multi-thread runtime while retaining disabled default features and existing runtime support, preparing the application migration without changing the synchronous entrypoint or current-thread ownership in auth, sync, and Turso. Refresh the lockfile and Flatpak source metadata for tokio-macros and syn 3.0.6.

Plan: cli-single-tokio-runtime-pr1 (T01)

Co-authored-by: SCE <sce@crocoder.dev>
Activate one application-level multi-thread Tokio runtime for static command dispatch, auth, and sync instead of constructing command-local runtimes. Preserve synchronous Turso ownership with scoped blocking cleanup, and use awaited owned blocking closures for credential operations.

Update the runtime, capability, observability, sync, and command documentation to record the borrowing, telemetry, cleanup, and retained persistence boundaries. Complete T02 with focused build and auth/sync test evidence while leaving the PR2 persistence migration for follow-up.

Plan: `context/plans/cli-single-tokio-runtime-pr1.md`
Task: `T02`

Co-authored-by: SCE <sce@crocoder.dev>
Route auth credential load, save, and delete calls through one blocking-operation helper that preserves typed storage and worker-failure errors. Add multi-thread async regressions for dispatch, renewal fallback, credential isolation, and control-plane load/save behavior.

Plan: `cli-single-tokio-runtime-pr1` — T03

Co-authored-by: SCE <sce@crocoder.dev>
Add multi-thread lifecycle, telemetry-polling, output, hook-persistence, and sync-storage cleanup regressions at the real async command boundary. The tests preserve existing CLI contracts while covering awaited dispatch, repeat protection, and cleanup when work errors or is abandoned.

Plan: cli-single-tokio-runtime-pr1.md (T04)

Co-authored-by: SCE <sce@crocoder.dev>
Record the completed PR1 application-level Tokio runtime and static command dispatch across the architecture and CLI contract owners. Describe direct Auth/Sync awaits, the justified DB lifetime scopes, sync storage cleanup, retained Turso bridge, and the future PR2 async-Turso boundary while correcting ownership and telemetry annotations.

Complete plan `cli-single-tokio-runtime-pr1`, task T05, with the final runtime documentation and verification record.

Co-authored-by: SCE <sce@crocoder.dev>
@davidabram
davidabram force-pushed the single-tokio-runtime branch from 43ff3aa to c9306dc Compare October 7, 2026 11:49
@davidabram
davidabram added this pull request to stack #302 October 7, 2026 13:39
@davidabram
davidabram removed this pull request from stack #302 October 10, 2026 08:24
@davidabram
davidabram added this pull request to stack #312 October 10, 2026 08:24
@davidabram
davidabram removed this pull request from stack #312 October 10, 2026 22:50
@davidabram
davidabram added this pull request to stack #324 October 11, 2026 14:45
@davidabram
davidabram merged commit 06b6e4c into main Oct 11, 2026
11 checks passed
@davidabram
davidabram deleted the single-tokio-runtime branch October 11, 2026 14:48
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