Skip to content

Make incremental indexing and snapshot publication atomic #910

Description

@TheGreenCedar

Parent: #899

Finding

The live incremental database, edge resolution, grounding snapshots, and search snapshots do not share one commit boundary. A cancellation or late error can publish a graph state that no completed run owns.

Evidence

  • crates/codestory-runtime/src/lib.rs:10718
  • crates/codestory-indexer/src/lib.rs:1084
  • crates/codestory-store/src/storage_impl/mod.rs:1192
  • Full refresh already stages and promotes a separate database

Acceptance Criteria

  • Incremental work writes to an isolated staging/savepoint boundary.
  • Projection, cleanup, resolution, semantic docs, and derived snapshots finalize before publication.
  • Cancellation/error discards staging and leaves last-known-good state readable.
  • Publication has one durable generation/run identity.
  • Fault injection covers every transition.
  • The v0.14.3 incomplete-run compatibility marker migrates safely.

Verification

  • Crash/cancel matrix across every phase
  • Concurrent readers see only old or fully new generation
  • Full and incremental fidelity/regression suites
  • Repo-scale timing evidence

Non-Goals

  • Do not retain partial-success semantics for production publication.
  • Do not rewrite the graph contracts unnecessarily.

Metadata

  • Release: v0.15.0
  • Area: Index architecture
  • Priority: P1
  • Wave: Next

Implementation Slices

Workstreams

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic:grounding-runtimev0.14.3 stabilization and v0.15 grounding/runtime rewriteepic:sidecar-provenanceSidecar provenance, freshness, and manifest workphase:next-waveActive next implementation wavepriority:p1Release blocker or high-risk reliability/security issuerelease:v0.15.0Planned for the v0.15.0 Grounding Runtime Rewrite releaserisk:publishable-blockerBlocks publishable benchmark or product claim readinesssaga:codestory-intelligenceCodeStory product-grade intelligence sagatype:refactorBehavior-preserving code reduction and refactoring work

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions