Repository navigation
Check stop and route IDs against Java in CI - #1805
aaronbrethorst wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
@aaronbrethorst, the PR description does not follow the PR template:
Keep this PR as Draft until these are fixed. This comment updates when the description changes. |
Performance Smoke Test ResultsStatus: PASSED
Smoke test config: 5 VUs x 30s. Thresholds: p(95) < 300ms, error rate < 1%. Full results uploaded as workflow artifact: k6-smoke-summary. |
Maglev's agency-prefix work was checked by hand against Java OneBusAway running in Docker. Nothing stopped those results from drifting. Add a small synthetic two-agency feed, the IDs Java 2.7.1 returns for 38 requests on it, and TestJavaParity_SyntheticTwoAgencyFeed, which replays the requests and compares every stop, route and service ID. The six requests that still differ are skipped with the reason. The feed generator and capture script live next to the data, and the README explains how to recapture.
A request listed in knownJavaDifferences was skipped without being compared, so a fixed difference stayed listed and stopped guarding anything. Compare it anyway and fail once it matches Java, so the entry gets removed. Also say what the comparison does not catch: an ID moved between entries of the same list.
c9f0c90 to
8a6e430
Compare
6f827eb to
45350af
Compare
|
Performance Smoke Test ResultsStatus: PASSED
Smoke test config: 5 VUs x 30s. Thresholds: p(95) < 300ms, error rate < 1%. Full results uploaded as workflow artifact: k6-smoke-summary. |
Performance Smoke Test ResultsStatus: PASSED
Smoke test config: 5 VUs x 30s. Thresholds: p(95) < 300ms, error rate < 1%. Full results uploaded as workflow artifact: k6-smoke-summary. |
|
Closing as superseded. The multi-feed static GTFS spec (#1811, |



Stacked on #1804. Part of the stop consolidation work (#1771–#1779). No issue filed yet.
What it does
Adds a CI test that compares the stop, route and service IDs in Maglev's responses with Java OneBusAway's, on a small synthetic two-agency feed. So far the agency-prefix fixes in this stack were checked by hand against Java running in Docker; this test keeps those results from drifting.
Root cause
Not a bug fix. The gap: nothing in CI compared Maglev with Java on a feed with more than one agency, which is where every bug fixed in this stack showed up.
Testing
TestJavaParity_SyntheticTwoAgencyFeedreplays 38 requests fromtestdata/java_parity/java_ids.json. 32 match Java. 6 are skipped as known differences, each with its reason, inknownJavaDifferences.mainthe same test fails 26 of 32 requests (I copied it into amainworktree and ran it there), so it covers what this stack fixed.purego.Response comparison
This PR changes no response.
Checklist
mainand passes on this branch.gtfsdb/(db.go,models.go,query.sql.go) ortestdata/openapi.yml(synced from upstream).r.Context()to DB/service calls, notcontext.Background().testdata/openapi.yml, has an issue open on OneBusAway/sdk-config, or is outside the SDK and the description says why.Notes for reviewers
Size: most of the 1,049 lines are data:
java_ids.json;feed/(255 lines).The code to review is
java_parity_test.go(122 lines), plusmake_feed.pyandcapture.py, which regenerate the data.Recapturing:
testdata/java_parity/README.mdexplains how to re-record Java's answers with theoba-apiDocker stack. That stack's gtfstidy step has to be switched off withGTFS_TIDY_ARGS=-help, or it deletes stops with no routes, which production Java keeps.A new bug the test found: in arrivals, a later trip in the same block gets its own first stop as
nextStop. Java gives the active trip's next stop. It's skipped for now and will be fixed in a follow-up.The other skipped differences:
schedule-for-routestop references and stop-timeserviceIds.Java quirk: on this feed Java's
trips-for-locationreturns no trips, even at times when trips are running. Maglev also returns none without real-time data, so that request currently matches.After review
knownJavaDifferencesis now compared anyway, and the test fails once it matches Java, so a fixed difference can't stay listed.key=IDpairs, not which list entry holds which ID.