fix(validate): the scan missed four kinds of file, and vouched for prose - #113
Closed
pitimon wants to merge 1 commit into
Closed
fix(validate): the scan missed four kinds of file, and vouched for prose#113pitimon wants to merge 1 commit into
pitimon wants to merge 1 commit into
Conversation
Closes #110 items 2, 6 and 1. Stacked on #111. ITEM 2 — the walker saw two directories and one extension set. Added: dashboard/*.html (the served shell — a preconnect, font CDN or script src here is a browser request), .css (skipped by EXTENSION while the walker was already standing in that directory), i18n .json, dashboard/vite.config.js, and scripts/. Maintainer-run is a caveat for the purpose field, not a reason to be invisible. That surfaced eight things nothing had ever mentioned, each read in source before being classified: scripts/build-pricing-seed.cjs really fetches the LiteLLM list -> request_from seed-snapshot.json records that URL as a value -> data_from dashboard/vite.config.js proxies /proxy/ipcheck -> request_from dashboard/index.html footer links to the upstream repo -> link_from www.tokentracker.cc JSON-LD metadata, not fetched -> new entry www.npmjs.com same block -> new entry schema.org JSON-LD @context identifier -> ignored example.invalid reserved never-resolving TLD -> ignored ITEM 6 — the inventory's prose was unchecked. `user_data: true` with `readme: false` passed; so did a wrong `from` and purpose text describing something the code does not do. The fields a reader trusts most were the ones nothing verified. Types and required values are now checked, and `from` is checked against WHERE THE HOST IS ACTUALLY REACHED — a host only ever requested from src/ cannot honestly be `browser`. ITEM 1 — unresolvable authorities were dropped. The issue's three examples (bracketed IPv6, a Cyrillic lookalike, a single-label intranet host) all resolve now; they predate deferring to new URL(). What is left is interpolation that pins nothing, which is ordinary code — which is why the flag-flip version had to be reverted inside #109. So each is declared with a why, matched on file + authority text, and a new one fails. 15 declared across 8 files: the local bind and Host-header parsing, git remote normalisation into project_ref, the user's own HTTPS_PROXY, dev-server proxying, and this scanner's own probe strings. Also: checkOutbound and collectHosts were both over the 50-line rule; split into scanLine (39), checkUnresolved (30) and checkInventoryMetadata (29), leaving them at 46 and 21. File is 640 lines. 19 new tests. The metadata check was proved non-vacuous against five deliberately-wrong entries before being committed, with a valid control. ci:local exit 0: 903 root tests, 256 dashboard.
5 tasks
Owner
Author
|
Superseded by #114. This PR was auto-closed when its base branch |
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.
Summary
Closes #110 items 2, 6 and 1. Stacked on #111 — review that first, or read this diff two-dot against
fix/110-comment-and-pinned-waivers.Item 2 — the walker saw two directories and one extension set
Added
dashboard/*.html(the served shell — a<link rel=preconnect>, font CDN or<script src>here is a browser request),.css(skipped by extension while the walker was already standing in that directory), i18n.json,dashboard/vite.config.js, andscripts/.That surfaced eight things nothing had ever mentioned. Each was read in source before being classified — declaring without looking would just be a waiver nobody reviewed:
scripts/build-pricing-seed.cjs:10request_fromsrc/lib/pricing/seed-snapshot.json:1data_frompindashboard/vite.config.js:1188/proxy/ipcheckrequest_fromdashboard/index.html×5sameAsto the upstream repolink_frompinswww.tokentracker.ccurl/logo/breadcrumbs — search-engine metadata, not fetcheddata_fromwww.npmjs.comdownloadUrl. Distinct fromregistry.npmjs.org, which npx really contactsdata_fromschema.org@contextidentifier, same class as thewww.w3.orgnamespaceignored_hostsexample.invalidignored_hostsItem 6 — the inventory's prose was unchecked
user_data: truewithreadme: falsepassed. So did a wrongfrom, and purpose text describing something the code does not do. The fields a reader trusts most were the ones nothing verified.Types and required values are now checked, and
fromis checked against where the host is actually reached — a host only ever requested fromsrc/cannot honestly bebrowser.Proved non-vacuous against five deliberately-wrong entries before committing, with a valid control that stays clean.
Item 1 — unresolvable authorities were dropped
The issue's three examples — bracketed IPv6, a Cyrillic lookalike, a single-label intranet host — all resolve now. They predate deferring to
new URL(). What is left is interpolation that pins nothing, which is ordinary code, which is exactly why the flag-flip version had to be reverted inside #109.So each is declared with a
why, matched on file + authority text, and a new one fails. 15 declared across 8 files: the local bind and Host-header parsing, git-remote normalisation intoproject_ref, the user's ownHTTPS_PROXY, dev-server proxying, and this scanner's own probe strings. A declaration that no longer matches the code is reported as stale, so the list cannot outlive what it excuses.Test plan
ci:localexit 0 — 903 root tests (+12 over fix(validate): trailing comments read as requests; waivers covered whole files #111), 256 dashboardvalidate:outboundgreen: 26 declared hostsurl(),scripts/, the dev config; five metadata violations plus a valid control; a new unresolvable authority fails, a declared one passes, a stale declaration is reportedcheckOutbound(46) andcollectHosts(21) back under the 50-line rule viascanLine(39),checkUnresolved(30),checkInventoryMetadata(29). File 640 lines.Remaining in #110
Item 5 (URL composition — following expressions rather than scanning literals) and item 7 (avatar body cap, which is PR #112).