Skip to content

[TASK] Session manifest lifecycle (.partial -> .json) + startup reconcile #53

@kirich1409

Description

@kirich1409

Context

Lifecycle: create .json.partial at start, update counts per item, atomic rename to .json on finalize. On startup, orphan .partial files are marked aborted and counts are recomputed from JSONL by sessionId.

Acceptance criteria

  • AC-22 passes.
  • Crash-injection test produces .partial, then reconcile yields status=aborted and correct counts.

Files to touch (estimate)

best-effort estimate; agent refines during implementation

Implementation notes

  • JSONL is authoritative; manifest is derived.

Dependencies

Safety checklist

See .github/ISSUE_TEMPLATE/task.yml — tick applicable invariants in the issue if any destructive path is touched.

Definition of Done

  • Acceptance criteria satisfied and verifiable
  • Tests added or updated
  • No build / lint / test regressions
  • Self-review against research-report invariants
  • Code review approved

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:historyDeletion history, RemovalLoggertype:taskConcrete implementation task

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions