Skip to content

feat(scout-for-lol): derive a lane_results table in the report lake - #5305

Merged
shepherdjerred merged 7 commits into
mainfrom
scout-lake-lane-results
Dec 3, 2026
Merged

shepherdjerred merged 7 commits into
mainfrom
scout-lake-lane-results

Conversation

@shepherdjerred

@shepherdjerred shepherdjerred commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Why

Lane rates across a friend group (and later the public pages) need "ahead at 15" per laner without reading every timeline frame on each request: consumer reads share two DuckDB slots per process. The table has to say exactly what the match page says, so it reuses buildRoleMatchups and the corrected checkpoint rule from #5205.

This builds on #5186, now merged. It retired the previous lake migration, which freed the single predecessor slot this migration uses.

What

  • lane_results derived table (backend/src/report-lake/lane-results/): one row per laner per tracked match that buildRoleMatchups can pair. Columns: match_id, month, derived_at, game_created_at, queue_id, puuid, participant_id, team_id, role, champion_id, opponent_participant_id, opponent_puuid, opponent_champion_id, win, has_timeline, checkpoint_timestamp_ms, checkpoint_complete, gold_diff_at_15, cs_diff_at_15, xp_diff_at_15 (laner minus opponent).
  • Checkpoint rule: the first frame stamped at or after 15:00 and before 16:00 (Riot stamps it at about 900303 ms). None (a game under 15 minutes, a missing frame, no timeline) means NULL differences and checkpoint_complete NULL; a match without a timeline still has its rows with has_timeline = false. "Ahead at 15" is gold_diff_at_15 > 0.
  • Partial checkpoint frames are a typed state: a 15:00 frame that omits a participant is Riot boundary data, not a broken internal contract. Such a match gets checkpoint_complete = false with NULL differences. buildRoleMatchups now returns checkpoint: "complete" | "missing" | "incomplete" on every pairing, so the match page shows no lane result instead of throwing. Manifests record laneResultIncompleteCheckpoints, and report_lake_lane_checkpoint_incomplete_total{tier} counts these matches. Evidence is under Verification.
  • Layering: buildRoleMatchups and isStandardRiftGame moved unchanged from trpc/router/consumer/ to reports/lanes/ (role-matchups.ts, standard-rift.ts). The routers, community insights and the lake writer import them from there. The move is its own commit.
  • Writers: a fold re-derives every match its staged match or timeline rows name (fold files); a rebuild derives every match. Both run one derivation over the candidate build's own Parquet, reusing buildRoleMatchups and the app's checkpoint frame selection. Reads keep the newest derivation per laner (derived_at), so a timeline folded after its match replaces the timeline-less rows.
  • Migration: schema epoch 3 (Delivery forward-only configuration scout-beta/3, scout-prod/3) and LAKE_PREDECESSOR_SCHEMA_FINGERPRINT = 0d22d548965ee58c, pinned by a test to the current schema minus lane_results. The next scheduled fold migrates by full rebuild; the boot fold and initial-history publishing skip while it is pending (the feat(scout-for-lol): store bot and unresolved participants in the report lake #4512 mechanism, restored).
  • Gated source: buildLaneResultsSource (reports/duckdb/lake/lane-results-source.ts, next to lake.ts, which is at its line cap) answers unavailable for any build not at the current fingerprint. fetchLaneResultsForMatches (lake/lane-results-reads.ts) returns { status: "unavailable" } | { status: "available"; rows }. No reader is switched to the table in this PR.
  • Build manifests and report_lake_compaction_rows_total record laneResultRows.
  • Wiki explanation (explanation/scout-report-lake) and backend README describe the table and the migration.

Verifying the rebuild in each stage

After this deploys, the next scheduled lake fold in each stage runs the migration rebuild. It is done when:

  1. The published build's manifest.json has schemaFingerprint: e767138ef6f2cf23, a laneResultRows count and laneResultIncompleteCheckpoints (expected 0 today, per the audit below).
  2. lane_results rows match eligible matches: every tracked match that pairs (standard Summoner's Rift queue, 10 participants with ids, each role once per team) has exactly 10 rows. Against the published build:
-- eligible = distinct matches with lane rows; expect rows = 10 × matches, and no match with ≠ 10
SELECT count(*) AS rows, count(DISTINCT match_id) AS matches,
       count(*) FILTER (WHERE has_timeline) AS with_timeline,
       count(*) FILTER (WHERE gold_diff_at_15 IS NOT NULL) AS with_checkpoint
FROM read_parquet('<build>/lane_results/**/*.parquet');

SELECT count(DISTINCT match_id) AS rift_matches
FROM read_parquet('<build>/matches/**/*.parquet')
WHERE map_id = 11 AND game_mode = 'CLASSIC' AND queue_id IN (400, 420, 430, 440, 480, 490, 700, 710);

matches in the first query should equal rift_matches minus matches that do not pair (end-of-game records, duplicated or missing roles); the gap is small and each such match also has roleMatchups: null on its match page. Then readers can switch (follow-up C3 removes the predecessor and the gate together).

Demo

There was no lane table before this PR; these tables come from the default-tier fixture lake (lane-results.test.ts), dumped with duckdb -markdown.

lane_results columns (month is the hive partition):

column_name column_type
match_id VARCHAR
derived_at TIMESTAMP
game_created_at TIMESTAMP
queue_id INTEGER
puuid VARCHAR
participant_id INTEGER
team_id INTEGER
role VARCHAR
champion_id INTEGER
opponent_participant_id INTEGER
opponent_puuid VARCHAR
opponent_champion_id INTEGER
win BOOLEAN
has_timeline BOOLEAN
checkpoint_timestamp_ms BIGINT
checkpoint_complete BOOLEAN
gold_diff_at_15 INTEGER
cs_diff_at_15 INTEGER
xp_diff_at_15 INTEGER
month VARCHAR

Row counts on the test lake. rebuild_* is one full derivation. fold_* is two fold derivations where the ranked match's timeline arrives in the second fold: the files hold 20 rows for it, and reads keep the 10 newest.

match_id fixture rebuild_rows with_timeline checkpoint_complete with_diffs ahead_at_15 fold_files_rows fold_read_rows
NA1_7300000001 ranked, 15:00 frame at 900303 ms 10 10 true 10 4 20 10
NA1_7300000002 ended 14:30 10 10 NULL 0 0 10 10
NA1_7300000003 no timeline 10 0 NULL 0 0 10 10
NA1_7300000004 ARAM 0 0 NULL 0 0 0 0
NA1_7300000005 ranked, bot laner 10 10 true 10 4 10 10
NA1_7300000006 15:00 frame omits a participant 10 10 false 0 0 10 10

Fold vs rebuild: the same rows either way.

rebuild_rows fold_rows only_in_rebuild only_in_fold
50 50 0 0

Partial 15:00 frames in the live lakes. A read-only DuckDB audit ran inside each stage's scout-backend pod over the published build's Parquet (staging excluded). It counted tracked matches whose first frame in [15:00, 16:00) has fewer distinct participants than the match, and the same for every frame at any timestamp.

stage build matches with a timeline with a 15:00 checkpoint (10-player Rift) partial checkpoint frames partial frames at any timestamp
beta 1795739716228-0016 8,084 7,755 (7,486) 0 0
prod 1795739708605-0368 30,700 29,331 (28,042) 0 0

The count is zero today, but no code guarantees it. RawTimelineFrameSchema.participantFrames (data/src/league/raw-timeline.schema.ts) is an open, nullable record, and flattenTimeline (report-lake/flatten-timeline.ts) writes whatever entries a frame has. The Scout Client converter (scout-client/canonical/lcu-timeline.ts) checks that frame participants are known, not that every participant is present. So the review's rule applies: this is a typed, counted state, not fail-loud.

The ranked match, blue side. The checkpoint is the frame stamped at 900303 ms, not the 14:00 frame, where blue led every lane by 100. Level gold is not ahead.

role blue red checkpoint_ms gold cs xp ahead_at_15
top 1 6 900303 400 3 400 true
jungle 2 7 900303 0 0 0 false
middle 3 8 900303 250 3 250 true
adc 4 9 900303 -300 -3 -300 false
support 5 10 900303 -50 -3 -50 false

Parity with the match page. lane-results.test.ts reads the same lake through fetchFullMatch + fetchTimelineCheckpointFrames + buildRoleMatchups and compares the checkpoint state, ahead-at-15 and the three differences for every laner. All 50 laners agree, including the partial-frame match. As a mutation check, starting the derivation's checkpoint window at 14:00 instead fails it:

✓ agrees with the match page's buildRoleMatchups for every laner
✓ states each laner's opponent, and nulls without a checkpoint
✓ folding a late timeline reads the same rows as one rebuild
✓ is unavailable until a build at the current schema publishes it
# with the window starting at 14:00:
× agrees with the match page's buildRoleMatchups for every laner
× states each laner's opponent, and nulls without a checkpoint

Wiki: a new section, "Derived tables: lane results", in explanation/scout-report-lake. There is no prior state to compare against. Desktop at 1440 and mobile at 390:

wiki-after-1440.png
wiki-after-390.png

Verification

  • bunx turbo run build typecheck test lint --filter=@scout-for-lol/backend --filter=@scout-for-lol/app --continue (after the move and the checkpoint change): backend 642/642 test files, app 92/92. The app is included because consumerMatch.detail's roleMatchups gained checkpoint. 32/33 tasks passed. The one failure was the dependency build @shepherdjerred/tracker#build (ENOENT @shepherdjerred/console-ui/styles/index.css), which then passed when re-run alone (9/9).

  • The move is behaviour-identical: before the checkpoint change, the role-pairing unit tests, the lane parity tests, the lane integration tests and the architecture-boundary test (21 tests) passed unchanged on the moved module.

  • lane-results.test.ts (default tier): 4/4. It covers parity with buildRoleMatchups for all 50 laners (frames at about 900303 ms, a 14:30 game, no timeline, ARAM, a bot laner, a 15:00 frame missing participant 7), fold/rebuild parity with a late timeline, and the gate states (no manifest, predecessor fingerprint, current schema with nothing derived). As a mutation check, moving the checkpoint window to start at 14:00 fails 2 of the 4.

  • Role-pairing unit test: a frame that omits a participant now returns checkpoint: "incomplete" with at15: null for every lane, and no frame returns "missing".

  • lane-results.integration.test.ts (extended tier): 2/2.

    • A real runReportLakeFold (the match first, then its timeline) equals runReportLakeRebuild from S3, and the gold differences equal the match page's buildRoleMatchups.
    • A predecessor-schema lake reads unavailable and reports reportLakeMigrationPending. The next fold runs as tier: "rebuild", the rows come back identical, and the fold after that is an ordinary fold.
  • schema.test.ts: the epoch is 3 and the fingerprint is e767138ef6f2cf23. The predecessor fingerprint equals the current schema minus lane_results, and the retired e086a72a1a8176aa is now unknown.

  • Wiki: bun run typecheck reported 0 errors and bun run build completed. The new section was rendered and inspected at 1440 and 390 (Demo).

  • bunx lefthook run pre-commit: passed, including service-registration (the immutable configuration revisions are bumped to scout-beta/3 and scout-prod/3) and directory-file-counts.

  • Backend extended tier on the final head: bun run verify:extended -- --filter=@scout-for-lol/backend: 26/26 tasks, 161 test files and 1,479 tests passed, lane-results.integration.test.ts included.

  • Earlier full extended run: bun run verify:extended -- --filter='...[origin/main...HEAD]': 66/66 tasks passed. Test files passed: @scout-for-lol/backend 161, @scout-for-lol/temporal 20, @shepherdjerred/delivery 71, @shepherdjerred/temporal 45 + 84, and golink, errors and mc-harness 1 each. This ran on the head while it was stacked on refactor(scout-for-lol): retire the participant-kind lake migration predecessor #5186. The rebase onto main after refactor(scout-for-lol): retire the participant-kind lake migration predecessor #5186 merged left the commit unchanged (git range-diff shows it identical).

  • Restacked onto main d8a526c. Main had added more importers of the moved modules, so three commits integrate them:

    • repoint role-matchup callers (champion matchups, meta lane) and share the test-lake fixture tail;
    • repoint standard-rift.ts importers (consumer-guild.router.ts, profile-summary.ts);
    • regenerate the two consumerMatch.detail snapshots, which only gain a checkpoint line per pairing.

    One catalog conflict was resolved by keeping main's recipeRevisionId: scout-beta/4 alongside this PR's configurationRevisionId: scout-beta/3. Service-registration passes. On the restacked head:

    • backend and app build typecheck lint passed, and app tests passed 95/95 files;
    • backend tests first failed only the two snapshot tests, which are now fixed: consumer-match-story.router.test.ts 13/13.
    • backend test re-run: 663/663 files and 6,189 tests;
    • backend extended tier (bun run verify:extended -- --filter=@scout-for-lol/backend): 165 files and 1,503 tests, 26/26 tasks;
    • pre-commit over the branch's files (including jscpd and service-registration): passed.
  • Not run: Woodpecker CI on this head, image publication, Delivery and ArgoCD rollout, and the live migration rebuild in Beta and Prod (see "Verifying the rebuild in each stage").

  • The match page renders an incomplete checkpoint like a missing one (no lane result). The app's scoreboard type ignores the new checkpoint field, and no UI copy changed.

🤖 Generated with Claude Code

https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y

@shepherdjerred

shepherdjerred commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner Author

@greptile-apps

greptile-apps Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Base automatically changed from scout-lake-retire-4512-predecessor to main November 27, 2026 00:32
@shepherdjerred
shepherdjerred force-pushed the scout-lake-lane-results branch 2 times, most recently from 5b2c5c5 to 7c94295 Compare November 27, 2026 00:33
@shepherdjerred
shepherdjerred force-pushed the scout-lake-lane-results branch from c99c2fd to 546551d Compare November 28, 2026 09:18
@shepherdjerred
shepherdjerred removed this pull request from stack #5306 November 28, 2026 09:18
@shepherdjerred
shepherdjerred marked this pull request as ready for review November 28, 2026 17:45
@shepherdjerred

Copy link
Copy Markdown
Owner Author

@codex review

Automated re-review request for 546551d from the CI review gate.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T17:48:46.803493Z 546551d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 546551da4f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

shepherdjerred and others added 7 commits December 2, 2026 19:26
Why
Lane rates across a friend group (and later the public pages) need "ahead at
15" per laner without reading every timeline frame per request; consumer
reads share two DuckDB slots per process. The table must say exactly what the
match page says (buildRoleMatchups, aligned to the corrected checkpoint rule
in #5205).

What
- New derived lake table lane_results: one row per laner per tracked match
  that buildRoleMatchups can pair (laner and same-role opponent PUUID,
  participant id and champion; team, role, win, queue, game time,
  has_timeline, the checkpoint timestamp and the gold/CS/XP difference at
  15:00). Checkpoint = first frame stamped in [15:00, 16:00); none (shorter
  game, missing frame, no timeline) means NULL differences.
- Derivation reuses buildRoleMatchups over the same checkpoint frames the
  app reads. A fold re-derives every match its staged match or timeline rows
  name (fold files); a rebuild derives every match. Reads keep the newest
  derivation per laner (derived_at), so a timeline folded after its match
  replaces the timeline-less rows.
- Schema epoch 3 (Delivery forward-only configuration scout-beta/3,
  scout-prod/3) and a declared predecessor fingerprint 0d22d548965ee58c (the
  lake without lane_results): the next scheduled fold migrates by full
  rebuild; boot and initial-history folds skip while it is pending.
- buildLaneResultsSource (reports/duckdb/lake/lane-results-source.ts) is
  gated: a build not at the current fingerprint answers "unavailable";
  fetchLaneResultsForMatches surfaces that as a typed state. No reader is
  switched to the table yet.
- Build manifests and compaction metrics record laneResultRows.
- Wiki explanation and backend README describe the table and migration.

Verification
- Default-tier parity test (lane-results.test.ts): a five-match test lake
  (ranked with frames stamped at 900303 ms, a 14:30 game, no timeline, ARAM,
  a bot laner) agrees with fetchFullMatch + fetchTimelineCheckpointFrames +
  buildRoleMatchups for all 40 laners; incremental fold derivation with a late
  timeline reads identically to one full derivation; gate states covered.
  Reverting the checkpoint window to start at 14:00 fails the parity test.
- Extended-tier lane-results.integration.test.ts: real runReportLakeFold
  (match, then timeline) equals runReportLakeRebuild from S3; a
  predecessor-schema lake is unavailable, then migrated by the next fold.
- bunx turbo run build typecheck test lint --filter=@scout-for-lol/backend
- Not run: CI, deployment, live rebuild in beta/prod.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
Why
The lane_results writer in report-lake imported buildRoleMatchups from a
tRPC router module, so the lake depended on a transport.

What
- Move consumer-match-role-matchups.ts and standard-rift.ts to
  src/reports/lanes/ (role-matchups.ts, standard-rift.ts) unchanged; the
  match and Explore routers, community insights and the lake writer import
  them from there.

Verification
- Typecheck and lint of the touched modules are clean.
- consumer-profile-details.router.test.ts (role pairing), lane-results.test.ts
  (parity with buildRoleMatchups), lane-results.integration.test.ts and the
  architecture-boundary test pass unchanged: 21 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
…he lane pairing

Why
buildRoleMatchups threw when a 15:00 checkpoint frame omitted a participant.
Riot's participantFrames is an open record and nothing between Riot and the
lake guarantees ten entries, so that is boundary data. Reused by the
lane_results writer, one such timeline would have failed every fold and
rebuild in a stage.

What
- buildRoleMatchups returns checkpoint "complete" | "missing" | "incomplete"
  on every pairing; an incomplete checkpoint gives no lane result for any lane
  of the match (the match page shows no result instead of failing).
- lane_results gains checkpoint_complete (NULL without a checkpoint, FALSE for
  a partial frame, which leaves the differences NULL). Schema fingerprint
  e767138ef6f2cf23; the predecessor is unchanged (the lake without the table).
- Manifests record laneResultIncompleteCheckpoints and
  report_lake_lane_checkpoint_incomplete_total{tier} counts them.
- README and wiki describe the state.

Verification
- Read-only audit of the published builds: beta (1795739716228-0016) 0 of
  7,755 matches with a 15:00 checkpoint, prod (1795739708605-0368) 0 of
  29,331, have a partial checkpoint frame; 0 partial frames at any timestamp in
  either stage.
- lane-results.test.ts adds a match whose 15:00 frame omits a participant;
  table and match page agree for all 50 laners (1 incomplete match).
- Role pairing unit test covers the incomplete and missing states.
- Backend and app build/typecheck/test/lint; backend extended tier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
Why: main gained role-matchup imports from the router module that this
stack removes, and the lane_results rows pass readonly arrays.

What: repoint those imports to reports/lanes/role-matchups.ts, make the
buildRoleMatchups inputs readonly, and share the empty timeline and lane
lake fixture tail that the ratchet flagged as duplicated.

Verification: backend typecheck clean; bun run jscpd ratchet passes;
check-directory-file-counts passes.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
Why: consumer-guild.router.ts and profile-summary.ts came in from main
importing the router-module standard-rift.ts that this stack moved.

What: import STANDARD_COMMUNITY_QUEUES from reports/lanes/standard-rift.ts.

Verification: backend and app typecheck and lint after restacking onto main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
…h detail snapshots

Why: roleMatchups now carry checkpoint (complete/missing/incomplete), which
main's consumer match story snapshots did not include.

What: regenerate the two match-detail snapshots; the only change is one
checkpoint line per pairing (complete with a timeline, missing without).

Verification: consumer-match-story.router.test.ts 13/13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
… module after the restack

Why: main moved bindParams and runSource into reports/duckdb/lake/statement.ts, so the lane_results derivation and reads no longer resolved them.

What: point derive-lane-results and lane-results-reads at the leaf module.

Verification: turbo typecheck lint over the changed packages, jscpd, check-directory-file-counts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
@shepherdjerred
shepherdjerred force-pushed the scout-lake-lane-results branch from 546551d to 908a14d Compare December 3, 2026 03:39
@shepherdjerred
shepherdjerred merged commit f38745d into main Dec 3, 2026
7 checks passed
@shepherdjerred
shepherdjerred deleted the scout-lake-lane-results branch December 3, 2026 04:57
shepherdjerred added a commit that referenced this pull request Dec 3, 2026
…ults landed

Why: main's Compare router still imported standard-rift from the old router path and the lane readers imported runSource from the profile reads; #5305 moved both, so the backend build failed on main.

What: point compare.ts at reports/lanes/standard-rift and the lane readers at the lake statement leaf module.

Verification: turbo typecheck lint over the changed packages, scout backend matchup/lane/compare tests, jscpd, check-directory-file-counts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
shepherdjerred added a commit that referenced this pull request Dec 3, 2026
…mpare reader (#5545)

Why
#5305 moved standard-rift.ts to reports/lanes/ while #5398 (merged just
before it) still imported the old trpc/router/consumer path, so main's
backend no longer builds.

What
Repoint the one remaining import in compare/compare.ts.

Verification
- bunx turbo run typecheck --filter=@scout-for-lol/backend: 26/26.
- bun run test src/trpc/router/consumer/compare (backend): 7/7.
- eslint on the changed file: clean.


Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
shepherdjerred added a commit that referenced this pull request Dec 3, 2026
…ults landed

Why: main's Compare router still imported standard-rift from the old router path and the lane readers imported runSource from the profile reads; #5305 moved both, so the backend build failed on main.

What: point compare.ts at reports/lanes/standard-rift and the lane readers at the lake statement leaf module.

Verification: turbo typecheck lint over the changed packages, scout backend matchup/lane/compare tests, jscpd, check-directory-file-counts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
shepherdjerred added a commit that referenced this pull request Dec 3, 2026
Why: the lane_results change (#5305) added a required checkpoint to RoleMatchup, so the Match page fixture no longer typechecked against main.
What: the fixture's role matchup is a complete checkpoint.
Verification: app and design-audit typecheck, lint and test:ci pass; bun run jscpd passes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
shepherdjerred added a commit that referenced this pull request Dec 3, 2026
Why: the lane_results change (#5305) added a required checkpoint to RoleMatchup, so the Match page fixture no longer typechecked against main.
What: the fixture's role matchup is a complete checkpoint.
Verification: app and design-audit typecheck, lint and test:ci pass; bun run jscpd passes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
shepherdjerred added a commit that referenced this pull request Dec 3, 2026
…ults landed

Why: main's Compare router still imported standard-rift from the old router path and the lane readers imported runSource from the profile reads; #5305 moved both, so the backend build failed on main.

What: point compare.ts at reports/lanes/standard-rift and the lane readers at the lake statement leaf module.

Verification: turbo typecheck lint over the changed packages, scout backend matchup/lane/compare tests, jscpd, check-directory-file-counts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
shepherdjerred added a commit that referenced this pull request Dec 3, 2026
Why: the lane_results change (#5305) added a required checkpoint to RoleMatchup, so the Match page fixture no longer typechecked against main.
What: the fixture's role matchup is a complete checkpoint.
Verification: app and design-audit typecheck, lint and test:ci pass; bun run jscpd passes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
shepherdjerred added a commit that referenced this pull request Dec 3, 2026
…ults landed

Why: main's Compare router still imported standard-rift from the old router path and the lane readers imported runSource from the profile reads; #5305 moved both, so the backend build failed on main.

What: point compare.ts at reports/lanes/standard-rift and the lane readers at the lake statement leaf module.

Verification: turbo typecheck lint over the changed packages, scout backend matchup/lane/compare tests, jscpd, check-directory-file-counts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
shepherdjerred added a commit that referenced this pull request Dec 3, 2026
…ayer summary from lane_results (#5441)

* feat(scout-for-lol): serve the Matchup page and a lane line on the Player summary from lane_results

Why
The redesigned in-app Matchup page needs the viewer's and friends' record in a
champion matchup with ahead at 15 minutes, and the Player page's "Lately" line
needs "Ahead at 15 minutes in 11 of 19 lane games". Both must use the one
definition of ahead at 15 held by the lane_results table, never recompute from
timelines, and say so when the published lake predates the table.

What
- consumerChampion.matchup({ championId, opponentChampionId, lane, guildIds? }):
  the viewer's record and friends' record (each with game count and ahead at 15
  of the games with a checkpoint) plus the viewer's ten newest games with
  scoreline, standing at 15 and LP change. One lake slot; logic in
  trpc/router/consumer/champion-matchup/.
- consumerPlayer.profileSummary gains `lane` ({ status, games, ahead }) over the
  games window the summary already reads, in its existing lake slot.
- Both return a typed unavailable result when lane_results is gated or has no
  derived rows. A game with no 15:00 checkpoint counts in the record but not in
  the ahead figure; a level lane is not ahead.
- Design-audit seed derives lane_results for its fixture lake.

Verification
- vitest: champion-matchup, profile-lane and consumer-player-lane suites (23
  tests) pass, including one-slot, gated, empty, forbidden, multi-account and
  multi-server cases; src/trpc/router/consumer and lib/player-profile pass apart
  from two consumer-match-story snapshots owned by the base PR.
- backend and app tsc, eslint on touched directories, jscpd and directory
  file-count checks pass.
- Not run: live beta or production lake (lane_results is gated there until the
  rebuild publishes).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y

* fix(scout-for-lol): resolve the lane imports that moved when lane_results landed

Why: main's Compare router still imported standard-rift from the old router path and the lane readers imported runSource from the profile reads; #5305 moved both, so the backend build failed on main.

What: point compare.ts at reports/lanes/standard-rift and the lane readers at the lake statement leaf module.

Verification: turbo typecheck lint over the changed packages, scout backend matchup/lane/compare tests, jscpd, check-directory-file-counts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y

* test(scout-for-lol): put the lane router suites in the db CI group

Why: the matchup and player-lane router suites reach the PostgreSQL harness, so the CI group guard rejected them in the free groups.

What: list both in the db group and drop them from the free groups' excludes and turbo inputs.

Verification: scripts/ci-test-groups.test.ts passes; both suites pass locally.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y

* fix(scout-for-lol): give a shared account to the viewer in the matchup tally

Why: an account tracked by the viewer in one server and by another person in a second was assigned to whichever came last, which could move the viewer's matchup games into friends.

What: the viewer's entry owns a shared PUUID regardless of order; a test covers both orders.

Verification: champion-matchup suites pass; typecheck and lint run by the pre-commit hook.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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