Compass
Cookbook

Cookbook: troubleshooting

This page is a symptom-to-diagnosis map. Start with the narrowest category and preserve the original diagnostic before deleting or rebuilding anything.

Cookbook: troubleshooting

This page is a symptom-to-diagnosis map. Start with the narrowest category and preserve the original diagnostic before deleting or rebuilding anything.

First five checks

pwd
command -v compass
compass --version
git status --short
df -h .

Then rerun the exact command without suppressing stderr.

Record:

  • command with secrets removed;
  • exit code;
  • Compass version;
  • current directory;
  • graph/output path;
  • source revision/profile;
  • first complete diagnostic.

Installation

SymptomLikely causeDiagnosisRemedy
command not foundinstall dir absent from PATHcommand -v compass, inspect PATHadd install dir and open new shell
source build uses wrong compilerrustup override/toolchainrustup showuse pinned rust-toolchain.toml
macOS blocks binaryunsigned/not notarized release policyinspect release and OS messagefollow organization policy; build from source if approved
checksum failsincomplete/tampered/wrong archiveretain installer outputdo not run archive; download from official release
build runs out of disklarge Rust dependencies/artifactsdf -h ., du -sh targetfree space or remove only rebuildable Cargo artifacts

Build and update

SymptomLikely causeDiagnosisRemedy
no compass-out/command failed before publicationinspect stderr/exitfix stage error and rerun
graph staleupdate not rerun/watcher failedcompare source times/revision; run manual updatecompass update .
symbol missingignored/unsupported/generated/outside rootinspect report, ignore/exclude, source pathadjust scope/support; rebuild
provider requested unexpectedlysemantic sources presentinspect command and file classesconfigure intentionally or use code-only
graph changed on no-opconfig/version/input changedcompare manifest/version/optionsclean qualification and investigate fingerprint
graph.html missingdisabled or graph too largeinspect command/reportquery JSON; HTML is optional
partial graph warninginvalid records were quarantinedinspect publication_omission_summary and bounded examples in graph.jsonfix the named producer/source shape; do not weaken the validator

Query

SymptomLikely causeDiagnosisRemedy
graph not foundwrong cwd/pathlocate graph.jsonrun from root or --graph PATH
graph must be JSONwrong input/exportinspect suffix/contentuse canonical graph JSON
node not foundlabel mismatch/duplicatesbroad query by file/domainuse stable ID or more context
path not foundwrong endpoint/direction/missing edgeexplain both endpointsverify graph coverage and relation
incomplete_coveragethe published graph omitted invalid recordsinspect the publication summary and relevant sourcetreat absence as uncertain until the producer issue is fixed
too many resultsgeneric phrase/hubinspect anchorsadd behavior/domain terms or CompassQL
limit/timeoutquery expansion too broadrun EXPLAIN, reduce path/labelsnarrow query; approved budget only
JSON consumer breaksschema mismatch or parsed human textinspect version tagconsume documented JSON/JSONL and reject unknown major

CompassQL

Diagnostic families:

CQL1xxx  source/syntax/unsupported
CQL2xxx  scope/type/projection/path shape
CQL3xxx  source/token/path/row/memory/time limit
CQL4xxx  parameter/runtime/regex/arithmetic/invariant

Response:

  • CQL1xxx/2xxx: fix query;
  • CQL3xxx: narrow work or limits deliberately;
  • CQL4xxx: validate parameters/types and report invariant failures.

No successful partial result is produced on execution failure.

Semantic providers

SymptomDiagnosisRemedy
missing keycheck documented environment variable is present in process, not print valueconfigure approved secret or code-only
unsafe endpointinspect scheme/host warninguse approved HTTPS/loopback endpoint
context exceededinspect adaptive-retry diagnosticreduce source/chunk/mode; do not loop manually
malformed provider outputretain redacted response metadataretry bounded; provider/model/prompt may be incompatible
partial sourcesinspect partial metadata and command policyrerun failed sources or surface partial status
rate limitinspect provider statusbounded backoff, lower concurrency

Never paste secret headers or sensitive corpus content into an issue.

Watch and hooks

compass hook status
compass update .

If manual update succeeds but watch/hook fails:

  • stop duplicate watchers;
  • inspect hook log;
  • confirm installed binary path;
  • check rebase/merge/worktree guards;
  • reinstall managed hooks after binary relocation;
  • uninstall hooks before hand-editing their managed sections.

Assistant integration

SymptomRemedy
skill not discoveredverify platform, scope, generated destination, assistant restart
duplicate managed contentrerun idempotent installer, inspect diff, uninstall/reinstall managed section
strict mode surprises userCOMPASS_HOOK_STRICT=0, then review project hook
assistant ignores graphconfirm compass-out/, skill discovery, and explicit repository instructions
assistant trusts graph blindlyrequire source verification and provenance qualification

History

SymptomResponse
profile mismatchbuild comparable realization with --profile-from
realization missingbuild explicitly or allow lazy --at materialization
preferred corruptinspect with list/show; explicit rebuild --replace-corrupt
lease/live workwait/join/inspect; do not delete live lock
disk file does not shrink after GCexpected; logical reclamation is not VACUUM
copied DB will not open coherentlyrestore SQLite and WAL as a consistent resource
submodule/LFS/filter limitationfollow diagnostic; history refuses unsafe/implicit expansion

Useful commands:

compass history status HEAD
compass history list HEAD --format json
compass history show REALIZATION_ID
compass history gc

Disk-full recovery

Stop writers first. Identify generated space:

df -h .
du -sh target compass-out 2>/dev/null

Safe categories differ:

  • Cargo target/ is rebuildable but deleting it discards compilation cache;
  • compass-out/ is rebuildable current output;
  • history SQLite/WAL is durable data and must not be deleted as cache;
  • user source and untracked files are never cleanup targets.

Use explicit, validated paths. Report what was removed.

When to report a bug

Create a minimal reproduction that includes:

  • supported platform and Compass version;
  • exact command/exit;
  • tiny source fixture;
  • expected nodes/edges/output;
  • actual redacted graph fragment/diagnostic;
  • whether cold, incremental, current, or historical;
  • profile/backend name without credentials.

For vulnerabilities, follow SECURITY.md, not a public issue.

Next step: capture the failing command, first diagnostic, version, path, and profile before trying the smallest recovery listed above.

On this page