You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[defect·P3] currency_meta.alpha_beta_note has zero readers anywhere, and its literal is a hardcoded Traditional-Chinese sentence sitting beside three fields that do reach the card #689
Discussion — mechanism-level finding from PR #685's investigation into #649, listed in the PR body under "Adjacent findings, deliberately not folded in." No real trade data anywhere below; no maintainer decision yet.
Owning outcome
Every field written into engine_card either reaches a card through a named, mechanical consumer, or it does not exist (the rule #416's audit applied and #429 restates for questions). Separately, no user-facing sentence bypasses copy/<locale>.json: a card rendered with --language en never carries a raw Traditional-Chinese literal (#356's rule).
This key is written into the currency_meta dict alongside mixed, aggregate_currency, fx, and pnl_by_currency — all four of which card_renderer.py reads (:843, :866, :974 against the same commit). alpha_beta_note is not among them: a grep of the entire origin/main tree — every .py file, tests included — for the literal string alpha_beta_note returns exactly one hit, the write site above. card_renderer.py has a separate, correctly-localized alpha-caveat mechanism (card.get("alpha_beta_breakdown"), _alpha_interval_line, routed through load_copy(language).get("alpha_interval") — the fix shape #313/#314/#272 already established via PR #332); alpha_beta_note is a different field on a different path and is not part of that mechanism.
Two facts compound rather than sitting side by side as independent nitpicks:
Latent i18n leak (fix(card): pre-commitment preview leaks a hardcoded Chinese rule string into English cards #356-class): the value is an f-string composed entirely in Traditional Chinese with no copy/<locale>.json routing, sitting inside the one dict on engine_card whose other keys are live, English-safe card inputs. fix(card): pre-commitment preview leaks a hardcoded Chinese rule string into English cards #356 fixed the structurally identical shape — a raw zh literal computed in trade_recap.py (state["rule"]), reaching card_renderer.py's pre-commitment branch untranslated on an English card — by routing the value through card_plan/copy instead of leaving it a trade_recap.py literal. Nothing here marks alpha_beta_note as internal-only or different in kind from its three siblings; the next reader wired for currency_meta — mechanical, or an agent reading engine_card JSON directly, which this product's own architecture treats as a legitimate consumer of engine-computed facts — has no signal that this one key was never meant to reach a user.
PR #685 widens how often the field is populated, without creating it: the field's else branch fires whenever mixed_ccy is True, and #685's whole point is that more books now count as mixed (a cash-flow-only currency is now enough to trigger it). The field was already dead and already carrying this literal before #685; #685 puts one more book shape behind the same latent condition, not fewer.
Evidence
Read against origin/main@e662164. Confirmed by a full-tree grep for the literal string alpha_beta_note (one hit: the write site) and by reading card_renderer.py's actual currency_meta consumers directly. No real trade data; this is a static code-mechanism finding, not a data reproduction.
Status
Discussion — mechanism-level finding from PR #685's investigation into #649, listed in the PR body under "Adjacent findings, deliberately not folded in." No real trade data anywhere below; no maintainer decision yet.
Owning outcome
Every field written into
engine_cardeither reaches a card through a named, mechanical consumer, or it does not exist (the rule #416's audit applied and #429 restates for questions). Separately, no user-facing sentence bypassescopy/<locale>.json: a card rendered with--language ennever carries a raw Traditional-Chinese literal (#356's rule).Mechanism
skills/fomo-kernel/engine/trade_recap.py:2862-2866(againstorigin/main@e662164):This key is written into the
currency_metadict alongsidemixed,aggregate_currency,fx, andpnl_by_currency— all four of whichcard_renderer.pyreads (:843,:866,:974against the same commit).alpha_beta_noteis not among them: a grep of the entireorigin/maintree — every.pyfile, tests included — for the literal stringalpha_beta_notereturns exactly one hit, the write site above.card_renderer.pyhas a separate, correctly-localized alpha-caveat mechanism (card.get("alpha_beta_breakdown"),_alpha_interval_line, routed throughload_copy(language).get("alpha_interval")— the fix shape #313/#314/#272 already established via PR #332);alpha_beta_noteis a different field on a different path and is not part of that mechanism.Two facts compound rather than sitting side by side as independent nitpicks:
trade_recap.py/card_renderer.pywere checked only by targeted greps rather than read end-to-end, andevals//mock fixtures were not swept — this field is exactly the kind of miss that leaves open, and neither [refactor·P2] Written-never-read fields: seven dead and two audit-only — wire a consumer or remove (the verify rule, applied) #416's Class A/B tables nor its do-not-reflag list mentioncurrency_metaoralpha_beta_note.copy/<locale>.jsonrouting, sitting inside the one dict onengine_cardwhose other keys are live, English-safe card inputs. fix(card): pre-commitment preview leaks a hardcoded Chinese rule string into English cards #356 fixed the structurally identical shape — a raw zh literal computed intrade_recap.py(state["rule"]), reachingcard_renderer.py's pre-commitment branch untranslated on an English card — by routing the value throughcard_plan/copy instead of leaving it atrade_recap.pyliteral. Nothing here marksalpha_beta_noteas internal-only or different in kind from its three siblings; the next reader wired forcurrency_meta— mechanical, or an agent readingengine_cardJSON directly, which this product's own architecture treats as a legitimate consumer of engine-computed facts — has no signal that this one key was never meant to reach a user.PR #685 widens how often the field is populated, without creating it: the field's
elsebranch fires whenevermixed_ccyisTrue, and #685's whole point is that more books now count as mixed (a cash-flow-only currency is now enough to trigger it). The field was already dead and already carrying this literal before #685; #685 puts one more book shape behind the same latent condition, not fewer.Evidence
Read against
origin/main@e662164. Confirmed by a full-tree grep for the literal stringalpha_beta_note(one hit: the write site) and by readingcard_renderer.py's actualcurrency_metaconsumers directly. No real trade data; this is a static code-mechanism finding, not a data reproduction.Cross-references
evals/run_episodes.py'sKNOWN_UNWIRED) checks questionkinds declared in the Review Plan schema, notengine_carddata fields, so it would not have caught this and this issue is not a duplicate of it.currency_metaoralpha_beta_note.card_plan/copy rather than a rawtrade_recap.pyliteral) that would apply here too, if and when a reader is wired.trade_recap.py-sourced literal-migration items (dims_raw[].dim,top_holes[].number_line,engine_card.strength, and what its own text calls "the alpha/P&L notes") reaching v2 cards untranslated specifically for zh-CN. Checked directly: those items are thealpha_beta_breakdown/_alpha_interval_linepath, notalpha_beta_note—alpha_beta_notereaches no card in any locale today, so it is not currently one of [i18n·P2] zh-CN ships under a mixed-script waiver — parity ratchet, two missing copy groups, literal migration #387's items. It shares [i18n·P2] zh-CN ships under a mixed-script waiver — parity ratchet, two missing copy groups, literal migration #387's root cause (a locale-unaware literal computed intrade_recap.py) and would want the same fix shape if a reader is ever wired for it.