You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Splitting this out of the PR #46 review so the decision is explicit before merge.
Background
Today's plan parser reads only resource_changes and filters no-op actions, so c3x estimate plan.json returns roughly the cost of what this apply changes (near-$0 for a plan where most resources are unchanged). #46 rewrites it to walk planned_values (the full post-apply resource set), so estimate plan.json returns the total cost of all resulting infrastructure.
Why it needs a decision
Changing the default output of estimate plan.json is a behavior change for existing users:
--budget gates can flip: a plan that added one $10/mo resource used to total ~$10; now it totals the whole fleet (hundreds/mo), which may fail a CI budget that previously passed.
--format json payload changes shape (all resources + full-fleet project_total instead of the changed subset).
Adopt full-fleet as the default (what Improve plan parser completeness and support optional() type defaults #46 does). Rationale: estimate should report the cost of the infrastructure the source describes; the old changed-only total was arguably misleadingly low. Use --show-delta for the change view. Requires a clear CHANGELOG/README note and a heads-up for --budget users.
Keep changed-only as the default, make full-fleet opt-in.
Add a flag to select the mode explicitly.
Recommendation
Option 1, with an explicit CHANGELOG entry and a note in the estimate docs, since it matches the meaning of estimate elsewhere in the tool. Tracking here so it's a conscious call rather than an implicit side effect of #46.
Splitting this out of the PR #46 review so the decision is explicit before merge.
Background
Today's plan parser reads only
resource_changesand filters no-op actions, soc3x estimate plan.jsonreturns roughly the cost of what this apply changes (near-$0 for a plan where most resources are unchanged). #46 rewrites it to walkplanned_values(the full post-apply resource set), soestimate plan.jsonreturns the total cost of all resulting infrastructure.Why it needs a decision
Changing the default output of
estimate plan.jsonis a behavior change for existing users:--budgetgates can flip: a plan that added one $10/mo resource used to total ~$10; now it totals the whole fleet (hundreds/mo), which may fail a CI budget that previously passed.--format jsonpayload changes shape (all resources + full-fleetproject_totalinstead of the changed subset).--show-deltaflag added in Improve plan parser completeness and support optional() type defaults #46 gives the changed-only view on demand.Options
estimateshould report the cost of the infrastructure the source describes; the old changed-only total was arguably misleadingly low. Use--show-deltafor the change view. Requires a clear CHANGELOG/README note and a heads-up for--budgetusers.Recommendation
Option 1, with an explicit CHANGELOG entry and a note in the
estimatedocs, since it matches the meaning ofestimateelsewhere in the tool. Tracking here so it's a conscious call rather than an implicit side effect of #46.Refs #46.