Skip to content

Add Target WebHarbor mirror - #51

Open
Lxr-max wants to merge 1 commit into
aiming-lab:mainfrom
Lxr-max:add-target-site
Open

Add Target WebHarbor mirror#51
Lxr-max wants to merge 1 commit into
aiming-lab:mainfrom
Lxr-max:add-target-site

Conversation

@Lxr-max

@Lxr-max Lxr-max commented Jun 5, 2026

Copy link
Copy Markdown

Summary

Implementation Summary

  • Added a new local Target mirror under sites/target/ using Flask, SQLAlchemy, SQLite, Jinja templates, and local CSS/JS.
  • Implemented product search, category browsing, filters, product details, compare, wishlist, cart, pickup/delivery mock checkout, order lookup, account orders/rewards, deals, store lookup, and support/help flows.
  • Registered Target in websyn_start.sh, control_server.py, Dockerfile, and README quickstart guidance.
  • Kept all runtime behavior fully local and deterministic with synthetic products, stores, orders, reviews, support articles, and rewards data.

Seed Row Counts

  • users: 4
  • categories: 12
  • brands: 25
  • products: 156
  • stores: 15
  • store_inventory: 1989
  • reviews: 339
  • orders: 60
  • order_items: 80
  • reward_accounts: 4
  • reward_activities: 20
  • wishlist_items: 16
  • compare_items: 12
  • cart_items: 8
  • deals: 18
  • support_articles: 24
  • support_tickets: 8
  • protection_plans: 312
  • pickup_slots: 45
  • delivery_options: 3
  • payment_mocks: 60

Benchmark Users

Tasks

  • Task count: 20
  • Categories covered:
    • product search
    • category/brand/price filtering
    • cheapest-item discovery
    • product comparison
    • add to cart
    • pickup/delivery selection
    • mock checkout
    • order lookup
    • account orders
    • deals
    • store details
    • support search

Key Routes

  • /, /home
  • /categories, /category/<category_slug>
  • /products, /product/<sku>
  • /deals, /stores, /stores/<store_slug>
  • /support, /help, /search?q=
  • /cart, /checkout, /checkout/shipping, /checkout/pickup, /checkout/payment, /checkout/review, /checkout/confirmation
  • /login, /register, /logout, /account, /account/orders, /account/rewards, /account/wishlist
  • /order-lookup, /order/<order_number>

Verification Commands and Results

  • py -3 -m py_compile sites/target/app.py
  • py -3 -m py_compile sites/target/seed_data.py
  • py -3 -m py_compile sites/target/_health.py
  • sites/target/tasks.jsonl JSONL/schema validation ✅ (20 tasks)
  • docker build -t webharbor:target-pr .
  • docker run -d --name webharbor-target-submit -p 8401:8101 -p 44000-44015:40000-40015 webharbor:target-pr
  • Control server health at http://localhost:8401/health ✅ (16/16 sites alive)
  • Route smoke for /, /home, /categories, /products, /cart, /checkout, /order-lookup, /support, /login, /stores, /deals, /search?q=pickup
  • Real HTTP smoke for login, account pages, filters, compare, wishlist, cart, pickup checkout, confirmation, order lookup, logout ✅ (http-smoke-ok TGT-240061)

Docker Result

  • Docker image built successfully after fetching/extracting the pinned base assets and rebuilding the local Target seed DB.
  • On this Windows machine, the bash helper scripts have CRLF sensitivity, so I used the equivalent documented manual Docker/HF steps instead of relying on scripts/build.sh and scripts/extract_assets.sh directly.

Smoke Test Result

  • Passed for public routes, search/filter flows, product detail, support/store search, login/account flows, compare/wishlist/cart, pickup checkout, confirmation, and order lookup.

Reset + MD5 Result

  • POST /reset/target returned ready: true
  • MD5 matched inside the container after reset:
    • f7dc6396667b9dccb784c8d8612ea672 /opt/WebSyn/target/instance/target.db
    • f7dc6396667b9dccb784c8d8612ea672 /opt/WebSyn/target/instance_seed/target.db
  • Container restart recheck also passed: homepage 200 and MD5 stayed identical ✅

Screenshot Paths

  • sites/target/scraped_data/submission_review/home.png
  • sites/target/scraped_data/submission_review/search_results.png
  • sites/target/scraped_data/submission_review/product_detail.png
  • sites/target/scraped_data/submission_review/stores.png
  • sites/target/scraped_data/submission_review/support.png
  • sites/target/scraped_data/submission_review/login.png
  • sites/target/scraped_data/submission_review/checkout.png
  • sites/target/scraped_data/submission_review/order_lookup.png
  • sites/target/scraped_data/submission_review/deals.png
  • sites/target/scraped_data/submission_review/mobile_home.png

Known Limitations

  • Visual assets are locally generated deterministic SVGs rather than official Target media.
  • No real payment, real checkout, real inventory sync, real delivery order, or live Target API integration.
  • .assets-revision was not modified at this stage; it should only be updated after the upstream HF asset change is merged and a stable merge revision is available.
  • Screenshot capture for authenticated account/confirmation pages was not fully automated in-browser; those flows were instead verified through real HTTP smoke checks.

