Repository navigation
Commit 91a04d4
committed
improvement(knowledge): count an unproven reach, read memos under the search deadline, and drop the dead search paths
Correctness
- A resolved scope's reach was assumed broad whenever the bases were small enough for the probe limit, without a probe having saturated; the shortcut now applies only to a saturated probe, and an unproven reach is counted
- The reach denominator and the source-index catalog were read outside the search's deadline on a memo miss; both run under the leg's budget now
- A page whose identity read recovered fewer rows than its slice ended the candidate stream early; short is judged by what the pool gave, not by what the read returned
Round trips
- The keyword leg re-read every base's kind per search to decide the Tin engine; the search carries whether its bases are search indexes, and the flag and index readiness are read together
- The v1 route re-read each result's document for its name and URL, which the rows already carry from hydration; the read, its helper and the retrieval result's read-access field are gone
- Input provenance is prepared alongside the other pre-model reads; result provenance is imported per document in parallel; projection fill and the source-index memo are read together
- A reordered leg sorts once at the end instead of re-sorting the result map after every page
Dead code
- `getQueryStrategy` fields nothing read, a never-emitted authorization stage, a one-valued candidate-storage diagnostic, the unused live-source `current` getter, the unread usage-admission policy field, the detached enqueue path the script never took, and a tautological Tin guard1 parent bc2f641 commit 91a04d4
16 files changed
Lines changed: 269 additions & 355 deletions
File tree
- apps/sim
- app/api
- knowledge
- search
- v1/knowledge/search
- v2/knowledge/search
- lib/knowledge
- application
- search
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
880 | | - | |
881 | | - | |
882 | | - | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | 880 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
| |||
52 | 59 | | |
53 | 60 | | |
54 | 61 | | |
| 62 | + | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
| |||
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
63 | | - | |
64 | 61 | | |
65 | | - | |
66 | 62 | | |
67 | 63 | | |
68 | 64 | | |
| |||
132 | 128 | | |
133 | 129 | | |
134 | 130 | | |
135 | | - | |
136 | 131 | | |
137 | 132 | | |
138 | 133 | | |
| |||
164 | 159 | | |
165 | 160 | | |
166 | 161 | | |
167 | | - | |
168 | 162 | | |
169 | 163 | | |
170 | 164 | | |
| |||
193 | 187 | | |
194 | 188 | | |
195 | 189 | | |
196 | | - | |
197 | 190 | | |
198 | 191 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
207 | 195 | | |
208 | 196 | | |
209 | 197 | | |
| |||
219 | 207 | | |
220 | 208 | | |
221 | 209 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | 210 | | |
231 | 211 | | |
232 | 212 | | |
233 | 213 | | |
| 214 | + | |
| 215 | + | |
234 | 216 | | |
235 | 217 | | |
236 | 218 | | |
237 | 219 | | |
238 | 220 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | 221 | | |
243 | 222 | | |
244 | 223 | | |
| |||
250 | 229 | | |
251 | 230 | | |
252 | 231 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
| 232 | + | |
| 233 | + | |
268 | 234 | | |
269 | | - | |
270 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
271 | 245 | | |
272 | 246 | | |
273 | 247 | | |
| |||
372 | 346 | | |
373 | 347 | | |
374 | 348 | | |
375 | | - | |
| 349 | + | |
376 | 350 | | |
377 | 351 | | |
378 | 352 | | |
| |||
382 | 356 | | |
383 | 357 | | |
384 | 358 | | |
| 359 | + | |
| 360 | + | |
385 | 361 | | |
386 | 362 | | |
387 | 363 | | |
388 | 364 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | 365 | | |
396 | 366 | | |
397 | 367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
267 | 266 | | |
268 | 267 | | |
269 | 268 | | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | 319 | | |
323 | 320 | | |
324 | 321 | | |
325 | 322 | | |
326 | | - | |
| 323 | + | |
327 | 324 | | |
328 | 325 | | |
329 | 326 | | |
| |||
335 | 332 | | |
336 | 333 | | |
337 | 334 | | |
338 | | - | |
339 | 335 | | |
340 | 336 | | |
341 | | - | |
342 | | - | |
| 337 | + | |
| 338 | + | |
343 | 339 | | |
344 | 340 | | |
345 | 341 | | |
| |||
349 | 345 | | |
350 | 346 | | |
351 | 347 | | |
352 | | - | |
| 348 | + | |
353 | 349 | | |
354 | 350 | | |
355 | 351 | | |
| |||
Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
70 | 68 | | |
71 | 69 | | |
72 | 70 | | |
| |||
240 | 238 | | |
241 | 239 | | |
242 | 240 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | 241 | | |
247 | 242 | | |
248 | 243 | | |
| |||
0 commit comments