Skip to content

fix(phys_org): address review findings for #74 - #83

Closed
QianhuiWu wants to merge 8 commits into
aiming-lab:mainfrom
QianhuiWu:review/pr-74-local-fixes
Closed

QianhuiWu wants to merge 8 commits into
aiming-lab:mainfrom
QianhuiWu:review/pr-74-local-fixes

Conversation

@QianhuiWu

Copy link
Copy Markdown
Collaborator

Context

This is the reviewed replacement for #74. The original source branch is owned by jackjin1997; GitHub returned HTTP 403 when the completed changes were pushed there, so the verified commit is published from this fork.

Changes

  • Merge current main while retaining both IKEA and Phys.org, assign Phys.org to port 40017, and update all 18-site documentation and control-plane declarations.
  • Replace generated journals, institutions, authors, DOI values, and article-body filler with source-derived text and source-verified metadata. Unknown source fields remain blank, and tracked provenance is recorded in sites/phys_org/source_metadata.json.
  • Add Latest and Members routes, make public profiles discoverable, correct homepage links and featured layout, reduce mobile page length, and remove list-page date leakage used by comparison tasks.
  • Require CSRF-protected POST logout, reject unsafe redirect targets, validate saved-note length at both HTML and server layers, and retain cross-article reply validation.
  • Redesign all affected tasks to avoid first-result shortcuts and prompt-supplied answers while preserving the full 18-task scope.
  • Harden all Phys.org verifiers with exact task identity, non-empty answers, same-origin ordered navigation, actual click transitions, submitted credentials/forms, answer binding, and exact state-difference checks.
  • Add positive, negative, adversarial, data-quality, provenance, ranking, asset, and false-negative regression coverage.

Asset

  • Hugging Face asset PR: https://huggingface.co/datasets/ChilleD/WebHarbor/discussions/52
  • Immutable asset revision pinned by this PR: c0053deaf15d082bf90a94d42532b891d4ad216a
  • Uploaded and re-downloaded phys_org.tar.gz SHA-256: 4e3c4b73bc2088e5ca733fd88d8b965570eac31fd7161dd98e2c795c5b5e9330
  • Seed database SHA-256: 00a6878071aec3e8db8cb185c292efedf62a31a7d57b10577cb96b9c14506449

Validation

  • Phys.org regression suite: 24 tests passed.
  • IKEA merge regression suite: 119 tests passed.
  • Python compilation, shell syntax, staged diff checks, and targeted Ruff checks passed.
  • Docker release-candidate image built successfully: sha256:ab187b6efacd119a18c81922faa167791b06ad2202509ab0680d8aae90b7d7b5.
  • All 18 sites returned HTTP 200; control-plane health reported 18/18 alive.
  • reset-all reported 18/18 ready, and every runtime database matched its seed SHA-256 after reset.
  • All 18 Phys.org tasks completed through Playwright with 98 step screenshots; all 18 corresponding deterministic verifiers passed against the resulting trajectories and before/after databases.
  • Public and authenticated responsive checks passed at 320, 390, 768, and 1440 pixels with no horizontal overflow.
  • CSRF, POST logout, unsafe redirects, oversized notes, cross-article replies, output escaping, source-panel omission, and DOI-link handling were exercised successfully.

yao and others added 8 commits August 15, 2026 14:25
Adds a 16th WebHarbor mirror at https://phys.org — a science / technology
/ research news aggregator. Real RSS-derived catalog of 210 articles
across 7 categories (Physics, Earth, Technology, Biology, Chemistry,
Astronomy, Nanotechnology) with real thumbnails, plus 4 benchmark users
with seeded saved articles, comments (incl. cross-user reply chains),
and search history.

Registered as the 16th site at port 40015. .gitignore was tightened
because the previous inline-comment patterns for sites/*/scraped_data/
and sites/*/instance/ were not matching (Codex finding, fixed in this
PR).

Site features:
- Categories with recent/popular sort
- Article detail with source journal / institution / DOI
- Threaded comments with reply UI (parent-article validation)
- Save articles with notes (auth)
- Token-overlap scored search with category filter
- Trending list, user profile, account edit, login/register

Determinism work for byte-identical reset:
- RSS pubDate parsing strips trailing TZ token (strptime %Z rejects EDT)
- Pinned bcrypt hash for benchmark users (random salt would drift md5)
- Per-article RNG seeded by slug for synthesized author/journal/views
- /article/<slug> GET no longer mutates Article.views (Codex finding)

Open-redirect hardening:
- _safe_next() validates next= targets in /login and /save (Codex finding)

Tasks: 18 WebVoyager-format tasks in sites/phys_org/tasks.jsonl,
covering search, browse, detail, comment thread reading, save toggle,
auth flows, and one comparison task.

Assets: heavy assets (instance_seed/phys_org.db, static/images/) live
in the paired HF dataset PR; phys_org.tar.gz is 460K, db md5
b4a324122c3cb0a56b8d511e73ff13a7. .assets-revision uses 'main' so the
HF merge will roll in automatically.
Add verifier and rubric coverage for all 18 tasks, harden the easy comparison tasks, and cover positive, no-op, shortcut, wrong-answer, and state-mismatch cases.

Fix reviewed environment nits in asset packing, seed taxonomy and journal realism, dependencies, and site-count documentation.
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