Repository navigation
Commit 17e8961
authored
Restore context-preserving handoff from automatic investigations (#1644)
## Summary
Restore the path from retained automatic evidence to a human
investigation without
discarding the available findings or turning the original transcript
into a mutable chat.
Completed automatic investigations offer **Investigate further**. It
opens a new
human conversation with the original resource and issue ID, using Hub's
existing
recent-verdict seeding. The header's separate action is explicitly
labeled
**Start fresh — ignore earlier findings** and sends `fresh: true`.
The new action requires a completed background run with an issue ID;
running,
failed, stopped, stale and unavailable runs do not advertise this
handoff. Copy
does not promise findings when no eligible recent verdict exists.
## OSS versus hosted behavior
- **Radar Cloud SaaS and licensed self-hosted Hub:** automatic retained
evidence
supports the new context-preserving handoff. The original transcript
stays read-only.
- **Standalone OSS Radar:** no organization sharing or hosted-copy
controls are
introduced. Existing human investigation behavior remains; the
fresh-start
tooltip now states its intent explicitly.
This is verdict seeding, not a full transcript or SDK-session fork, and
it does
not change sharing permissions or model-provider consent.
## Verification
| Journey | Proof |
|---|---|
| Completed automatic evidence → Investigate further | Actual local
browser click sends resource + issueId without fresh |
| Explicit fresh start | Actual local browser click sends same target +
issueId and fresh:true |
| Ineligible state / OSS human run | Eligibility matrix covers absent
issueId, human trigger, running/error/stopped/stale/gone states |
| Request serialization | Both start intents tested at API boundary |
| Standalone build | Type-check, 23 targeted tests, full
frontend/embed/Go build pass |
Browser verification used real local Hub/Postgres and synthetic retained
evidence
on the existing kind cluster. Job POSTs were intentionally intercepted;
this is UI
request proof, not a newly executed model investigation. Hub separately
tests prompt
seeding and authorization. Screenshots were captured and inspected
locally.
## Dependencies
Follows merged [Radar
#1640](#1640).
Uses the issueId and prior-evidence authorization from merged [Hub
#218](skyhook-dev/radar-hub#218).
The retained-evidence entrypoint is in merged [Web
#280](skyhook-dev/radar-hub-web#280).
Published radar-app 1.13.1 does not include this change. After merging,
publish a new
Radar package and adopt it in Web to complete the context-preserving
handoff.
No package publication or deployment is performed by this PR.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> UI-only diagnose flow changes with guarded eligibility; no auth or
sharing logic modified in this diff.
>
> **Overview**
> Restores a **context-preserving** path from completed automatic
investigations into a new human run, while keeping the original
automatic transcript read-only.
>
> Eligible background runs (`done`, with `issueId`) now show an
**Investigate further** action that starts a new investigation with the
same resource and issue ID and **without** `fresh: true`, so Hub can
seed from recent verdict evidence. The header **+** control is relabeled
**Start fresh — ignore earlier findings** and continues to pass `fresh:
true` for an explicit clean slate.
>
> `canInvestigateFurther` centralizes eligibility (no handoff for
in-flight, failed, stopped, stale, missing issue, human runs, or when
the run is gone). Copy falls back to generic “start a new investigation”
when further investigation isn’t offered.
>
> Adds Vitest coverage for the eligibility matrix and for `createRun`
POST bodies for both start intents.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0815ae8. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 7f5d05c commit 17e8961
4 files changed
Lines changed: 116 additions & 5 deletions
File tree
- web/src
- api
- components/diagnose
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
530 | | - | |
| 530 | + | |
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
| 544 | + | |
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
| |||
685 | 694 | | |
686 | 695 | | |
687 | 696 | | |
688 | | - | |
689 | | - | |
690 | | - | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
691 | 730 | | |
692 | 731 | | |
693 | 732 | | |
| |||
0 commit comments