Skip to content

Fix sensitive-path routing and measure real-code retrieval - #4

Merged
Zulut30 merged 1 commit into
mainfrom
codex/token-efficiency-remediation-20260924
Sep 24, 2026
Merged

Zulut30 merged 1 commit into
mainfrom
codex/token-efficiency-remediation-20260924

Conversation

@Zulut30

@Zulut30 Zulut30 commented Sep 24, 2026

Copy link
Copy Markdown
Member

Sensitive files such as config/secrets.py, src/crypto.py, and wp-config.php previously took the low-risk/fast path. Routing now selects high risk and the shared security guard. The cache exposes aggregate hits, misses, expiries, writes, entries, and evictions without leaking queries or source; cache writes no longer count as fake lookups.

A reproducible retrieval-eval command checks labeled HearthPulse and hs-manacost.ru source files locally or through the existing native OpenRouter embedding/rerank path. The live WordPress run exposed an AST edge case that crashed on empty PHP reference fragments; the parser now skips those fragments. Both project suites found both targets in the top three locally; native reranking put all four at rank one, with zero OpenRouter calls on immediate repeats. Four cases are a smoke benchmark, not a token-savings estimate.

Validation: 49 focused tests and canonical make verify passed with pinned quality dependencies and a provisioned offline tokenizer. New cache and retrieval-evaluation tests are included in the canonical gate. No historical matched-task outcomes were fabricated; the existing meter/pilot flow remains the source for end-to-end savings claims.

@Zulut30
Zulut30 merged commit 764ee62 into main Sep 24, 2026
2 checks passed
@Zulut30
Zulut30 deleted the codex/token-efficiency-remediation-20260924 branch October 21, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant