Skip to content

Bug: lore stage --dry-run persists the staged state (dry run is not dry) #125

Description

@Segurad27

Environment

  • Lore v0.8.4 (CLI + loreserver), Windows 11
  • Local server over lore://127.0.0.1, single user, single branch

Summary

lore stage . --dry-run is documented as "only report what would have been
changed and perform no changes", but it persists the computed staged state.
A subsequent real lore stage . reports "No changes staged" because the
work is already done, and lore status shows the full staged file list —
which a following lore commit happily uses.

Repro

# with any uncommitted changes present (marked dirty)
lore stage . --dry-run     # prints "Staged repository state <signature>"
lore stage .               # prints "No changes staged"
lore status                # "Changes staged for commit:" lists every file
lore commit "msg"          # commits the dry-run's staged state

Expected

After --dry-run, no staged state exists; the follow-up real lore stage .
stages the changes fresh.

Actual

The dry-run's staged state is persisted and consumed by later commands.

Impact

Low when the preview matched intent, but "preview" operations that mutate
state are an automation hazard: a dry-run followed by an abort still leaves
a staged state, and a staged state blocks synchronization
("Unable to sync when there is a staged state") — so an abandoned preview
can break the next unrelated lore sync until the user discovers
lore unstage.

Workaround

Treat stage --dry-run as a real stage; run lore unstage <path> to clean
up after an abandoned preview.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions