#0121 Direct Injection Mode #159

Merged
fuzzy merged 1 commit from feature/0121-direct-injection-mode into main 2026-07-06 08:04:53 +00:00
Owner

Adds direct SQLite3 database injection mode.

Changes:

  • src/hottea/cli.py--connect and --state-file flags, direct injection pipeline
  • tests/test_cli.py — 2 new tests for connect/state-file flags

New flags:

  • --connect PATH — inject records directly into a SQLite3 database
  • --state-file PATH — save last --end-date for resume capability

Features:

  • Direct INSERT via sqlite3 Python module (no file output needed)
  • Transaction management with automatic rollback on error
  • Progress reporting every 1000 records for large operations
  • State file tracks end-date for resuming from last cutoff
  • Resume hint printed after successful injection

Usage:

hottea --connect /path/to/forgejo.db --end-date 2024-12-31
hottea --connect /path/to/forgejo.db --end-date 2024-12-31 --state-file .hottea-state

Closes: #0121, #0117, #0118, #0119, #0120

Adds direct SQLite3 database injection mode. **Changes:** - `src/hottea/cli.py` — `--connect` and `--state-file` flags, direct injection pipeline - `tests/test_cli.py` — 2 new tests for connect/state-file flags **New flags:** - `--connect PATH` — inject records directly into a SQLite3 database - `--state-file PATH` — save last `--end-date` for resume capability **Features:** - Direct INSERT via `sqlite3` Python module (no file output needed) - Transaction management with automatic rollback on error - Progress reporting every 1000 records for large operations - State file tracks end-date for resuming from last cutoff - Resume hint printed after successful injection **Usage:** ```bash hottea --connect /path/to/forgejo.db --end-date 2024-12-31 hottea --connect /path/to/forgejo.db --end-date 2024-12-31 --state-file .hottea-state ``` **Closes:** #0121, #0117, #0118, #0119, #0120
feat(cli): add direct SQLite3 injection mode with --connect
All checks were successful
CI / lint-and-test (pull_request) Successful in 1m28s
5e2f8df878
Add direct database injection mode for hottea.

- --connect PATH: directly insert records into SQLite3 DB
- --state-file PATH: track last end-date for resume capability
- Progress reporting every 1000 records for large operations
- Transaction management: BEGIN/COMMIT with rollback on error
- Resume hint printed after successful injection

Closes #117, #118, #119, #120, #121
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-06 08:03:51 +00:00
the.auditor left a comment

Audit Review — PR #159

Clean direct injection mode implementation. All 5 issues (#0117-#0121) addressed. Uses parameterized queries for safety, proper transaction management with rollback on error, progress reporting at 1000-record intervals, state file for resume capability, and resume hint output.

Minor note: zip(all_actions, all_comments, strict=False) — using strict=True would catch list mismatch bugs. Not a blocking concern.

No suggestions — clean PR.

Summary

Result: COMMENT — no issues found.

## Audit Review — PR #159 Clean direct injection mode implementation. All 5 issues (#0117-#0121) addressed. Uses parameterized queries for safety, proper transaction management with rollback on error, progress reporting at 1000-record intervals, state file for resume capability, and resume hint output. Minor note: `zip(all_actions, all_comments, strict=False)` — using `strict=True` would catch list mismatch bugs. Not a blocking concern. No suggestions — clean PR. ## Summary **Result:** COMMENT — no issues found.
the.auditor left a comment

APPROVED. Direct injection mode completes the roadmap. Merge when ready.

APPROVED. Direct injection mode completes the roadmap. Merge when ready.
fuzzy merged commit 5e2f8df878 into main 2026-07-06 08:04:53 +00:00
fuzzy deleted branch feature/0121-direct-injection-mode 2026-07-06 08:04:53 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/hottea!159
No description provided.