Commit 7cd5b94
CI: green up the test + frontend jobs
Two unrelated breakages, both diagnosed via a github.com/actions
walk after the user noticed every CI run since the redesign merge
has been red:
Python — `tests/test_error_handling_scenarios.py`
The two `admin_refresh_*` scenarios POST to
/api/admin/refresh-cache and assert 401/403. They passed
locally because `.env` in the repo root populates
REFRESH_CACHE_SECRET, so the endpoint reaches the bearer-check
branch. CI does not load that .env, so REFRESH_CACHE_SECRET
ends up empty and the route's "fail closed" path returns 503
("Refresh-cache secret not configured on the server.") — never
exercising the assertion path.
Split the two scenarios out of the parametrized list into
standalone test functions that take `monkeypatch` and patch
`backend.routers.jobs.REFRESH_CACHE_SECRET = "test-secret"`
before invoking the scenario. The other 9 scenarios stay in
the parametrized list since they don't need the secret.
Frontend — `frontend/src/components/workspace/WorkspaceShell.tsx`
The `jd_summary` projection added in commit `e741549`
("Assistant: thread live workspace state into every query")
referenced field names that don't exist on the `JobReview`
type. Specifically:
- `review.title` → JobReview has no title field
- `review.location` → no location field either
- `review.requirements.*` → no requirements field; the
parsed-text breakdown lives at
the top level as
`hardSkills` / `softSkills`
/ `mustHaves`
TypeScript blocks the Next.js build on this. The Vercel/dev
server happens to run with looser types so it kept working
locally; CI's `next build` (full type check) failed.
Fix: pull title + location from `activeJob` (the JobPosting
metadata, which DOES have those structured fields) and use
the correct flat field names from JobReview for the counts.
When the user pasted a JD manually (no JobPosting), title +
location come up empty; the LLM still gets the skill counts.
Verified locally:
- tests/test_error_handling_scenarios.py: 14/14 pass
- npx tsc --noEmit: 0 errors
- Build & Deploy was always green (only test+frontend in CI
were red), so production was never affected by either bug.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 18fde26 commit 7cd5b94
2 files changed
Lines changed: 39 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1355 | 1355 | | |
1356 | 1356 | | |
1357 | 1357 | | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
1358 | 1367 | | |
1359 | 1368 | | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
1365 | 1374 | | |
1366 | 1375 | | |
1367 | 1376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
319 | 325 | | |
320 | 326 | | |
321 | 327 | | |
| |||
327 | 333 | | |
328 | 334 | | |
329 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
330 | 353 | | |
331 | 354 | | |
332 | 355 | | |
| |||
0 commit comments