Skip to content

fix(glassdoor): isolate malformed detail aliases - #431

Open
O-marqs wants to merge 1 commit into
speedyapply:mainfrom
O-marqs:fix/oss03-glassdoor-detail-aliases
Open

O-marqs wants to merge 1 commit into
speedyapply:mainfrom
O-marqs:fix/oss03-glassdoor-detail-aliases

Conversation

@O-marqs

@O-marqs O-marqs commented Oct 20, 2026

Copy link
Copy Markdown

One malformed detail alias interrupts valid aliases later in the response, and an unrequested alias can attach details to an unrelated ID.

Validate the existing small detail shape per alias, ignore unrequested IDs and keep valid neighbors and subsequent batches. Missing/null descriptions remain optional. Use local checks rather than adding detail model classes.

Validation on public main 8dd83cdd194b6e27f6487eb09b2b2a10117d9a1c:

  • Offline standard-library unittest: 6 test methods pass. Before the production patch, the same tests reproduce 6 failed assertions/subtests and 1 errors caused by the defects above.
  • python -m unittest discover -s tests -p test_oss03_b3.py -v
  • ruff check jobspy tests, ruff format --check jobspy tests, full configured mypy and git diff --check pass with the upstream-declared MCP extra and development dependencies installed.
  • Network guards assert that sockets, DNS and both HTTP transports are never used. Fixtures demonstrate local contracts; no current live HTML/API compatibility is claimed.

Transport or envelope failure still retains earlier batches and stops later requests as before. The batch size remains 25; no retry is introduced. This patch is independent of optional-field and identity model changes.

This is a narrowly scoped fix in the existing implementation, without architectural changes, new scrapers, dependencies, global models or workflows. No real acquisition was performed. The branch starts directly from public main and includes no private history or audit artifacts. Other contribution groups and published PR #426 are not included.

@kirkwat

kirkwat commented Oct 21, 2026

Copy link
Copy Markdown
Member

Can you share the search you used to find these errors? I'm unable to reproduce the issue this PR is meant to solve in a live search.

@O-marqs

O-marqs commented Oct 21, 2026

Copy link
Copy Markdown
Author

Hi @kirkwat, thanks for reviewing!

I identified this through offline tests of the Glassdoor detail-response handling, not from a particular live search.

The regression scenario contains a malformed detail alias between valid entries. The existing processing can lose valid details following the malformed entry. The tests also cover aliases that do not belong to the requested IDs.

The fix validates aliases individually while preserving the existing batching and transport-failure behavior.

The six regression methods in tests/test_oss03_b3.py pass with the patch.

This is a defensive improvement for malformed detail responses; I haven’t observed this exact case in live traffic. Happy to provide a smaller example if useful.

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.

2 participants