Adds DirtyFingerprint package var (default "") and a composeVersionDisplay() helper implementing the same strip-and-append rule as the C daemons: strips a trailing -dirty from GitCommit and appends -<fingerprint> when available, via a genuine anchored strings.TrimSuffix, not a blind substring replace. GitCommit's declaration and the logger.Info startup-log call site (with its zap fields) are completely untouched. New main_test.go covers 6 cases via table-driven tests. Verified independently by review, including a self-constructed mutation test (distinct from the implementer's own) proving the anchored-suffix regression test is genuinely meaningful, a real build across all 5 ldflags scenarios, and a live daemon startup-log capture confirming no leak into the log even on the same binary whose -version output shows the fingerprint. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| settings | ||
| specs | ||
| steering | ||