santifer/career-ops · warning

⚠️ ${label} not found at: ${path}

Error message

⚠️   ${label} not found at: ${path}

What it means

ollama-eval.mjs loads prompt-context files (modes/_shared.md, the oferta mode, cv.md, the JD) through a readFile(path, label) helper. When a file is absent it warns with the exact path and returns the placeholder '[label not found -- skipping]' instead of throwing, so the local LLM evaluation proceeds with a degraded prompt -- the run completes but scores/tailoring are produced without that context.

Source

Thrown at ollama-eval.mjs:145

if (!jdText) {
  console.error('❌  No Job Description provided. Run with --help for usage.');
  process.exit(1);
}

// ---------------------------------------------------------------------------
// File helpers
// ---------------------------------------------------------------------------
/**
 * Read a file and return its trimmed contents, or a placeholder if missing.
 * Emits a console warning when the file is absent so the user knows context is incomplete.
 * @param {string} path - Absolute path to the file.
 * @param {string} label - Human-readable label used in the warning and placeholder.
 * @returns {string} File contents or a "[label not found]" placeholder.
 */
function readFile(path, label) {
  if (!existsSync(path)) {
    console.warn(`⚠️   ${label} not found at: ${path}`);
    return `[${label} not found — skipping]`;
  }
  return readFileSync(path, 'utf-8').trim();
}

// ---------------------------------------------------------------------------
// Loopback guard — cv.md + full JD are sent to this endpoint.
// A remote URL would silently exfiltrate private data.
// ---------------------------------------------------------------------------
{
  let hostname;
  try {
    hostname = new URL(baseUrl).hostname;
  } catch {
    console.error(`❌  Invalid OLLAMA_BASE_URL: "${baseUrl}"`);
    process.exit(1);
  }
  const isLoopback = hostname === 'localhost' || hostname === '127.0.0.1' || hostname === '::1';

View on GitHub (pinned to 60398d6549)

Solutions

  1. Run node doctor.mjs --json and complete onboarding so cv.md, config/profile.yml and modes/ files exist.
  2. Copy the exact path from the warning and verify with ls; restore the missing file from templates/ or git.
  3. Run the script from the career-ops repo root so path resolution matches the checkout layout.

Example fix

# before
$ node ollama-eval.mjs --url https://example.com/jobs/1
⚠️   cv not found at: /wrong/root/cv.md
# after
$ node doctor.mjs --json            # see what is missing
$ cd /path/to/career-ops && node ollama-eval.mjs --url https://example.com/jobs/1
Defensive patterns

Strategy: validation

Validate before calling

// Gate the evaluator on context completeness instead of accepting a degraded prompt
import { existsSync } from 'node:fs';
const required = ['cv.md', 'modes/_shared.md', 'modes/oferta.md'];
const missing = required.filter(p => !existsSync(p));
if (missing.length) {
  console.error('Refusing to evaluate with missing context:', missing.join(', '));
  process.exit(1);
}

Prevention

When it happens

Trigger: Invoking ollama-eval.mjs before onboarding completed (cv.md missing); running from a directory where the resolved absolute paths do not exist; a modes/ file renamed or deleted by customization; CAREER_OPS/repo-root resolution landing on the wrong checkout.

Common situations: Fresh clone without running node doctor.mjs; a user-deleted or renamed mode file; CI job checking out only part of the repo; symlinks breaking path resolution.

Related errors


AI-assisted analysis of santifer/career-ops@60398d6549 (2026-08-20). Data as JSON: /api/errors/f1bb1d5b76bdc6c1. Report an issue: GitHub.