Skip to content

fix(console): gated asset-change fallback when strict cohort has no overlap - #989

Merged
Pigbibi merged 3 commits into
mainfrom
fix/qrs-health-refresh-reads-20261031
Oct 31, 2026
Merged

Pigbibi merged 3 commits into
mainfrom
fix/qrs-health-refresh-reads-20261031

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Calendar and latest daily change fall back to the bounded per-currency asset series (≤3-day forward fill) only when the strict cohort has no usable calendar values, no account read failed, no member is missing, and dates were omitted.
  • Fallback cells and series are explicitly labeled asset_change / partial with snapshot_history_missing; no return claim is made and strict TWR fields stay unchanged.
  • Mixed-currency returns.per_currency entries expose their own asset_change series; currencies are never merged and no FX is inferred.
  • Frontend renders the fallback with explanatory zh/en notes in ReturnsCard and CalendarCard.
  • New tests/console_calendar_fallback_validation.mjs covers disjoint-date fallback, year view, missing/failed guards, mixed currencies, cashflow failure preservation, and untouched strict overlap.

Test plan

  • node tests/console_calendar_fallback_validation.mjs
  • related console suite (console_performance_stats, console_currency_totals, console_equity_history, console_api_contract, ...)
  • npx tsc --noEmit
  • npm run build

The combined performance view requires every account to share an
observation date. When the strict intersection is empty or too thin,
the calendar and latest daily change collapsed to an empty state even
though per-currency forward-filled asset history exists.

Reuse the bounded (max 3-day) asset series for those blocks only when
no read failed, no account is missing, dates were omitted, and no
strict calendar values exist. Cells are labeled asset_change/partial
with snapshot_history_missing coverage, and never carry a return
claim. Mixed-currency returns expose an independent asset_change
series per currency; strict TWR fields are untouched.
@Pigbibi
Pigbibi merged commit 9239e90 into main Oct 31, 2026
10 checks passed
@Pigbibi
Pigbibi deleted the fix/qrs-health-refresh-reads-20261031 branch October 31, 2026 10:15
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.

1 participant