Checkpoint: Préparation recette : ajout du journal classification_errors, exposition de la cause technique des fallbacks IA, enregistrement non bloquant depuis le moteur RSS, écran d’administration Erreurs IA, route protégée et migration 0013. Validation locale : 28 tests, TypeScript et build de production réussis.

This commit is contained in:
Manus
2026-08-18 07:49:11 +00:00
parent e4a389cc67
commit 9acc52da7d
15 changed files with 1432 additions and 5 deletions

View File

@@ -0,0 +1,11 @@
CREATE TABLE `classification_errors` (
`id` int AUTO_INCREMENT NOT NULL,
`feedId` int,
`feedName` varchar(255) NOT NULL,
`feedType` enum('veille','aap') NOT NULL,
`articleTitle` text NOT NULL,
`articleUrl` text,
`errorMessage` text NOT NULL,
`occurredAt` timestamp NOT NULL DEFAULT (now()),
CONSTRAINT `classification_errors_id` PRIMARY KEY(`id`)
);

File diff suppressed because it is too large Load Diff

View File

@@ -92,6 +92,13 @@
"when": 1786997741455,
"tag": "0012_fluffy_boomer",
"breakpoints": true
},
{
"idx": 13,
"version": "5",
"when": 1787039231200,
"tag": "0013_odd_grim_reaper",
"breakpoints": true
}
]
}

View File

@@ -137,6 +137,25 @@ export const importLogs = mysqlTable("import_logs", {
export type ImportLog = typeof importLogs.$inferSelect;
export type InsertImportLog = typeof importLogs.$inferInsert;
// ─── Erreurs de classification RSS ───────────────────────────────────────────
/**
* Journal technique destiné à l'administration. Il conserve les fallbacks IA
* article par article, sans bloquer l'import ni exposer l'erreur aux utilisateurs.
*/
export const classificationErrors = mysqlTable("classification_errors", {
id: int("id").autoincrement().primaryKey(),
feedId: int("feedId"),
feedName: varchar("feedName", { length: 255 }).notNull(),
feedType: mysqlEnum("feedType", ["veille", "aap"]).notNull(),
articleTitle: text("articleTitle").notNull(),
articleUrl: text("articleUrl"),
errorMessage: text("errorMessage").notNull(),
occurredAt: timestamp("occurredAt").defaultNow().notNull(),
});
export type ClassificationError = typeof classificationErrors.$inferSelect;
// ─── Boîte à idées ───────────────────────────────────────────────────────────
export const ideas = mysqlTable("ideas", {