Skip to content

feat(ladder): require max_hourly_commit_per_run when saving an AWS ladder config #1815

Closed

Description

@cristim

Problem

The ladder sizes the Compute Savings Plan layer from Cost Explorer's account-wide blended rate (cloud-commitments-go#698). That sizing is accepted only because a per-run cap bounds it. The upcoming go pin bump adds a run-time refusal in executeLadderRun: an AWS ladder config with no max_hourly_commit_per_run gets an errored run, with an error naming the field.

Saving still accepts such a config:

  • LadderConfigDB.validateLadderRunLimits (internal/config/validation.go) treats a nil cap as "no cap", and it is valid.
  • The ladder form (frontend/src/ladder.ts) sends null for a blank cap.

So a user can save a config that every run will then refuse, and only finds out from the run result.

Proposed change

  • Validation: an AWS ladder config requires max_hourly_commit_per_run. Mirror the provider-keyed rule in ladderMinLookbackDays and return a 400 that names the field. Update the "nil = no cap (valid)" fixtures in validation_ladder_test.go and the API tests that save uncapped AWS configs.
  • Frontend: make the cap required for AWS configs in the ladder form, with an inline error. Update ladder.test.ts and the e2e fixtures that use max_hourly_commit_per_run: null.
  • Keep the run-time refusal. Stored rows can already be uncapped, so the save check is an addition, not a replacement.

Acceptance

  • Saving an uncapped AWS ladder config returns 400 naming max_hourly_commit_per_run, and the form blocks it.
  • Capped AWS configs and non-AWS configs save as before.
  • The ladder config page shows why runs stop for an existing uncapped AWS config. For example, it can say "Runs are refused until max_hourly_commit_per_run is set", based on the saved config, or show the errored run's reason if the page shows runs. Owners of rows saved before this check then see the cause without reading the logs.

No data migration or default cap: existing rows stay uncapped until an owner sets a value.

Activity

  1. cristim commented on Nov 6, 2026

    @cristim
    MemberAuthor

    Raised to p1. Once #1817 merges, every daily ladder run of an existing AWS ladder config without max_hourly_commit_per_run errors until someone sets a cap. Requiring the cap at save time and in the form stops new uncapped configs. Existing uncapped configs keep erroring until a cap is set. I'll pick this up right after #1817 merges.

  2. cristim commented on Nov 6, 2026

    @cristim
    MemberAuthor

    Claimed by claude-cc-platform-2, now that #1817 has merged. The plan has three parts:

    • Save-time validation in LadderConfigDB validation (400, naming max_hourly_commit_per_run).
    • A required cap for AWS in the ladder form.
    • A notice on the config page when a saved AWS config has no cap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions