repowise-dev / repowise-dev/repowise

[Bug] init --resume skips decision extraction even when the persisted decision report is empty

Open
#670 4 comments 0 reactions 1 assignee View on GitHub

@tarunbtw is already working on this.

Since Aug 19, 2026.

bug
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

  1. 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_records stays 0.
  2. Run repowise init --resume ... to completion.
  3. decision_records is 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

  1. Decouple harvest from generation (best UX): make decision harvest a standalone, resumable pass over already-generated page content, so --resume or a dedicated repowise decision harvest can backfill without regenerating every page.
  2. Surface the limitation (cheap, honest): when resume reuses pages and harvest_decisions is on but decision_records is empty, print a one-line notice, e.g. "decisions are harvested during generation; re-run with --force or a stronger model to populate."
  3. 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 (inline harvest_decisions, ~line 296)
  • packages/core/src/repowise/core/generation/models.py (harvest_decisions config, 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.