← back to Carnegie Identity Audit
approval-request.md
112 lines
Status: EXECUTED AND INDEPENDENTLY VERIFIED — 2026-09-11T17:38:59.201091+00:00
# TK-11246 complete
Verified 2026-09-11T17:38:59.201091+00:00.
- Three creation scripts preserve full manufacturer category identities.
- Restored26 local staging rows and104 metafields across26 active +26 archived products.
- Independent REST/SQL verifies all52 products,5928 unique identities, unchanged
current prices, unrelated fields, grouped exclusion and canonical records.
- Real canary rollback/reapply, transactional DB reversal, stale-write rejection
and idempotent retry checks passed. Delayed monitoring passed after299s.
- Source commit: `3a275476b5b5a1f9fbafa067c42e47133438eaf9`. Execution code/canary proof: `54fc24b`.
All execution records and exact rollback prestate are in `execution-20260911/`.
Canonical writes:0. Emails:0. Broader Carnegie inventory remains outside this repair.
---
Original approved scope (historical):
# TK-11246 — Restore Carnegie category identities
Status: PREPARED, NOT EXECUTED. Execution confirmation pending. Owner: codex-run-11246.
## Concrete request
Approve this bounded repair, in this order:
1. Apply the three-line suffix-preservation patch to `rollout.mjs`, `rollout2.mjs`,
and `build-siltech-grain-v2-archived.mjs` in `~/Projects/carnegie-split/`.
2. Restore exactly 26 local `dw_unified.carnegie_catalog.mfr_sku` values for
DWAG-379296 through DWAG-379321 from the exact canonical mapping.
3. Restore `custom.manufacturer_sku` and `dwc.manufacturer_sku` on exactly 52
Shopify products: 26 ACTIVE v2 replacements and 26 ARCHIVED pilot products,
totaling 104 existing metafields. Do not publish or unarchive anything.
Kamatera already has the correct values: ZERO canonical writes. No Shopify
variant SKU, price, title, handle, status, tags, or unrelated metafields change.
No stripping of category suffixes, pattern/color recomputation, or bulk vendor
rewrite is permitted by this proposal.
## Evidence and why the old plan was insufficient
Fresh read-only Shopify API collection on September 10 local time found three
generations per exact SKU: the old grouped ARCHIVED parent (no manufacturer_sku
in either namespace), the ARCHIVED pilot, and the ACTIVE v2 replacement.
The 26 IDs from the still-earlier split-run artifact no longer resolve.
All 26 archived pilot metafield timestamps are 2026-08-18T22:14:36Z through
22:14:57Z, immediately before the original cleanup ledger entry at 22:15:39Z.
This corroborates membership; the original standalone mutation-ID log was not
recovered and is not claimed as recovered.
Both the pilot and replacement carry the exact stripped staging code in both
namespaces. Today's replacement generation inherited the defect. Restoring only
the archived pilots would leave all 26 active replacements wrong.
Canonical Kamatera read-only SELECT at 2026-09-11T00:58:48.94186Z (exact timestamp in
canonical-catalog.json) confirms all 26 suffixed targets. Local staging still
has the stripped values. Proposed restoration preserves 5,928 unique identities.
Three creation scripts independently strip suffixes via cleanMfr(). The proposed
patch preserves input identities byte-for-byte. Without this prerequisite,
data-only repair would be lost on the next creation run.
## Exact artifacts
- Repo: `/Users/macstudio3/Projects/carnegie-identity-audit/`
- `verification/repair-plan.json`: all 26 row IDs, exact old/new values, all 52
product IDs, exact variant IDs/SKUs/statuses, and 104 metafield IDs/types/prestate.
- `preserve-manufacturer-identity.patch`: three source edits, not applied.
- `verification/current-by-sku.json` and `historical-products.json`: Shopify reads.
- `verification/current-catalog.json` and `canonical-catalog.json`: database reads.
- `verification/e2e-proof.json`: proof boundaries, negative tests, and skipped writes.
- `verification/dtd-verdict.md`: 2/2 available voters chose scoped preparation;
mandatory adversarial debate KEEP, contingent on row-level proof and approval.
## Verification completed
- Exact26 source-to-canonical mapping, current product/variant identity, both
namespaces, and unchanged grouped-product exclusion: PASS.
- Full-table projected uniqueness: 5,928 distinct before and after: PASS.
- Five negative fixtures (wrong vendor, wrong prestate, extra active membership,
wrong canonical target, grouped product mistaken for a scalar): rejected.
- Each patched helper tested on 5,928 current codes plus 26 restoration targets:
5,954/5,954 preserved; current helper alters 5,763 of those inputs.
- Patched full modules pass syntax checks; `git apply --check` passes.
- No source, database, or Shopify business changes executed.
## Execution and rollback requirements
Before execution, refresh every source/prestate and reject any identity/value/
status/canonical mismatch. Review current source diffs and preserve concurrent
pricing changes. Capture durable rollback data. Apply source patch before local
staging transaction, then one ACTIVE product canary and independent API readback
before the remaining bounded Shopify batches. Use compare-and-set for metafields
or equivalent drift rejection; never blindly overwrite a changed value.
After execution, independently read DB and API to verify the exact target values,
full-table uniqueness, unchanged product properties and grouped exclusions.
Record partial completion durably so retries skip verified work.
Rollback is conditional restoration of captured before-values only where the
current value still equals this repair's after-value. Reverse source patch only
after checking no later edits overlap. No remote push, new service, or schedule.
## Remaining limits
This does not quantify the broader storefront impact of the three stripping
helpers; a separate read-only inventory is needed for other Carnegie rows.
Ticket remains blocked until approved execution and post-write proof are complete.