Implement export pre-flight checks #29

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

Context

Export is the payoff for all the review work, and it is the one operation that produces
files the user will keep and rely on. Spec section 12.2 defines pre-flight checks that
must run before any file is written, because an export that quietly includes unresolved
photos undermines the trust the whole review process exists to build.

Scope

The pre-flight check service that validates and reports on an export set before execution.

Implementation notes

  • Checks per spec section 12.2:
    • confirm the export mode
    • exclude disputed photos
    • exclude unresolved duplicates from the export set
    • ensure every file selected for dated export has an approved decision
    • confirm output directory and overwrite policy
  • Return a structured report the UI can render: counts per category, the reasons for each
    exclusion, and any blocking conditions. A reviewer should see exactly what will and will
    not be exported before committing.
  • Distinguish blocking problems (no write permission on the output directory, insufficient
    disk space for the estimated size) from informational exclusions (12 photos undated).
  • Estimate output size and check free space up front. Running out of disk halfway through
    an export leaves a partial output set that looks complete.
  • Pre-flight must be read-only — it must never mutate photo state or write files.
  • Warn when the output directory already contains a previous export, and surface the
    overwrite policy choice explicitly rather than defaulting to overwrite.

Done when

  • All spec section 12.2 checks are implemented
  • The report distinguishes blocking errors from informational exclusions
  • Disk space and permissions are validated before any write
  • Pre-flight has no side effects
  • Existing content in the output directory is detected and surfaced

References

  • docs/circa-spec.md section 12.2, section 6.6
  • backend/app/models/models.py (JobType.export)

Blocks: the export execution pipeline.

## Context Export is the payoff for all the review work, and it is the one operation that produces files the user will keep and rely on. Spec section 12.2 defines pre-flight checks that must run before any file is written, because an export that quietly includes unresolved photos undermines the trust the whole review process exists to build. ## Scope The pre-flight check service that validates and reports on an export set before execution. ## Implementation notes - Checks per spec section 12.2: - confirm the export mode - exclude disputed photos - exclude unresolved duplicates from the export set - ensure every file selected for dated export has an approved decision - confirm output directory and overwrite policy - Return a structured report the UI can render: counts per category, the reasons for each exclusion, and any blocking conditions. A reviewer should see exactly what will and will not be exported *before* committing. - Distinguish blocking problems (no write permission on the output directory, insufficient disk space for the estimated size) from informational exclusions (12 photos undated). - Estimate output size and check free space up front. Running out of disk halfway through an export leaves a partial output set that looks complete. - Pre-flight must be read-only — it must never mutate photo state or write files. - Warn when the output directory already contains a previous export, and surface the overwrite policy choice explicitly rather than defaulting to overwrite. ## Done when - [ ] All spec section 12.2 checks are implemented - [ ] The report distinguishes blocking errors from informational exclusions - [ ] Disk space and permissions are validated before any write - [ ] Pre-flight has no side effects - [ ] Existing content in the output directory is detected and surfaced ## References - `docs/circa-spec.md` section 12.2, section 6.6 - `backend/app/models/models.py` (`JobType.export`) Blocks: the export execution pipeline.
claude-bot added this to the v0.5.0 milestone 2026-07-28 04:57:28 +00:00
Sign in to join this conversation.
No description provided.