SCE trace sync - #200
Open
davidabram wants to merge 9 commits into
Open
Conversation
The Agent Trace control-plane endpoint lacked a configurable runtime setting, preventing the upcoming sync command from using the repository’s established configuration precedence. Add the shared auth-adjacent resolver entry with environment, config-file, and baked-default sources, expose provenance in config output, and enforce the non-empty schema contract. Record the resolved contract and T01 implementation evidence for downstream sync work.\n\nPlan: agent-trace-sync T01 Co-authored-by: SCE <sce@crocoder.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Define typed serde contracts for ingestion state and batch endpoints, including exact stream wire values and generic batch payloads for all four export row types. Add shape tests to protect the camelCase request/response fields and stream identifiers used by the control plane.\n\nPlan: agent-trace-sync.md, T02 Co-authored-by: SCE <sce@crocoder.dev>
Add credential-backed ingestion HTTP operations with token reuse, refresh-on-expiry, bounded 401 retry, typed response classification, and state retry handling. Cover behavior with an in-repo HTTP test server and focused tests, while keeping batch retries under sync engine scope.\n\nPlan: agent-trace-sync (T03) Co-authored-by: SCE <sce@crocoder.dev>
Add a generic per-stream batching engine that validates accepted counts and server cursors before advancing, including support for all four export row types. Reconcile conflicts and ambiguous outcomes from a refreshed authoritative cursor with a bounded retry counter, preserving gapped source IDs and avoiding unnecessary resends.\n\nPlan: agent-trace-sync (T04) Co-authored-by: SCE <sce@crocoder.dev>
Expose \ through clap/runtime dispatch and synchronize the four Agent Trace capture streams from authoritative control-plane cursors. Reuse repository-scoped storage and WorkOS credentials, distinguish terminal failures from retryable reconciliation, and cover full, incremental, and forbidden-response behavior with end-to-end tests.\n\nPlan: agent-trace-sync, T05 Co-authored-by: SCE <sce@crocoder.dev>
Replace the provisional debug dump from "sce trace sync" with concise text output and the documented camelCase JSON report, including per-stream upload and cursor details. Add focused renderer coverage and document the completed command architecture and recovery behavior across the CLI context. Plan: agent-trace-sync.md (T06, T07) Co-authored-by: SCE <sce@crocoder.dev>
Reject out-of-range state cursors and persist refreshed credentials from a single expiry decision. Sanitize control-plane error messages and classify unsupported client statuses as terminal, while preserving reconciliation for ambiguous batch failures. Add regression coverage and document recovery behavior. Plan: agent-trace-sync-hardening Tasks: T01, T02, T03, T04 Co-authored-by: SCE <sce@crocoder.dev>
davidabram
force-pushed
the
sce-trace-sync
branch
from
August 11, 2026 08:36
213e5f1 to
89f485f
Compare
Synchronous Turso database calls previously invoked Runtime::block_on directly, which panics when an async caller already drives a Tokio runtime on the current thread. Detect that context and run the blocking future on a scoped dedicated thread, preserving direct execution for non-runtime callers across migration, connection, and query paths. Co-authored-by: SCE <sce@crocoder.dev>
CredentialStore operations can initialize the encrypted auth database and Linux Secret Service through blocking APIs that create a Tokio runtime. Calling them directly from control-plane requests caused sce trace sync to panic with a nested-runtime error.\n\nRun credential persistence through spawn_blocking while leaving HTTP and token refresh asynchronous, and add regression coverage for the runtime boundary. Co-authored-by: SCE <sce@crocoder.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.