← back to Ticket System

data/codex-yoloforever/cycle-20260908T1221Z.HzXvuQ/vienna-parent-memo-preimage.md

41 lines

# TK-11299 — Conditional Vienna inventory reapply preparation

Observed UTC: 2026-09-08T11:40:08.007432Z
Status: BLOCKED / UNRESOLVED. This draft grants no execution approval, including canary writes.
Owner: codex-yoloforever; preparation by codex-yoloforever-vp-dw-commerce.

## Proven local evidence

Commit `5d73ddffa37a9ca61437995249ab6930adc678a5` (recorded commit time `2026-09-08T04:16:00-07:00`) adds `price` to the setter query and excludes `Number(v.price) === 0` from its fixes list. Current local setter is byte-identical to that commit's file: True. Current repository HEAD: `5d73ddffa37a9ca61437995249ab6930adc678a5`. A hermetic test of the extracted actual scan function excludes a zero-price fixture and still includes a $4.25 fixture. Invalid price values are not fail-closed. This establishes local code behavior only; deployment, scheduler target, other writers, and actual runtime effectiveness were not inspected.

Preserved source draft: `/Users/macstudio3/Desktop/PENDING-TK11299-zero-price-reapply.md`
SHA-256: `f203a5e148b42d7cd8353091a93887f9e6bd331fa2e558cf5b615707fd44a6b2`

The original draft reports a historical August fix affecting 1,281 products and asserts they are still at on_hand=2026. The count and present quantities were not authoritatively reread during this preparation. They are historical/reported scope, not today's approved target count. The source draft's statement that the cadence can no longer re-inflate the inventory is not established by this code check. No unsupported timestamp correction is adopted.

## Writer limitation and exact scope blocker

`/Users/macstudio3/Projects/tk-10965-zero-price-analysis/apply-fix.mjs` has no frozen-manifest or exact-ID input. It freshly enumerates active quote-only tagged products across vendors plus active Fentucci Naturals, selecting the first qualifying zero-price non-Sample available variant per product. This is broader than Vienna. Its canary selects the first N newly enumerated rows, and `--all` selects the full fresh result. Therefore generic `--all` and the historical canary command are not a bounded execution proposal and must not be treated as authorized. The initial inspection also found missing/unknown arguments fell through to a full run; that separate defect is now repaired by the local CLI guard described below.

The scan caps variants at 20 and inventory locations at 10 without nested pagination. Restore maps are written before writes but include the full scan even when only a canary subset is changed. Rollback processes every row in the supplied map, comparing quantity against zero; it has no journal of successful mutations or subset selector. The writer uses quantity comparisons, but does not independently reread the final state. Its environment-configurable store must also be pinned to the approved store.

## Required preparation before an executable approval request

1. Obtain a fresh authoritative inventory manifest for the precisely intended Vienna set, using approved read access and complete variant/location pagination. Record observation time, explicit product/variant/inventory-item/location IDs, canonical DW identity mapping from dw_unified, price, sample classification, current on_hand, availableForSale, tracked status and inventory policy; include exclusions, counts and SHA-256. Reconcile historical 1,281 scope against today's rows; do not substitute historical counts.
2. Verify the actual active scheduler/writer path and deployed bytes, and establish that the verified zero-price guard covers the reapply window. A local commit alone is insufficient.
3. Prepare a reviewed executor that consumes only that immutable manifest and exact approved IDs, pins store/API, rejects drift or malformed scope, uses compare quantities, records each successful mutation and supports a bounded rollback from only those successes. The present CLI does not satisfy this condition. The local argument guard described below does not implement this bounded executor.
4. Present the exact reviewed command, executor hash, manifest hash, target counts and IDs, explicit canary subset, rollback plan and independent post-write verification for Steve's explicit approval under TK-11299. If canonical dw_unified writes are required, specify and approve them separately and perform PostgreSQL before Shopify. Legacy TK-10993 approval and the TK-10965 header do not authorize this reapplication.

Requested future mutation is limited to approved zero-price non-Sample inventory levels becoming on_hand=0. Preserve paid Sample variants and all unapproved rows. Canary writes are gated too. No executable write command is supplied because the fresh manifest and a bounded executor are missing. Exact execution approval is still required after that preparation.

## Evidence and outcome

Evidence: `/Users/macstudio3/Projects/ticket-system/data/codex-yoloforever/cycle-20260908T1121Z.O0jFR4/vienna-evidence.json`
The initial documentation pass made no source edits. The subsequent local CLI guard is one implementation fix; operational fixes remain zero. No Shopify reads/writes, credential access, scheduler edits or live canary execution occurred. Inventory remediation remains UNRESOLVED.

## Superseding local guard update

Observed UTC: 2026-09-08T11:51:50.684239+00:00

Local commit `7fb358ca8948290915678dd2c34f83a02d5a0532` is integrated in the writer repository after a clean fast-forward. Missing/unknown/conflicting arguments and invalid canary counts now exit 2 before runtime directory creation, credentials, network or subprocess attempts. `--help` exits 0 without initialization. All 42 hermetic checks passed in the isolated checkout; the parent is retaining a second actual-CLI run from the integrated checkout. Explicit recognized write modes retain their old scope and remain gated. The immutable manifest, bounded executor, current inventory and runtime-effectiveness checks above remain outstanding. Original documentation evidence is preserved as `vienna-memo-before-guard.md` in the cycle directory.