Review: harden WebHarbor site registry audit (#46) - #110
Open
jackjin1997 wants to merge 9 commits into
Open
jackjin1997 wants to merge 9 commits into
jackjin1997 wants to merge 9 commits into
Conversation
jackjin1997
marked this pull request as ready for review
September 13, 2026 10:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review of PR #46: site registry audit
Original contribution: aiming-lab/WebHarbor#46, authored by @Lxr-max / XuanRui LI.
Scope and fixed versions
5d7a4e8c594028b845cbdcc180619e438c3a22ab4610b5df689ef664d49d7ba56bc53d123de28261f20b5ee8377ba31bcb825b4dfe30ad96c416e4776e5d77b0af6c2b7dfcd82039361df4228f2c3c6580bd5817109563313d1ae30fac684a8b918599f7839c74dc0dd1a2967552b9d6df991701c61aafe6fa1e8a5b9e8e5d0e42764cd658825f4dea088d8fRelative to current upstream, this PR adds repository-level tooling and documentation only. It does not add or modify a mirror site, task set, deterministic task verifier, or Hugging Face asset. The asset pin is identical to upstream; the original review used
ad6f424f72cada9e6f5c09a58093d0ceeab9c52b.Baseline findings
The original seven unit tests passed, but the original implementation did not pass its own strict scan on the original review base
f20b5ee: it reported the validosu/Ohio State Universityname pair as a warning and exited 1.Reproducible review fixtures also confirmed that the original implementation:
EXPOSE .../tcpsyntax while accepting descending ranges;.assetpathsentries unless wildcard entries also existed;Reviewer fixes
EXPOSEinstructions; reject descending and out-of-range ports.web_nameconsistency checks.--strict.NotADirectoryError.AGENTS.mdpre-PR checklist.Isolated review reconciliation
The frozen candidate was independently reviewed at
80bd581. The reviewer reproduced the four recorded verification commands and returnedCHANGES_REQUIREDwith one P2 and four P3 findings; the review declared no contamination.AGENTS.mdchecklist entry..assetpathsto accept arbitrary recursive glob spellings. The checked-in file and the actual pack/extract scripts define three canonical managed roots; no repository consumer defines the proposed spellings as equivalent. Certifying them in the audit would accept an unverified asset configuration. Canonical wildcard entries and explicit per-site entries remain supported.Affected tests and the full validation set were rerun after reconciliation. A direct regression check also confirmed that restricting Python assignments to module scope does not reject valid indented shell declarations.
Upstream synchronization — 2026-09-16
Merged upstream
mainat5d7a4e8, preserving the original contribution and reviewer commits. The only content conflict was in theAGENTS.mdpre-PR checklist: the audit had shifted the step numbers while upstream expanded the HTTP sweep. The resolution keeps the audit step, consecutive numbering, and the current41000–41030host-port range.Upstream now includes
scripts/check_site_registry.py, called byscripts/check_assets.shduring the build. That check verifies exact task URLs and referenced verifier paths. It remains enabled and unchanged. The supplemental audit adds structured JSON diagnostics, per-site selection, asset-path coverage, and runtime-file checks; README now explains the relationship.The audit implementation and its 22 tests are byte-for-byte unchanged from the previously reconciled PR head
472863e. The historical isolated review therefore remains applicable to that code; no new independent review is claimed. Integration checks below were rerun against all 31 current sites. The upstream HF revision was confirmed reachable; no asset archives were downloaded or modified for this tooling update.Validation
All commands below were run on 2026-09-16 from the tree committed as
4610b5d; the subsequent report update changes documentation only:python3.12 -m py_compile scripts/audit_site_registry.py scripts/test_audit_site_registry.py python3.12 -B -m unittest discover -s scripts -p 'test_audit_site_registry.py' -v python3.12 -B scripts/audit_site_registry.py --strict python3.12 -B scripts/check_site_registry.py pyright scripts/audit_site_registry.py scripts/test_audit_site_registry.pyResults:
8101 40000-40030.The original 2026-09-13 validation covered 26 sites and 843 tasks. Those historical counts are superseded by the current integration results above.
The negative fixtures cover missing registrations/directories, duplicate task ports, mismatched ports, malformed JSONL inputs, malformed registries, function-local lookalike declarations, runtime-like regular files, missing core files, invalid Docker ranges/ports, warning/strict exit behavior, and JSON error output. Legal alternatives cover explicit per-site asset paths, brand aliases, shell comments and indentation, and protocol-qualified Docker ports.
Applicability and unexecuted checks
Current status
The synchronized candidate passes the repository-tooling checks and is ready for maintainer review. The original full Docker build was not run because the review host lacked safe rebuild headroom; this update does not claim a fresh Docker build or runtime smoke. Final approval and merge remain with the maintainer.