{"record":{"id":"d4c26b36ba6ef681","repo":"santifer/career-ops","slug":"could-not-release-report-reservation-err-m-d4c26b","errorCode":null,"errorMessage":"⚠️   Could not release report reservation: ${err.message}","messagePattern":"⚠️   Could not release report reservation: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"ollama-eval.mjs","lineNumber":400,"sourceCode":"\n---\n\n${evaluationText.replace(/---SCORE_SUMMARY---[\\s\\S]*?---END_SUMMARY---/, '').trim()}\n`;\n\n    writeFileSync(reportPath, reportContent, 'utf-8');\n    console.log(`\\n✅  Report saved: reports/${filename}`);\n\n    console.log(`\\n📊  Tracker entry (add to data/applications.md):`);\n    console.log(`    | ${num} | ${today} | ${company} | ${role} | ${score}/5 | Evaluated | ❌ | [${num}](reports/${filename}) |`);\n  } catch (err) {\n    console.warn(`⚠️   Could not save report: ${err.message}`);\n  } finally {\n    if (reservedNumbers.length > 0) {\n      try {\n        await releaseReportNumbers(reservedNumbers, { reportsDir: PATHS.reports });\n      } catch (err) {\n        console.warn(`⚠️   Could not release report reservation: ${err.message}`);\n      }\n    }\n  }\n}\n\nconsole.log('\\n' + '─'.repeat(66));\nconsole.log(`  Score: ${score}/5  |  Archetype: ${archetype}  |  Legitimacy: ${legitimacy}`);\nconsole.log('─'.repeat(66) + '\\n');\n\nconsole.log(formatBreakdown(tracker, modelName, 'ollama'));\n","sourceCodeStart":382,"sourceCodeEnd":411,"githubUrl":"https://github.com/santifer/career-ops/blob/60398d6549a46f5266929538af21cfab94badc75/ollama-eval.mjs#L382-L411","documentation":"The finally-block call to releaseReportNumbers threw while trying to remove this run's reservation sentinels from reports/. The reserved numbers therefore still look occupied and the next reservation skips past them. By design the allocator garbage-collects stale sentinels after 4 hours, so the leak self-heals; report numbers may simply gap in the meantime.","triggerScenarios":"Deleting the sentinel files fails (EACCES on reports/, ENOENT when another worker's GC removed them first); a parallel worker's reservation collision aborts the release mid-way.","commonSituations":"Parallel eval workers using the documented reserve-first fan-out; permission changes mid-run; someone pruning reports/ while evaluations run.","solutions":["Do nothing — the 4-hour stale-sentinel GC reclaims the numbers automatically.","To reclaim immediately, delete the stale sentinel files for your numbers under reports/ and verify with node reserve-report-num.mjs.","Check reports/ writability if the warning repeats across runs."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"import { readdirSync } from 'node:fs';\nconst numbersStillTaken = (dir, nums) =>\n  nums.some((n) => readdirSync(dir).some((f) => f.startsWith(String(n).padStart(3, '0'))));\n// after the 4h GC window, a dry `node reserve-report-num.mjs --count 1` also proves the slot freed","typeGuard":null,"tryCatchPattern":"try {\n  await releaseReportNumbers(reservedNumbers, { reportsDir: PATHS.reports });\n} catch (err) {\n  console.warn(`Could not release report reservation: ${err.message}`);\n  // accept the 4h stale-sentinel GC rather than crashing — gaps in numbering are harmless\n}","preventionTips":["Do not prune reports/ or hand-delete sentinels while evaluations are in flight","Accept short gaps in report numbering; never force-allocate a number a stale sentinel holds","Reserve right before spawning workers so sentinel lifetimes stay short"],"tags":["report-numbers","reservation","sentinel-gc","locks"],"backgroundTag":"stale-lock-file","analyzedSha":"60398d6549a46f5266929538af21cfab94badc75","analyzedAt":"2026-08-20T23:00:06.764Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}