HF Asset Status

Manual Review Notes

  • This is not a live Target integration; every retail, support, rewards, and order flow is synthetic and deterministic by design.
  • Runtime DBs, screenshots, caches, and the local HF tarball were intentionally left out of the git commit.

@1171-jpg

1171-jpg commented Jul 13, 2026

Copy link
Copy Markdown

Reviewed end-to-end (Playwright + built from the paired HF assets).
Mechanically, it's solid: byte-identical reset holds, and the core flows work. But visual fidelity is well off the real target.com: all imagery is generated SVG placeholders, 10/12 category images don't even render (an unescaped & in the SVG generator produces invalid XML), and there are functional and task-quality gaps (multi-word search returns 0, star ratings show mojibake, T11 has 3 valid answers, T14 has no distractors).

Given the size of the gap I'll take this on: I'll rebuild toward real target.com fidelity and author the 20 verifiers/rubrics, then open a follow-up PR based on this one. Thanks @Lxr-max for the solid mechanical base and the honest Known-Limitations note.

@Raibows

Raibows commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Hi @Lxr-max ,

Thank you for your contribution.

We noticed that the submitted website has poor quality and many submitted websites are generated from "best buy" template which do not qualify the accept criteria. Could you please have a check on your other submitted PRs? This PR (target website) will be assigned to @1171-jpg

Thank you!

@1171-jpg

Copy link
Copy Markdown

Reviewer verifiers + content rebuild → submitted as #72

The deterministic verifiers, judge rubrics and the content rebuild for this site are up as
#72. It branches from current main rather than from this branch — this one predates the
Merriam-Webster merge and would collide with it on port 40015, so #72 registers Target at
index 16 / port 40016 instead and merges cleanly. Your work on the Flask app, routing and
template structure is what #72 builds on, and its commit message credits this PR. Full review
below.


