feat(profile): spec-12 memoryBudgetMB warning on up (X5 follow-up) - #57
Merged
Conversation
Closes the last spec-12 acceptance item: with `memoryBudgetMB` set and the active
profile's summed `memoryMB` exceeding it, `up` prints a non-fatal warning naming
the offending services and suggesting a smaller slice (`--profile minimal`). With
no budget configured, no check runs (opt-in).
- `profile.CheckBudget(model, active)` → {BudgetMB, TotalMB, Over, Services}; pure,
unit-tested (opt-in off; frontend slice over budget names both services; a
zero-MB slice stays under).
- Wired into the up CLI before the saga; suppressed under --quiet/--json.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Closes the last spec-12 acceptance item (the memory-budget warning).
With
workspace.memoryBudgetMBset and the active profile's summedmemoryMBexceeding it,upprints a non-fatal warning naming the offending services and suggesting a smaller slice (--profile minimal). With no budget configured, no check runs (opt-in).How
profile.CheckBudget(model, active) → Budget{BudgetMB, TotalMB, Over, Services}— pure, sums only active services that declared amemoryMB.--quiet/--json.Tests
internal/profile: opt-in off (no budget → never Over);frontendslice over budget names both services; a zero-MB slice stays under.make cigreen.Spec acceptance (spec 12)
memoryBudgetMBset and activememoryMBexceeding it,upwarns naming the offending services and suggesting--profile minimal; with no budget, no check runs.🤖 Generated with Claude Code