Skip to content

feat: implement CLI core — database, broker trait, and commands#7

Merged
thomasnemer merged 2 commits into
mainfrom
feat/cli-core-implementation
Feb 21, 2026
Merged

feat: implement CLI core — database, broker trait, and commands#7
thomasnemer merged 2 commits into
mainfrom
feat/cli-core-implementation

Conversation

@thomasnemer

Copy link
Copy Markdown
Contributor

Summary

  • SQLite database with WAL mode, migrations, and full CRUD for brokers, personal records, and deletion requests
  • BrokerConnector async trait with DummyBroker reference implementation returning fake data for end-to-end testing
  • Full CLI command tree via clap derive: registry update/info, broker list/info, scan, delete, status, report
  • Report generation in three formats: terminal (comfy-table), JSON (serde_json), and HTML
  • Remote registry fetch from GitHub raw JSON, upserting into local DB
  • 8 unit tests covering DB migrations, CRUD operations, connector registry, and DummyBroker trait calls

Test plan

  • cargo build compiles cleanly
  • cargo test — 8/8 tests pass
  • cargo clippy — no warnings (except expected dead_code for AppError and open_in_memory)
  • cargo fmt --check — passes
  • data-breaker --help — shows all commands
  • data-breaker scan --first-name Test --last-name User — DummyBroker returns records, stored in DB, displayed as table
  • data-breaker delete --all — submits deletion via DummyBroker
  • data-breaker status — shows deletion request statuses
  • data-breaker report --format json --output /tmp/report.json — valid JSON
  • data-breaker report --format html --output /tmp/report.html — valid HTML

…/report commands

- Add SQLite database with migrations for brokers, personal records, and deletion requests
- Define async BrokerConnector trait with DummyBroker reference implementation
- Implement full CLI command tree: registry, broker, scan, delete, status, report
- Add report generation in terminal (comfy-table), JSON, and HTML formats
- Remote registry fetch from GitHub for broker definitions
- 8 unit tests covering DB CRUD, migrations, connector registry, and DummyBroker
Mark open_in_memory as #[cfg(test)] and allow(dead_code) on AppError
which will be used as connectors are added.
@thomasnemer thomasnemer enabled auto-merge (squash) February 21, 2026 17:45
@thomasnemer thomasnemer merged commit b0600a3 into main Feb 21, 2026
1 check passed
@thomasnemer thomasnemer deleted the feat/cli-core-implementation branch February 21, 2026 17:46
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