Implement export folder organization and manifest generation #32

Open
opened 2026-07-28 04:57:30 +00:00 by claude-bot · 0 comments

Context

Spec sections 12.4 and 12.6 define the output layout and the manifest. The manifest is the
artifact that makes an export verifiable — the acceptance criterion is that it is
sufficient to verify every exported file.

Scope

Dated folder organization and manifest.csv generation.

Implementation notes

  • Folder structure per spec section 12.4:
    • 1983/1983-06/ for month precision
    • 1983/1983-unknown-month/ for year precision
    • 1980s-unknown-year/ for decade precision
    • undated/ only in include_unapproved mode
  • Filename collisions across source albums are inevitable in a large collection. Define a
    deterministic disambiguation rule — never overwrite a file already written in this run,
    and record the original filename in the manifest either way.
  • manifest.csv columns exactly per spec section 12.6: filename, original_filename,
    export_mode, decision_state, approved_date_low, approved_date_high, precision,
    approved_by, sha256_original, sha256_exported.
  • Write the manifest incrementally or flush it on abort, so an interrupted export still
    documents what it produced.
  • Quote and escape CSV correctly — filenames and labels can contain commas and quotes.
  • Include a run summary: export mode, timestamp, counts, and any files excluded with reasons.
  • A user with only the output directory should be able to verify every file's integrity
    from the manifest alone, with no access to the Circa database.

Done when

  • Folder structure matches spec section 12.4 exactly, including the unknown-month and unknown-year cases
  • Filename collisions are resolved deterministically without data loss
  • manifest.csv carries every specified column with correct escaping
  • An aborted export still leaves a manifest of what was written
  • Every exported file can be verified from the manifest alone

References

  • docs/circa-spec.md sections 12.4, 12.6

Depends on: export execution, the EXIF writing pipeline.

## Context Spec sections 12.4 and 12.6 define the output layout and the manifest. The manifest is the artifact that makes an export verifiable — the acceptance criterion is that it is sufficient to verify every exported file. ## Scope Dated folder organization and `manifest.csv` generation. ## Implementation notes - Folder structure per spec section 12.4: - `1983/1983-06/` for month precision - `1983/1983-unknown-month/` for year precision - `1980s-unknown-year/` for decade precision - `undated/` only in `include_unapproved` mode - Filename collisions across source albums are inevitable in a large collection. Define a deterministic disambiguation rule — never overwrite a file already written in this run, and record the original filename in the manifest either way. - `manifest.csv` columns exactly per spec section 12.6: `filename`, `original_filename`, `export_mode`, `decision_state`, `approved_date_low`, `approved_date_high`, `precision`, `approved_by`, `sha256_original`, `sha256_exported`. - Write the manifest incrementally or flush it on abort, so an interrupted export still documents what it produced. - Quote and escape CSV correctly — filenames and labels can contain commas and quotes. - Include a run summary: export mode, timestamp, counts, and any files excluded with reasons. - A user with only the output directory should be able to verify every file's integrity from the manifest alone, with no access to the Circa database. ## Done when - [ ] Folder structure matches spec section 12.4 exactly, including the unknown-month and unknown-year cases - [ ] Filename collisions are resolved deterministically without data loss - [ ] `manifest.csv` carries every specified column with correct escaping - [ ] An aborted export still leaves a manifest of what was written - [ ] Every exported file can be verified from the manifest alone ## References - `docs/circa-spec.md` sections 12.4, 12.6 Depends on: export execution, the EXIF writing pipeline.
claude-bot added this to the v0.5.0 milestone 2026-07-28 04:57:30 +00:00
Sign in to join this conversation.
No description provided.