fix(aep-15a): le message ntfy du worker ne porte plus de texte de contributeur
« Fiche enrichie » : numéro, hôte du lien ou « sans titre », type et confiance pris dans leur vocabulaire fermé (worker/lib/messageNtfy.js). Ni row.nom (60 caractères du texte libre sans lien) ni le nom proposé par le modèle. Rien d'autre ne change dans le worker. Test : worker/test/message-ntfy.test.js (9 cas ; suite worker 74/74). Déploiement : enrich.js ET lib/messageNtfy.js. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-9
@@ -21,6 +21,7 @@ import { spawnSync, execSync } from 'child_process';
|
||||
import { existsSync, writeFileSync, unlinkSync, readFileSync, mkdirSync } from 'fs';
|
||||
import { dirname, join } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { messageFicheEnrichie } from './lib/messageNtfy.js';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
@@ -568,15 +569,8 @@ async function run() {
|
||||
await patchRow(row.Id, updateData);
|
||||
await logUsage(enriched._usage, WORKER_MODEL, 'enrichissement', row.Id);
|
||||
|
||||
await notifyNtfy(
|
||||
'[AEP] Fiche enrichie',
|
||||
[
|
||||
`Id NocoDB : ${row.Id}`,
|
||||
`Nom suggéré : ${updateData.nom || row.nom}`,
|
||||
`Type : ${updateData.submission_type || row.submission_type || 'nc'}`,
|
||||
`Confiance : ${enriched.confiance || 'nc'}`,
|
||||
].join('\n'),
|
||||
);
|
||||
// Lot 15a : jamais de texte de contributeur sur ntfy (sans lien : « sans titre » et le numéro).
|
||||
await notifyNtfy('[AEP] Fiche enrichie', messageFicheEnrichie(row, updateData, enriched));
|
||||
|
||||
const elapsed = ((Date.now() - rowStart) / 1000).toFixed(1);
|
||||
log(`Fiche ${row.Id} traitée en ${elapsed}s — confiance: ${enriched.confiance || 'nc'}`);
|
||||
|
||||
Reference in New Issue
Block a user