# Changelog of jobs.ch Scraper — Swiss Jobs & Details (`stone_jadex/jobsch-jobs-scraper`) Actor

- **URL**: https://apify.com/stone_jadex/jobsch-jobs-scraper/changelog.md
- **Full Actor documentation**: https://apify.com/stone_jadex/jobsch-jobs-scraper.md

## Changelog

### Unreleased — Store & schema polish (2026-11-21)

- **Input schema (`.actor/input_schema.json`):** Added clean Console `sectionCaption` and `sectionDescription` groupings (`Search source & filters`, `Collection limits & detail enrichment`, `Timing, runtime & network`) with all `prefill` values (`term`, `filters.term`, `maxItems`, etc.) and descriptions preserved.
- **README (`README.md`):** Added an illustrative JSON output row example, live Pay-Per-Event pricing and Store subscription tier discounts table (`Free`, `Bronze`, `Silver`, `Gold`, `Platinum`, `Diamond` verified against `pricingInfos`), JavaScript and Python `ApifyClient` SDK quickstart (`Stone_JadeX/jobsch-jobs-scraper`), and a `2026-11-21` Changelog section.

### Unreleased — final-batch rules (2026-11-16)

- **Blocking (C1–C3):** 412 is now a block code like 403/429 (30 s then 60 s back-off, at most 2 retries). K1: once a request saw a block code, the next answer that is not 200 (any 3xx/4xx/5xx), a network error or a timeout ends it at once as blocked with the most recent block code. A block or challenge stops the **whole run** (list, detail and robots requests alike); a 404 after a block is no longer treated as a page end. A list page that fails without a block now ends the run as `errors` (still SUCCEEDED) instead of `complete`/`empty`.
- **stopReason:** `blocked-403-or-429` → `blocked-<most recent block code>` (`blocked-403`, `blocked-412`, `blocked-429`); `challenge-or-auth` → `blocked-challenge`. With 0 rows nothing is charged, otherwise only rows already pushed are charged (push before charge unchanged).
- **End-state contract (幕僚 2026-11-16 12:30):** the platform run is always SUCCEEDED (only invalid input fails the run). OUTPUT `failed=true` for `blocked-*`, `errors` and a hard time-limit cut (`run-time-limit` with `deadlineSource: "hard-timeout"`, i.e. the platform timeout); `failed=false` for `completed`, `empty` (0 rows, no errors), `maxItems` and the buyer's own `maxRunSeconds` (`deadlineSource: "maxRunSeconds"`). Normal end renamed `complete` → `completed`.
- **OUTPUT (fields added only):** `blocked` {status, url, retries, backoffSeconds, lastFailure}, `lastFailure` (real status of the last failed attempt, or `network-error` / `timeout`), `runNotice` (states only the back-off waits and retries that happened), `detailFallbackRows`, `errors[].type` (`blocked` / `blocked-challenge` / `list-error` / `detail-error`) with `errors[].url` and `errors[].lastFailure`, `detailFailureSamples` (first 5 failed details with error, status and redacted redirect target), `pricingEvents.start`, `http.status412`.
- **Detail failure no longer drops the row:** with `includeDetails=true`, a row whose detail fetch fails (404, error, refused redirect, missing vacancy data, or a block/challenge that then stops the run) is pushed as the list row (`detailStatus`/`detailError`/`missingReasons.detail` say why) and charged `job-serp-result` only. Direct detail start URLs have no list data and are still skipped on failure.
- **Fix:** a failed detail was counted twice in `detailFailures` (cost run m6WcxcTiTNl4O8pyj showed `detailFailures=2` for one refused redirect); now counted once.
- **Pricing:** start fee via Apify's synthetic `apify-actor-start` event ($0.0005) added to `.actor/pay_per_event.json`; the platform charges it at run start, the code never charges it. `job-serp-result` $0.001435 and `job-detail-result` $0.0025 unchanged; no event renamed.
- Tests: `test/block-rules.test.js` (21 tests); fake sleeps in tests yield via `setImmediate`. Input schema and dataset fields unchanged; proxy logic unchanged (non-empty proxy input still rejected).

### 0.1.0 — 2026-11-08

- Initial jobs.ch Actor developer freeze (no schema/README — specialist roles).
- List SSR via global `__INIT__` (`vacancy.results.main`); detail via `__REACT_QUERY_STATE__` queries by `queryKey[0]` + JobPosting JSON-LD.
- Hard pagination `page<=100` with page101 soft-reset detection (`stopReason=page-limit-or-soft-reset`); cross-page ID dedup; `maxItems` unique cap.
- PPE: `job-serp-result` ($0.001435) list-only; `job-detail-result` ($0.0025) detail-enriched only (not both). Local `.actor/pay_per_event.json` only.
- Defaults: maxItems 100, includeDetails false, proxy rejected if nonempty, requestDelayMs≥1200, memory 256 / timeout 3600 metadata.
- HTTP: public path allowlist, ≥1200ms spacing, 403/429 floor 30s×2 then site stop, captcha protective stop, robots warning+hits, ToS high-risk recorded.
- TDD: redlogs captured before implementation; `# fail 0` on `node --test --test-reporter=tap test/*.js`.
