chore(forensics): refresh types after mono details JSONB + reason cleanup#12
Merged
Conversation
…anup Picks up the schema changes from devhelmhq/mono#316: - IncidentStateTransitionDto gains a `details: dict[str, Any]` field. User-driven transitions carry `details["source"] = "public-api"`; pipeline-driven ones carry `details["source"] = "pipeline"`. - Transition `reason` description aligns with what the engine actually writes (trigger | confirm | resolve | auto_clear | reopen). The earlier `manually_resolved` was a parallel reason value for the same logical edge — replaced by reason="resolve" + details.source="public-api". Pure regen via `./scripts/typegen.sh`. The mono PR also added `@Schema(additionalProperties = TRUE)` on the Java DTO so Springdoc emits `additionalProperties: true` instead of `additionalProperties: {type: "object"}`, yielding `dict[str, Any]` here instead of `dict[str, dict[str, Any]]`. Without that fix the Pydantic model would fail to parse real responses (`details.source` is a string, not a nested dict). Made-with: Cursor
0cf6b57 to
90172d8
Compare
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
Picks up the schema changes from devhelmhq/mono#316:
IncidentStateTransitionDto.details: dict[str, Any]added. Distinguishes actor (pipelinevspublic-api) without forking the reason vocabulary.reasondescription aligned with what the engine actually writes:trigger | confirm | resolve | auto_clear | reopen. The earliermanually_resolvedwas a parallel reason for the same logical edge — replaced byreason="resolve"+details["source"]="public-api".What's in this PR
Pure regen via
./scripts/typegen.sh:docs/openapi/monitoring-api.jsoncopied from mono main.datamodel-codegen+inject_strict_config.Important
The mono PR also added
@Schema(additionalProperties = TRUE)on the Java DTO so Springdoc emits the right OpenAPI shape:Without that fix this Pydantic model would fail to parse real API responses —
details["source"]is a string"public-api", not a nesteddict. Verified locally with the actual response shape.Dependency
Depends on devhelmhq/mono#316 reaching main. Opening manually so the next SDK release can ship without waiting for the
spec-propagatecron.Test plan
./scripts/typegen.shcleanuv run --no-sync ruff checkcleanuv run --no-sync mypy src/cleanuv run --no-sync pytest— 713 tests passIncidentStateTransitionDto.model_validate({...details: {source: "public-api"}})parses successfullyMade with Cursor