fix: drop bogus Incidents.delete + add StatusPages.reorder_layout#6
Merged
Merged
Conversation
Two surface-parity gaps surfaced by `tests/surfaces/parity/`:
1. **Drop `Incidents.delete()`** — the underlying API endpoint
`DELETE /api/v1/incidents/{id}` does not exist; calling this method
would always return a 404. The method was a leftover from earlier API
experimentation and was missing from sdk-js / mcp-server / cli, so the
parity check (rightly) flagged sdk-python as out of sync. Removing it
here is the canonical decision: incidents are auto-resolved or manually
resolved via `incidents.resolve(...)`, never deleted.
This is technically a breaking change to the `devhelm` Python package
public API, but no real consumers exist (the method has never produced
a successful response). Captured in the version bump for the next
release.
2. **Add `StatusPages.reorder_layout(id, body)`** — hits the existing
`PUT /api/v1/status-pages/{id}/layout/reorder` endpoint, mirroring
`sdk-js.StatusPages.reorderLayout`. Wires through the
`ReorderPageLayoutRequest` model (already in `_generated.py`); also
re-exports it from the top-level `devhelm` package and `devhelm.types`,
plus a harness entry for the surface-test suite.
Synced uv.lock to match `devhelm` 0.2.0 already in pyproject.toml.
Verified locally:
- `pytest tests/` — 707 passed
- `mypy src/` — clean
- `ruff format` / `ruff check` — clean
- `make test-surface SURFACE=sdk_python` (against test API) — 174 passed,
1 skipped
Made-with: Cursor
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
Fixes two surface-parity gaps surfaced by the monorepo's
tests/surfaces/parity/suite.1. Drop
Incidents.delete()— endpoint never existedThe underlying API endpoint
DELETE /api/v1/incidents/{id}is not implemented on the API server. Callingclient.incidents.delete(id)would always return a 404 — the method has never produced a successful response. It was a leftover from earlier API experimentation.All other surfaces (sdk-js, mcp-server, cli, terraform-provider) correctly omit it, so the parity check (rightly) flagged sdk-python as out of sync.
Decision: remove from sdk-python rather than implement the endpoint. Incidents are auto-resolved by the pipeline or manually resolved via
incidents.resolve(...). Permanent deletion is not part of the product surface.This is technically a breaking change to the public API, but with no real consumers it's safe to ship as a 0.x patch (captured in the next release version bump).
2. Add
StatusPages.reorder_layout(id, body)The API endpoint
PUT /api/v1/status-pages/{id}/layout/reorderexists andsdk-jsalready exposesstatusPages.reorderLayout(...). sdk-python was missing the method, creating a real parity gap.This PR:
reorder_layout(id, body: RequestBody[ReorderPageLayoutRequest]) -> Noneto theStatusPagesroot class.ReorderPageLayoutRequestfromdevhelmanddevhelm.types.status-pages.reorder-layoutop to the surface-test harness (tests/run_sdk.py).uv.lockto track the publisheddevhelm 0.2.0.Test plan
pytest tests/— 707 passedmypy src/— clean (23 files)ruff format --check/ruff check— cleanmake test-surface SURFACE=sdk_pythonagainst test API — 174 passed, 1 skippeddevhelm 0.2.1release; once on PyPI, sister PR onmcp-serverbumps the pin and adds thereorder_status_page_layouttool.Companion PRs
mono— #260 — fixes 3 stale parity-test issues (introspect override anticipates the newreorder_status_page_layoutMCP tool).mcp-server— coming oncedevhelm 0.2.1is on PyPI: adds thereorder_status_page_layoutMCP tool.Made with Cursor