Skip to content

feat(cli): add leann rebuild for re-running a build with stored config (#123)#326

Merged
ASuresh0524 merged 4 commits into
StarTrail-org:mainfrom
raoabinav:feat/leann-rebuild-issue-123
Jun 4, 2026
Merged

feat(cli): add leann rebuild for re-running a build with stored config (#123)#326
ASuresh0524 merged 4 commits into
StarTrail-org:mainfrom
raoabinav:feat/leann-rebuild-issue-123

Conversation

@raoabinav
Copy link
Copy Markdown
Contributor

@raoabinav raoabinav commented May 20, 2026

Evaluator Summary

  • Abi added leann rebuild <index>, letting users rerun a build from stored sync metadata instead of reconstructing the original command manually.
  • The design defaults to LEANN's existing idempotent incremental build path while exposing --force for full rebuilds when needed.
  • The implementation reconstructs build arguments from index metadata and sync roots, sharing logic with watch-triggered rebuilds to avoid duplicated behavior.
  • Quality bar: CLI tests cover argument reconstruction, missing replay config, incremental/default behavior, and force rebuild behavior.

@raoabinav raoabinav force-pushed the feat/leann-rebuild-issue-123 branch from 7728af1 to 2c457c9 Compare May 20, 2026 17:57
@ASuresh0524 ASuresh0524 reopened this May 23, 2026
@ASuresh0524
Copy link
Copy Markdown
Collaborator

@raoabinav thanks for the pr! fix CI error before I can merge please

…fig (StarTrail-org#123)

Closes StarTrail-org#123.

Adds `leann rebuild <index>` which re-runs the original build using the
config recorded in the index's `.meta.json` + `sync_roots.json`. By default
it's an incremental delta (because `leann build` is already idempotent), and
`--force` does a full rebuild from scratch.

Errors clearly when sync config is missing — that case only comes up for
indexes built via the Python API which don't record their docs roots, so
there's nothing to replay.

The arg-reconstruction logic that was previously duplicated between this and
`_watch_trigger_build` is now in a shared `_reconstruct_build_args()` helper
with a `verbose` knob: rebuild prints why it can't proceed, watch stays
silent (since it polls and shouldn't spam logs).
@raoabinav raoabinav force-pushed the feat/leann-rebuild-issue-123 branch 2 times, most recently from 3db8905 to a2f19b8 Compare June 1, 2026 18:18
@ASuresh0524 ASuresh0524 merged commit eee075f into StarTrail-org:main Jun 4, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants