{"record":{"id":"c3af025b065811ff","repo":"santifer/career-ops","slug":"row-not-found","errorCode":"ROW_NOT_FOUND","errorMessage":"Tracker not found at ${trackerPath}","messagePattern":"Tracker not found at (.+?)","errorType":"error_code","errorClass":"SeedError","httpStatus":null,"severity":"error","filePath":"followup-seed.mjs","lineNumber":555,"sourceCode":"    return await fn();\n  } finally {\n    lock.release();\n  }\n}\n\nexport async function seedFollowup(appNum, options = {}) {\n  if (!Number.isInteger(appNum) || appNum <= 0) {\n    throw new SeedError('USAGE', `Invalid appNum: ${appNum}`);\n  }\n  if (options.date != null && !isValidCalendarDate(options.date)) {\n    throw new SeedError('INVALID_DATE', `--date must be a real calendar date in YYYY-MM-DD form: ${options.date}`);\n  }\n\n  const trackerPath = resolveTrackerPath(options.trackerPath);\n  const followupsPath = resolveFollowupsPath(options.followupsPath);\n\n  if (!existsSync(trackerPath)) {\n    throw new SeedError('ROW_NOT_FOUND', `Tracker not found at ${trackerPath}`);\n  }\n  const rows = readTrackerRows(trackerPath);\n  const row = rows.find(r => r.num === appNum);\n  if (!row) {\n    throw new SeedError('ROW_NOT_FOUND', `Application #${appNum} not found in ${trackerPath}`);\n  }\n\n  const normalized = normalizeStatus(row.status);\n  if (normalized !== 'applied' && !options.force && !options.assumeApplied) {\n    throw new SeedError('NOT_APPLIED', `Application #${appNum} is not Applied (status: \"${row.status.trim()}\"); use --force to seed anyway`);\n  }\n\n  // appDateSource travels with the result so a caller can tell a measured apply\n  // date from a proxy or a guess — the same contract followup-cadence.mjs and\n  // company-history.mjs already expose.\n  const { appliedDate, appDateSource } = resolveAppliedDate(row, options.date);\n  const cadence = resolveCadenceConfig({ profilePath: options.profilePath });\n  const nextDate = addDays(parseDate(appliedDate), cadence.applied_first);","sourceCodeStart":537,"sourceCodeEnd":573,"githubUrl":"https://github.com/santifer/career-ops/blob/aac998c7ed7248ea853b720ceeb1fdbeb322fc5d/followup-seed.mjs#L537-L573","documentation":"seedFollowup resolves the tracker path (explicit option or the canonical location: CAREER_OPS_TRACKER override, data/applications.md, falling back to applications.md) and checks it exists with existsSync before reading. If the tracker file itself is missing, it throws SeedError with code ROW_NOT_FOUND indicating the tracker file was not found at the resolved path. Note this code covers both 'file missing' and 'row missing' (see error 54).","triggerScenarios":"Running seedFollowup before the tracker was ever created (empty project / fresh clone); passing options.trackerPath pointing at a non-existent or misspelled file; a relative trackerPath resolved against a different working directory than expected; CAREER_OPS_TRACKER pointing to a path that does not exist.","commonSituations":"First run of the pipeline where data/ was not initialized; running the script from a different cwd in CI than locally; a data directory that was gitignored and therefore absent on a new machine; a typo'd override env var.","solutions":["Create/initialize the tracker at data/applications.md (or run the onboarding step that creates it).","Verify the resolved path in the error message exists: ls <trackerPath>.","If passing options.trackerPath, use an absolute path or ensure the cwd is the repository root.","Check the CAREER_OPS_TRACKER environment variable for a wrong or stale value."],"exampleFix":"// before\nawait seedFollowup(42, { trackerPath: 'data/trackers/application.md' }); // typo\n// after — confirm the file exists first\nconst p = resolve('data/applications.md');\nif (!existsSync(p)) throw new Error(`Tracker missing at ${p}; run onboarding first`);\nawait seedFollowup(42, { trackerPath: p });","handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs';\nconst trackerPath = options.trackerPath ?? resolve('data/applications.md');\nif (!existsSync(trackerPath)) {\n  throw new Error(`Tracker not found at ${trackerPath}; run career-ops onboarding first.`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await seedFollowup(appNum);\n} catch (e) {\n  if (e.code === 'ROW_NOT_FOUND' && /Tracker not found/.test(e.message)) {\n    console.error('Tracker file missing — initialize data/applications.md before seeding.');\n    process.exitCode = 1;\n  } else throw e;\n}","preventionTips":["Initialize the tracker during onboarding before any follow-up automation runs.","Use absolute paths for options.trackerPath, or always run from the repository root.","Check whether CAREER_OPS_TRACKER / .career-ops-data redirect the path on this machine.","Remember data/ may be gitignored — a fresh clone will not have it."],"tags":["filesystem","file-not-found","configuration"],"backgroundTag":"file-not-found","analyzedSha":"aac998c7ed7248ea853b720ceeb1fdbeb322fc5d","analyzedAt":"2026-09-16T06:35:29.214Z","contentChangedAt":"2026-09-16T06:35:29.214Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}