Skip to content

feat(tui): show the patch segment in the dashboard header - #178

Merged
eaitbrahim merged 1 commit into
mainfrom
feat/tui-patch-version
Aug 7, 2026
Merged

feat(tui): show the patch segment in the dashboard header#178
eaitbrahim merged 1 commit into
mainfrom
feat/tui-patch-version

Conversation

@eaitbrahim

Copy link
Copy Markdown
Contributor

The TUI header now renders keel v0.5.2 instead of keel v0.5.

Why

_short_version truncated to v<major>.<minor>, so 0.5.0, 0.5.1 and 0.5.2 all rendered identically as v0.5. That makes the header unable to answer the one question an operator glances at it for — is this box running the build I just shipped, or the one before it? Three releases went out in the 0.5 line today alone.

The detail that matters

Build metadata rides on the patch segment. A released version is 0.5.2+79f35b9e73d5, so parts[2] is 2+79f35b9e73d5 and a naive .isdigit() check returns False. Taking it verbatim would print a commit hash into a header line budgeted for a version; rejecting it would drop the patch on exactly the shape a release build emits — the common case, not an edge case. The patch is split on + and the numeric head kept.

Two further degradations, each keeping the most it can still vouch for rather than falling all the way back to v?:

Input Renders Why
0.5.2 v0.5.2 the point of the change
0.5.2+79f35b9e73d5 v0.5.2 build metadata stripped — what a release actually looks like
2.0 v2.0 no patch segment; show what exists rather than inventing a .0
0.5.2rc1 v0.5 non-numeric patch; keep the two segments that did parse
unknown / 1 / `` v? reserved for an unparseable major/minor

Verification

Test-first: the five patch-expecting cases failed before the change and pass after. 2083 tests pass (+3 new parametrize cases), ruff clean, mypy clean across 95 files.

Not visible on the live deployment until a release — it is pinned to 0.5.2+79f35b9e73d5, which predates this.

🤖 Generated with Claude Code

The header rendered `keel v0.5` for 0.5.0, 0.5.1 and 0.5.2 alike, so it could
not answer the question an operator actually asks it: is this box running the
build I just shipped, or the one before it? It now renders `keel v0.5.2`.

The load-bearing detail is that build metadata rides on the PATCH segment. A
released version is `0.5.2+79f35b9e73d5`, so `parts[2]` is `2+79f35b9e73d5` and
a naive `.isdigit()` check is False -- meaning the patch would have silently
vanished on precisely the shape a release build emits, i.e. the common case
rather than an edge case. The patch is split on `+` and the numeric head kept.

Two other degradations, each keeping the most it can vouch for rather than
falling all the way back to `v?`: a version with no patch segment (`2.0`)
renders `v2.0` rather than inventing a `.0` it never claimed, and a
non-numeric patch (`0.5.2rc1`) renders `v0.5` rather than discarding the two
segments that did parse. `v?` remains reserved for an unparseable major/minor.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@eaitbrahim
eaitbrahim merged commit f9e0ed1 into main Aug 7, 2026
1 check passed
@eaitbrahim
eaitbrahim deleted the feat/tui-patch-version branch August 7, 2026 21:32
eaitbrahim added a commit that referenced this pull request Aug 7, 2026
Patch: no schema change, no rail change, nothing that alters what the agent
trades or when. Ships #176, #177 and #178.

The reason to cut this rather than wait is #176's fix to `DATA_DERIVED_FAILURES`,
which is a reporting bug live on the deployment right now: `history` was missing
from the tag set that marks a failure as downstream of an empty cache, so
`keel assets propose` and `keel assets holdings --screen` printed
`x history: 0 daily bars < 1460 required` directly beneath their own note saying
the verdict was about missing data rather than about the asset. An asset nobody
had ever fetched was reported as too young to trade.

Also in: the TUI can now reach the admission gate (`screen`/`propose`/`discover`,
read-only, `discover` network-gated behind an explicit keypress like `f`); the
non-UTF-8 shortlist hole that broke `build_propose_view`'s documented never-raises
contract; and the header now shows the patch segment, so 0.5.1 and 0.5.3 no longer
render identically as `v0.5`.

uv.lock relocked in the SAME commit, per 0.5.0-0.5.2. Verified with
`uv sync --frozen`, which accepted the lock and rewrote nothing.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant