Repository navigation
LSZM test: movement API for the central login, server-side tariff - #930
Merged
Merged
Conversation
Port the LSZM tariff (src/util/landingFeeStrategies/lszm.ts) to functions/fees/landingFeeStrategies, so computeArrivalFeesOnWrite can price arrivals recorded through the movement API when /settings/landingFeesStrategy is "lszm". A parity test compares the port with the app's tariff for all categories, flight types, origins and MTOW edges.
The movement routes now exist where movementWritesViaApi or centralLogin is set: centralLogin alone serves API clients (the Open Digital MCP hub) while the app keeps writing to the database. The check that an environment-level aerodrome keeps the rule-relevant names applies to both. LSZM test gets centralLogin with the audience flightbox-lszm-test.
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.
Adds LSZM test as a second aerodrome for the Open Digital MCP hub.
Changes
functions/fees/landingFeeStrategies/lszm.js(+lszm_data.json), the port ofsrc/util/landingFeeStrategies/lszm.ts.computeArrivalFeesOnWriteprices arrivals with it when/settings/landingFeesStrategyis"lszm".src/util/landingFeeStrategies/lszm.parity.spec.jscompares the port with the app's tariff for all aircraft categories × flight types × origins (club, home base, other) × MTOW edges (247 cases, including errors).centralLogintoo:functions/api/index.jsregisters the movement routes whenmovementWritesViaApiorcentralLoginis set. With onlycentralLoginset, the routes serve API clients and the app keeps writing to the database as before. On LSZM the app is unchanged (movementWritesViaApistays off).tasks/generateServerConfig.js: the check that an environment-levelaerodromekeeps the ICAO, runway and route names now also runs whencentralLoginis set.projects/lszm.json:environments.test.centralLogin(dev login, audienceflightbox-lszm-test).projects/Configuration.mdis updated to match.Verification
npm test: 361 suites, 7979 tests passednpm run typecheck: no errorsnpm run test:functions: 114 suites, 4698 tests passednode tasks/generateServerConfig.js lszm test … lszm-testgenerates the config withcentralLogin,paymentMethods(checkout, invoice),homebasePaymentandnoRunwayIfHelicopterAfter merge
lszm_testdeploy jobs (hosting and functions)./settings/landingFeesStrategy="lszm"so that arrivals recorded through the API get landing fees.Generated by Claude Code