Expose stream payloads and deployment pipeline#31
Conversation
|
Warning Review limit reached
Next review available in: 6 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR introduces CI/CD workflows and deployment infrastructure, a runtime .env loader, a continuous streams indexer runtime loop with start-ledger/cursor resolution, and a canonical stream snapshot model with raw/readable event payloads persisted via migrations, storage helpers, event handlers, and exposed through the GraphQL API. ChangesCI/CD and Deployment Infrastructure
Runtime Environment File Loading
Streams Indexer Runtime Loop and Event Fetching
Canonical Stream Snapshot and Readable Payloads
Estimated code review effort: 4 (Complex) | ~75 minutes Sequence Diagram(s)sequenceDiagram
participant EventSource as SorobanEventSource
participant Handler as EventHandler
participant ReadablePayload as readablePayload.ts
participant EventStorage as EventTableStorage
participant StreamStorage as StreamStorage
participant API as GraphQL API
EventSource->>Handler: dispatch StreamIndexerEvent
Handler->>ReadablePayload: createReadablePayload(event)
ReadablePayload-->>Handler: payloadReadable
Handler->>EventStorage: insert(record with payload/payloadReadable)
Handler->>StreamStorage: updateStreamSnapshot(id, patch)
StreamStorage-->>Handler: updated StreamEntity
API->>EventStorage: select payload, payload_readable
API->>StreamStorage: select stream snapshot columns
API-->>API: map rows to GraphQL fields (payloadReadable, snapshot fields)
sequenceDiagram
participant Main as streams/main.ts
participant Runtime as StreamIndexerRuntime
participant App as StreamIndexerApp
participant Cursor as CursorRepository
participant Soroban as SorobanRpcEventClient
Main->>Runtime: run()
loop until closed
Runtime->>App: runOnce()
App->>App: resolveStartLedger()
App->>Soroban: getLatestLedger()
Soroban-->>App: latestLedger
App->>Cursor: ensureStreamCursorFloor(startLedger)
App->>App: runStreamIndexerBatch(startLedger)
Runtime->>Runtime: waitForPollInterval(pollIntervalMs)
end
Main->>Runtime: close() on SIGINT/SIGTERM
Runtime-->>Main: run() resolves
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Summary
Verification
Summary by CodeRabbit
New Features
Bug Fixes