Skip to content

feat: add SlateDB trace history example - #501

Merged
alongubkin merged 14 commits into
mainfrom
alon/alien-584-add-slatedb-ai-trace-history-example
Aug 27, 2026
Merged

feat: add SlateDB trace history example#501
alongubkin merged 14 commits into
mainfrom
alon/alien-584-add-slatedb-ai-trace-history-example

Conversation

@alongubkin

Copy link
Copy Markdown
Member

Summary

  • add a portable AI trace-history data plane using Storage, Queue, replicated API readers, and a single SlateDB writer
  • add transactional indexes, durable acceptance, idempotent queue processing, pagination, and failure recording
  • make local Storage report unsupported object attributes through the standard object-store error so SlateDB can fall back correctly
  • include behavior tests and a deployed local end-to-end test

Verification

  • cargo nextest run -p slatedb-trace-store
  • cargo nextest run -p alien-bindings local_storage_rejects_object_attributes_without_writing_the_payload
  • cargo clippy -p slatedb-trace-store --all-targets --locked --no-deps -- -D warnings
  • pnpm exec tsc --noEmit
  • pnpm test

Linear: ALIEN-584

@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds a portable SlateDB-backed trace-history example with durable queue-based ingestion, indexed readers, failure recording, and local end-to-end coverage. It also updates local Storage to report unsupported object attributes using the standard object-store error.

  • Adds API and single-writer container deployment definitions across AWS, GCP, Azure, and local development.
  • Implements staged ingestion, transactional indexes, pagination, idempotent rejection records, and bounded queue-operation retries.
  • Adds Rust behavior tests, a deployed TypeScript integration test, and workspace configuration.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
examples/slatedb-trace-store/src/service.rs Implements durable ingestion and bounded queue retry behavior; the previously reported writer lifecycle and finalization-health behaviors are either corrected or explicitly documented as intentional.
examples/slatedb-trace-store/src/store.rs Implements SlateDB trace persistence, transactional secondary indexes, and paginated reads without an accepted blocking finding.
examples/slatedb-trace-store/src/keys.rs Defines primary, secondary-index, timestamp, and pagination-cursor encodings.
examples/slatedb-trace-store/alien.ts Declares the storage, queue, replicated API, and singleton writer resources for the portable example.
crates/alien-bindings/src/providers/storage/local.rs Returns the standard NotSupported object-store error for unsupported local object attributes, enabling SlateDB fallback behavior.
examples/slatedb-trace-store/tests/trace-store.test.ts Exercises the deployed local ingestion and trace-query workflow.

Sequence Diagram

sequenceDiagram
    participant Client
    participant API
    participant Storage
    participant Queue
    participant Writer
    participant SlateDB
    Client->>API: POST /v1/traces
    API->>Storage: Store canonical staged trace
    API->>Queue: Enqueue ingestion pointer
    API-->>Client: 202 Accepted
    Writer->>Queue: Receive pointer
    Writer->>Storage: Read and validate staged trace
    Writer->>SlateDB: Commit trace and indexes
    Writer->>Queue: Acknowledge delivery
    Writer->>Storage: Delete staging object
    Client->>API: GET trace or indexed page
    API->>SlateDB: Read latest visible state
    API-->>Client: Trace response
Loading

Reviews (14): Last reviewed commit: "fix: make rejection records idempotent" | Re-trigger Greptile

Comment thread examples/slatedb-trace-store/src/service.rs Outdated
Comment thread examples/slatedb-trace-store/src/service.rs Outdated
Comment thread examples/slatedb-trace-store/src/service.rs
Comment thread examples/slatedb-trace-store/src/service.rs Outdated
Comment thread examples/slatedb-trace-store/src/service.rs Outdated
Comment thread examples/slatedb-trace-store/src/service.rs Outdated
Comment thread examples/slatedb-trace-store/src/service.rs Outdated
Comment thread examples/slatedb-trace-store/src/service.rs Outdated
Comment thread examples/slatedb-trace-store/src/service.rs Outdated
Comment thread examples/slatedb-trace-store/src/service.rs Outdated
Comment thread examples/slatedb-trace-store/src/service.rs
@alongubkin
alongubkin merged commit 7240361 into main Aug 27, 2026
26 checks passed
@alongubkin
alongubkin deleted the alon/alien-584-add-slatedb-ai-trace-history-example branch August 27, 2026 01:22
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