fix: stop the live canary from failing on Google's empty booking responses#23
Merged
Conversation
The booking canary picked the first itinerary with a booking_token + selected legs and failed if Google returned zero booking options for that one — even when the RPC itself succeeded. That made the canary fail ~weekly on schedule for two months while the actual code worked end-to-end. - _bookable_candidates returns up to 5 candidates (was: first match only). - Test iterates candidates and passes if any returns booking options; fails only when all came back empty. - get_booking_results now logs a WARNING when the RPC succeeds with 0 options so artifact triage can distinguish upstream variance from parser regressions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Node 20 is deprecated on GitHub-hosted runners as of June 2026. Move the canary and mutation workflows to checkout@v5, setup-python@v6, and upload-artifact@v5 so we stop emitting the deprecation warning. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The release-create step inherited GITHUB_REF_NAME as the title, so v0.5.0
ended up published as 'swoop-v0.5.0' while v0.4.x were titled 'v0.4.0' /
'v0.4.1'. Pass --title v${VERSION} explicitly so future releases stay
consistent. Tag still ships as swoop-vX.Y.Z (publish job and PyPI parser
depend on that prefix).
Also bump checkout/setup-python to Node 24-compatible versions to silence
the deprecation warning on every CI run.
Co-Authored-By: Claude Opus 4.7 (1M context) <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
The live-canary workflow has been failing on every scheduled run since ~April 6 (8+ weeks) — but only on schedule. Manual
workflow_dispatchruns occasionally pass. Locally the same test passes 100% of the time. That's a flakiness signal in the canary itself, not a regression in swoop.Failure mode in the most recent run:
Shopping search succeeds, an itinerary with
booking_token+_build_selected_legs(itin)is found, thenrpc.get_booking_results(itin)returns[]— Google's GetBookingResults RPC succeeded but had no bookable options for the first token we tried.Changes
tests/test_live_contract.py—_find_bookable_itinerary→_bookable_candidates(returns up to 5 candidates). The booking test iterates until one returns options; only fails when all 5 come back empty. Failure message includes how many were tried so triage is faster.swoop/rpc.py—get_booking_resultslogs WARNING when the RPC succeeds with 0 options. Lets artifact review distinguish upstream variance from a parser regression..github/workflows/ci.yml— release-create step uses--title v${VERSION}so future v0.x.y releases get the bare title (matches v0.4.0 / v0.4.1; v0.5.0 was published with the wrong title and has been manually corrected).actions/checkout@v4 → v5,setup-python@v5 → v6,upload-artifact@v4 → v5. Drops the Node 20 deprecation warning that hits on every run before the September 2026 EOL.Test plan
make check(offline tests + pyright) — passespython -m pytest tests/test_live_contract.py -v -m livelocally — all 3 passlive-canaryrun on Tuesday (or trigger viaworkflow_dispatchafter merge)🤖 Generated with Claude Code