← back to Dw Unbuyable Recovery Pilot
tk11041-innovations-reconcile/rescrape/REPRICE-WHICH-TOOL.md
48 lines
# Two reprice tools live here. Pick by WHERE THE NUMBER CAME FROM.
Built independently, hours apart, by two sessions on TK-11041. Both implement the same verified
chain — `net = list x 0.90`, `retail = net / 0.65 / 0.85` — and both are read-only. The difference
that matters is **what they assume about the number you feed them.**
| The 7 prices came from… | Use | Why |
|---|---|---|
| the **authenticated portal** (acct 58315) | `tk11041-dryrun-reprice-plan.mjs` | It is built for the portal and hardcodes **basis = LIST**, which is right: the portal shows list (proven by DW's own June-2026 crawl — `price_retail` 134.95 / `price_trade` 121.46 = x0.90). |
| **Hektor's email reply** | `stage-reprice.mjs --basis net` | The merged draft asks him to *"confirm the current per-yard **net**"*. A net number is NOT a list number. |
## The trap, stated plainly
`tk11041-dryrun-reprice-plan.mjs` assumes LIST and applies `x0.90`. **Feed it a NET price and it
discounts an already-discounted number** — retail lands ~10% under where it belongs, on 39
customer-facing products, silently, because the arithmetic succeeds and the output looks normal.
That is not hypothetical: the email route we just opened asks for net specifically, so the wrong
pairing is the *likely* one, not the exotic one.
`stage-reprice.mjs` refuses to run without an explicit `--basis` and has **no default**, precisely
so this cannot happen by omission.
## What each adds that the other does not
**`tk11041-dryrun-reprice-plan.mjs`** — a full 888-line staged plan already written out, with the
per-column write targets spelled out for the gated write. Further along for the portal path.
**`stage-reprice.mjs`** — required `--basis`; 12 self-tests, the meaningful ones negative ($0,
negative, missing basis, unknown basis all throw rather than produce a price); a sanity band against
the Fall-2025 list that catches a wrong-unit quote (a 90%-low number is flagged, not priced); names
unpriced SKUs instead of dropping them; and carries the per-pattern order terms.
## One finding only the second tool has
**Skylark (SKL-001..004) is MADE TO ORDER** — no stock, no cut-fee code, MTO warehouse, per the
vendor's own Fall-2025 list. Decide deliberately whether those 4 become buyable stocked rolls or
stay quote/lead-time, and set a lead time, *before* they go sellable. Neither the portal pull nor
the other planner surfaces this.
*(It was nearly missed here too: the first parser silently dropped those 4 rows because its regex
expected a `Fee X` freight code and Skylark's cell reads `MTO (no cut-fee code)`. 35-of-39 looked
like a clean run.)*
## Unchanged for both
Neither writes to `dw_unified` or Shopify. The repricing of the 39 is canonical + customer-facing
and stays gated.