Problem
know-code range begin --from <invalid-ref> can succeed because merge-base failures fall back to the supplied string. Later range commands then treat Git failures as empty history/tree state. Unborn repositories also fail through an implicit HEAD assumption.
Scope
Validate --from as a commit, resolve it to an OID, require a real merge base, and store only immutable OIDs in the session. Define and test the intended unborn-repository behavior.
Acceptance criteria
- Invalid, non-commit, and missing refs fail before writing a range session.
- A valid ref is persisted as its resolved commit OID.
- Git lookup failures cannot silently become an empty range or empty tree.
- Tests cover invalid refs, ref movement after begin, and the selected unborn-repo behavior.
Problem
know-code range begin --from <invalid-ref>can succeed because merge-base failures fall back to the supplied string. Later range commands then treat Git failures as empty history/tree state. Unborn repositories also fail through an implicitHEADassumption.Scope
Validate
--fromas a commit, resolve it to an OID, require a real merge base, and store only immutable OIDs in the session. Define and test the intended unborn-repository behavior.Acceptance criteria