fix(health,argus): restore cost_health + drop stripe test-mode events#27
Open
stackbilt-admin wants to merge 1 commit intomainfrom
Open
fix(health,argus): restore cost_health + drop stripe test-mode events#27stackbilt-admin wants to merge 1 commit intomainfrom
stackbilt-admin wants to merge 1 commit intomainfrom
Conversation
Two Co-Founder Brief regressions surfaced 2026-04-11 triage: 1. /health?format=json no longer exposed cost_health (lost during kernel shadow collapse). Re-added loadCostHealth() which reads cost_budgets + latest cost_snapshot per provider and shapes the per-provider response per the original CHANGELOG #373 contract (spend_usd, monthly_budget, threshold_tier, projected_depletion_days, burn_rate_per_hour). Safe against fresh installs where cost tables don't yet exist (returns null). 2. argus-notify queued Stripe test-mode events (livemode: false) into digest_sections, causing the daily brief to trip the "Revenue is flowing" take against fake MRR. argus-actions already had this check (line 330) but argus-notify didn't — the two layers disagreed. Now filtered pre-classification; rows still get marked notified=1 so we don't re-scan them. Closes #26, #25. Co-Authored-By: Claude Opus 4.6 (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.
Summary
Two Co-Founder Brief regressions surfaced during 2026-04-11 triage, both landing in aegis-core (active code path — daemon shadow is dead code).
1. cost_health regression (closes #26)
`/health?format=json` lost its `cost_health` field during the kernel shadow collapse. Re-added `loadCostHealth()` which reads `cost_budgets` + latest `cost_snapshot` per provider and shapes the response per the original CHANGELOG #373 contract (`spend_usd`, `monthly_budget`, `threshold_tier`, `projected_depletion_days`, `burn_rate_per_hour`). Safe against fresh installs — returns `null` if tables don't exist.
2. Stripe livemode filter (closes #25)
`argus-notify` was queueing test-mode Stripe events into `digest_sections`, causing the daily brief to fire "Revenue is flowing" against fake MRR. `argus-actions` already had the livemode check (line 330) but `argus-notify` didn't — the two layers disagreed. Fixed pre-classification so rows still mark `notified=1` and don't re-scan.
Test plan
Closes #26
Closes #25
🤖 Generated with Claude Code