Skip to content

fix(api): regen for typed TimingPhasesDto in HTTP check details#9

Merged
caballeto merged 1 commit into
mainfrom
fix/http-timing-typed-dto
Apr 23, 2026
Merged

fix(api): regen for typed TimingPhasesDto in HTTP check details#9
caballeto merged 1 commit into
mainfrom
fix/http-timing-typed-dto

Conversation

@caballeto
Copy link
Copy Markdown
Contributor

Summary

  • Regenerates src/devhelm/_generated.py and the vendored docs/openapi/monitoring-api.json from the upstream spec to pick up devhelmhq/mono#271.
  • That PR replaces the erroneous Map<String, Object> schema for Http.timing with a typed TimingPhasesDto (nullable ints: dns_ms, tcp_ms, tls_ms, ttfb_ms, download_ms, total_ms).
  • Before this regen, Http.timing was typed as dict[str, dict[str, Any]] | None — which couldn't actually decode the real wire payload (a flat snake_case map of integers).

Diff scope

Pure regen via scripts/regen-from.sh — no hand edits:

  • docs/openapi/monitoring-api.json — spec drop-in
  • src/devhelm/_generated.py — new TimingPhasesDto model + Http.timing retyped to TimingPhasesDto | None. Most of the line count is datamodel-codegen reordering classes by dependency (Http sorts after its new dep).

Test plan

  • make lint (ruff check + format)
  • make typecheck (mypy strict, 23 files, no issues)
  • make test — 707/707 pytest tests pass

Made with Cursor

Picks up the upstream mono fix (devhelmhq/mono#271) that replaces
the misleading `Map<String, Object>` `Http.timing` schema with a
typed `TimingPhasesDto`.

Before regen, `Http.timing` was generated as
    dict[str, dict[str, Any]] | None
which doesn't actually match the wire payload (a flat snake_case
object of nullable ints). After regen it's the typed
`TimingPhasesDto` model with fields `dns_ms`, `tcp_ms`, `tls_ms`,
`ttfb_ms`, `download_ms`, `total_ms` — each nullable int.

Bulk of the diff in `_generated.py` is datamodel-codegen reordering
classes (Http now sorts after its new TimingPhasesDto dependency).

Verified: ruff + mypy strict + 707 pytest tests pass.
Made-with: Cursor
@caballeto caballeto merged commit 7c661d9 into main Apr 23, 2026
4 checks passed
@caballeto caballeto deleted the fix/http-timing-typed-dto branch April 23, 2026 18:10
caballeto added a commit to devhelmhq/mcp-server that referenced this pull request Apr 23, 2026
Vendored-spec sync to pick up the upstream mono fix
(devhelmhq/mono#271) that replaces the misleading
`Map<String, Object>` `Http.timing` schema with a typed
`TimingPhasesDto` (nullable ints for dns_ms, tcp_ms, tls_ms,
ttfb_ms, download_ms, total_ms).

mcp-server has no codegen of its own (all SDK types come from the
sibling `devhelm` SDK; see devhelmhq/sdk-python#9), so the only
artifact change here is the vendored OpenAPI snapshot used for
parity tests + the spec_updated repository_dispatch workflow.

Verified: ruff + mypy strict + 57 pytest tests pass.
Made-with: Cursor
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