Skip to content

Add NBA mirror - #30

Open
lyc61c wants to merge 1 commit into
aiming-lab:mainfrom
lyc61c:add-nba-mirror
Open

lyc61c wants to merge 1 commit into
aiming-lab:mainfrom
lyc61c:add-nba-mirror

Conversation

@lyc61c

@lyc61c lyc61c commented May 18, 2026

Copy link
Copy Markdown

Summary

Adds a new WebHarbor mirror site for NBA.com:

  • Real site mirrored: NBA.com
  • Upstream URL: https://www.nba.com/
  • Site slug: nba
  • Local port: 40015 in the container, typically exposed as http://localhost:41015/ during testing

The mirror implements an NBA.com-style sports information portal with homepage stories, games/schedule, playoffs, draft, fantasy, stats, standings, teams, players, news/articles, search, tickets, store/cart/checkout, and account flows. Runtime behavior is deterministic and uses SQLite plus local static assets only.

Seeded data

Major seeded model counts:

Model Rows
Users 4
Teams 30
Players 28
Games 10
Articles 22
Products 16
Cart items 8
Orders 4
Order items 4
Favorites 12
Ticket requests 0

Functional coverage

Implemented routes and flows include:

  • NBA.com-style homepage with top game strip, hero story, story cards, headlines, trending/news sections, recaps, and right rail
  • Games and schedule pages with official-style game cards and playoff schedule layout
  • Playoffs bracket/news page
  • Draft page with combine, lottery, mock draft, key dates, draft info, and classic moments sections
  • Fantasy page with featured stories, watch cards, Yahoo High Score sections, and dense player-stat table
  • Stats and standings pages with official-style leader panels, tables, conference standings, and bracket context
  • Teams by division, team profiles, rosters, schedules, and team stats
  • Players table, filters, player profiles, and stat summaries
  • News/category browsing and article detail pages
  • Search grouped by teams, players, games, articles, stats, and store items
  • Tickets request flow, local NBA Store, bag, checkout, account, orders, and favorites

Benchmark tasks

sites/nba/tasks.jsonl contains 20 WebVoyager-schema benchmark tasks.

Task coverage includes:

  • Player filtering and profile lookup
  • Games and season leader comparison
  • Schedule lookup
  • Standings-to-team-profile reasoning
  • Player stats and team stats comparison
  • Team division browsing
  • Draft page/article/key-date tasks
  • Fantasy stat table comparison
  • Search-to-article navigation
  • Watch/highlights disambiguation
  • Tickets comparison
  • Store filtering/product-detail reasoning
  • Authenticated cart/checkout/account update flows

The tasks were revised to reduce benchmark leaks:

  • No repeated seeded credential text in tasks
  • No alice.j@test.com / TestPass123! task leakage
  • No stale TBD arena task from an older schedule layout
  • Fewer login-dependent tasks; only tasks that genuinely require account/cart/profile state ask the user to sign in

Paired HuggingFace dataset PR

Paired asset-side PR:

<PASTE_HUGGINGFACE_DATASET_PR_LINK_HERE>

The HF asset bundle is nba.tar.gz and contains:

  • nba/instance_seed/nba.db
  • nba/static/images/
  • nba/static/external_cache/

After the HF PR merges, this code PR should bump .assets-revision to the merged dataset revision.

Visual fidelity

The NBA mirror is designed to closely follow NBA.com rather than a generic Bootstrap demo:

  • Dark NBA-style top navigation with major nav entries: Games, Schedule, Watch, Playoffs, News, Draft, Stats, Standings, Teams, Players, NBA Play, Fantasy, BAL 2026, League Pass, Store, Tickets, Sign In
  • Homepage portal layout with top score strip, hero story module, story grids, headlines rail, trending sections, game recaps, Around the NBA content, social/affiliate-style right rail sections
  • Schedule, Draft, Fantasy, Playoffs, Stats, and Standings pages modeled after NBA.com page structures
  • Teams grouped by NBA divisions with local profile/stats/schedule/roster links
  • Dense player/stat/standings tables for benchmark comparison tasks
  • Local NBA.com-style imagery served from static/images/; no runtime network fetches

Screenshot evidence to attach to this PR:

  • NBA.com homepage vs local http://localhost:41015/
  • NBA.com Schedule page vs local /schedule
  • NBA.com Draft page vs local /draft
  • NBA.com Fantasy page vs local /fantasy
  • NBA.com Playoffs page vs local /playoffs
  • NBA.com Stats page vs local /stats
  • NBA.com Standings page vs local /standings

Test plan

  • python3 -m py_compile sites/nba/app.py
  • ./scripts/build.sh webharbor:dev
  • Started test container:
