Repository navigation
fix: uptime monitors.test() deprecation window and bundle include (W0-13) - #162
Merged
Merged
Conversation
…l 2027-01-31 Doc 42 R16 (amended) and sdk-js: monitors.test(id) on an uptime monitor returns the probe result with a one-time deprecation warning pointing to monitors.probe(id) until 2027-01-31, and raises ValidationError USE_PROBE after. The result is MonitorTestOutcome (RunDto | MonitorTestResultDto); devhelm.is_run narrows it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerated from mono #1436 (W0-13), which adds CreateBundleRequest.include and three bundle vectors (include-kept, include-set-with-include, include-missing-refused). Explicit include paths from either code form are sent with the upload (JSON field or zip query parameter); an in-memory include that names no file is refused as include[i], as the server does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- monitors.test() treats only 200 as a probe result and refuses other non-202 statuses; the removal date has one source. - typing.TypeGuard / NotRequired from the standard library, and typing_extensions declared for TypeAliasType. - Tests: async deprecation and USE_PROBE paths, include as repeated query parameters on zip uploads, no include when none is given, and the refusal field of every conformance vector. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Two follow-ups to #160:
monitors.test(id)keeps returning the probe result until 2027-01-31, as 1.12 did, with a one-timeDeprecationWarningpointing tomonitors.probe(id). From that date it raisesValidationErrorUSE_PROBE. This matches the amended doc 42 R16 and sdk-js.include(W0-13). Explicit include paths (files nothing imports, such asfixtures/order.json) are sent asCreateBundleRequest.includeon a JSON upload, or as theincludequery parameter on a zip upload. The server then keeps them in the closure.The spec is generated from mono #1436 (
feat/bundle-include, head 9405da4), including itsdocs/contracts/bundle-vectors.json. It will be identical once #1436 merges.What's covered (doc 42 map)
test()returnsMonitorTestOutcome = RunDto | MonitorTestResultDto.devhelm.is_run()is aTypeGuard[RunDto]that narrows it, mirroring sdk-jsisRun.USE_PROBEcarriesdetails.passed, as in sdk-js.includeadds files to the default set and names them to the server.{entrypoint, files, include}is supported.MONITOR_PACKAGE_PATH_INVALID, fieldinclude[i], as the server does.AsyncDevhelmgets both changes; it is generated from the same source.Tests
--strict, ruff check/format and theunasync --checkfreshness check are clean.USE_PROBEafter the date (clock patched);is_runnarrowing;fixtures/order.jsonships from disk and appears ininclude;?include=parameters;includeis sent when none is given.Self-review
Sonnet reviewer on the final diff: 2 P0s, both fixed.
typing_extensionswas imported but not declared as a dependency. It is now declared, andTypeGuard/NotRequiredcome fromtyping.P1s also fixed:
includeis tested;TypeAliasis annotated.Review follow-ups:
@overloads ontest()that narrow toRunDtowhencode=is given.stacklevelof the deprecation warning points one frame off under asyncio.details.passedonUSE_PROBEis undocumented beyond sdk-js parity.Deviations from doc 42
AssertionTestResultDtois unchanged; that was noted in feat: synthetics surface, AsyncDevhelm and typed errors (doc 42 §9) #160.Not in this PR
open-synthetics-admissions): the shared test API on :8081 was down. To rerun:include-keptagainst the server: this needs a stack running #1436.How to verify locally
🤖 Generated with Claude Code