# Changelog of WooCommerce Catalog & Price Monitor - Diffs & Low-Stock Alerts (`yasaslive/woo-monitor`) Actor

- **URL**: https://apify.com/yasaslive/woo-monitor/changelog.md
- **Full Actor documentation**: https://apify.com/yasaslive/woo-monitor.md

## Changelog

All notable changes to this actor are documented here. Format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow semver.

### \[0.1.3] — 2026-08-17

#### Fixed

- **Runs started normally produced no data.** The actor decided it was in Standby mode from the
  presence of `ACTOR_STANDBY_PORT`, which the platform also sets on ordinary runs of a Standby-enabled
  actor. Every run therefore started an HTTP server, waited for requests that never came, and wrote an
  empty dataset. Mode is now decided by `APIFY_META_ORIGIN=STANDBY`, and a run whose input names at
  least one store always crawls regardless of the environment. Each run logs the mode and the reason.
  This also removes a path to the maintenance flag, since the daily health check requires a non-empty
  dataset. Covered by regression tests in `tests/run-mode.test.ts`.
- `ACTOR_STANDBY_PORT` values such as `12.5.6` were accepted as port 12, because `Number.parseInt`
  stops at the first invalid character. The port is now digit-validated before parsing.

### \[0.1.2] — 2026-08-16

#### Added

- Buyer-facing Store listing at `.actor/README.md`, separate from the developer README.
- Actor logo (`.actor/logo.svg`, `.actor/logo.png`).

#### Changed

- Actor title shortened to `WooCommerce Catalog & Price Monitor — Diffs & Low-Stock Alerts` (62
  characters); Apify rejects titles over 63.

### \[0.1.0] — 2026-08-16

First release.

#### Added

- Catalog export from the public WooCommerce Store API (`wc/store/v1`), one row per product or per
  variation, with prices in exact integer cents.
- Store detection via `/wp-json/` namespaces with a Store API fallback probe. Detected REST namespaces
  are exported — they enumerate the site's REST-enabled plugins.
- Snapshot and diff per store in a named key-value store, emitting seven typed change events:
  `price_drop`, `price_increase`, `low_stock`, `back_in_stock`, `out_of_stock`, `new_product`,
  `removed_product`.
- Low-stock detection from two signals: the store's own `low_stock_remaining` where published, and
  otherwise the unit count parsed out of `stock_availability` and tracked across runs. Fires on
  crossing into the threshold or falling further, not on every run while low.
- Per-variation price enrichment within a configurable budget, with unenriched rows explicitly
  labelled `priceSource: "parent"`.
- Watch filters over events only (`nameIncludes`, `categories`, `tags`, `minPctChange`).
- Slack and generic webhook alerts, grouped per store, carrying every low-stock hit and the ten most
  significant price moves.
- Pre-run cost estimator written to `COST-ESTIMATE.json` and logged, derived from each store's own
  `X-WP-Total` header rather than from an assumption.
- Free-plan caps: 1 store, 50 records, no alert delivery.
- Standby HTTP mode sharing one `run()` with the one-off entry point, plus `GET /health`.
- `npm run discover` to qualify prospect domains before spending anything.
- Health records (`kind: "health"`) so a run that collects nothing is visible in the dataset rather
  than silently empty, and endpoint-drift detection for sources that return 2xx with the wrong shape.
- 199 automated tests, including diff fixtures covering every event type exactly once and detection
  fixtures captured from live sites.

#### Notes

- Prices are parsed from minor-unit strings using each store's `currency_minor_unit`. Zero-decimal
  currencies are handled: `"115"` at exponent 0 is $115.00, not $1.15. No floating point arithmetic
  appears anywhere in the price path.
- Product names are HTML-entity decoded, so exported names match the store's rendered page.
- Stores whose robots.txt excludes `/wp-json/` are reported `skipped` and never charged. This affected
  3 of the 6 WooCommerce stores found while probing 42 domains during the build.