docker run -d --rm --name wh-test \
  -p 8201:8101 -p 41000-41015:40000-40015 webharbor:dev
  • Control plane reported nba alive on port 40015
  • Key pages rendered successfully during local checks:
    • /
    • /games
    • /schedule
    • /playoffs
    • /draft
    • /fantasy
    • /stats
    • /standings
    • /teams
    • /players
    • /news
    • /search
    • /tickets
    • /shop
    • /login
  • POST /reset/nba returned "ready": true
  • Byte-identical reset verified

Reset evidence

POST /reset/nba  ->  {"pid":524,"ready":true,"site":"nba"}

acb697f83c108e21b8da4c069cfef373  /opt/WebSyn/nba/instance/nba.db
acb697f83c108e21b8da4c069cfef373  /opt/WebSyn/nba/instance_seed/nba.db

Notes for reviewers

  • The mirror does not implement real video streaming, League Pass playback, ticket purchasing, payment processing, or external authentication.
  • Tickets, store, checkout, favorites, and account flows are local deterministic benchmark workflows.
  • HTTP handlers use SQLAlchemy/SQLite and local static files.
  • The runtime does not depend on live NBA.com data or runtime JSON files.
  • sites/nba/image/ is a local scratch/reference directory and should not be included in the final GitHub PR.

@MufanQiu

MufanQiu commented Jul 1, 2026

Copy link
Copy Markdown

Review — nba (PR #30)

Verdict: REQUEST CHANGES.

We deployed the environment locally and ran the full review checklist; every finding below was independently reproduced, and fidelity was checked against the real upstream site.

Issues (summary)

  • BLOCKER: .assets-revision pins 'main' but nba.tar.gz is not on main (CI fail-closed)
  • BLOCKER: Port-slot 40015 collides with merriam_webster on current main (merge conflict / clobber)
  • MINOR: NBA--18 'pre-order total' is non-deterministic due to non-empty seeded cart
  • MINOR: NBA--13 answer leaks in the search-result dek (no detail page needed)
  • MINOR: NBA--16 listing card exposes name+team+color+price (no product page needed)
  • MINOR: NBA--5 has a tie for second-highest BPG, making 'the top two' ambiguous

Mechanical checks: FAIL

  • Byte-identical reset: OK. Idempotent seed gated on Team.query.count()>0 and seed_benchmark_users() on alice's email; fresh boot reproduces the seed md5.

Visual fidelity: PASS

High-fidelity clone. Homepage (/tmp/nba_home.png) reproduces the utility nav, full main nav (Games/Schedule/Watch/Playoffs/News/Draft/Stats/Standings/Teams/Players/Store/Tickets/Sign In), hero story with a real player photo, Stories carousel, Trending Now, 2026 Postseason, Game Recaps, footer.

Functional depth: PASS

All flows driven with Playwright. Login (alice.j@test.com/TestPass123!) → /account; wrong password → "Invalid email or password." Register creates + auto-logs-in; duplicate email → "already registered." Search is scored/additive (multi-word does not zero out).

Task quality: PASS (with nits)

20 tasks; difficulty bar met (≥5 tasks need ≥5 actions; several multi-step/comparison tasks; no task solvable by clicking result #1, since listings hide PPG/APG and standings hide arena/coach).

Required fixes before approval

  1. (BLOCKER) Resolve the 40015 collision with merriam_webster. Rebase on current main and register nba at index 16 → port 40016 in all three files in sync: websyn_start.sh SITES, control_server.py SITES, and Dockerfile EXPOSE (raise to 40000-40016).
  2. (BLOCKER) Bump all 20 task URLs in lockstep. After the rebase, change every "web":"http://localhost:40015/" in sites/nba/tasks.jsonl to the new nba port (:40016/) so tasks target nba, not merriam_webster.
  3. (MAJOR) Pin .assets-revision to a merged dataset SHA that provably contains nba.tar.gz (not the floating main, not a PR ref).
  4. (MAJOR) Fix NBA--18 determinism. Either empty the benchmark users' seeded carts in seed_benchmark_users() (so the total is the intended $259.78) or rephrase the task to instruct clearing the bag first / report only the added jersey line.
  5. (MAJOR) Fix the NBA--13 leak. Shorten the "Bucks focus on half-court spacing" dek so it no longer enumerates both balanced elements; keep "Antetokounmpo rim pressure / Lillard range" only in the article body.

@jackjin1997

Copy link
Copy Markdown
Contributor

I’m claiming PR #30 for reviewer takeover. I’ll preserve @lyc61c’s original contribution, carry it on a separate reviewer-owned branch, audit and fix the environment/tasks/verifiers, and submit a linked Draft Review: PR with reproducible evidence. I will not merge either PR.

@jackjin1997

Copy link
Copy Markdown
Contributor

Reviewer takeover continues in Draft PR #101: https://github.com/aiming-lab/WebHarbor/pull/101\n\nPaired reviewed asset candidate: https://huggingface.co/datasets/ChilleD/WebHarbor/discussions/71. The original mirror contribution and authorship are preserved; the Draft remains pending independent blind review and final visual reconciliation.

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.

3 participants