Skip to content

CLI testing: scripted QA + manual verification of export/browse commands #27

@timon0305

Description

@timon0305

Problem

scripts/export.py is 984 lines and is a primary user entry point but has no end-to-end test. The CLI argument parser is tested, but actual export execution — markdown generation, zip archives, JSONL manifests, incremental export state — is untested. The script also has its own copies of resolve_workspace_path() (line 122), normalize_file_path() (line 135), to_epoch_ms() (line 150), extract_text_from_bubble() (line 198), and slug() (line 174) that diverge from the canonical versions in utils/. A user running python scripts/export.py --since all --out ./exports has no CI-verified assurance that the output is correct.

Severity

Medium · 3 points

Acceptance criteria

  • tests/test_cli_export_e2e.py (or tests/test_export_integration.py) exercises scripts/export.py main() against fixture data (reuses the tests/conftest.py fixture from Pytest coverage for conversation browsing API endpoints #26)
  • Coverage: zip mode output, no-zip mode output, --since last incremental behavior, manifest JSONL generation
  • Exported markdown files contain expected YAML frontmatter fields: log_id, title, workspace, created_at, updated_at
  • Manual QA checklist document (markdown file in tests/ or repo root) covering: server launch, export commands (--help, --out --no-zip, default zip, --since last), browse flow verification
  • App server launch (python app.py --port 3001) verified to start without errors and serve the home page
  • CI green
  • PR approved by at least 1 reviewer

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions