{"record":{"id":"108ac1b0aac98b72","repo":"santifer/career-ops","slug":"could-not-release-report-reservation-err-m","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":"gemini-eval.mjs","lineNumber":464,"sourceCode":"      try {\n        const mergeOutput = execFileSync(process.execPath, [join(ROOT, 'merge-tracker.mjs')], {\n          cwd: ROOT,\n          encoding: 'utf-8',\n          stdio: ['ignore', 'pipe', 'pipe'],\n        });\n        if (mergeOutput.trim()) console.log(mergeOutput.trim());\n        console.log('📊  Tracker merged into data/applications.md.');\n      } catch (err) {\n        console.warn(`⚠️   Report saved, but could not merge tracker addition into data/applications.md: ${err.message}`);\n        process.exitCode = 1;\n      }\n    }\n  } finally {\n    if (reservedNumbers.length > 0) {\n      try {\n        await releaseReportNumbers(reservedNumbers, { rootDir: ROOT, 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, 'gemini'));\n","sourceCodeStart":446,"sourceCodeEnd":475,"githubUrl":"https://github.com/santifer/career-ops/blob/60398d6549a46f5266929538af21cfab94badc75/gemini-eval.mjs#L446-L475","documentation":"Warning from gemini-eval.mjs's finally block: releaseReportNumbers() — which hands back the reserved report-number range to reserve-report-num.mjs — failed. The numbers were reserved before evaluation and would leak if unreleased; however stale reservation sentinels are garbage-collected automatically after 4 hours, so the leak self-heals.","triggerScenarios":"The release step (invoking the reservation machinery under ROOT/reports) failing because the sentinel files were moved/deleted mid-run, the reports dir became unwritable, another process re-GC'd the reservation first, or the script path is broken. Runs only when reservedNumbers.length > 0, i.e. every reserved evaluation.","commonSituations":"Interrupted/crashing parallel runs racing the 4h GC; read-only or reorganized reports/ during a run; partial checkouts missing reserve-report-num.mjs.","solutions":["Do nothing if you can wait: stale sentinels are GC'd after 4 hours and the numbers become reusable","Or release explicitly: `node reserve-report-num.mjs --release <NNN-MMM>` with the range gemini-eval reserved","Check err.message for EACCES/ENOENT and fix permissions/paths in reports/ if it recurs","Reserve right before spawning workers (per the headless fan-out rule) so released-ranges windows stay small"],"exampleFix":"# before: warning printed, reservation leaks until GC\n# after\nnode reserve-report-num.mjs --release 042-049   # using the range from the run log","handlingStrategy":"fallback","validationCode":"// If you wrap gemini-eval in your own runner, release deterministically after it exits:\nimport { execFileSync } from 'node:child_process';\ntry {\n  execFileSync(process.execPath, ['gemini-eval.mjs', jd], { stdio: 'inherit' });\n} finally {\n  try { execFileSync(process.execPath, ['reserve-report-num.mjs', '--release', range]); } catch {}\n}","typeGuard":null,"tryCatchPattern":"try {\n  await releaseReportNumbers(reserved, { rootDir, reportsDir });\n} catch (err) {\n  // self-healing: stale sentinels are GC'd after 4h — log and move on\n  console.warn(`reservation release failed, will self-GC: ${err.message}`);\n}","preventionTips":["Reserve ranges immediately before spawning workers and release right after, keeping the leak window small","Know the 4h sentinel GC backstop exists — an unreleased range is an inconvenience, not corruption","For immediate recovery use `node reserve-report-num.mjs --release NNN-MMM` with the logged range"],"tags":["report-numbering","resource-cleanup","reservation","gc"],"backgroundTag":"resource-cleanup-failed","analyzedSha":"60398d6549a46f5266929538af21cfab94badc75","analyzedAt":"2026-08-20T23:00:06.764Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}