Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions hub/scripts/compile-manifests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,37 @@ export const VALID_HTML_MODES = new Set([
'finra_brokercheck_html',
'pacer_case_locator_html',
'state_court_portals_html',
// Wave 3 B1 Category A (Local Gov #202-#216, deduplicated with #140)
'govdelivery_html',
'municipal_cms_html',
'boarddocs_html',
'civicclerk_html',
'primegov_html',
'agenda_portal_html',
'accela_html',
'tyler_energov_html',
'opengov_html',
'public_bid_html',
'arcgis_hub_html',
'junar_tyler_html',
// Wave 3 B1 Category B (Education #217-#225, deduplicated with #140)
'finalsite_html',
'blackboard_wcm_html',
'edlio_thrillshare_html',
'acalog_html',
'coursedog_html',
'canvas_public_html',
'edx_coursera_html',
'schema_course_html',
// Wave 3 B1 Category C (Public/Staffing Jobs #226-#233)
'neogov_html',
'bullhorn_portal_html',
'taleo_full_html',
'paradox_olivia_html',
'staffing_ats_pack_html',
'smb_ats_full_html',
'edu_job_boards_html',
'healthcare_careers_html',
]);

const pslDatPath = join(manifestsDir, 'public_suffix_list.dat');
Expand Down Expand Up @@ -395,6 +426,37 @@ const APPROVED_WILDCARD_DOMAIN_PATTERNS = new Set([
'*.zendesk.com',
'*.giant-bicycles.com',
'*.liv-cycling.com',
// Wave 3 B1 Category A
'*.civicclerk.com',
'*.primegov.com',
'*.escribemeetings.com',
'*.novusagenda.com',
'*.civicweb.net',
'*.opengov.com',
'*.bonfirehub.com',
'*.hub.arcgis.com',
'*.opendata.arcgis.com',
'*.opendatasoft.com',
'*.junar.com',
// Wave 3 B1 Category B
'*.edlio.com',
'*.apptegy.us',
'*.sites.thrillshare.com',
'*.acalog.com',
'*.coursedog.com',
'*.instructure.com',
// Wave 3 B1 Category C
'*.governmentjobs.com',
'*.schooljobs.com',
'*.bullhornstaffing.com',
'*.taleo.net',
'*.paradox.ai',
'*.jobdiva.com',
'*.ceipal.com',
'*.zohorecruit.com',
'*.freshteam.com',
'*.homerun.co',
'*.healthcaresource.com',
]);

const RESERVED_CORE_ATS_DOMAINS = new Set([
Expand Down Expand Up @@ -434,6 +496,10 @@ const APPROVED_SAP_ATS_EXACT_EXEMPTIONS = Object.freeze(
'enterprise-ats:jobs.jobvite.com',
'gem-ats:jobs.gem.com',
'ukg-paylocity-dover:jobs.dover.com',
'paradox-olivia:jobs.mchire.com',
'staffing-ats-pack:jobs.crelate.com',
'smb-ats-full:jobs.manatal.com',
'edu-job-boards:jobs.chronicle.com',
]),
);

