Conversation
The Interval literal advertised '1s', which the API rejects with a 400 — it is not in the endpoint's interval enum. Meanwhile the API's real sub-minute intervals, 15s and 30s, were absent, so a caller passing either failed type checking despite the request being valid. Both are Tier 3 gated, noted on the literal and in the docstrings, which listed a third and different set again. __version__ read "0.1.0" while pyproject said 4.1.0. bumpver's file_patterns only covered pyproject.toml, so __init__.py was never going to be updated by a release. Set to the current version and added to file_patterns so the two cannot drift again — kept as a literal rather than read from importlib.metadata, which is unreliable under Pyodide, and this package ships a Pyodide transport. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MYkNnTCck1hxLyLgb5hoYp
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 independent drifts found while auditing the aperiodic.io code snippets against this SDK.
1.
Intervaldisagreed with the API in both directionsThe API's enum (
apps/data/config/data-catalog.config.tsindream-faster/unravel-router) is15s, 30s, 1m, 5m, 15m, 30m, 1h, 4h, 1d. So:1swas typed as valid but the API rejects it with a 400 — it isn't in the endpoint's enum at all.15sand30sare real but were missing, so a caller passing either failed type-checking despite the request being perfectly valid.Both sub-minute intervals are Tier-3 gated (403 without the entitlement), which is now noted on the literal and in the docstrings.
The five docstrings listed a third, different set —
('1m', '5m', '15m', '30m', '1h', '4h', '1d')— omitting sub-minute entirely. All updated.2.
__version__was three majors behindsrc/aperiodic/__init__.pysaid"0.1.0";pyproject.tomlsaid4.1.0. Anything logging or asserting onaperiodic.__version__reported the wrong version.The cause:
[tool.bumpver.file_patterns]only coveredpyproject.toml, so__init__.pywas never going to be touched by a release. Set to the current version and added tofile_patternsso the two can't drift again.Kept as a literal rather than reading from
importlib.metadata— that's unreliable under Pyodide, and this package ships a Pyodide transport (_backends/_pyfetch_transport.py).Confirmed with a dry run that bumpver now picks it up:
Test plan
ruff checkpasses on every file this PR touchesPLR0917errors inendpoints/utils.pyare pre-existing — identical on unmodifiedmain, and that file isn't touched herepytest: 76 failed / 38 passed both before and after — byte-identical baseline. The failures are this sandbox's blocked egress (test_readme.pyand friends make real calls expectingAPIError(401)), not a regression from this change. Worth a clean run in CI to confirm.'1s'reference remains anywhere insrc/,README.mdortests/Follow-up
The API is the source of truth for this enum and the two are hand-synced. If it drifts again, a generated types module or a contract test against the live enum would prevent it — out of scope here.
Found by the site audit in dream-faster/unravel-router#814 (Task 11).
Generated by Claude Code