MCPcopy Create free account
hub / github.com/codehamr/codehamr / TestStatusBarShowsBudgetFromHeaders

Function TestStatusBarShowsBudgetFromHeaders

internal/tui/tui_test.go:1358–1363  ·  view source on GitHub ↗

TestStatusBarShowsBudgetFromHeaders: the pass segment renders whenever X-Budget-Remaining arrives: the header is the only signal, no profile gating. The percent is rounded to a whole number so it doesn't jitter on every token.

(t *testing.T)

Source from the content-addressed store, hash-verified

1356 })
1357 final := out.(Model)
1358 if final.budget.Remaining != 0.88 {
1359 t.Fatalf("stale probe overwrote live budget: %+v", final.budget)
1360 }
1361}
1362
1363// TestActiveContextSizePrefersLiveValue: packing reads liveContextSize first,
1364// then Profile.ContextSize, then the floor. Cloud profiles ship ContextSize=0,
1365// so without a live value the floor must apply.
1366func TestActiveContextSizePrefersLiveValue(t *testing.T) {

Callers

nothing calls this directly

Calls 2

runTurnFunction · 0.85
ViewMethod · 0.45

Tested by

no test coverage detected