Expand Down
1 change: 1 addition & 0 deletions hub/scripts/run-tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const suiteSpecs = [
['test/wave2d-dev.test.ts', 'wave2d-dev.test.mjs'],
['test/wave2d-local.test.ts', 'wave2d-local.test.mjs'],
['test/wave2d-sports-misc.test.ts', 'wave2d-sports-misc.test.mjs'],
['test/wave3-b1-gov-edu-jobs.test.ts', 'wave3-b1-gov-edu-jobs.test.mjs'],
['test/mcp-part2-wave2e.test.ts', 'mcp-part2-wave2e.test.mjs'],
['test/wave2-security-fixes.test.ts', 'wave2-security-fixes.test.mjs'],
['test/hub-secrets-policy.test.ts', 'hub-secrets-policy.test.mjs'],
Expand Down
49 changes: 46 additions & 3 deletions hub/src/extractors/declarative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,21 @@ export type DeclarativeJsonMode =
| 'calendly_booking_json'
| 'bosch_ebike_error_code_json'
| 'finra_brokercheck_json'
| 'ncaa_espn_json';
| 'ncaa_espn_json'
| 'civicclerk_json'
| 'primegov_json'
| 'tyler_energov_json'
| 'opengov_json'
| 'arcgis_hub_json'
| 'junar_tyler_json'
| 'coursedog_json'
| 'canvas_course_json'
| 'edx_course_json'
| 'neogov_json'
| 'bullhorn_joborder_json'
| 'staffing_ats_json'
| 'manatal_jobs_json'
| 'smb_ats_json';

export interface DeclarativeExtractSpec {
commerceMode?: DeclarativeCommerceMode;
Expand Down Expand Up @@ -607,7 +621,8 @@ export interface DeclarativeExtractSpec {
| 'chocolatey_xml'
| 'edge_cloud_changelog_xml'
| 'fhfa_hpi_csv'
| 'public_share_csv';
| 'public_share_csv'
| 'boarddocs_text';
pathParam?: string;
codeByPath?: DeclarativeCodeByPathSpec;
xml?: DeclarativeXmlSpec;
Expand Down Expand Up @@ -878,7 +893,35 @@ export type DeclarativeHtmlMode =
| 'ncaa_espn_html'
| 'finra_brokercheck_html'
| 'pacer_case_locator_html'
| 'state_court_portals_html';
| 'state_court_portals_html'
| 'govdelivery_html'
| 'municipal_cms_html'
| 'boarddocs_html'
| 'civicclerk_html'
| 'primegov_html'
| 'agenda_portal_html'
| 'accela_html'
| 'tyler_energov_html'
| 'opengov_html'
| 'public_bid_html'
| 'arcgis_hub_html'
| 'junar_tyler_html'
| 'finalsite_html'
| 'blackboard_wcm_html'
| 'edlio_thrillshare_html'
| 'acalog_html'
| 'coursedog_html'
| 'canvas_public_html'
| 'edx_coursera_html'
| 'schema_course_html'
| 'neogov_html'
| 'bullhorn_portal_html'
| 'taleo_full_html'
| 'paradox_olivia_html'
| 'staffing_ats_pack_html'
| 'smb_ats_full_html'
| 'edu_job_boards_html'
| 'healthcare_careers_html';

export interface DeclarativeHtmlRouteSpec {
id?: string;
Expand Down
8 changes: 8 additions & 0 deletions hub/src/search-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,7 @@ export async function executeExtractCall(params: {
status: number;
cached: boolean;
title?: string;
extractorId?: string;
markdown?: string;
jobPosting?: StructuredJobPosting;
contentState?: ContentState;
Expand Down Expand Up @@ -2572,6 +2573,7 @@ export async function executeExtractCall(params: {
status: typeof r.status === 'number' ? r.status : 200,
cached: false,
title: twinOut.title,
extractorId: twinSpec.id,
contentState: twinState.state,
markdown: redactPii ? redactPiiText(sanitizedTwin) : sanitizedTwin,
truncated: r.truncated === true || (r.bodyOmitted === true && r.extractedOnNode !== true),
Expand Down Expand Up @@ -2757,6 +2759,7 @@ export async function executeExtractCall(params: {
const structuredDoc = icsDoc || feedDoc || jsonDoc || csvDoc || patchDoc || srcDoc;
let md: string;
let title: string | undefined;
let extractorId: string | undefined;
let jobPosting: StructuredJobPosting | undefined;
let contentSource: 'meta-description' | 'ssr-hydration' | undefined;

Expand Down Expand Up @@ -2855,6 +2858,7 @@ export async function executeExtractCall(params: {
fetchBoundedTwin: fetchBoundedForExtract,
});
if (compRes && compRes.doc.markdown.trim()) {
extractorId = compRes.extractorId;
setActiveSpanAttribute('edgefetch.adapter_id', compRes.extractorId, activeTracer ?? undefined);
platformCompDoc = {
extractorId: compRes.extractorId,
Expand Down Expand Up @@ -3038,6 +3042,7 @@ export async function executeExtractCall(params: {
contentSource = 'meta-description';
}
if (!platformCompDoc && extracted?.extractorId) {
extractorId = extracted.extractorId;
setActiveSpanAttribute('edgefetch.adapter_id', extracted.extractorId, activeTracer ?? undefined);
}
}
Expand Down Expand Up @@ -3109,6 +3114,7 @@ export async function executeExtractCall(params: {
status: typeof r.status === 'number' ? r.status : 200,
cached: false,
...(title ? { title } : {}),
...(extractorId ? { extractorId } : {}),
...(jobPosting ? { jobPosting } : {}),
contentState: stateRes.state,
...(contentSource ? { contentSource } : {}),
Expand Down Expand Up @@ -3246,6 +3252,7 @@ export async function executeExtractCall(params: {
status: entry.status,
cached: entry.cached,
...(safeFinalTitle ? { title: safeFinalTitle } : {}),
...(entry.extractorId ? { extractorId: entry.extractorId } : {}),
...(entry.contentState ? { contentState: entry.contentState } : {}),
...(entry.contentSource ? { contentSource: entry.contentSource } : {}),
...(entry.waybackSnapshotUrl ? { waybackSnapshotUrl: entry.waybackSnapshotUrl, waybackTimestamp: entry.waybackTimestamp } : {}),
Expand Down Expand Up @@ -3294,6 +3301,7 @@ export async function executeExtractCall(params: {
status: entry.status,
cached: entry.cached,
...(safeFinalTitle ? { title: safeFinalTitle } : {}),
...(entry.extractorId ? { extractorId: entry.extractorId } : {}),
...(entry.contentState ? { contentState: entry.contentState } : {}),
...(entry.contentSource ? { contentSource: entry.contentSource } : {}),
...(entry.waybackSnapshotUrl ? { waybackSnapshotUrl: entry.waybackSnapshotUrl, waybackTimestamp: entry.waybackTimestamp } : {}),
Expand Down
42 changes: 42 additions & 0 deletions hub/test/fixtures/adapters/acalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"adapterId": "acalog",
"mode": "html",
"inputUrl": "https://csulb.catalog.acalog.com/preview_course_nopop.php?catoid=12&coid=1397",
"mockPayload": "<!doctype html><html><head><title>Course: CECS 328 - California State University, Long Beach</title><meta property=\"og:site_name\" content=\"CSULB Academic Catalog\"><script src=\"https://acalog-clients.s3.amazonaws.com/global/js/acalog.js\"></script></head><body><table><tr><td class=\"block_content\"><h1 id=\"course_preview_title\">CECS 328 - Data Structures and Algorithms</h1><p>Credits: 3. Prerequisites: CECS 228. Study of trees, graphs, sorting, hashing, and algorithm analysis.</p><a href=\"/preview_course_nopop.php?catoid=12&coid=8888\">CECS 329</a></td></tr></table></body></html>",
"expectTitleIncludes": "CECS 328",
"expectMarkdownIncludes": [
"CSULB Academic Catalog",
"CECS 328",
"Acalog",
"Data Structures and Algorithms"
],
"negativeCases": [
{
"name": "http-404",
"status": 404,
"payload": "<!doctype html><html><head><title>404 Not Found</title></head><body><h1>Course Not Found</h1></body></html>"
},
{
"name": "redirect-to-error",
"status": 200,
"finalUrl": "https://csulb.catalog.acalog.com/error",
"payload": "<!doctype html><html><head><title>Error</title></head><body><p>Catalog error</p></body></html>"
},
{
"name": "maintenance-shell",
"status": 503,
"payload": "<!doctype html><html><head><title>Service Unavailable</title></head><body><h1>Scheduled Maintenance</h1><p>Catalog is temporarily unavailable due to maintenance. Please check back soon.</p></body></html>"
},
{
"name": "empty-spa-shell",
"status": 200,
"payload": "<!doctype html><html><head><title>Loading...</title></head><body><div id=\"root\"></div><script src=\"/bundle.js\"></script></body></html>"
},
{
"name": "robots-disallowed-ajax-route",
"status": 200,
"finalUrl": "https://csulb.catalog.acalog.com/ajax/preview_course.php?catoid=12&coid=1397",
"payload": "<!doctype html><html><head><title>Loading...</title></head><body><div id=\"app\"></div></body></html>"
}
]
}
35 changes: 35 additions & 0 deletions hub/test/fixtures/adapters/accela-citizen-access.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"adapterId": "accela-citizen-access",
"mode": "html",
"inputUrl": "https://aca-prod.accela.com/SANDIEGO/Cap/CapDetail.aspx?Module=DSD&TabName=DSD&capID1=REC26&capID2=00000&capID3=008YQ&agencyCode=SANDIEGO",
"mockPayload": "<!doctype html><html><head><title>Accela Citizen Access</title></head><body><h1>Message Bar</h1><span id=\"ctl00_PlaceHolderMain_lblPermitNumber\">PMT-3398658</span><span id=\"ctl00_PlaceHolderMain_lblPermitType\">Combination Building Permit</span><span id=\"ctl00_PlaceHolderMain_lblRecordStatus\">Closed</span><span id=\"ctl00_PlaceHolderMain_lblExpirtionDate\">2027-06-30</span><div id=\"ctl00_PlaceHolderMain_divWorkLocation\">1200 Third Ave, San Diego, CA 92101</div><div id=\"ctl00_PlaceHolderMain_divProjectDescription\">Tenant improvement and interior electrical upgrade for municipal office suite.</div></body></html>",
"expectTitleIncludes": "PMT-3398658",
"expectMarkdownIncludes": [
"PMT-3398658",
"Combination Building Permit",
"1200 Third Ave, San Diego, CA 92101"
],
"negativeCases": [
{
"name": "http-404",
"status": 404,
"payload": "<!doctype html><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1></body></html>"
},
{
"name": "redirect-to-error",
"status": 200,
"finalUrl": "https://aca-prod.accela.com/error",
"payload": "<!doctype html><html><head><title>404 Page Not Found</title></head><body><h1>Page Not Found</h1></body></html>"
},
{
"name": "maintenance",
"status": 200,
"payload": "<!doctype html><html><head><title>Scheduled Maintenance</title></head><body><p>This portal is currently undergoing scheduled maintenance. Please check back shortly.</p></body></html>"
},
{
"name": "empty-spa-shell",
"status": 200,
"payload": "<!doctype html><html><head><title>Loading...</title></head><body><div id=\"root\"></div><noscript>Please enable JavaScript.</noscript></body></html>"
}
]
}
34 changes: 34 additions & 0 deletions hub/test/fixtures/adapters/agenda-portal-pack.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"adapterId": "agenda-portal-pack",
"mode": "html",
"inputUrl": "https://pub-london.escribemeetings.com/",
"mockPayload": "<!doctype html><html><head><title>London City Council Public Meetings - eSCRIBE</title></head><body><div id=\"ctl00_MainContent_MeetingListUpdateProgress\"><select id=\"MeetingTypeListbox\"><option>Council</option></select><table><tr><td><a href=\"/Meeting.aspx?Id=44120&Agenda=Merged\">City Council Meeting - 2026-12-01</a></td></tr></table></div></body></html>",
"expectTitleIncludes": "London City Council Public Meetings",
"expectMarkdownIncludes": [
"escribe",
"City Council Meeting - 2026-12-01"
],
"negativeCases": [
{
"name": "http-404",
"status": 404,
"payload": "<!doctype html><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1></body></html>"
},
{
"name": "redirect-to-error",
"status": 200,
"finalUrl": "https://pub-london.escribemeetings.com/error",
"payload": "<!doctype html><html><head><title>404 Page Not Found</title></head><body><h1>Page Not Found</h1></body></html>"
},
{
"name": "maintenance",
"status": 200,
"payload": "<!doctype html><html><head><title>Scheduled Maintenance</title></head><body><p>This portal is currently undergoing scheduled maintenance. Please check back shortly.</p></body></html>"
},
{
"name": "empty-spa-shell",
"status": 200,
"payload": "<!doctype html><html><head><title>Loading...</title></head><body><div id=\"root\"></div><noscript>Please enable JavaScript.</noscript></body></html>"
}
]
}
35 changes: 35 additions & 0 deletions hub/test/fixtures/adapters/arcgis-hub.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"adapterId": "arcgis-hub",
"mode": "twin",
"inputUrl": "https://hub.arcgis.com/api/search/v1/collections/all/items?limit=3",
"expectedFetchUrl": "https://hub.arcgis.com/api/search/v1/collections/all/items?limit=3",
"mockPayload": "{\"type\":\"FeatureCollection\",\"numberMatched\":1200,\"numberReturned\":1,\"features\":[{\"id\":\"9f4a2e1c\",\"type\":\"Feature\",\"properties\":{\"id\":\"9f4a2e1c\",\"title\":\"Municipal Zoning Districts\",\"owner\":\"CityGIS\",\"modified\":\"2026-11-20T12:00:00Z\",\"description\":\"Official municipal zoning boundary polygons.\"},\"links\":[{\"rel\":\"self\",\"href\":\"https://hub.arcgis.com/api/search/v1/collections/all/items/9f4a2e1c\"}]}]}",
"expectTitleIncludes": "Municipal Zoning Districts",
"expectMarkdownIncludes": [
"Municipal Zoning Districts",
"CityGIS"
],
"negativeCases": [
{
"name": "http-404",
"status": 404,
"payload": "{\"error\":{\"code\":404,\"message\":\"Collection not found\"}}"
},
{
"name": "redirect-to-error",
"status": 200,
"finalUrl": "https://hub.arcgis.com/error",
"payload": "<!doctype html><html><head><title>404 Page Not Found</title></head><body><h1>Page Not Found</h1></body></html>"
},
{
"name": "maintenance",
"status": 200,
"payload": "<!doctype html><html><head><title>Scheduled Maintenance</title></head><body><p>This service is currently undergoing scheduled maintenance. Please check back shortly.</p></body></html>"
},
{
"name": "empty-feature-collection",
"status": 200,
"payload": "{\"type\":\"FeatureCollection\",\"numberMatched\":0,\"numberReturned\":0,\"features\":[]}"
}
]
}
Loading
Loading