Steve Yegge
efb56e9dd8
refactor: Break up 280-line flushToJSONLWithState into focused helpers (bd-9hc9)
...
Extracted 8 helper functions from the monolithic flushToJSONLWithState:
- recordFlushFailure/recordFlushSuccess: Failure tracking and counter management
- readExistingJSONL: Parse existing JSONL file for incremental merging
- fetchAndMergeIssues: Fetch dirty issues from DB and merge into map
- filterWisps: Remove ephemeral (wisp) issues from export
- filterByMultiRepoPrefix: Multi-repo prefix filtering for non-primary repos
- updateFlushExportMetadata: Store hashes and timestamps after export
- getIssuesToExport: Determine full vs incremental export issue list
Main function now reads as a clear pipeline:
1. Validate integrity -> 2. Get issues -> 3. Read existing JSONL
4. Merge from DB -> 5. Filter wisps -> 6. Filter by prefix
7. Write atomically -> 8. Update metadata
Benefits:
- Each helper is single-responsibility and testable
- Main function reduced from ~280 to ~94 lines
- Logic is clearly separated and documented
- Easier to understand and maintain
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-28 16:23:45 -08:00
..
2025-12-28 10:05:16 -08:00
2025-12-23 22:40:16 -08:00
2025-12-27 22:33:05 -08:00
2025-12-24 00:06:41 -08:00
2025-12-23 04:16:26 -08:00
2025-12-28 10:06:08 -08:00
2025-12-27 16:21:08 -08:00
2025-12-27 16:21:08 -08:00
2025-12-28 01:56:53 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 16:23:45 -08:00
2025-12-28 10:05:16 -08:00
2025-12-24 00:06:41 -08:00
2025-12-28 10:05:16 -08:00
2025-12-27 16:02:15 -08:00
2025-12-23 01:56:19 -08:00
2025-12-28 13:52:21 -08:00
2025-12-24 00:08:10 -08:00
2025-12-28 10:05:16 -08:00
2025-12-24 00:06:41 -08:00
2025-12-25 18:40:15 -08:00
2025-12-28 16:15:17 -08:00
2025-12-23 12:06:42 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 10:05:16 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 02:11:13 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 10:05:16 -08:00
2025-12-24 00:06:41 -08:00
2025-12-28 10:05:16 -08:00
2025-12-24 00:06:41 -08:00
2025-12-24 00:06:41 -08:00
2025-12-24 00:06:41 -08:00
2025-12-27 16:02:15 -08:00
2025-12-24 12:43:18 -08:00
2025-12-27 16:02:15 -08:00
2025-12-24 00:06:41 -08:00
2025-12-28 10:05:16 -08:00
2025-12-24 00:06:41 -08:00
2025-12-28 10:05:16 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 13:52:21 -08:00
2025-12-27 16:02:15 -08:00
2025-12-24 00:06:41 -08:00
2025-12-28 10:05:16 -08:00
2025-12-24 13:03:27 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 10:05:16 -08:00
2025-12-23 01:56:19 -08:00
2025-12-28 10:05:16 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 10:59:02 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 10:05:16 -08:00
2025-12-25 13:56:19 -08:00
2025-12-24 00:07:52 -08:00
2025-12-24 00:06:41 -08:00
2025-12-28 10:05:16 -08:00
2025-12-23 01:56:19 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 10:05:16 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-24 00:06:41 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 10:05:16 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 10:05:16 -08:00
2025-12-23 01:56:19 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 13:52:21 -08:00
2025-12-28 13:52:21 -08:00
2025-12-28 13:52:21 -08:00
2025-12-28 13:52:21 -08:00
2025-12-28 13:52:21 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 02:11:13 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-23 03:57:08 -08:00
2025-12-28 02:11:13 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 10:05:16 -08:00
2025-12-27 17:23:45 -08:00
2025-12-27 17:23:45 -08:00
2025-12-28 10:05:16 -08:00
2025-12-27 21:33:01 -08:00
2025-12-28 10:05:16 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 13:52:21 -08:00
2025-12-27 22:24:19 -08:00
2025-12-27 22:24:19 -08:00
2025-12-27 16:21:08 -08:00
2025-12-27 16:02:15 -08:00
2025-12-24 00:06:41 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 10:05:16 -08:00
2025-12-24 00:10:14 -08:00
2025-12-24 00:10:14 -08:00
2025-12-25 12:05:46 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 10:05:16 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 10:05:16 -08:00
2025-12-24 23:33:34 -08:00
2025-12-28 10:05:16 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:08:34 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 10:59:02 -08:00
2025-12-27 21:27:44 -08:00
2025-12-28 10:05:16 -08:00
2025-12-28 01:07:38 -08:00
2025-12-27 16:02:15 -08:00