Commit 2ad7b7f
feat: add greenlet dep, incremental SQLite saves during Phase 3 generation
Add greenlet>=3.0 to pyproject.toml to fix SQLAlchemy async engine on
Python 3.11 (greenlet._greenlet C extension was missing for 3.11).
Add incremental per-page SQLite persistence during Phase 3 so that a crash
in Phase 4 (persist step) does not lose all generated content:
- page_generator.generate_all(): accept optional async on_page_saved
callback, called immediately after each page is generated
- orchestrator.run_generation(): accept page_persister and wire it through
to generate_all(on_page_saved=page_persister)
- init_cmd._page_persister(): async function that upserts each page into
SQLite via the session factory already created for the CostTracker;
errors are logged but do not abort generation
The final batch persist (Phase 4) is idempotent (upsert), so pages saved
incrementally are simply no-ops on the second write.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent a9295df commit 2ad7b7f
4 files changed
Lines changed: 26 additions & 0 deletions
File tree
- packages
- cli/src/repowise/cli/commands
- core/src/repowise/core
- generation
- pipeline
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
581 | 593 | | |
582 | 594 | | |
583 | 595 | | |
| |||
593 | 605 | | |
594 | 606 | | |
595 | 607 | | |
| 608 | + | |
596 | 609 | | |
597 | 610 | | |
598 | 611 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| 412 | + | |
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
| |||
503 | 504 | | |
504 | 505 | | |
505 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
506 | 516 | | |
507 | 517 | | |
508 | 518 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
| 644 | + | |
644 | 645 | | |
645 | 646 | | |
646 | 647 | | |
| |||
704 | 705 | | |
705 | 706 | | |
706 | 707 | | |
| 708 | + | |
707 | 709 | | |
708 | 710 | | |
709 | 711 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
0 commit comments