← back to Gmc Titlefix
chore: lint, refactor (session close) + track TK-11847 APPLY rollback artifact
2164b4ce20faf1a5076af63061e2cd8a0e1d7494 · 2026-09-24 13:18:03 -0700 · Steve
Behavior-preserving: saveState/fmtOffer helpers in merge-recheck; drop dead
lastResultArtifact var in override script. node --check + dry-run clean.
No version field in repo (no bump).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sb592So8iWsxtsmVsiTMfq
Files touched
A data/tk11847-colorway-override-APPLY-2026-09-24T19-59-41.jsonM tk11847-colorway-override.mjsM tk11847-merge-recheck.mjs
Diff
commit 2164b4ce20faf1a5076af63061e2cd8a0e1d7494
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Sep 24 13:18:03 2026 -0700
chore: lint, refactor (session close) + track TK-11847 APPLY rollback artifact
Behavior-preserving: saveState/fmtOffer helpers in merge-recheck; drop dead
lastResultArtifact var in override script. node --check + dry-run clean.
No version field in repo (no bump).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sb592So8iWsxtsmVsiTMfq
---
...olorway-override-APPLY-2026-09-24T19-59-41.json | 169 +++++++++++++++++++++
tk11847-colorway-override.mjs | 4 +-
tk11847-merge-recheck.mjs | 20 ++-
3 files changed, 184 insertions(+), 9 deletions(-)
diff --git a/data/tk11847-colorway-override-APPLY-2026-09-24T19-59-41.json b/data/tk11847-colorway-override-APPLY-2026-09-24T19-59-41.json
new file mode 100644
index 0000000..e978bcd
--- /dev/null
+++ b/data/tk11847-colorway-override-APPLY-2026-09-24T19-59-41.json
@@ -0,0 +1,169 @@
+{
+ "ticket": "TK-11847",
+ "mode": "APPLY",
+ "at": "2026-09-24T19:59:41.509Z",
+ "dataSource": "accounts/146735262/dataSources/10677010255",
+ "hold": [
+ "44736900464691"
+ ],
+ "rows": [
+ {
+ "offerId": "44724797538355",
+ "title": "Apollo Chardonnay",
+ "color": "Chardonnay",
+ "material": "Faux Leather",
+ "stillLR": true,
+ "liveDescription": "Apollo Chardonnay",
+ "liveColor": null,
+ "liveMaterial": null,
+ "lastUpdateDate": "2026-09-11T22:54:48.097974Z",
+ "productAttributes": {
+ "color": "Chardonnay",
+ "material": "Faux Leather",
+ "productTypes": [
+ "Wallcovering"
+ ],
+ "description": "Apollo Chardonnay — faux leather wallcovering (wallpaper) in the Chardonnay colorway. Not a beverage. Apollo — Chardonnay . Majilite Nytek® faux leather from the Metallic Specialties I collection — a specially engineered Nylon Fiber Matrix, luxurious, breathable and durable, ideal for wall coverings, seating, flat surfaces and displays. Width: 54 in / 137 cm Weight: 8.8 oz/sq yd / 300 g/m² Thickness: 28 mils / 0.7 mm Durability: 300,000+ double rubs (Wyzenbeek wire screen, ASTM D-4157-82) Flammability: UFAC/NFPA 260 (Class 1) & CAL Technical Bulletin 117-2013 Section 1 — Pass Cleanability: S/W · Crocking Wet 5 / Dry 5 PFAS-, PVC- and plasticizer-free · no off-gassing Available by the yard (54\" wide) at $117.25/yd, or order a $4.25 sample swatch."
+ }
+ },
+ {
+ "offerId": "44724798226483",
+ "title": "Brushed Finesse Champagne",
+ "color": "Champagne",
+ "material": "Faux Leather",
+ "stillLR": true,
+ "liveDescription": "Brushed Finesse Champagne",
+ "liveColor": null,
+ "liveMaterial": null,
+ "lastUpdateDate": "2026-08-26T15:15:58.136016Z",
+ "productAttributes": {
+ "color": "Champagne",
+ "material": "Faux Leather",
+ "productTypes": [
+ "Wallcovering"
+ ],
+ "description": "Brushed Finesse Champagne — faux leather wallcovering (wallpaper) in the Champagne colorway. Not a beverage. Brushed Finesse — Champagne . Majilite Nytek® faux leather from the Metallic Specialties I collection — a specially engineered Nylon Fiber Matrix, luxurious, breathable and durable, ideal for wall coverings, seating, flat surfaces and displays. Width: 54 in / 137 cm Weight: 8.8 oz/sq yd / 300 g/m² Thickness: 28 mils / 0.7 mm Durability: 300,000+ double rubs (Wyzenbeek wire screen, ASTM D-4157-82) Flammability: UFAC/NFPA 260 (Class 1) & CAL Technical Bulletin 117-2013 Section 1 — Pass Cleanability: S/W · Crocking Wet 5 / Dry 5 PFAS-, PVC- and plasticizer-free · no off-gassing Available by the yard (54\" wide) at $92.75/yd, or order a $4.25 sample swatch."
+ }
+ },
+ {
+ "offerId": "44724798193715",
+ "title": "Infinity White Zinfandel",
+ "color": "White Zinfandel",
+ "material": "Faux Leather",
+ "stillLR": true,
+ "liveDescription": "Infinity White Zinfandel",
+ "liveColor": null,
+ "liveMaterial": null,
+ "lastUpdateDate": "2026-09-11T23:19:26.742824Z",
+ "productAttributes": {
+ "color": "White Zinfandel",
+ "material": "Faux Leather",
+ "productTypes": [
+ "Wallcovering"
+ ],
+ "description": "Infinity White Zinfandel — faux leather wallcovering (wallpaper) in the White Zinfandel colorway. Not a beverage. Infinity — White Zinfandel . Majilite Nytek® faux leather from the Metallic Specialties I collection — a specially engineered Nylon Fiber Matrix, luxurious, breathable and durable, ideal for wall coverings, seating, flat surfaces and displays. Width: 54 in / 137 cm Weight: 8.8 oz/sq yd / 300 g/m² Thickness: 28 mils / 0.7 mm Durability: 300,000+ double rubs (Wyzenbeek wire screen, ASTM D-4157-82) Flammability: UFAC/NFPA 260 (Class 1) & CAL Technical Bulletin 117-2013 Section 1 — Pass Cleanability: S/W · Crocking Wet 5 / Dry 5 PFAS-, PVC- and plasticizer-free · no off-gassing Available by the yard (54\" wide) at $92.75/yd, or order a $4.25 sample swatch."
+ }
+ },
+ {
+ "offerId": "40977437818931",
+ "title": "McKinley Park Type 2 | Phillipe Romano",
+ "color": "Gray",
+ "material": "Vinyl",
+ "stillLR": true,
+ "liveDescription": "A soft, organic quality suggests a landscape obscured by fog… or a memory by time. The Type II vinyl wallcovering’s a gentle visual texture for the wall.",
+ "liveColor": null,
+ "liveMaterial": null,
+ "lastUpdateDate": "2026-09-11T22:20:16.886293Z",
+ "productAttributes": {
+ "color": "Gray",
+ "material": "Vinyl",
+ "productTypes": [
+ "Wallcovering"
+ ],
+ "description": "McKinley Park Type 2 | Phillipe Romano — vinyl wallcovering (wallpaper) in the Gray colorway. Not a beverage. A soft, organic quality suggests a landscape obscured by fog... or a memory by time. The Type II vinyl wallcovering’s a gentle visual texture for the wall."
+ }
+ },
+ {
+ "offerId": "44508742418483",
+ "title": "Colonne Une Véritable Affinité | Elitis",
+ "color": "Silver",
+ "material": "Textile",
+ "stillLR": true,
+ "liveDescription": "Colonne Une Véritable Affinité | Elitis",
+ "liveColor": null,
+ "liveMaterial": null,
+ "lastUpdateDate": "2026-09-11T22:47:07.706689Z",
+ "productAttributes": {
+ "color": "Silver",
+ "material": "Textile",
+ "productTypes": [
+ "Wallcovering"
+ ],
+ "description": "Colonne Une Véritable Affinité | Elitis — textile wallcovering (wallpaper) in the Silver colorway. Not a beverage. A traditional striped wallcovering with a textured effect, suitable for residential use. Colonne in Une Véritable Affinité, from the Elitis Wall Rayures Jumelles collection. 60% PES 40% PU, 50\" wide."
+ }
+ },
+ {
+ "offerId": "44508735209523",
+ "title": "Volutes Le Goût De L'étrange | Elitis",
+ "color": "Cream",
+ "material": "Vinyl",
+ "stillLR": true,
+ "liveDescription": "Volutes Le Goût De L'étrange | Elitis",
+ "liveColor": null,
+ "liveMaterial": null,
+ "lastUpdateDate": "2026-09-11T23:04:14.129658Z",
+ "productAttributes": {
+ "color": "Cream",
+ "material": "Vinyl",
+ "productTypes": [
+ "Wallcovering"
+ ],
+ "description": "Volutes Le Goût De L'étrange | Elitis — vinyl wallcovering (wallpaper) in the Cream colorway. Not a beverage. Traditional vinyl wallcovering featuring bronze abstract swirls on a charcoal gray textured background, suitable for residential interiors. Volutes in Le Goût De L'étrange, from the Elitis Wall Domino collection. Paper on non woven backing, 39\" wide."
+ }
+ }
+ ],
+ "results": [
+ {
+ "offerId": "44724797538355",
+ "http": 200,
+ "ok": true,
+ "body": "{\n \"name\": \"accounts/146735262/productInputs/en~US~44724797538355\",\n \"product\": \"accounts/146735262/products/en~US~44724797538355\",\n \"offerId\": \"44724797538355\",\n \"contentLanguage\": \"en\",\n \"feedLabel\": \"US\",\n \"productAttributes\": {\n \"description\": \"Apollo Chardonnay — faux leather wallcover",
+ "realName": "accounts/146735262/productInputs/en~US~44724797538355"
+ },
+ {
+ "offerId": "44724798226483",
+ "http": 200,
+ "ok": true,
+ "body": "{\n \"name\": \"accounts/146735262/productInputs/en~US~44724798226483\",\n \"product\": \"accounts/146735262/products/en~US~44724798226483\",\n \"offerId\": \"44724798226483\",\n \"contentLanguage\": \"en\",\n \"feedLabel\": \"US\",\n \"productAttributes\": {\n \"description\": \"Brushed Finesse Champagne — faux leather w",
+ "realName": "accounts/146735262/productInputs/en~US~44724798226483"
+ },
+ {
+ "offerId": "44724798193715",
+ "http": 200,
+ "ok": true,
+ "body": "{\n \"name\": \"accounts/146735262/productInputs/en~US~44724798193715\",\n \"product\": \"accounts/146735262/products/en~US~44724798193715\",\n \"offerId\": \"44724798193715\",\n \"contentLanguage\": \"en\",\n \"feedLabel\": \"US\",\n \"productAttributes\": {\n \"description\": \"Infinity White Zinfandel — faux leather wa",
+ "realName": "accounts/146735262/productInputs/en~US~44724798193715"
+ },
+ {
+ "offerId": "40977437818931",
+ "http": 200,
+ "ok": true,
+ "body": "{\n \"name\": \"accounts/146735262/productInputs/en~US~40977437818931\",\n \"product\": \"accounts/146735262/products/en~US~40977437818931\",\n \"offerId\": \"40977437818931\",\n \"contentLanguage\": \"en\",\n \"feedLabel\": \"US\",\n \"productAttributes\": {\n \"description\": \"McKinley Park Type 2 | Phillipe Romano — v",
+ "realName": "accounts/146735262/productInputs/en~US~40977437818931"
+ },
+ {
+ "offerId": "44508742418483",
+ "http": 200,
+ "ok": true,
+ "body": "{\n \"name\": \"accounts/146735262/productInputs/en~US~44508742418483\",\n \"product\": \"accounts/146735262/products/en~US~44508742418483\",\n \"offerId\": \"44508742418483\",\n \"contentLanguage\": \"en\",\n \"feedLabel\": \"US\",\n \"productAttributes\": {\n \"description\": \"Colonne Une Véritable Affinité | Elitis — ",
+ "realName": "accounts/146735262/productInputs/en~US~44508742418483"
+ },
+ {
+ "offerId": "44508735209523",
+ "http": 200,
+ "ok": true,
+ "body": "{\n \"name\": \"accounts/146735262/productInputs/en~US~44508735209523\",\n \"product\": \"accounts/146735262/products/en~US~44508735209523\",\n \"offerId\": \"44508735209523\",\n \"contentLanguage\": \"en\",\n \"feedLabel\": \"US\",\n \"productAttributes\": {\n \"description\": \"Volutes Le Goût De L'étrange | Elitis — vi",
+ "realName": "accounts/146735262/productInputs/en~US~44508735209523"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tk11847-colorway-override.mjs b/tk11847-colorway-override.mjs
index dd06cea..e7d5986 100644
--- a/tk11847-colorway-override.mjs
+++ b/tk11847-colorway-override.mjs
@@ -116,7 +116,6 @@ if (ROLLBACK) {
}
}
-let lastResultArtifact = null; // side effect: write after each mutation
try {
for (const r of rows) {
if (!ROLLBACK && !r.stillLR) { record.results.push({ offerId: r.offerId, skipped: 'self-cleared' }); continue; }
@@ -146,14 +145,13 @@ try {
console.log(ROLLBACK ? 'DELETE' : 'INSERT', r.offerId, 'HTTP', resp.status, resp.ok ? '' : txt.slice(0, 160));
// CRITICAL: flush after every write so a transport failure mid-loop leaves an audit trail
fs.writeFileSync(art, JSON.stringify(record, null, 1));
- lastResultArtifact = art;
await new Promise(z => setTimeout(z, 400));
}
} catch (e) {
if (e instanceof TypeError && e.message.includes('fetch')) {
// transport failure: network, DNS, TLS, or connection reset
console.error(`\n⚠️ TRANSPORT FAILURE at offer index ${record.results.length}:`, e.message);
- console.error(`Partial results written to: ${lastResultArtifact || art}`);
+ console.error(`Partial results written to: ${art}`);
console.error('Review the artifact, fix the issue, and retry with --rollback to clean up what was applied.\n');
process.exit(2); // distinct exit code: not a user gate, a system error
}
diff --git a/tk11847-merge-recheck.mjs b/tk11847-merge-recheck.mjs
index fa373f9..d0ff518 100644
--- a/tk11847-merge-recheck.mjs
+++ b/tk11847-merge-recheck.mjs
@@ -43,6 +43,14 @@ function selfUninstall() {
console.log('self-uninstalled launchd job', LAUNCHD_LABEL);
}
+function saveState(s) {
+ fs.writeFileSync(STATE_FILE, JSON.stringify(s, null, 1));
+}
+
+function fmtOffer(r) {
+ return `${r.offerId} (${r.title}) merged=${r.merged} stillLR=${r.stillLR}${r.error ? ' err=' + r.error : ''}`;
+}
+
const apply = JSON.parse(fs.readFileSync(APPLY_ARTIFACT, 'utf8'));
const targets = apply.rows.map(r => ({
offerId: r.offerId,
@@ -87,15 +95,15 @@ console.log(new Date().toISOString(), JSON.stringify(results.map(r => ({ o: r.of
if (allMerged && !anyStillLR) {
tkLog(`Merge recheck PASS: all 6 offers show merged color/material, none still legal_restrictions-disapproved. ${results.map(r => r.offerId).join(', ')}`);
- fs.writeFileSync(STATE_FILE, JSON.stringify(state, null, 1));
+ saveState(state);
selfUninstall();
process.exit(0);
}
if (now >= deadlineAt) {
const stillBad = results.filter(r => r.stillLR || !r.merged || r.error);
- tkLog(`Merge recheck 72h DEADLINE reached. APPEAL NEEDED (console) for: ${stillBad.map(r => `${r.offerId} (${r.title}) merged=${r.merged} stillLR=${r.stillLR}${r.error ? ' err=' + r.error : ''}`).join('; ')}`);
- fs.writeFileSync(STATE_FILE, JSON.stringify(state, null, 1));
+ tkLog(`Merge recheck 72h DEADLINE reached. APPEAL NEEDED (console) for: ${stillBad.map(fmtOffer).join('; ')}`);
+ saveState(state);
selfUninstall();
process.exit(0);
}
@@ -103,13 +111,13 @@ if (now >= deadlineAt) {
if (now >= stalledAt && !anyMerged && !state.stalled_logged) {
tkLog(`Merge recheck WARN: 12h elapsed, no offer has merged the new color/material yet. Possible naming/rule/datasource-link problem. Offers: ${results.map(r => r.offerId).join(', ')}`);
state.stalled_logged = true;
- fs.writeFileSync(STATE_FILE, JSON.stringify(state, null, 1));
+ saveState(state);
process.exit(0);
}
if (changed.length) {
- tkLog(`Merge recheck state change: ${changed.map(r => `${r.offerId} (${r.title}) merged=${r.merged} stillLR=${r.stillLR}${r.error ? ' err=' + r.error : ''}`).join('; ')}`);
+ tkLog(`Merge recheck state change: ${changed.map(fmtOffer).join('; ')}`);
}
-fs.writeFileSync(STATE_FILE, JSON.stringify(state, null, 1));
+saveState(state);
console.log(changed.length ? 'logged change to ticket' : 'no change, quiet');
← c36bba2 TK-11847 add merge-recheck script; verified PASS — all 6 ove
·
back to Gmc Titlefix
·
auto-data-snapshot: 2026-09-24T13:20:22 (1 data files) — dat 259f3af →