Summary
--version prints cdidx v1.21.0 only. Dev builds from main are indistinguishable from the tagged release in the output. Bug reports become ambiguous: "I'm on v1.21.0" could mean the tagged release or any number of in-progress builds at HEAD.
Evidence
src/CodeIndex/Cli/ConsoleUi.cs:305-322 — LoadVersion reads version.json only.
version.json — {"version": "1.21.0"}, no commit SHA / build date.
Impact
- Bug triage is harder than necessary.
- Hard to verify in the field whether a fix landed or whether the user is running stale binary.
Proposed direction
- At build time, embed
BuildMetadata (commit SHA, build date, dirty/clean tag) — git rev-parse --short HEAD and git diff-index --quiet HEAD for dirty detection.
- Display in
--version: cdidx v1.21.0 (commit abc1234, built 2026-05-12, clean).
- Provide
--version --json for machine consumption.
Repro env
- Branch:
main @ 2ee912d (release v1.21.0)
Summary
--versionprintscdidx v1.21.0only. Dev builds frommainare indistinguishable from the tagged release in the output. Bug reports become ambiguous: "I'm on v1.21.0" could mean the tagged release or any number of in-progress builds at HEAD.Evidence
src/CodeIndex/Cli/ConsoleUi.cs:305-322—LoadVersionreadsversion.jsononly.version.json—{"version": "1.21.0"}, no commit SHA / build date.Impact
Proposed direction
BuildMetadata(commit SHA, build date, dirty/clean tag) —git rev-parse --short HEADandgit diff-index --quiet HEADfor dirty detection.--version:cdidx v1.21.0 (commit abc1234, built 2026-05-12, clean).--version --jsonfor machine consumption.Repro env
main@ 2ee912d (release v1.21.0)