Review — target (PR #51)

Reviewer: @1171-jpg · Site author: @Lxr-max · Date: 2026-07-20

Verdict: SUPERSEDED BY #72. The Flask app, routing and template structure are a solid
foundation and are kept. Several findings below could not be fixed by patching and required
rebuilding the content domain, so rather than requesting changes I did the work — @Raibows
reassigned this PR to me on 2026-07-19.

Reviewed by building the image and driving a real Chromium (Playwright) against the mirror on
alt ports (control plane :8201, sites :41000-41015).


1. Mechanical checks

Check Result
Syntax (py_compile app.py / seed_data.py) OK
Site isolation no cross-site imports
Path hygiene BASE_DIR-relative
Port registration target = index 15 → 40015, self-consistent across the three files
Build succeeds
HTTP 200 sweep 16/16 sites return 200
Control plane /health ok, target alive
Byte-identical reset FAIL — see F1

F1 (BLOCKING) — byte-identical reset fails

Consecutive builds of the seed DB produce different md5s (a9b540ea… vs 10771a85…), so
POST /reset/target cannot restore a byte-identical database.

Root cause: TimestampMixin defaults created_at to datetime.utcnow, and six seeded models
inherit it (User, Review, CartItem, WishlistItem, CompareItem, SupportTicket). Every
build stamps a different time. Function-level gating is present and correct — the invariant
breaks on the timestamps, not on re-seeding.

Fixed in #72 by rewriting seed_data.py with a fixed SEED_TIMESTAMP, explicit created_at
on every row and no RNG. Consecutive builds now yield an identical md5.


2. Visual fidelity — FAIL

F2 (BLOCKING) — placeholder imagery throughout

static/images/ contains 312 generated SVGs and no photography. 156 of them are named
BBY*.svg. Product cards, category tiles, store pages and the homepage hero all render flat
coloured blocks.

clone-website is explicit: "use REAL images from the live site … Never use placeholders,
coloured rectangles, AI-generated stock photos"
, and notes this is the #1 reason agents
reject reviews
.

Fixed in #72: 1,932 real product photographs scraped from target.com via Playwright, plus
18 category images. Zero placeholders remain; a broken-image sweep across 30 pages reports 0.

F3 — Best Buy provenance in the catalog

The catalog is Best Buy's product set with Target branding: laptops, monitors, GPUs, camera
kits. Content-line comparison against the Best Buy PR shows 93.3% duplication (365 identical
content lines), and 156 image files still carry the BBY prefix. The real target.com sells
groceries, apparel, home goods, baby and beauty — none of which appear.

To be fair to the author, I checked cross-author copying separately: maximum overlap with any
other contributor's site is 4.8%, i.e. normal scaffolding. This is one author reusing their own
earlier work, not copied from someone else.

Fixed in #72: 1,932 real target.com products across 18 real departments.

F4 — mojibake in two templates

鈽? renders where a star glyph is intended (_product_cards.html:15,
product_detail.html:12,133) — a UTF-8 sequence written through a non-UTF-8 encoder. All 36
files in the directory also carry a UTF-8 BOM.

F5 — button overlaps discount text on /deals

.button lacks display:inline-flex, so the "Open product" control overlaps the savings line.
Automated checks miss this: the button is still clickable, so a click-and-assert test passes.

F6 — cart row image overflows its container

.cart-row img has no fixed dimensions and covers the product name and price.


3. Functional depth — FAIL

F7 (BLOCKING) — search is strict-AND

/search requires every token to match, so "coffee maker" returns 0 results while
"coffee" returns many. clone-website requires scored token-overlap, not strict AND;
review-env lists this as pitfall #3 with "Boston Celtic" as the canonical probe.

Fixed in #72: token-overlap with per-token scoring and relevance ordering.

F8 — no sign-out control in the UI

/logout exists as a route but nothing links to it, so a signed-in agent cannot sign out by
navigating.

Worth recording how this was found: my automated pass initially reported logout as PASS because
it requested /logout directly. Driving the URL routes around the defect. The human pass
caught it.

F9 — checkout accepts any card number

The payment step defaults payment_last4 to '1111' and performs no validation; an empty or
malformed card advances the flow.

F10 — product listings are unpaginated

/products renders all catalog items in one response. With the rebuilt catalog this became a
55 MB page. Fixed in #72 with 24-per-page pagination, matching target.com.

F11 — comparison table is always empty

compare_page reads section.get("items", []) while specs were emitted as a flat list, so the
lookup silently yields nothing and the table renders with no rows. No error is raised.

F12 — cart quantity does not accumulate

/cart/add assigns rather than adds, so pressing "Add to cart" twice leaves the quantity at 1
and the second press silently does nothing.

F13 — missing routes required by the contract

No /account/edit (listed under clone-website's required routes), no review-submission form
and no way to create a support ticket, though SupportTicket exists in the schema and seeded
rows are displayed.


4. Task quality — FAIL

F14 (BLOCKING) — tasks reference products that do not exist

tasks.jsonl cites Dell Horizon 14 OLED Laptop, Apple MacBook Air 13 Sky M3,
Acer NitroMesh 27, WD Vault 2TB, Canon Vista R10, Sony QuietWave XM6 and categories
monitors and Storage & Accessories. None of these are real target.com products, and none
survive a catalog rebuild.

All 20 were rewritten in #72 against verified facts.

F15 — several tasks are answerable from the search-results page

Answers such as price and rating are printed on the product card, so the detail page never has
to be opened. review-env §5 treats this as a leak.


5. Findings that were checked and debunked

An automated diff initially suggested this branch deletes sites/merriam_webster/, guts
agent_demo/eval_judge.py, rewrites .assets-revision and breaks .gitignore. All four are
artifacts of a two-dot diff against a branch forked at af0765d.
Comparing against the merge
base (git diff $(git merge-base main HEAD)...HEAD) shows this branch touches none of them.

Recording this explicitly so the finding list is not inflated with things you did not do.

Separately: .gitignore on this branch does fail to ignore scraped_data/ and instance/,
because those two rules carry trailing # comments and .gitignore only treats # as a
comment at the start of a line. That is inherited from the fork point, not introduced here
the three-dot diff for .gitignore is empty, and upstream main has since fixed it. Syncing
the branch to main resolves it.


6. Release mechanics

  • The paired HF assets PR (discussion Add Discogs mirror site (port 40015) #34) is unmerged, so target.tar.gz is absent from
    the dataset and a clean clone cannot fetch the seed DB or images.
  • .assets-revision therefore cannot yet be pinned to an immutable merge SHA.

Both are carried forward in #72: the HF PR must merge first, then the SHA gets pinned.


Summary

Area Verdict
Mechanical FAIL (F1 byte-identical reset)
Visual fidelity FAIL (F2 placeholders, F3 Best Buy catalog)
Functional depth FAIL (F7 strict-AND search)
Task quality FAIL (F14 tasks cite non-existent products)

The app skeleton is worth keeping and #72 keeps it. Everything above is fixed there, with
your commit preserved at the base of the branch so the site authorship stays with you.

1171-jpg added a commit to 1171-jpg/WebHarbor that referenced this pull request Jul 21, 2026
…erifiers

Adds the Target mirror as the 17th site (index 16, port 40016), rebuilt from
real target.com data scraped with Playwright.

Catalog: 1,932 products across 18 categories, 562 brands, with real product
photography, 19,821 specification rows and 2,350 scraped guest reviews.

Tasks: 20 WebVoyager tasks in sites/target/tasks.jsonl, each anchored on a
fact that only appears on a detail page.

Grading contract: sites/target/verify/ with verify_lib.py and one deterministic
verifier per task, recorded as verifier_path + judge_rubric on every task row.
Ground truth lives only in the verifiers, never in tasks.jsonl.

Assets uploaded to HF as target.tar.gz (discussions/46).

Based on the Target site skeleton from aiming-lab#51 by @Lxr-max, which was reassigned
for rebuild after review.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PLRyFZ4TjY9pC7uZkKJC6H
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