Skip to content

feat(live): Live Leaderboard copy and catching-up badge - #708

Open
FlyM1ss wants to merge 9 commits into
mainfrom
feat/live-board-copy
Open

FlyM1ss wants to merge 9 commits into
mainfrom
feat/live-board-copy

Conversation

@FlyM1ss

@FlyM1ss FlyM1ss commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

DO NOT MERGE until the owner has checked the Live board's Entry cell at 375px wide (review focus 4 in the P6 plan: up to three .team-badge spans sit in a white-space: nowrap cell, and no browser runs in the dev WSL). Never merge from 22:15 UTC on a weekday until that night's live refresh has finished: the merge auto-deploys prod, and the restart kills a running refresh.

  • Renames the Live board "Live Leaderboard" in-app and in the payload. board_title and phase_label ("Season 0 · preview") now come from service.LIVE_BOARD_TITLE and service.LIVE_PHASE_LABEL, read by resolve_leaderboard_config("live"), live_freeze_config and the Live GET payload. Those two values are the only API response change; the OpenAPI/help text drops "Trading" too.
  • Live header: the subtitle is now the static "Simulated fills · forward-only · no real money", and the Updated stat is the static "Nightly after the close" instead of the request clock.
  • The Competition header gains a static line, "legacy engine · historical window · may overlap model training data".
  • Both boards' Rules and About cards now say stop-loss and take-profit prices are not executed (D12). test_stop_prices_not_enforced.py pins that the legacy single-prompt path drops them, through the per-bar valuation step too. The prompt is unchanged.
  • fix(live): a catching-up entry renders as pending on the board #586: catching-up rows get a "Catching up" badge (hover: "Catching up · through ") and a "Status" row in Entry Details. The banner reads the rows instead of live_status.models_cached and has_prints, which count ranked rows only. A sorted table keeps catching-up rows below every current row and above pending ones, in both directions. Phase 3's healthy-board fixture in test_frontend_live_budget.py now carries a printed model row (_PRINTED_MODEL) to match.
  • vs SPY shows — for a catching-up row, or against a catching-up SPY, instead of subtracting returns from two windows. Its sort value is NaN, so it sorts like any other no-figure cell.
  • With no model printed, the banner now also names a lagging baseline after the "Baselines frozen" line. "No freeze snapshot ... yet" shows only when no row has a printed curve, not when the only printed rows are catching up.
  • Tests: an AST guard pins LIVE_BOARD_TITLE and the "· preview" label to one owner, and a test pins that the catching-up date is escaped in the badge title and the Status row.

Before merging: re-run Task 6.6 Step 3 of docs/superpowers/plans/2026-10-14-live-board-fixes-p6-copy.md (cache-busters against origin/main). This branch has js/leaderboard.js?v=40 and js/live-leaderboard.js?v=8.

Stale once merged (P7 PR A owns them): CLAUDE.md:129 and docs/architecture/backend-internals.md:238 still call the rename unlanded.

Not in this PR: the landing (Race.tsx and its bundle) and docs/source still say "Live Trading Leaderboard" (P7 PR B, owner-coordinated).

Plan amendments: cache-busters bumped from what P1 and P5 left (39 to 40, 7 to 8); the 6.5 sort test loads _board_sharpe_js() and ok Sharpe rows, because P5 keys the Sharpe sort on window.boardSharpeValue; 6.5 edit 5 re-anchored on snapshot_end after 801af7f; the test_backtest_window_cap_is_two_weeks docstring (and its comment in backtests.py) now says seasons were two weeks, not that they are.

Left for the owner:

  • A same-window vs SPY figure for catching-up rows is not built: it needs server data or a client-side return derivation, against "returns come off the stored run". The cell shows the shipped —.
  • A board whose only printed rows are catching-up baselines while every model is pending joins two approved banner lines; any rewording needs owner copy.

Local suite: 5 failed, 7699 passed, 193 skipped, 25 xfailed. The 5 test_robinhood_mcp_transport.py failures happen only locally (mcp 1.28 against the 1.30 pin) and fail on clean main too.

Closes #586

🤖 Generated with Claude Code

FlyM1ss and others added 9 commits October 31, 2026 23:50
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… preview label

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#586)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the rows (#586)

A catching-up row's return ends sessions before SPY's (and a catching-up
SPY's before every current row's), so vs SPY now shows the no-figure dash
there and sorts as NaN. With no model printed, a lagging baseline is named
after the "Baselines frozen" line. has_prints counts ranked rows only, so the
"No freeze snapshot" line now also needs no printed row on screen. The #586
test helpers use the module-level fn_body, run_node and _APP_JS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lue the book in the stop guard

The value test passed if live.py spelled the title or season label out
again; an AST guard now allows those strings only in the two service.py
assignments. The stop guard also scans domain/trading/portfolio.py and runs
update_equity after every bar, as llm_agent.py does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment only. #boardEngineNote made it three, so "there are two" was stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the catching-up escapes

The Live title guard kept service.py's node id()s after that tree was freed,
so CPython could hand them to a later file's string and exempt it at random.
The skip set is now built from the tree being walked.

A plain date escapes to itself, so no test failed with either escapeHtml call
on the catching-up badge title or Status row removed. A date carrying markup
now pins both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agentic-trading-lab Ready Ready Preview Nov 1, 2026 5:34am UTC

This branch was successfully deployed

1 active deployment
Preview — c72fcbba Deployed Nov 1, 2026 by vercel[bot]
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.

fix(live): a catching-up entry renders as pending on the board

1 participant