{
  "id": "variation-stock",
  "action": "Reduce variation stock from 12 to 8",
  "edit_path": "Native wc_update_product_stock in WP-CLI, user 1",
  "fixture_result": {
    "id": 13,
    "quantity": 8
  },
  "events": [
    {
      "id": "10",
      "network_id": "1",
      "site_id": "1",
      "occurred_at": "2026-11-22 06:12:32.999960",
      "code": "commerce.stock_changed",
      "category": "commerce",
      "action": "stock_changed",
      "outcome": "stored_change",
      "severity": "notice",
      "actor_kind": "authenticated_user",
      "actor_id": "1",
      "subject_id": null,
      "object_type": "product",
      "object_id": "13",
      "channel": "cli",
      "payload": {
        "event_scope": "site",
        "source": "wordpress",
        "actor_label": "User #1",
        "subject_label": "Not applicable",
        "facts": {
          "product_type": "variation",
          "execution_context": "authenticated_staff"
        },
        "diffs": [
          {
            "field": "quantity",
            "type": "scalar",
            "before": "12",
            "after": "8",
            "availability": "captured",
            "redacted": false
          }
        ],
        "collector": "woocommerce_crud_v1",
        "observed_via": "woocommerce_variation_set_stock",
        "confidence": "successful_write_with_prewrite_snapshot",
        "ip_context": {
          "mode": "unavailable",
          "reason": "not_collected_by_this_collector"
        },
        "incomplete_context": false,
        "truncated": false,
        "before_consistency": "prewrite_snapshot_not_serializable_against_concurrent_writes",
        "maintenance": null
      }
    }
  ],
  "observed_codes": [
    "commerce.stock_changed"
  ],
  "expected_event": "commerce.stock_changed",
  "status": "captured",
  "retained_fields": [
    "quantity"
  ],
  "retained_fact_names": [
    "execution_context",
    "product_type"
  ],
  "attribution": [
    "authenticated_user; actor_id=1; channel=cli"
  ],
  "limitations": "Native wc_update_product_stock records numeric quantity changes. The event uses the variation ID as Product #13; its current-item link was unavailable in this fixture. It does not retain the parent product title or certify all stock integrations.",
  "alternatives": "Find the variation in WooCommerce inventory by its ID; use native order notes for reductions/restocks and importer/job records.",
  "versions": {
    "logged_ai_free": "1.2.16",
    "wordpress": "7.1.5",
    "php": "8.5.4",
    "mariadb": "11.8.6",
    "woocommerce": "11.3.0",
    "order_storage": "HPOS"
  },
  "tested_at": "2026-11-22",
  "sample": "variation-stock.json",
  "screenshot": "variation-stock-detail.png"
}
