Version: v1.33.0 (commit 29820aa), macOS, Node
What happens
With user data outside the repo and a .career-ops-data marker pointing at it (.. in my case), most scripts resolve the data root correctly. doctor.mjs reports it, and getCareerOpsRoot() returns the data directory. Two scripts still look inside the code directory:
-
generate-pdf.mjs refuses to write the PDF:
Refusing to write the PDF outside the tracker workspace: input escapes the tracker workspace:
/path/to/data/output/cv.html (workspaceRoot=/path/to/data/career-ops ...)
refreshRootCache() (line 72) derives the workspace from resolveTrackerPath(__dirname), so the marker is never read. The module-level trackerPath at line 48 does use getCareerOpsRoot(), so the two disagree.
-
set-status.mjs can't find the tracker:
❌ No tracker found at /path/to/data/career-ops/applications.md
Line 328: const APPS_FILE = resolveTrackerPath(CAREER_OPS), where CAREER_OPS is the script's own directory.
Workaround
Setting CAREER_OPS_TRACKER=/path/to/data/data/applications.md makes both work, since they honour that variable.
Steps to reproduce
- Put the user layer in a separate directory and create
.career-ops-data in the repo root pointing at it.
node doctor.mjs --json: data root resolves correctly.
node generate-pdf.mjs <data>/output/x.html <data>/output/x.pdf: refused.
node set-status.mjs --report 3 Evaluated --dry-run: "No tracker found".
Suggested fix
Use resolveTrackerPath(getCareerOpsRoot()) in both places, the same as the other scripts.
Possibly affected (not verified)
A grep for resolveTrackerPath( with a script-directory argument also matches these files. I haven't tested them, so some may be false positives: dedup-tracker.mjs, followup-cadence.mjs, hired-share.mjs, invite-match.mjs, mark-pdf-ready.mjs, normalize-statuses.mjs, outcome.mjs, reply-watch.mjs, tracker-utils.mjs, tracker.mjs, upskill.mjs, verify-pipeline.mjs. A test that runs each tracker-writing script with only a marker (and no CAREER_OPS_TRACKER) would catch the whole class.
Small related note
generate-pdf.mjs injects its own @page { margin: var(--page-margin, 0.6in) } after the document's styles, so a hand-written CV's own @page margin is silently ignored. Documenting --page-margin in modes/pdf.md would save people a debugging round.
Version: v1.33.0 (commit 29820aa), macOS, Node
What happens
With user data outside the repo and a
.career-ops-datamarker pointing at it (..in my case), most scripts resolve the data root correctly.doctor.mjsreports it, andgetCareerOpsRoot()returns the data directory. Two scripts still look inside the code directory:generate-pdf.mjsrefuses to write the PDF:refreshRootCache()(line 72) derives the workspace fromresolveTrackerPath(__dirname), so the marker is never read. The module-leveltrackerPathat line 48 does usegetCareerOpsRoot(), so the two disagree.set-status.mjscan't find the tracker:Line 328:
const APPS_FILE = resolveTrackerPath(CAREER_OPS), whereCAREER_OPSis the script's own directory.Workaround
Setting
CAREER_OPS_TRACKER=/path/to/data/data/applications.mdmakes both work, since they honour that variable.Steps to reproduce
.career-ops-datain the repo root pointing at it.node doctor.mjs --json: data root resolves correctly.node generate-pdf.mjs <data>/output/x.html <data>/output/x.pdf: refused.node set-status.mjs --report 3 Evaluated --dry-run: "No tracker found".Suggested fix
Use
resolveTrackerPath(getCareerOpsRoot())in both places, the same as the other scripts.Possibly affected (not verified)
A grep for
resolveTrackerPath(with a script-directory argument also matches these files. I haven't tested them, so some may be false positives:dedup-tracker.mjs,followup-cadence.mjs,hired-share.mjs,invite-match.mjs,mark-pdf-ready.mjs,normalize-statuses.mjs,outcome.mjs,reply-watch.mjs,tracker-utils.mjs,tracker.mjs,upskill.mjs,verify-pipeline.mjs. A test that runs each tracker-writing script with only a marker (and noCAREER_OPS_TRACKER) would catch the whole class.Small related note
generate-pdf.mjsinjects its own@page { margin: var(--page-margin, 0.6in) }after the document's styles, so a hand-written CV's own@pagemargin is silently ignored. Documenting--page-margininmodes/pdf.mdwould save people a debugging round.