Skip to content

LSZM test: movement API for the central login, server-side tariff - #930

Merged
rzueger merged 2 commits into
developfrom
claude/magical-dirac-ww38gt
Nov 21, 2026
Merged

rzueger merged 2 commits into
developfrom
claude/magical-dirac-ww38gt

Conversation

@rzueger

@rzueger rzueger commented Nov 21, 2026

Copy link
Copy Markdown
Member

Adds LSZM test as a second aerodrome for the Open Digital MCP hub.

Changes

  • Server-side LSZM tariff: functions/fees/landingFeeStrategies/lszm.js (+ lszm_data.json), the port of src/util/landingFeeStrategies/lszm.ts. computeArrivalFeesOnWrite prices arrivals with it when /settings/landingFeesStrategy is "lszm". src/util/landingFeeStrategies/lszm.parity.spec.js compares the port with the app's tariff for all aircraft categories × flight types × origins (club, home base, other) × MTOW edges (247 cases, including errors).
  • Movement API gated by centralLogin too: functions/api/index.js registers the movement routes when movementWritesViaApi or centralLogin is set. With only centralLogin set, the routes serve API clients and the app keeps writing to the database as before. On LSZM the app is unchanged (movementWritesViaApi stays off).
  • tasks/generateServerConfig.js: the check that an environment-level aerodrome keeps the ICAO, runway and route names now also runs when centralLogin is set.
  • projects/lszm.json: environments.test.centralLogin (dev login, audience flightbox-lszm-test).
  • projects/Configuration.md is updated to match.

Verification

  • npm test: 361 suites, 7979 tests passed
  • npm run typecheck: no errors
  • npm run test:functions: 114 suites, 4698 tests passed
  • node tasks/generateServerConfig.js lszm test … lszm-test generates the config with centralLogin, paymentMethods (checkout, invoice), homebasePayment and noRunwayIfHelicopter
  • The database rules and the movement module are unchanged, so the rules emulator tests were not rerun.

After merge

  • Approve the lszm_test deploy jobs (hosting and functions).
  • In the lszm-test Realtime Database, set /settings/landingFeesStrategy = "lszm" so that arrivals recorded through the API get landing fees.

Generated by Claude Code

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.
@rzueger
rzueger merged commit 9d5fc13 into develop Nov 21, 2026
2 checks passed
@rzueger
rzueger deleted the claude/magical-dirac-ww38gt branch November 21, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants