Skip to content

Add backup JSONL output and fix terminal rendering - #14

Merged
tijs merged 2 commits into
mainfrom
feat/issue-13-backup-json-renderer
Aug 24, 2026
Merged

Add backup JSONL output and fix terminal rendering#14
tijs merged 2 commits into
mainfrom
feat/issue-13-backup-json-renderer

Conversation

@tijs

@tijs tijs commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • add attic backup --json as a schema-versioned JSON Lines progress stream with exactly one final completion event
  • keep JSON stdout free of ANSI, filenames, paths, raw provider errors, migration text, hook output, and other human diagnostics
  • preserve backup exit behavior and success/failure hooks while routing hook stdout to stderr in JSON mode
  • serialize terminal callback rendering into immutable, width-aware frames; track actual frame height, clear stale rows, and make failure/cancellation cleanup idempotent
  • leave stdin terminal modes unchanged so SIGINT/SIGTERM cannot strand the terminal in raw/no-echo mode
  • document the stable event/count/bytes/pause/concurrency/final-result contract and compatibility with status --json and human output

Related to #13. The issue is intentionally left open for validation.

Verification

  • swift test --filter BackupJSONProgressTests — 7 tests passed
  • swift test --filter BackupCommandFlowTests — 6 tests passed
  • swift test --filter TerminalRendererTests — 9 tests passed
  • swift test — 323 tests in 49 suites passed
  • swift build -c release — passed
  • swiftformat . --lint — passed; 0 files require formatting
  • swiftlint lint --quiet — exit 0; 9 warnings, identical to the base commit
  • git diff --check — passed
  • release CLI backup --help — verified --json usage and help text
  • bounded PTY harness — normal redraw path emitted 64 ANSI sequences, handled a long filename, and restored terminal state
  • bounded SIGINT PTY harness — process exited on SIGINT with ECHO/ICANON unchanged

@tijs
tijs merged commit e7e72c8 into main Aug 24, 2026
4 checks passed
@tijs
tijs deleted the feat/issue-13-backup-json-renderer branch August 24, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant