Skip to content

Add a versioned atomic current-snapshot format #586

Description

@JAORMX

Part of #583. Depends on the bounded legacy reader.

Problem

Every jsonlstore Save appends the entire aggregate snapshot. Repeated saves make storage grow approximately with the sum of every historical full snapshot.

Acceptance criteria

  • Define a versioned v2 current-snapshot representation using same-directory temp write, file sync, atomic rename, and directory sync where supported.
  • Repeatedly saving a same-sized session keeps steady-state snapshot storage bounded to roughly one current snapshot.
  • Existing tool/event sidecars remain append-only and intact.
  • Crash injection around write/sync/rename always leaves the old or new committed snapshot readable.
  • Disk-full preserves the prior committed snapshot.
  • v1 remains readable; successful saves may lazily promote v1.
  • All sessnap fields, owner, kind, logical modified time, profile/selectors, environment ref, and usage survive byte-equivalent logical round-trip.
  • unknown remains unknown.
  • Add a new ADR covering durability and cross-process coordination.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions