repowise-dev / repowise-dev/repowise
[Bug] init --resume skips decision extraction even when the persisted decision report is empty
@tarunbtw is already working on this.
Since Aug 19, 2026.
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 711
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 439
Description
Describe the Bug
Decision records are only harvested inline during page generation. When repowise init --resume reuses a previously generated page (hash match, LLM call skipped), the inline harvest never runs, so decisions cannot be backfilled by a resume. A user who sees an empty Decisions page and runs init --resume (the natural "finish / repair" instinct) gets the same empty result and reasonably concludes decisions are broken, when the actual fix is a regeneration with a stronger model or higher coverage plus --force.
Steps to Reproduce
- Run an initial index where generation captures no decisions (for example a low-coverage run, or a model that emits nothing passing the harvest bar).
decision_recordsstays 0. - Run
repowise init --resume ...to completion. decision_recordsis still 0. The Decisions surface renders its empty state.
Expected Behavior
Either resume should be able to backfill decisions, or the tool should tell the user why resume will not populate them and what to do instead.
Actual Behavior
Decision harvesting is inline in page generation, not a separate phase. In packages/core/src/repowise/core/generation/page_generator/core.py (around line 296), right after the LLM returns a page, harvest_decisions(...) pulls a trailing decision block out of that freshly generated content and strips it before the page is stored. It is gated on harvest_decisions and on the page type. On --resume, the incremental generator reuses prior pages by hash match and skips the LLM call (_call_provider returns the stored page early when source_hash matches). The harvest step still runs, but only over the reused page's already-stored content, which had its decision block stripped at original storage time, and the model is never re-invoked to emit a new one. Resume therefore cannot backfill decisions the original generation did not capture.
Fix Direction
- Decouple harvest from generation (best UX): make decision harvest a standalone, resumable pass over already-generated page content, so
--resumeor a dedicatedrepowise decision harvestcan backfill without regenerating every page. - Surface the limitation (cheap, honest): when resume reuses pages and
harvest_decisionsis on butdecision_recordsis empty, print a one-line notice, e.g. "decisions are harvested during generation; re-run with --force or a stronger model to populate." - Document that decisions come from the generation pass and will not appear via resume-reuse.
Option 2 is a small, self-contained starting point; option 1 is the durable fix.
Additional Context
packages/core/src/repowise/core/generation/page_generator/core.py(inlineharvest_decisions, ~line 296)packages/core/src/repowise/core/generation/models.py(harvest_decisionsconfig, default true)- Related: the incremental update path also reuses decision records, so any backfill needs to run on resume/update, not just a fresh
init.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.