chore(currency)!: remove the deprecated English message fields - #207
Open
fjaeckel wants to merge 4 commits into
Open
chore(currency)!: remove the deprecated English message fields#207fjaeckel wants to merge 4 commits into
fjaeckel wants to merge 4 commits into
Conversation
fjaeckel
force-pushed
the
chore/currency-drop-deprecated-message
branch
from
August 31, 2026 07:52
396e370 to
940ef7a
Compare
fjaeckel
force-pushed
the
chore/currency-drop-deprecated-message
branch
from
August 31, 2026 09:19
940ef7a to
0515bd9
Compare
Completes the message-key migration. The currency payload no longer carries prose: message is gone from rating, passenger, flight-review, requirement and launch-method results, and name survives only on custom currency rules, where it is pilot-authored user data rather than a translatable string. Removing the fields exposed a bug they were hiding. The notification service picked a locale-specific email template via PreferredLocale and then interpolated the API's English sentence into it, so a German user received a German template containing English currency prose. The email package now renders the same key catalogue per locale (pkg/email/currency_messages.go), and a test keeps the two locale maps in step. Dropping the prose also retired the code that only existed to build it: the msgFmt format strings and name fields on reqSpec, the plural helper, and paxExpiryNote — passenger expiry now reaches clients solely as the dayExpiresOn/nightExpiresOn dates. BREAKING CHANGE: message and name are removed from the currency response. Clients must render messageKey/nameKey per docs/CURRENCY_MESSAGES.md. Merge only after the web and iOS clients ship key rendering. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The e2e helper found requirements by their English name and the passenger expiry test asserted the date appeared in the message text; neither field exists once the deprecated prose is removed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
passengerPrivilege was declared on PassengerCurrency and in the spec, and rendered by the web client, but no code path ever populated it — the field was always absent from the response and the client branch could never fire. The two tests covering it only asserted that a struct literal holds what was put in it, never calling an evaluator, which is how the surface survived while looking covered. Also documents that a hint's id from GET /announcements doubles as its localisation key, while operator-authored announcement text is never translated — the same user-data rule the currency contract applies to custom rule names. BREAKING CHANGE: passengerPrivilege is removed from PassengerCurrency. It was never populated, so no response content changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The contract said message and name are gone but never listed passengerPrivilege, which the web client still renders. A client dev reading the contract now finds what to delete, including the warning that a test fixture supplying a removed field keeps passing while covering a surface the API cannot produce. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fjaeckel
force-pushed
the
chore/currency-drop-deprecated-message
branch
from
August 31, 2026 10:21
0515bd9 to
f39a805
Compare
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.
Stacked on #206 — base is
feat/currency-message-keys, so the diff shows only this step. GitHub retargets it tomainwhen #206 merges.Do not merge until [ninerlog-frontend] and [ninerlog-ios] have shipped key rendering. That is the entire point of the deprecation window: old iOS builds sitting in App Store review must keep working.
What goes
messageis removed fromClassRatingCurrency,PassengerCurrency,FlightReviewStatus,CurrencyRequirementandLaunchMethodCurrency.nameis removed from regulatory requirements and kept on custom currency rules, where it is pilot-authored user data and was never translatable.Clients render
messageKey/nameKeyperdocs/CURRENCY_MESSAGES.md.A bug the removal exposed
NotificationServicepicks a locale-specific email template fromuser.PreferredLocaleand then interpolated the API's English sentence into it. A German pilot got:German template, English payload. Deleting
Messageforced the fix rather than letting it hide behind a field nobody looked at.Emails are server-rendered, so the server needs its own copy of the catalogue:
pkg/email/currency_messages.goholds the en and de maps, rendered by locale exactly like every other email string in that package.TestCurrencyMessageCataloguesMatchfails if the two locales drift apart, andTestCurrencyMessagesAreLocalisedpins the actual bug — English and German must not render identically.Dead code the prose was keeping alive
reqSpec.msgFmtandreqSpec.name— the format strings existed only to build "12 / 720 minutes in class", which the client now composes fromcurrent/required/unit(the web already did this for minutes)plural()— only ever fed English "landing(s)"paxExpiryNote()— passenger expiry now reaches clients solely asdayExpiresOn/nightExpiresOn. Worth noting the web client already ignoredpax.messageentirely, so this note was only ever visible on iOSrating := rt.ratinglocals andfmtimports that existed only for message formattinggolangci-lintis back to the exact 57-issuemainbaseline (it briefly went to 58 whenpluralwas orphaned).Left alone deliberately
passengerPrivilegeis still dead surface — declared intypes.goand the spec, rendered by the web client, never populated by any Go code. I flagged it on #206 and did not act, because removing it versus implementing it is a product call, not a cleanup one. Say which and I will follow up.Tests
E2E now asserts the negative: no rating or passenger card may carry a
messagekey at all. The evaluator sweep is unchanged and still requires a catalogued key on every reachable branch.🤖 Generated with Claude Code