dataforth(datasheet): Fix 2 — publish the 68 STAGE-3-clean DSCA models to Hoffman
Restarted testdatadb service (new template live), canary-pushed 1 cert (updated, 0 errors), then re-pushed all PASS certs for the 68 Final-Test-content-clean models via uploadBySerialNumbers from a fresh node process. Result over 30,423 PASS certs: updated=26022 unchanged=2738 created=0 errors=0 skipped=1663. The 26,022 updates replace the old defective DSCA renders on the live site with the rebuilt, byte-content-validated ones. The 1,663 skips are the count-guard correctly refusing any individual cert whose value count != its template row count (ambiguous) — never publishing misaligned data. Artifacts: push-clean68.js (driver), dsca-clean68-models.json (the published set). NOT yet published: the 26 last-digit-diff models, the ~32 ambiguous/null layout families, and the 231 untemplated models. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1
projects/dataforth-dos/dsca-clean68-models.json
Normal file
1
projects/dataforth-dos/dsca-clean68-models.json
Normal file
@@ -0,0 +1 @@
|
||||
["DSCA30-01","DSCA30-03","DSCA30-06","DSCA30-07","DSCA30-08","DSCA30-08C","DSCA30-09","DSCA30-09C","DSCA30-1944","DSCA30-1945","DSCA30-1946","DSCA31-02","DSCA31-03","DSCA31-06","DSCA31-07","DSCA31-11","DSCA31-12","DSCA31-1273","DSCA31-13","DSCA31-13C","DSCA31-15","DSCA32-01","DSCA32-01C","DSCA32-01E","DSCA34-01","DSCA34-02C","DSCA34-04","DSCA34-04C","DSCA34-05","DSCA34-1858","DSCA36-01","DSCA36-02","DSCA36-03","DSCA36-04","DSCA36-04C","DSCA36-1949","DSCA38-03","DSCA38-09E","DSCA38-1544","DSCA38-15C","DSCA38-16","DSCA38-18C","DSCA40-03","DSCA40-05","DSCA40-05C","DSCA40-06","DSCA40-1951","DSCA40-1952","DSCA41-01","DSCA41-02","DSCA41-03","DSCA41-05C","DSCA41-06","DSCA41-09","DSCA41-13","DSCA41-14","DSCA41-15","DSCA41-15E","DSCA42-01","DSCA42-01C","DSCA42-02","DSCA47E-08C","DSCA47J-01C","DSCA47J-03","DSCA47K-05","DSCA47K-13","DSCA47K-14","DSCA47T-1928"]
|
||||
27
projects/dataforth-dos/tools/push-clean68.js
Normal file
27
projects/dataforth-dos/tools/push-clean68.js
Normal file
@@ -0,0 +1,27 @@
|
||||
// Fix 2 publish — re-push the 68 STAGE-3 Final-Test-clean DSCA models to Hoffman.
|
||||
// Idempotent (Updated/Unchanged/Created); renderContent uses the new template;
|
||||
// null renders (count-guard) + FAIL certs + unregistered models auto-skip.
|
||||
const db = require('./database/db');
|
||||
const { uploadBySerialNumbers } = require('./database/upload-to-api');
|
||||
const clean = require('./_clean-models.json');
|
||||
|
||||
(async () => {
|
||||
const ph = clean.map((_, i) => '$' + (i + 1)).join(',');
|
||||
const rows = await db.query(
|
||||
`SELECT serial_number FROM test_records WHERE overall_result='PASS' AND model_number IN (${ph}) ORDER BY serial_number`,
|
||||
clean,
|
||||
);
|
||||
const sns = rows.map(r => r.serial_number);
|
||||
console.log(`[PUSH] ${sns.length} PASS serials across ${clean.length} clean models`);
|
||||
const CHUNK = 1000;
|
||||
const tot = { created: 0, updated: 0, unchanged: 0, errors: 0, skipped: 0 };
|
||||
for (let i = 0; i < sns.length; i += CHUNK) {
|
||||
const chunk = sns.slice(i, i + CHUNK);
|
||||
const r = await uploadBySerialNumbers(chunk);
|
||||
for (const k of Object.keys(tot)) tot[k] += r[k] || 0;
|
||||
console.log(`[PUSH] ${Math.min(i + CHUNK, sns.length)}/${sns.length} cumulative ` +
|
||||
`created=${tot.created} updated=${tot.updated} unchanged=${tot.unchanged} errors=${tot.errors} skipped=${tot.skipped}`);
|
||||
}
|
||||
console.log('[PUSH] COMPLETE ' + JSON.stringify(tot));
|
||||
await db.close();
|
||||
})().catch(e => { console.error('ERR', e.message, e.stack); process.exit(1); });
|
||||
Reference in New Issue
Block a user