mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-18 05:57:40 +02:00
fix: preserve snapshot paths and reject malformed skill tracking rows
This commit is contained in:
@@ -103,7 +103,10 @@ function readJsonl(filePath) {
|
||||
.reduce((rows, line) => {
|
||||
try {
|
||||
const record = JSON.parse(line);
|
||||
if (record && typeof record === 'object' && !Array.isArray(record)) {
|
||||
if (record && typeof record === 'object' && !Array.isArray(record)
|
||||
&& typeof record.skill_id === 'string' && record.skill_id.trim().length > 0
|
||||
&& VALID_OUTCOMES.has(record.outcome)
|
||||
&& typeof record.recorded_at === 'string' && !Number.isNaN(Date.parse(record.recorded_at))) {
|
||||
rows.push(record);
|
||||
}
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user