fix(statusline): fold effort into the model bracket, parenthesise ctx pct, name the classifier backend - #64
Open
yulonglin wants to merge 3 commits into
Open
fix(statusline): fold effort into the model bracket, parenthesise ctx pct, name the classifier backend#64yulonglin wants to merge 3 commits into
yulonglin wants to merge 3 commits into
Conversation
SGR 34 sets the foreground colour but leaves the faint attribute alone, so the model bracket rendered as ESC[34m[Opus 5 ESC[2m(high)ESC[34m]ESC[0m put a DIM blue ] against a normal-blue [. Re-open with 22;34 instead: SGR 22 (normal intensity) is what actually clears ESC[2m. Found by codex-companion adversarial-review. The parity suite could not have caught it: every effort assertion was either ANSI-stripped or a rust-vs-bash comparison, so both implementations were free to be identically wrong. Add absolute raw-byte goldens for high, xhigh and no-effort, which pin the exact escape sequence rather than only cross-implementation agreement. Audited both files for other instances of the class; there are none. Every other dim run is ESC[2m ... ESC[0m, and the one ESC[2mESC[36m is intentional dim cyan. Binary rebuild pending - cargo is blocked by a classifier outage.
Deployed binary now emits ESC[22;34m before the closing bracket, matching the bash fallback. Parity suite: 108 passed, 0 failed.
Source files auto-merged; the two conflicts were both generated artifacts (custom_bins/claude-tools-linux-x86_64 and SHA256SUMS), resolved by rebuilding from the merged source rather than by picking a side. main brought the classifier health-staleness change (the auto? state), so the binary is rebuilt to include both that and the dim-bracket fix. SHA256SUMS is regenerated across all three platform binaries. Parity suite on the merged tree: 127 passed, 0 failed.
Owner
Author
|
@claude is this alr superseded by changes on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reformats the statusline as requested:
Effort folds into the model bracket and loses its own segment; the context percentage takes parentheses; the classifier prefix becomes
auto-ant:.The classifier rename is a bug fix, not cosmetics
The suffix after
auto-now names the backend, not the key. Previously a key labelledsubrendered asauto:sub— byte-identical to the degraded subscription-fallback state. The states are now distinct:auto-ant:<key>(API),auto-sub (api down)(fallback),🔴auto(dead).A real bug, found by adversarial review
The first implementation emitted
ESC[34m[Opus 5 ESC[2m(high)ESC[34m]ESC[0m. SGR 34 sets the foreground colour but does not clear the faint attribute, so the closing]rendered dim blue against a normal-blue[. Fixed by re-opening withESC[22;34m— SGR 22 (normal intensity) is what actually clearsESC[2m. Both files audited for other instances of the class; there are none.Why the test suite could not have caught it
Every effort assertion was either ANSI-stripped or a Rust-vs-bash comparison. A parity suite is blind by construction to a fault both implementations share — and these two agreed perfectly on the wrong bytes. Added absolute raw-byte goldens for
high,xhighand no-effort that pin the exact escape sequence rather than mutual agreement. Verified they fail when the fix is reverted.Merge with main
mainmoved during this work, bringing the classifier health-staleness change (theauto?state). Merged in; source auto-merged, and the two conflicts were both generated artifacts (claude-tools-linux-x86_64,SHA256SUMS) resolved by rebuilding from the merged source rather than picking a side.Verification
#!— the clobber this repo has hit twiceESC[34m[Opus 5 ESC[2m(high)ESC[22;34m]ESC[0mcheck-claude-tools-fresh.shstill flagsdarwin-arm64andlinux-aarch64: CI built those at e782fb4, before this fix, so those two platforms carry the dim bracket until this PR merges and CI rebuilds themReviewed by codex-companion across two rounds; the second confirmed
22;34correct and complete.https://claude.ai/code/session_01HUBXhNd199qP9iMFXnhQfw