LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
UN-4183 [MISC] Run frontend typecheck and tests in CI and make the frontend test group required (#2302)
Jaseem Jasc7277eeb1007
diff --git a/.github/workflows/ci-frontend-lint.yaml b/.github/workflows/ci-frontend-lint.yamlindex e30537b5e..1c87375a9 100644--- a/.github/workflows/ci-frontend-lint.yaml+++ b/.github/workflows/ci-frontend-lint.yaml@@ -1,4 +1,4 @@-name: Frontend Lint (Biome)+name: Frontend CI (Biome, typecheck, tests)on:push:@@ -6,16 +6,44 @@ on:- mainpaths:- "frontend/**"+ # No `paths` on pull_request: an untriggered workflow reports no check run,+ # so a required check would wait forever on non-frontend PRs. Filtering is+ # done by the `changes` job instead — a job skipped via `if:` reports+ # `skipped`, which satisfies a required check. Same pattern as ci-test.yaml.pull_request:types: [opened, synchronize, reopened, ready_for_review]branches: [main]- paths:- - "frontend/**"jobs:- biome-ci:+ # Gating jobs below run when `changes` finds frontend files, AND whenever+ # `changes` itself did not succeed: a skipped job satisfies a required+ # check, so a broken filter must fail open (run the checks), never skip them.+ # `!cancelled()` is what lets them run past a failed dependency.+ changes:if: github.event.pull_request.draft == falseruns-on: ubuntu-latest+ outputs:+ # Push is already path-filtered by its trigger, so force true off-PR.+ frontend: ${{ github.event_name != 'pull_request' || steps.filter.outputs.frontend == 'true' }}+ steps:+ - name: Checkout repository+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3+ with:+ persist-credentials: false++ - name: Check for frontend changes+ if: github.event_name == 'pull_request'+ uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2+ id: filter+ with:+ filters: |+ frontend:+ - "frontend/**"++ biome-ci:+ needs: changes+ if: ${{ !cancelled() && github.event.pull_request.draft != true && (needs.changes.result != 'success' || needs.changes.outputs.frontend == 'true') }}+ runs-on: ubuntu-lateststeps:- name: Checkout repository@@ -68,3 +96,52 @@ jobs:- name: Fail if Biome found issuesif: steps.biome.outputs.exit_code != '0'run: exit 1++ # Vite/esbuild strip types without checking them, so a green build says+ # nothing about the .tsx files — tsc is the only thing that does.+ typecheck:+ needs: changes+ if: ${{ !cancelled() && github.event.pull_request.draft != true && (needs.changes.result != 'success' || needs.changes.outputs.frontend == 'true') }}+ runs-on: ubuntu-latest++ steps:+ - name: Checkout repository+ uses: actions/checkout@v6++ - name: Setup Bun+ uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0++ - name: Install dependencies+ working-directory: frontend+ # No dependency lifecycle scripts: nothing here needs them (tsc and+ # esbuild ship per-platform binaries as optionalDependencies).+ run: bun install --frozen-lockfile --ignore-scripts++ - name: Run TypeScript typecheck+ working-directory: frontend+ run: bun run typecheck++ # ci-test.yaml runs the same suite as the rig's `frontend` group, but its+ # tiers skip frontend-only PRs; this job is what gates those.+ vitest:+ needs: changes+ if: ${{ !cancelled() && github.event.pull_request.draft != true && (needs.changes.result != 'success' || needs.changes.outputs.frontend == 'true') }}+ runs-on: ubuntu-latest++ steps:+ - name: Checkout repository+ uses: actions/checkout@v6++ - name: Setup Bun+ uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0++ - name: Install dependencies+ working-directory: frontend+ # No dependency lifecycle scripts: nothing here needs them (tsc and+ # esbuild ship per-platform binaries as optionalDependencies).+ run: bun install --frozen-lockfile --ignore-scripts++ - name: Run Vitest+ working-directory: frontend+ # The package script, so the lockfile's vitest runs, never a fetched one.+ run: bun run test --rundiff --git a/.github/workflows/ci-test.yaml b/.github/workflows/ci-test.yamlindex c82f57291..66239e7b3 100644--- a/.github/workflows/ci-test.yaml+++ b/.github/workflows/ci-test.yaml@@ -102,6 +102,18 @@ jobs:# so this constrains nothing and resolves identically.run: uv tool install tox==4.64.1 --with tox-uv==1.36.0 --no-build+ - name: Setup Bun+ # The unit tier's `frontend` vitest group is required, and the rig runs+ # it with `npx --no-install`, so node_modules must already be there.+ if: matrix.tier == 'unit'+ uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0++ - name: Install frontend dependencies+ if: matrix.tier == 'unit'+ working-directory: frontend+ # No dependency lifecycle scripts: vitest needs none of them.+ run: bun install --frozen-lockfile --ignore-scripts+- name: Validate test manifests# Cheap pre-flight: catches manifest schema errors before tier runs.run: tox -e rig -- validatediff --git a/frontend/bun.lock b/frontend/bun.lockindex 5e81a89a5..b49088700 100644--- a/frontend/bun.lock+++ b/frontend/bun.lock@@ -720,6 +720,46 @@"@types/ws": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],+ "@typescript/typescript-aix-ppc64": ["@typescript/[email protected]", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="],++ "@typescript/typescript-darwin-arm64": ["@typescript/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA=="],++ "@typescript/typescript-darwin-x64": ["@typescript/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA=="],++ "@typescript/typescript-freebsd-arm64": ["@typescript/[email protected]", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ=="],++ "@typescript/typescript-freebsd-x64": ["@typescript/[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw=="],++ "@typescript/typescript-linux-arm": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ=="],++ "@typescript/typescript-linux-arm64": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ=="],++ "@typescript/typescript-linux-loong64": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ=="],++ "@typescript/typescript-linux-mips64el": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA=="],++ "@typescript/typescript-linux-ppc64": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "ppc64" }, "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA=="],++ "@typescript/typescript-linux-riscv64": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ=="],++ "@typescript/typescript-linux-s390x": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw=="],++ "@typescript/typescript-linux-x64": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A=="],++ "@typescript/typescript-netbsd-arm64": ["@typescript/[email protected]", "", { "os": "none", "cpu": "arm64" }, "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA=="],++ "@typescript/typescript-netbsd-x64": ["@typescript/[email protected]", "", { "os": "none", "cpu": "x64" }, "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA=="],++ "@typescript/typescript-openbsd-arm64": ["@typescript/[email protected]", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ=="],++ "@typescript/typescript-openbsd-x64": ["@typescript/[email protected]", "", { "os": "openbsd", "cpu": "x64" }, "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg=="],++ "@typescript/typescript-sunos-x64": ["@typescript/[email protected]", "", { "os": "sunos", "cpu": "x64" }, "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g=="],++ "@typescript/typescript-win32-arm64": ["@typescript/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ=="],++ "@typescript/typescript-win32-x64": ["@typescript/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="],+"@vitejs/plugin-react": ["@vitejs/[email protected]", "", { "dependencies": { "@babel/core": "^7.28.0", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-beta.27", "@types/babel__core": "^7.20.5", "react-refresh": "^0.17.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA=="],"@vitest/expect": ["@vitest/[email protected]", "", { "dependencies": { "@types/chai": "^5.2.2", "@vitest/spy": "3.2.6", "@vitest/utils": "3.2.6", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" } }, "sha512-1+7q9BtaKzEmO+fmNT3kYvoNn5Y71XWAx2Q5HRim4tTVRQVRv4uJFAQ5FbK0OPUeNP/WmVCpxYxoJdvuHVjzBQ=="],@@ -1582,7 +1622,7 @@"tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],- "typescript": ["[email protected]", "", { "bin": { "tsc": "./bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],+ "typescript": ["[email protected]", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],"uglify-js": ["[email protected]", "", { "bin": { "uglifyjs": "bin/uglifyjs" } }, "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ=="],diff --git a/frontend/src/components/ui/shims/antd-inputs.tsx b/frontend/src/components/ui/shims/antd-inputs.tsxindex db7ff6799..cb9deb315 100644--- a/frontend/src/components/ui/shims/antd-inputs.tsx+++ b/frontend/src/components/ui/shims/antd-inputs.tsx@@ -1066,7 +1066,7 @@ function matchesQuery(return filterOption(query, item.data);}const field = optionFilterProp- ? (item.data as Record<string, unknown>)[optionFilterProp]+ ? (item.data as unknown as Record<string, unknown>)[optionFilterProp]: undefined;const haystack = optionFilterProp? optionText(field as React.ReactNode)diff --git a/tests/groups.yaml b/tests/groups.yamlindex 24e07e940..cc2e5beb7 100644--- a/tests/groups.yaml+++ b/tests/groups.yaml@@ -52,15 +52,16 @@ groups:# runner points vitest's own JUnit reporter at the group's junit.xml, so# results come through per-test rather than as one synthetic row.#- # `optional` because CI images without `node_modules` should skip this- # rather than fail: the runner exits 5 ("nothing collected") when npx is- # absent, and optional keeps that from gating the overall result.+ # Required: a red test gates the unit tier. It needs `node_modules`, so+ # ci-test.yaml installs frontend deps on the unit leg; with them missing,+ # `npx --no-install vitest` fails and turns the group red. A host with no+ # npx at all (cloud's self-hosted runner) still skips via the runner's+ # exit 5, which folds green for non-pytest groups.tier: unitrunner: vitestworkdir: frontendpaths: [src]timeout_seconds: 900- optional: trueunit-rig:# Rig self-tests. Run from repo root so the `tests.rig` import resolves.