Skip to content

Make whoknows_health doctor fixture path CWD-independent #969

@shandutta

Description

@shandutta

Summary

whoknows_health in gbrain doctor resolves test/fixtures/whoknows-eval.jsonl relative to process.cwd(). That makes the check CWD-sensitive: running gbrain doctor outside the repo can warn that the fixture is missing even though the installed/source tree includes it.

Repro

cd /home/shan
gbrain doctor --json

Observed

The whoknows_health check can report the fixture as missing when the current working directory is not the GBrain repo root.

Expected

The doctor check should find GBrain's own fixture independent of the caller's CWD.

Local patch tested

I changed whoknowsHealthCheck in src/commands/doctor.ts to resolve the default fixture from the module/source location, while still allowing tests or callers to override with GBRAIN_WHOKNOWS_FIXTURE_PATH. Existing tests were adjusted to use that env override for fixture-specific cases.

Verification:

bun test test/whoknows-doctor.test.ts
# pass

cd /home/shan
gbrain doctor --json
# no whoknows fixture warning locally

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions