Repository navigation
π¦ CodeFox CLI v0.4.7
Silent failures, gone.
When CodeFox had nothing to say in your pull request, it stayed quiet β
no comment, no error, just a green check and silence.
This release makes every failure loud, explainable, and fast to recover from.
β¨ At a glance
| π Empty PR comments | Blank reviews are no longer posted; the run fails with the real reason |
| π‘οΈ Crash-proof reviews | A broken RAG index no longer blocks the review |
| π§© Chunking that can't fail | No more 0 chunks β max() iterable argument is empty |
| β‘ Bounded CI indexing | Whole-repo embedding storm replaced with a capped index |
| π§ Action cache fix | ${{ pwd }} β ${{ github.workspace }} |
π― Why this release exists
Two support reports drove it:
"The PR comment doesn't show up."
A pull request showed an empty comment β literally No description provided.
Behind it was a chain of silent failures: a missing .codefox.yml aborted the
run before any review could be posted, and an empty model response was sent
straight to the API, which happily created a blank comment.
"Too slow to build."
Continuous integration stalled embedding thousands of chunks from a handful of
files, until the runner was cancelled mid-index.
Both are fixed at the root: fail loudly, degrade gracefully, do less work.
π No more silent empty comments
Before: an empty or placeholder model response was posted as an empty PR
comment. Missing configuration aborted the step without a trace.
Now:
codefox scan --ciraises a dedicatedEmptyReviewErrorwith the raw output
truncated to 200 characters, instead of publishing nothing useful.- Empty, whitespace-only,
None,"None","null","n/a","undefined",
"no response"and"empty"are all rejected before hitting the API. GitHubBot.send()refuses empty or whitespace-only bodies β matching the
guardGitLabBotalready had β so a blank comment can never reach GitHub.- The action creates a default
.codefox.ymlwhen the repository has none,
and exits with an explicit::error::if it still cannot.
Scan result: β CodeFox scan failed: The model returned an empty review, so
nothing was posted to the pull request. Reported raw output: ''. Check the
model name, API key and token limits in .codefox.yml / .codefoxenv.
π§© Chunking that survives a cold CI runner
sent_tokenize failed on fresh runners because NLTK 3.9 needs the punkt_tab
package, not just punkt. The resulting LookupError had an empty message,
and except Exception: continue swallowed it β one dropped file turned into
all files dropped.
Fixes:
- Both
punktandpunkt_tabare downloaded, with a warning instead of a
crash if the download fails. - A regex-based sentence splitter backs up NLTK, and code-like text is split
line-by-line β sentence tokenization on Python source was slow and pointless. - Skipped files are now listed with their real reason (first 5, plus a count).
- An empty corpus raises a readable
ValueErrorinstead of the opaque
max() iterable argument is empty.
- β Created 0 chunks from 16 files.
- Failed to upload files to model: LocalRAG error: max() iterable argument is empty
+ β Created 7622 chunks from 16 files.
+ β 1 file(s) could not be chunked and were skipped:
+ src/generated.py: LookupError (no message)π‘οΈ A broken index no longer blocks the review
RAG only enriches a review with project context. Treating it as a hard
requirement meant losing the index cost you the entire review.
Now a failed index falls back to diff-only review, and the warning is surfaced:
Warning: LocalRAG unavailable, reviewing diff only: No chunks could be builtβ¦
β‘ Bounded, faster CI indexing
Embedding the entire checkout is what stalled CI: every chunk costs one CPU
embedding on a 2β4 core runner.
Chunk size is now actually honored. The previous packer checked the size
before re-prepending the overlap tail, so chunks ballooned to 2737
characters at chunk_size=300 β then every one of them got embedded.
Measured on this repository:
| Setting | Chunks | Chunking | BM25 | Embedding batches |
|---|---|---|---|---|
old: 300, uncapped |
776 | 0.22 s | 0.02 s | 13 |
new: 1000, cap 600 |
279 | 0.21 s | 0.01 s | 5 |
Directory filtering β vendored dependencies, virtualenvs, caches, hidden
folders and RAG artifacts are no longer indexed:
| Files indexed | |
|---|---|
| before | 14 226 |
| after | 55 |
CI defaults (set by the action when the repo hasn't opted out):
model:
rag_chunk_size: 1000
rag_chunk_overlap: 200
rag_max_chunks: 600
rag_max_files: 300Existing values in your .codefox.yml are never overwritten. To index
everything, opt out:
env:
CODEFOX_FULL_REPO_RAG: "true"Or tune the cap directly:
env:
CODEFOX_RAG_MAX_CHUNKS: "200" # fastest
CODEFOX_RAG_MAX_FILES: "300"Note: the embedding stage itself was not benchmarked end-to-end for this
release. The chunk cap is a hard ceiling, so index build time no longer grows
with repository size beyond 600 chunks.
π§ Action cache path fix
${{ pwd }} is not a valid GitHub Actions expression, so the CodeFox cache was
never restored. It is now ${{ github.workspace }}/.codefox/, meaning repeat
runs reuse the embedding cache and index instead of rebuilding them.
π¦ Install
# uv
uv tool install codefox
# pip
python3 -m pip install codefoxUse in a workflow:
- uses: URLbug/CodeFox-CLI@v0.4.7
with:
codefox-api-key: ${{ secrets.CODEFOX_API_KEY }}β Quality
- 83 tests passing, including new regression coverage for empty responses,
RAG fallback, chunk-size bounding and directory filtering. ruffandmypyclean.action.ymlvalidated as parseable YAML and its scan step executed
end-to-end.
πΊοΈ What's in this tag vs. what's next
Being precise, because it matters for what you can actually run:
- In
v0.4.7: the action-cache path fix only. - Merged to
mainafter this tag: everything else described above β empty
comment handling, RAG resilience, chunking fixes and bounded indexing.
If you need today's fixes now, track main; they will ship together in the
next tagged release.
π Thanks
To everyone who reported the empty comment and the stalled build β both led
straight to root causes that would otherwise have stayed hidden.
Full changelog: v0.4.6...v0.4.7