Repository navigation
Bound live tests to model data ranges from my-access - #81
Open
sam-watttime wants to merge 1 commit into
Open
sam-watttime wants to merge 1 commit into
sam-watttime wants to merge 1 commit into
Conversation
Live tests used fixed dates (2025-01-01 and similar). The v3 APIs now reject a window wholly outside the serving model's data_start/data_end with a 400, and the client raises on any failed chunk. A cached model_window helper reads /v3/my-access once per run and returns a window inside every model still serving the endpoint. test_multi_model_range now straddles data_start within one 30-day chunk and filters my-access to v3/historical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xginn8
approved these changes
Nov 13, 2026
xginn8
left a comment
Contributor
There was a problem hiding this comment.
good idea to clean this up
This branch has not been deployed
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.
What
Live tests now read each model's
data_startanddata_endfrom/v3/my-accessand request only windows the serving model covers. Fixed dates such as 2025-01-01 survive only in the offline date-parsing tests and the mocked 403 test.Why
Two open API changes (WattTime/watttime-apiv3-historical#285, WattTime/watttime-apiv3-forecast#385) return a 400
START_END_OUTSIDE_BOUNDSfor a request wholly outside a model's data range. Because the client raises on any failed chunk, a hard-coded date older than a newly promoted default model fails the whole test.How
A cached helper,
model_window, reads my-access once per run and returns a day-aligned UTC window inside every model still serving the endpoint, a set that always includes the API's default.test_multi_model_rangenow straddlesdata_startwithin one 30-day chunk and filters my-access tov3/historical, so no chunk falls wholly beforedata_startand a forecast model cannot pass for the newest historical one.🤖 Generated with Claude Code