fix: normalize Casper CLI ranking and Windows UTF-8 - #3
Conversation
|
Deployment failed for project casper-nl with the following error: Learn More: https://vercel.com/gratechs-projects?upgradeToPro=build-rate-limit |
|
Deployment failed for project casper with the following error: Learn More: https://vercel.com/gratechs-projects?upgradeToPro=build-rate-limit |
There was a problem hiding this comment.
🟡 Changes recommended
The new CLI normalization introduces a couple of correctness/API consistency issues (notably bounds defensiveness and URL normalization affecting emitted hashes / schema stability) that should be addressed before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the Casper C CLI to make Windows console output reliably UTF-8 and to make RAG result ordering/destination URLs deterministic at the CLI boundary, and it extends CI to run a new CLI self-check to catch regressions.
Changes:
- Force UTF-8 console code pages on Windows and add
--self-checkfor ranking / answer selection / DDG URL normalization. - Normalize DuckDuckGo redirect URLs and defensively re-sort results in the CLI before selecting/emitting sources.
- Run the CLI self-check in CI after the generic smoke build.
File summaries
| File | Description |
|---|---|
| Core_CPP/casper_cli.c | Adds Windows UTF-8 console configuration, DDG redirect URL unwrapping, defensive CLI-side result normalization/sorting, updated JSON fields, and a --self-check mode. |
| .github/workflows/ci.yml | Runs ./build/casper --self-check after the smoke build for the C job matrix. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Deployment failed for project casper-7z with the following error: Learn More: https://vercel.com/gratechs-projects?upgradeToPro=build-rate-limit |
|
Deployment failed for project casper-7z with the following error: Learn More: https://vercel.com/gratechs-projects?upgradeToPro=build-rate-limit |
|
@copilot review Addressed the three findings: clamp |
Verified on |
9557b4a to
24a07a3
Compare
Fixes the runtime behavior observed in the Windows CLI:
relevance_score, preserveconfidenceas an explicit top lexical relevance alias, and addmean_relevance--self-checkcovering ranking, answer-source selection, and DDG URL normalizationBaseline: 8109cb2