diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index f8726b6..6c2dfb4 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -19,6 +19,12 @@ jobs: - name: Install dependencies run: npm ci + - name: Run Node tests + run: npm test + + - name: Verify strict US portal coverage + run: npm run verify:diversity -- --strict + - name: ISO source smoke checks run: npm run smoke:iso diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 126a3da..09edd64 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,12 +41,13 @@ Before opening a PR, from the harness repo root: ```bash npm run verify npm run smoke:iso +npm test npm run build:dashboard ``` (`npm run build:dashboard` is the same as `(cd dashboard && go build .)` — requires Go on PATH.) -`npm run verify` runs `verify-pipeline.mjs`. It exits successfully when no tracker exists (fresh clone). +`npm run verify` runs `verify-pipeline.mjs` followed by the offline US portal-policy and source-coverage check. The tracker portion exits successfully when no tracker exists (fresh clone). > **Contributor note:** Inside the harness repo, scripts resolve PROJECT_DIR via `process.cwd()`, so running `npm run verify` from the repo root operates on your local `data/` directory (gitignored). If you have a personal project that you want to test changes against, use `JOB_FORGE_PROJECT=/path/to/personal/project npm run verify`. @@ -58,12 +59,14 @@ Other npm scripts: | `npm run lint:helpers` | `scripts/check-helper-integration.mjs` | Verifies local helper deps, CLI aliases, scaffolder scripts, migrations, generated ignores, templates, docs, and helper reference stay aligned | | `npm run build:dashboard` | `go build` in `dashboard/` | Optional TUI; same check as manual `cd dashboard && go build .` | | `npm run sync-check` | `cv-sync-check.mjs` | Optional setup lint: `cv.md`, `config/profile.yml`, hardcoded-metric scan; fails if those files are missing | +| `npm run verify:diversity` | `scripts/verify-portal-diversity.mjs` | Offline check for the US-only policy, US location queries, and US-tagged catalog coverage | +| `npm run balance:scan -- candidates.json portals.yml` | `scripts/balance-scan-results.mjs` | Deterministic US-eligibility and company/location-balanced shortlist JSON | | `npm run normalize` | `normalize-statuses.mjs` | Maps non-canonical statuses in tracker files; no-op if no tracker exists | | `npm run dedup` | `dedup-tracker.mjs` | Merges duplicate company/role rows; no-op if no tracker exists | | `npm run merge` | `merge-tracker.mjs` | Merges `batch/tracker-additions/*.tsv` into the tracker (day-based or single-file); no-op if no TSVs exist; creates tracker when no tracker file exists yet | | `npm run pdf` | `generate-pdf.mjs` | Pass HTML and PDF paths after `--`, e.g. `npm run pdf -- output/cv.html output/cv.pdf`; missing parent dirs for the PDF path are created | -Utility scripts `verify`, `merge`, `normalize`, `dedup`, `sync-check`, and `pdf` accept `--help` / `-h` (e.g. `npm run verify -- --help`, `npm run sync-check -- --help`, `npm run pdf -- --help`). +Utility scripts `verify`, `verify:diversity`, `balance:scan`, `merge`, `normalize`, `dedup`, `sync-check`, and `pdf` accept `--help` / `-h` (e.g. `npm run verify:diversity -- --help`, `npm run balance:scan -- --help`, `npm run pdf -- --help`). You can run the same `.mjs` files with `node