You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Published `terraphim_grep` 1.21.1 can return non-empty `chunks` with `stats.chunks_returned = 0` when the sufficiency heuristic classifies fewer than three matches as `RlmInsufficient`. This violates the JSON result invariant and blocks release wrapper #3208.
5
+
6
+
## Decision
7
+
In `crates/terraphim_grep/src/lib.rs`, preserve returned chunks and KG concepts in the `Sufficiency::Insufficient` branch and derive counters from the actual vectors. Do not change sufficiency thresholds or reinterpret `RlmInsufficient`.
8
+
9
+
## Tests first
10
+
Extend the real CLI known-match regression so it asserts `stats.chunks_returned == chunks.len()`. Add/extend library coverage for `RlmInsufficient` with non-empty chunks and the same invariant. Run the targeted test before implementation and retain the expected RED.
11
+
12
+
## Acceptance
13
+
- Known-match JSON has at least one chunk.
14
+
-`stats.chunks_returned == chunks.len()` in every result branch.
15
+
-`stats.kg_hits == concepts.len()` when concepts are retained.
16
+
- Focused crate tests, fmt and clippy pass.
17
+
- Exact Release Guardian known-match smoke passes from the branch binary.
18
+
19
+
## Non-goals
20
+
No release version bump, publish, sufficiency threshold change, unrelated crate refactor, or dependency update in this PR.
0 commit comments