fix(tui): --spec usage names the whole frozen-prompt cost, never zero - #230
Open
Max17190 wants to merge 2 commits into
Open
fix(tui): --spec usage names the whole frozen-prompt cost, never zero#230Max17190 wants to merge 2 commits into
Max17190 wants to merge 2 commits into
Conversation
The usage economics surface short-circuited to "no extensions installed; the frozen prompt carries zero extension cost" whenever no external tool or skill was present, but the frozen prefix still carries AGENTS.md, the memory index, and the layout map on every request. A project holding only a memory note or an AGENTS.md was told it paid nothing. Print the frozen-prefix component breakdown (base rules, self-extension guide, AGENTS.md, memory index, layout map, tool schemas, total) above the extension table, list installed memory notes with their index-line cost beside skills, and only report an absence for the tool/skill/memory extensions that are truly empty. The data already lived in PromptBreakdown. Test plan: cargo test -p open-max-tui (new spec_usage_names_memory_cost_and_never_claims_zero shown red on the prior short-circuit, green after); cargo clippy at zero warnings.
…x state Greptile review of this PR: - schema cost summed each tool's schema alone, omitting the JSON-array brackets and commas the request actually carries; measure tool_schemas_wire().len(), the exact on-wire bytes, instead. - the empty-extensions line said "no memory extensions installed" from breakdown.memory being empty, but that means the frozen INDEX carries no note, not that none exists: a note faded past the index floor or dropped by the byte cap is still on disk. Say "no memory note is in the frozen index" and point at openmax --recall for the on-disk notes.
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.
Why
openmax --spec usageis the surface a user reads to answer "what is my prompt costing me". It short-circuited tono extensions installed; the frozen prompt carries zero extension costwhenever no external tool or skill was present, but the frozen prefix still carriesAGENTS.md, the memory index, and the layout map on every request. A project holding only a memory note or anAGENTS.mdwas told, untruthfully, that it paid nothing. This surfaced independently in dogfooding of both the observability and the skill-pack workflows: a project with four memory notes (616 bytes on every request) reportedzero extension cost, and answering the real cost took a from-scratch A/B measurement of budget events.Summary
AGENTS.md, memory index, layout map, tool schemas, and the total, with a~tokestimate) above the extension table. The data already lived inPromptBreakdown.No change to the frozen prompt itself, the wire, or any stored format; this is the reporting surface only.
Test Plan
cargo test -p open-max-tui: newspec_usage_names_memory_cost_and_never_claims_zero(shown red on the prior short-circuit, which printed the false "zero extension cost" and named no memory; green after).cargo test --workspaceandcargo clippy --workspace --all-targetsat zero warnings.--spec usagein a project with a memory note now prints the frozen-prefix breakdown and amemoryrow.Greptile Summary
The command now provides a detailed frozen-prefix usage breakdown for project configuration and extensions. No blocking issue remains.
Confidence Score: 5/5
No blocking failure remains.
The affected command completed successfully in isolated project configurations and produced the expected usage report.
What T-Rex did
Reviews (2): Last reviewed commit: "fix(tui): count the tool-schema array as..." | Re-trigger Greptile