Skip to content

CLI export exits successfully with invalid archive for large SQLite site #4189

Description

@chubes4

Problem

While validating draft PR #3997 against a real, large Studio site before SQLite-to-MySQL conversion, the supported full-site export command exited successfully with no diagnostic but produced an invalid archive.

Reproduction

Integration build: current origin/trunk plus PR #3997, commit 3e547db03 in a managed test worktree.

node apps/cli/dist/cli/main.mjs export 
  /Users/.../intelligence-chubes4-full.zip 
  --path /Users/.../intelligence-chubes4 
  --mode full

Source SQLite database size: 19,880,640,512 bytes.
Produced archive size: 8,440 bytes.

Validation:

End-of-central-directory signature not found
unzip: cannot find zipfile directory

The command returned success and printed no warning/error. The source site remained unchanged.

Expected

A successful export produces a readable full-site archive. Any interrupted, unsupported, capacity-limited, or failed export exits non-zero, removes/marks the partial artifact, and reports the failing phase with actionable diagnostics.

Why this matters for #3997

studio convert --to mysql is intentionally being validated first against a clone with a verified rollback artifact. Silent export corruption makes the documented safe migration path appear ready when no usable rollback exists.

Acceptance criteria

  • Large SQLite full exports produce a valid archive or fail non-zero.
  • Partial archives are never reported as successful.
  • Export performs a final archive-integrity check before success.
  • Regression coverage includes an interrupted/failed archive stream and bounded large-file behavior.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenAI GPT-5.6 Sol via OpenCode
  • Used for: Integrating Add MySQL proof of concept #3997 with current trunk, running the migration preflight, and capturing deterministic export evidence.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions