Skip to content

feat(wave3): 189 adapters across B1–B6, live/OTel audit, SCRAPE_PIPELINE_VERSION 42 - #156

Merged
bartrumb merged 14 commits into
mainfrom
feat/wave3-b7-live-trace-audit
Nov 29, 2026
Merged

bartrumb merged 14 commits into
mainfrom
feat/wave3-b7-live-trace-audit

Conversation

@bartrumb

@bartrumb bartrumb commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Wave 3, batches B1–B6 plus the M7 audit, landed as one PR. M0 merged separately as #149.

This PR replaces the stacked PRs #150–#155. Each intermediate branch failed CI on its own, because the fixes for their regressions landed in the M7 commit. Merging them one at a time would have put red commits on main. The 7 original commits are kept here in order, rebased onto main after #149's squash merge. The resulting tree is byte-identical to the old M7 head, apart from the CI fix below.

Commit Contents
B1 27 local-government, education and public/staffing job adapters (#201–#233), with improvements folded into #140's overlapping manifests
B2 32 Schema.org, community and store adapters (#234–#270), with #140 overlap improvements and the schema-localbusiness.json fixture
B3 30 trade, tariff and regulator adapters (#271–#300)
B4 40 research, security and developer-infrastructure adapters (#301–#340)
B5 27 cycling, e-bike and resale adapters (#341–#367)
B6 33 GTIN, media, finance and social adapters (#368–#400)
M7 Live and OTel adapter audit across all 486 manifests, ReDoS and /rss hardening, and SCRAPE_PIPELINE_VERSION 41 → 42
CI Runs the Wave 3 wall-clock budget tests in the CPU-budget step
perf Stops ClassifyContentState repeating whole-document scans (see below)

CI fix: Wave 3 latency tests

14 Wave 3 tests assert wall-clock latency budgets, but they were not listed in CPU_BUDGET_TESTS. They therefore ran in the -race -coverprofile ./... step, where covermode=atomic makes them tens of times slower. They now run in the existing uninstrumented -race CPU-budget step, and the pass-count check goes from 4 to 18. No budget is raised and no test is dropped.

sec_xbrl_frames_json takes under 25ms natively and about 45ms under -race. Its budget now uses the package's extractRaceSlowdown factor, as the other Wave 3 budgets already do.

Classifier performance

The Wave 3 shell heuristics made ClassifyContentState about 2× slower on adversarial HTML. That pushed the hub M4 linear-time check (SEC-AUDIT-5, 350ms unscaled budget) to 397ms in CI. The budget is unchanged; the classifier now does less repeated work:

  • Each new regex runs only when its mandatory literal is present.
  • The <h1> check and the visible word count are computed once per call instead of up to 5 and 17 times.
  • The Route Tracking check tests the page title before lower-casing the whole document.

Classification results are unchanged. Natively, classification takes 16.5ms instead of 25.0ms, and the whole M4 workload is 1.3× main instead of 1.65×.

Test plan

  • Locally I ran gofmt, go vet, and the exact two CI test steps: -race plus coverage with the budget tests skipped, then the budget step, which passed 18/18.
  • Go classify, extract and cmd tests pass, and the hub suite passes 447/447, with SEC-AUDIT-5 meeting the budget on its first sample.

🤖 Generated with Claude Code

bartrumb and others added 8 commits November 29, 2026 13:45
…rs + #140 deltas (#201-#233)

Implement Wave 3 / Round 2 Batch B1 (#201-#233) on top of #140 across three categories:
- Category A (Local Gov, #201-#216): granicus-govdelivery, municipal-cms-pack, boarddocs, civicclerk, primegov, agenda-portal-pack, accela-citizen-access, tyler-energov, opengov-portals, public-bid-portals, arcgis-hub, junar-tyler-data + additive deltas & >=4 negative cases on #140's civicplus, laserfiche-weblink, dkan, and opendatasoft
- Category B (Education, #217-#225): finalsite, blackboard-wcm, edlio-thrillshare, acalog, coursedog, canvas-public-courses, edx-coursera, schema-course + >=4 negative cases on #140's courseleaf
- Category C (Public/Staffing Jobs, #226-#233): neogov, bullhorn-career-portal, paradox-olivia, staffing-ats-pack, smb-ats-full, edu-job-boards, healthcare-careers + SSR FreeMarker fallback & >=4 negative cases on #140's taleo-full

Compiled 324 manifests in internal/extract/manifests/compiled.json with Go lazy HTML/API extractors, golden + 4-way negative fixtures, and verified Batch B1 gates.

Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
…as (#234-#270)

Implement Wave 3 / Round 2 Batch B2 (#234-#270) on top of #140 across Categories D, E, F, G, H, and I:
- Category D (Universal Schema.org, #234-#241): schema-vehicle, schema-faq-howto, schema-dataset, schema-software-app, schema-medical + additive precedence yields, schema-localbusiness.json fixture, and >=4 negative cases on #140's schema-recipe, schema-event, and schema-localbusiness
- Category E (Community, #242-#250): wild-apricot, association-ams-pack, runsignup, bikereg-usacycling, race-results-pack, lemmy, peertube, fediverse-pack + ChamberMaster classic/events support & >=4 negative cases on #140's chambermaster-growthzone
- Categories F/G/H (Property, Restaurant & IR/Newsrooms, #251-#261): appfolio-listings, pm-listing-widgets, multifamily-portals, idx-broker-showcase, popmenu, bentobox, square-toast-menu, schema-menu, q4-ir, ir-portal-pack, company-newsrooms
- Category I (Store Add-Ons, #262-#270): shopify-hydrogen, recharge-bold-subscriptions, shopify-filter-apps, rebuy-searchanise, aftership-tracking-page, branded-tracking-pack, gorgias-reamaze, klaviyo-attentive-forms + same-origin page-key companion discovery & >=4 negative cases on #140's shopify-storefront-graphql

Compiled 356 manifests in internal/extract/manifests/compiled.json with 0 staticcheck warnings and verified Batch B2 gates.

Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
Implement Wave 3 / Round 2 Batch B3 (#271-#300, 30 adapters) across Categories J, K1, and K2:
- Category J (Trade, Tariff & Sanctions, #271-#278): usitc-hts, cbp-cross-rulings, census-foreign-trade, ustr-301, trade-gov-csl, ofac-sdn, bis-entity-list, import-alerts-aphis-fda
- Category K1 (Labor, Telecom, Energy & Financial Enforcement, #279-#288): dol-enforcement, osha-establishment, nlrb-cases, eeoc-litigation, ftc-cases, fcc-ecfs, fcc-uls, ferc-nrc-dockets, financial-regulators-enforcement, oversight-gov
- Category K2 (Legislative Reports, Health Transparency, Postal & SBA, #289-#300): gao-reports, cbo, everycrsreport, gov-wordpress-newsrooms, gsa-site-scanning, va-lighthouse-facilities, healthcare-gov-marketplace, cms-price-transparency, medicaid-nadac, usps-addresses, carrier-tracking-official, sba-dsbs-loans

Compiled 386 manifests in internal/extract/manifests/compiled.json with Go-first official API provider specs, 0 staticcheck warnings, and verified Batch B3 gates.

Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
…301-#340)

Implement Wave 3 / Round 2 Batch B4 (#301-#340, 40 adapters) across Categories L-N:
- Category L (Research & Scholarly, #301-#314): semantic-scholar, unpaywall, core-ac, orcid, ror, dblp, biorxiv-medrxiv, nasa-ads, nih-reporter, nsf-awards, doe-osti, research-repo-pack, datacite, ssrn-nber
- Category M (Security & Vulnerability Intelligence, #315-#326): cisa-kev, first-epss, mitre-attack, mitre-cwe-capec, cve-org, cisa-advisories-ics, vendor-csaf, security-txt, exploit-db, certificate-transparency, rdap, bgp-asn
- Category N (Developer Infrastructure, #327-#340): bitbucket-cloud, sourceforge-launchpad, gerrit, bugzilla, jira-public, wordpress-org-plugins, vscode-open-vsx, browser-addons-amo-cws, artifact-hub, ansible-puppet-forge, apis-guru, endoflife-date, web-compat-data, bundlephobia-packagephobia

Includes official keyed API specs in hub/src/api-keys.ts for core-ac (CORE_AC_API_KEY), nasa-ads (NASA_ADS_API_KEY), and semantic-scholar (SEMANTIC_SCHOLAR_API_KEY) preserving makeKeyHint and redactSecretsInBody, strict robots and host rate-pacing defaults in internal/extract/policy.go (dblp, biorxiv-medrxiv, research-repo-pack, ssrn-nber), unpaywall bot@edgefetch.dev query normalization, gerrit XSSI prefix stripping, zero detect-only stubs, zero Rule 7 cross-domain/wildcard twin additions, and 425 compiled manifests with Go lazy HTML/JSON/text extractors, golden + >=4 negative shell fixtures, and telemetry/registry parity.

Inner gates verified: gofmt, go vet, staticcheck, ZERO_CRYPTO_DEPS, targeted Go extract/classify tests, adapter:check (425 manifests), psl:check, tsc --noEmit, adapter:test (425 YAML, 386 fixtures, 10233 fuzz cases, max 63.68ms < 75ms), wasm-memory-budget (10.50 MiB linear memory, 255.7 KiB initHeapAlloc), security-audit (38/38), and wave3-b4-research-security-dev (6/6).

Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
…367)

Implement Wave 3 / Round 2 Batch B5 (#341-#367, 27 adapters) across Categories O1, O2, and P:
- Category O1 (Bike Components & Help, #341-#349): fox-ridefox, park-tool, ifixit, ebike-drive-systems, specialized-turbo-support, bicycle-tire-specs, wheel-hub-specs, bicycle-brake-docs, suspension-cockpit-compat
- Category O2 (Bike & E-Bike OEMs, Geometry & Compliance, #350-#358): cargo-ebike-oems, us-ebike-oems, qbp-frame-brands, mtb-geometry-brands, geometrygeeks-99spokes, sheldon-brown, ul-product-iq, e-bike-state-laws, cpsc-ebike-incidents
- Category P (Resale & Marketplaces, #359-#367): reverb, pinkbike-buysell, used-bikes-shopify, bicycle-blue-book, back-market-swappa, peer-resale-fashion, local-classifieds-marketplaces, creator-digital-stores, chairish-1stdibs

Includes full real-adapter implementations for #354 (geometrygeeks-99spokes), #364 (peer-resale-fashion), and #365 (local-classifieds-marketplaces) with zero detect-only stubs, path/query-disjoint routing between #358 (cpsc-ebike-incidents) and cpsc-recalls on saferproducts.gov with cpsc_query_term parameter validation, zero Rule 7 cross-domain twin additions, and 452 compiled manifests with Go lazy HTML/JSON extractors, golden + >=4 negative shell fixtures, and telemetry/registry parity.

Inner gates verified: gofmt, go vet, staticcheck, ZERO_CRYPTO_DEPS, targeted Go classify/extract/edgefetch-wasm tests, adapter:check (452 manifests), psl:check, tsc --noEmit, adapter:test (452 YAML, 413 fixtures, 10889 fuzz cases, max 57.38ms < 75ms), wasm-memory-budget (10.50 MiB linear memory, 257.2 KiB initHeapAlloc), and 8 targeted Hub suites (64/64).

Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
…al adapters (#368-#400)

Implement Wave 3 / Round 2 Batch B6 (#368-#400, 33 adapters) across Categories Q, R, S, and T:
- Category Q (Product Identity & Data Pools, #368-#374): gs1-us-datahub, open-icecat, upcitemdb-barcodelookup, open-product-wikidata-gtin, energy-star, fcc-test-report, prop65-warnings (plus fcc-id Go lazy HTML migration)
- Category R (Media & Entertainment, #375-#386): tmdb, imdb-datasets, tvmaze, musicbrainz-coverart, discogs, podcast-index, spotify-web-api, setlist-lastfm, steam-store, igdb, bandcamp, genius-lyrics
- Category S (Finance & Market Data, #387-#392): fed-h15-datadownload, nasdaq-data-link, market-quotes-pack, sec-xbrl-frames, msrb-emma, ffiec-cdr
- Category T (Open Social & Creator, #393-#400): youtube-data-api, threads-api, tumblr, farcaster-hub, nostr-relays, product-hunt, substack-notes-beehiiv, patreon-public

Includes full real-adapter implementation for #386 (genius-lyrics) with zero detect-only stubs, NIP-11 + read-only NIP-01 REQ support for #397 (nostr-relays), bounded gzip TSV decoding and non-commercial license marking for #376 (imdb-datasets), musicbrainz UA profile registration, *.bandcamp.com wildcard pattern support, keyed API & companion secret/header resolution in hub/src/api-keys.ts, zero Rule 7 cross-domain twin additions, and 486 compiled manifests with Go lazy HTML/JSON/text extractors, golden + >=4 negative shell fixtures, and telemetry/registry parity.

Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
…full gates across 486 manifests

Complete Wave 3 / Round 2 Milestone M7 verification, triage fixes, and audit documentation:

- Resolve 5 cross-batch triage findings across declarative manifests, Go/WASM extractors, agentloop router, and Hub overflow/CSR/WAF handling
- Achieve 0 failures across the full live + OTel trace + negative-probe + secret-redaction + inventory smoke sweep (486 manifests)
- Harden O(N) linear ReDoS/WAF scanning in Hub and Go classifiers and scope ir-portal-pack /rss matching to exact IR portal hosts
- Publish docs/LIVE-ADAPTER-AUDIT-ROUND2-2026-11.md with full inventory parity, Rule 7/9 verification, and SCRAPE_PIPELINE_VERSION guidance
- Pass all Go race, staticcheck, WASM reproducibility/memory budget, Hub/adapter, workerd, Wave 2 E2E, and Victory Audit gates

Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
The 14 Wave 3 latency tests assert wall-clock ceilings but were not listed in
CPU_BUDGET_TESTS, so they ran in the -race -coverprofile step, where
covermode=atomic makes them tens of times slower and every package runs in
parallel. They now run in the uninstrumented -race CPU-budget step, like the
existing budget tests. No budget is raised and no test is dropped: each still
runs in exactly one step, and the pass count check goes from 4 to 18.

sec_xbrl_frames_json streaming takes under 25ms natively but about 45ms under
-race, so its budget uses the package's extractRaceSlowdown factor, matching
the other Wave 3 budgets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
bartrumb and others added 6 commits November 29, 2026 14:28
…tState

The Wave 3 shell heuristics made ClassifyContentState about 2x slower on
adversarial HTML (20k unclosed <noscript> + 20k <script>): 11.7ms -> 25.0ms
natively, which pushed the hub M4 linear-time check (SEC-AUDIT-5, 350ms
unscaled budget) to 397ms in CI. The budget is unchanged; the classifier now
does less repeated work:

- Regex calls added by Wave 3 now run only when their mandatory literal is
  present (location, item-listing-container, application, <app-root). The JS
  redirect pattern starts with optional groups, so without the guard the
  submatch engine tried every offset of the 32 KiB window.
- hasNonEmptyH1CSGo and countWordsFromHTMLCSGo over cleanVisibleHTML are
  computed at most once per call. cleanVisibleHTML is assigned once, and the
  heuristics re-scanned it up to 5 and 17 times.
- The Route Tracking check tests the page title before lower-casing the
  whole bounded document.

Classification results are unchanged; the guards only skip work that cannot
match. Locally: classify 25.0ms -> 16.5ms native (total M4 work 1.65x -> 1.3x
main), Go classify/extract/cmd tests pass, and the hub suite passes 447/447.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
The Wave 3 latency tests compared against native budgets (25/50/75/200ms) but
now run in CI's -race CPU-budget step, whose budgets are calibrated for the
race detector. On the CI runner three missed by 1.02-1.4x (r-m.de 35ms,
municipal_cms 25.6ms, bgp_he 54.5ms), while all of them finish in a few
milliseconds natively.

All 29 Wave 3 budgets now multiply by the package's existing
extractRaceSlowdown constant (1 without -race, 8 with it), as the other
budgets in this package and the earlier sec_xbrl fix already do. Native
budgets are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
The empty-shell heuristic tested 22 id="..."/id='...' substrings with one
strings.Contains each over the whole lower-cased document (up to
maxHTMLScanCharsCSGo). On the hub M4 adversarial page none match, so every
probe is a full scan; WASM has no SIMD for them, and M4 still landed exactly
on its 350ms budget in CI.

spaShellIDsCSGo now finds each id= once, reads the quoted value and records
the ids the heuristic cares about. A bit is set exactly when the original
substring occurs (id= + quote + value + same quote), and
TestSpaShellIDsMatchesContainsProbes checks that against the original probes
on fixed and 30k random inputs. The <div id="main"></div> and
<div id="application"></div> probes now run only when that id was seen.

Native ClassifyContentState on the M4 input is now 12ms, level with main
(it was 25ms at the Wave 3 tip). Hub suite 447/447 locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
`go test -fuzz=FuzzX ./pkg` without -run also runs every unit test in the
package before fuzzing, without -race and with fuzzing's coverage
instrumentation. internal/extract was re-tested four times this way, so its
wall-clock budget tests ran in a step that is not calibrated for timing.
TestWave3StoreAddonsPreemptionAnd2MBPerfBudget missed its native 50ms budget
there (59ms), after passing in the -race CPU-budget step.

Each fuzz command now passes -run '^FuzzX$', so it runs only its own seed
corpus and then fuzzes, as before. Unit tests still run exactly once each, in
the -race steps. The Makefile fuzz target is updated the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
…iles

SEC-AUDIT-5 M4 asserts an unscaled 350ms best-of-5 wall-clock budget, but
security-audit ran beside the other core files at --test-concurrency=4..6.
On 4-vCPU CI runners the same commit measured 350.0ms, under budget, then
459.7ms. Measured locally in WASM, M4 is 130ms on main and 142ms on this
branch, so the swing is CPU contention between test files, not the code.

The runner already moves the Wave 2/3 adapter suites to their own pass for
this reason. security-audit now also runs in its own pass, with
--test-concurrency=1 and no other test file at the same time, right after the
core pass. Every test still runs once and budgets are unchanged (core 409 +
security-audit 38 = 447, as before). Coverage still includes the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
…udget step

The test's 50k-character sanitizer budgets are already race-scaled
(75ms x extractRaceSlowdown = 600ms under -race), but it was not in
CPU_BUDGET_TESTS, so it ran in the -race -coverprofile step, where
covermode=atomic makes wall-clock budgets unreliable. It failed main's last
three push builds there (50k_link_amp_rpar: 666ms against 600ms).

It now runs in the uninstrumented -race CPU-budget step with the other
budget tests, and the pass count goes from 18 to 19. Its budgets are
unchanged and it still runs in exactly one step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Brett Bartrum <17114576+bartrumb@users.noreply.github.com>
@bartrumb
bartrumb merged commit b37a74a into main Nov 29, 2026
4 checks passed
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.

1 participant