Commit 85a3c44
committed
Implements #102 β search probes now return their findings as structured result cards that render on the search page, with the richest per-item detail the connector yields (title, source, snippet, url, kind, relevance, **confidence**).
## New features
- **Probe-emitted result cards.** Each `scg-path-probe` emits the hits its pathway grounded through the existing `scg_results` validate-only tool (already bound to probes via the capability gate β **no new transport, no new tool**), once, right before its evidence block. The root's step 5.5 narrows to inline-grounded hits so probes own their cards (playbook-level dedup). Probe emits project as `result` SSE events + `RunPayload.results` with probe-salted stable ids `r-<run8>-<agent8>-<n>` β collision-free across concurrent emitters, deterministic liveβsettle (same transcript event β same id β dedup holds).
- **Per-result `confidence` on the wire** (additive): `SearchResult.confidence` carries the emitting agent's per-card certainty verbatim (BE `schemas.py` + FE `agenticSearch.ts`); the existing relevance fold is preserved. `ResultCard` renders a mono `%` chip beside the relevance dot only when present β honest-or-absent, never an invented 0%.
## Stability β corrected root cause
The #95 premise "*probes run in their own sessions; their tool_results never appear here*" is **false**: a child loop inherits the parent's `event_logger` (`mewbo_core/agent_context.py:85`) and every `tool_result` payload is stamped with its `agent_id` (`tool_use_loop.py:2305`). Verified live in Mongo β e.g. session `eb132addβ¦` (run-35a4f94e39) carries **89 probe tool_results** in the root transcript; 8/8 sampled search runs agree. Consequences fixed:
- **Coordinator-lane mislabeling (live bug):** probe tool calls were being digested into the coordinator lane as root activity. Live streamer (`_probe_emitter`/`_project_probe_tool`) and settle (`probe_ids` threaded through `_build_coordinator_lines`/`_assign_lane_slots`/`_build_results`) now classify every `tool_result` by `agent_id β probe lanes` β same classifier both sides, so live and settle agree.
- **Id collisions:** a probe emit would previously mint the same `r-<run8>-<n>` ids as the root's and be silently dropped by the dedup.
**Deliberate non-goal:** `scg_results` stays **non-terminal** for probes β the probe's terminal is its `EVIDENCE`/`NO DATA` stop summary (the #86 seam feeding per-lane evidence + synthesis metrics); a terminal emit would erase it.
## Validation (observed locally)
- `pytest tests` β **3561 passed** (incl. 4 new cases: probe live attribution + settle parity, coordinator-pollution regression, mixed-emit id-collision regression, confidence wire semantics).
- `ruff check .` β All checks passed; `make typecheck` β Success: no issues found in 230 source files.
- Console: `npx tsc --noEmit` exit 0, eslint exit 0, `vitest run src/components/agentic_search` β 24 passed (incl. the new confidence-chip test).
- **Caveat:** validated via unit/contract tests over real-shaped transcripts (mirroring live Mongo event shapes); a live end-to-end LLM search run was not exercised. Probe emission also depends on the model following the updated playbook β the projection handles zero-emit probes gracefully (no behavior change for them).
## Docs
`agentic_search/scg/CLAUDE.md` + `plugins/scg/CLAUDE.md` correct the false own-sessions premise and record the classification + id-salting invariants; console `agentic_search/CLAUDE.md` notes the per-card confidence stance.
Closes #102
Reviewed-on: https://git.hurricane.home/bearlike/Assistant/pulls/103
Co-authored-by: Krishnakanth Alagiri <mail@kanth.tech>
Co-committed-by: Krishnakanth Alagiri <mail@kanth.tech>
1 parent 96ae473 commit 85a3c44
13 files changed
Lines changed: 428 additions & 83 deletions
File tree
- apps
- mewbo_api/src/mewbo_api/agentic_search
- scg
- mewbo_console/src
- components/agentic_search
- types
- packages/mewbo_graph/src/mewbo_graph/plugins/scg
- agents
- tests/agentic_search/scg
Lines changed: 28 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
121 | 137 | | |
122 | 138 | | |
123 | 139 | | |
| |||
Lines changed: 45 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
309 | 315 | | |
310 | 316 | | |
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
314 | 320 | | |
315 | 321 | | |
316 | | - | |
317 | | - | |
| 322 | + | |
| 323 | + | |
318 | 324 | | |
319 | | - | |
320 | | - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
321 | 328 | | |
322 | 329 | | |
323 | 330 | | |
| |||
489 | 496 | | |
490 | 497 | | |
491 | 498 | | |
492 | | - | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
493 | 502 | | |
494 | 503 | | |
495 | 504 | | |
496 | 505 | | |
497 | 506 | | |
498 | 507 | | |
499 | 508 | | |
500 | | - | |
| 509 | + | |
| 510 | + | |
501 | 511 | | |
502 | 512 | | |
503 | 513 | | |
| |||
514 | 524 | | |
515 | 525 | | |
516 | 526 | | |
| 527 | + | |
| 528 | + | |
517 | 529 | | |
518 | 530 | | |
519 | 531 | | |
| |||
525 | 537 | | |
526 | 538 | | |
527 | 539 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
537 | 554 | | |
538 | 555 | | |
539 | 556 | | |
540 | 557 | | |
541 | 558 | | |
542 | 559 | | |
| 560 | + | |
| 561 | + | |
543 | 562 | | |
544 | 563 | | |
545 | 564 | | |
546 | 565 | | |
547 | 566 | | |
548 | 567 | | |
549 | | - | |
| 568 | + | |
550 | 569 | | |
551 | 570 | | |
552 | 571 | | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
560 | 579 | | |
561 | 580 | | |
562 | 581 | | |
| |||
566 | 585 | | |
567 | 586 | | |
568 | 587 | | |
569 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
570 | 591 | | |
571 | 592 | | |
572 | 593 | | |
| |||
Lines changed: 73 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
249 | 251 | | |
250 | 252 | | |
251 | 253 | | |
| |||
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
257 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
258 | 262 | | |
259 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
260 | 270 | | |
261 | 271 | | |
262 | 272 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
267 | 277 | | |
268 | 278 | | |
269 | 279 | | |
270 | 280 | | |
271 | 281 | | |
272 | 282 | | |
| 283 | + | |
| 284 | + | |
273 | 285 | | |
274 | 286 | | |
275 | 287 | | |
| |||
286 | 298 | | |
287 | 299 | | |
288 | 300 | | |
289 | | - | |
290 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
291 | 304 | | |
292 | 305 | | |
293 | 306 | | |
294 | 307 | | |
295 | 308 | | |
296 | 309 | | |
| 310 | + | |
297 | 311 | | |
298 | | - | |
299 | | - | |
| 312 | + | |
| 313 | + | |
300 | 314 | | |
301 | 315 | | |
302 | 316 | | |
303 | 317 | | |
304 | 318 | | |
| 319 | + | |
305 | 320 | | |
306 | 321 | | |
307 | 322 | | |
| |||
409 | 424 | | |
410 | 425 | | |
411 | 426 | | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
418 | 440 | | |
419 | 441 | | |
420 | 442 | | |
421 | 443 | | |
422 | 444 | | |
423 | 445 | | |
424 | 446 | | |
425 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
426 | 479 | | |
427 | 480 | | |
428 | 481 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
287 | 291 | | |
288 | 292 | | |
289 | 293 | | |
| |||
0 commit comments