Skip to content

feat(profile): spec-12 memoryBudgetMB warning on up (X5 follow-up) - #57

Merged
gustavobertoi merged 1 commit into
mainfrom
nightly/X5-budget
Jun 29, 2026
Merged

feat(profile): spec-12 memoryBudgetMB warning on up (X5 follow-up)#57
gustavobertoi merged 1 commit into
mainfrom
nightly/X5-budget

Conversation

@gustavobertoi

Copy link
Copy Markdown
Contributor

What

Closes the last spec-12 acceptance item (the memory-budget warning).

With workspace.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).

How

  • profile.CheckBudget(model, active) → Budget{BudgetMB, TotalMB, Over, Services} — pure, sums only active services that declared a memoryMB.
  • Wired into the up CLI before the saga; suppressed under --quiet/--json.

Tests

internal/profile: opt-in off (no budget → never Over); frontend slice over budget names both services; a zero-MB slice stays under. make ci green.

Spec acceptance (spec 12)

  • With memoryBudgetMB set and active memoryMB exceeding it, up warns naming the offending services and suggesting --profile minimal; with no budget, no check runs.

🤖 Generated with Claude Code

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>
@gustavobertoi
gustavobertoi merged commit acf6720 into main Jun 29, 2026
2 checks passed
@gustavobertoi
gustavobertoi deleted the nightly/X5-budget branch June 29, 2026 18:19
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