Summary
One directory the indexing user cannot read (chmod 000) aborts the whole run with a generic Pipeline failed. Nothing else is indexed, no partial result is kept, and the hint sends the reader to look for the wrong thing:
Pipeline failed. Check repo_path exists and contains source files.
Try mode='fast' for a quicker diagnostic run.
The path exists and does contain source files. mode='fast' fails the same way.
Directories excluded by .gitignore, .cbmignore or the built-in skip list are walked past without incident. An unreadable one is the same situation from the walker's point of view — a directory whose contents will not be indexed — but it takes the run down.
Minimal reproduction
mkdir -p repro/a repro/b repro/locked && cd repro && git init -q .
printf '<?php\nfunction alpha() { return 1; }\n' > a/alpha.php
printf '<?php\nfunction beta() { return alpha(); }\n' > b/beta.php
printf 'x\n' > locked/secret.txt
chmod 000 locked
git add -A && git commit -qm init
Then index_repository(repo_path=".../repro", mode="full").
Observed
{"project": "...", "status": "error",
"hint": "Pipeline failed. Check repo_path exists and contains source files. Try mode='fast' for a quicker diagnostic run."}
Flip the single bit back — same tree, same files, nothing else touched:
{"nodes": 10, "edges": 10, "skipped_count": 0, "status": "indexed"}
Expected
An unreadable directory should be reported and skipped, the way an excluded one is — ideally in not_indexed_files (or skipped) with reason: "permission denied" — and the rest of the repository should still be indexed. A permission problem in one corner is not a reason to have no graph at all.
If aborting is deliberate, the error should at least name the offending path, since the current text actively points away from the cause.
Why this is easy to hit
It showed up on a PHP application served by Apache, where runtime/.../images/ belongs to www-data with mode 0770 and the developer's own account is not in that group. That is an ordinary deployment layout, and the directory holds uploaded files — nothing anyone wants indexed anyway. The repository could not be indexed at all until the directory was named in .cbmignore, which requires already knowing the cause.
The misdiagnosis cost is real: the failure was attributed to nested git checkouts for a long time (this repository has four). Excluding those changed nothing; excluding the unreadable directory fixed it immediately, and the nested checkouts index fine.
Notes
- Version: 0.10.8, Linux x86-64, stdio server.
- Same behaviour in
mode='full' and mode='fast'.
Summary
One directory the indexing user cannot read (
chmod 000) aborts the whole run with a genericPipeline failed. Nothing else is indexed, no partial result is kept, and the hint sends the reader to look for the wrong thing:The path exists and does contain source files.
mode='fast'fails the same way.Directories excluded by
.gitignore,.cbmignoreor the built-in skip list are walked past without incident. An unreadable one is the same situation from the walker's point of view — a directory whose contents will not be indexed — but it takes the run down.Minimal reproduction
Then
index_repository(repo_path=".../repro", mode="full").Observed
{"project": "...", "status": "error", "hint": "Pipeline failed. Check repo_path exists and contains source files. Try mode='fast' for a quicker diagnostic run."}Flip the single bit back — same tree, same files, nothing else touched:
{"nodes": 10, "edges": 10, "skipped_count": 0, "status": "indexed"}Expected
An unreadable directory should be reported and skipped, the way an excluded one is — ideally in
not_indexed_files(orskipped) withreason: "permission denied"— and the rest of the repository should still be indexed. A permission problem in one corner is not a reason to have no graph at all.If aborting is deliberate, the error should at least name the offending path, since the current text actively points away from the cause.
Why this is easy to hit
It showed up on a PHP application served by Apache, where
runtime/.../images/belongs towww-datawith mode0770and the developer's own account is not in that group. That is an ordinary deployment layout, and the directory holds uploaded files — nothing anyone wants indexed anyway. The repository could not be indexed at all until the directory was named in.cbmignore, which requires already knowing the cause.The misdiagnosis cost is real: the failure was attributed to nested git checkouts for a long time (this repository has four). Excluding those changed nothing; excluding the unreadable directory fixed it immediately, and the nested checkouts index fine.
Notes
mode='full'andmode='fast'.