Skip to content

chore(spec): refresh spec for launch sprint + qualified enum constants#20

Merged
caballeto merged 1 commit into
mainfrom
chore/spec-refresh-launch-sprint
May 6, 2026
Merged

chore(spec): refresh spec for launch sprint + qualified enum constants#20
caballeto merged 1 commit into
mainfrom
chore/spec-refresh-launch-sprint

Conversation

@caballeto
Copy link
Copy Markdown
Member

Summary

Unblocks mono#369 launch sprint by handling spec changes that ripple
into TF provider source compilation.

mono#369 adds MonitorStatus enum (UP/DOWN/DEGRADED/PAUSED/UNKNOWN) and
IncidentFilterParamsSeverity (DOWN/DEGRADED), which causes oapi-codegen
to namespace-qualify previously-unique enum constants:

  • generated.Emailgenerated.EmailChannelConfigChannelTypeEmail
  • generated.Downgenerated.TriggerRuleSeverityDown
  • generated.Degradedgenerated.TriggerRuleSeverityDegraded

It also makes managedBy nullable on CreateMonitorRequest (now
*pointer), and adds managedBy to Create/Update Status Page, Resource
Group, and Alert Channel DTOs.

Changes

  • Refresh docs/openapi/monitoring-api.json from mono#369
  • Regenerate internal/generated/types.go
  • Update enum constant references to qualified names
  • Wrap CreateMonitorRequest.ManagedBy in pointer (and similar for
    status page, resource group, alert channel) — provider continues to
    hardcode TERRAFORM for attribution so audit trail is correct
  • Allow-list new managed_by fields in schema-vs-DTO audit
  • Update monitor_test.go for pointer ManagedBy comparison

Why now

mono#369 Evolution Harness pulls TF provider source from main and
recompiles against the new spec. Without this PR, mono#369 cannot merge.
Cross-repo dependency: this PR must merge first.

Test plan

  • go build ./... (clean locally)
  • go test ./... (clean locally — all 4 packages pass)
  • Existing acceptance tests should be unaffected (constant rename only,
    same wire format)

Made with Cursor

mono#369 adds MonitorStatus enum (UP/DOWN/DEGRADED/PAUSED/UNKNOWN) and
IncidentFilterParamsSeverity (DOWN/DEGRADED), which causes oapi-codegen
to namespace-qualify previously-unique enum constants:

- generated.Email          → generated.EmailChannelConfigChannelTypeEmail
- generated.Down           → generated.TriggerRuleSeverityDown
- generated.Degraded       → generated.TriggerRuleSeverityDegraded

It also makes managedBy nullable on Create/Update DTOs (now *string
pointer), and adds managedBy to Create/Update Status Page, Resource
Group, and Alert Channel DTOs.

Changes:
- Refresh spec + regenerate types
- Update enum constant references to qualified names
- Wrap CreateMonitorRequest.ManagedBy in pointer (and similar for
  status page, resource group, alert channel) — provider continues to
  hardcode TERRAFORM for attribution
- Allow-list new managed_by fields in schema-vs-DTO audit
- Update monitor unit test for pointer ManagedBy

Co-authored-by: Cursor <cursoragent@cursor.com>
@caballeto caballeto merged commit ec82534 into main May 6, 2026
6 checks passed
@caballeto caballeto deleted the chore/spec-refresh-launch-sprint branch May 6, 2026 11:33
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