Skip to content

Integrate evidence-first Findings into AI investigations - #1608

Merged
nadaverell merged 25 commits into
mainfrom
feat/agent-diagnosis-review
Sep 7, 2026
Merged

nadaverell merged 25 commits into
mainfrom
feat/agent-diagnosis-review

Conversation

@nadaverell

@nadaverell nadaverell commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an evidence-first investigation workspace to Radar OSS's main AI Diagnose surface. Activity preserves the agent's chronological transcript and raw tool results; Findings presents the assessment, relevant evidence, and proposed next steps. Operators can inspect the source behind a finding, request a plain-language explanation, and follow a confirmed action with a fresh verification without losing the investigation history.

The public MCP diagnose tool remains a bounded point-in-time evidence bundle with its existing name. The local investigation workflow adds durable provenance and presentation on top of those producer results.

What changed

Investigation workspace

  • Activity and Findings scroll independently. The follow-up composer belongs to Activity; Findings uses its full available height. Narrow layouts use pane navigation with retained reading positions and relevant-evidence update cues. History uses a stable toggle and a sliding overlay or collapsible rail according to available space.
  • History is resource-first: name, namespace/kind, cluster, start time, and initial failure signal provide recognition without generated list summaries. Cluster/session boundaries remain explicit, including read-only history after a context switch.
  • Assessment, Evidence, and Next steps have distinct, restrained section treatments. Full analysis, Explain simply, and the Next steps shortcut share an action row. Previous assessments are a separate collapsed history, not nested current-assessment cards.
  • Evidence cards show workload facts directly, with quiet supporting cards, shared disclosure motion, and optional raw-source/resource navigation. Small tool inputs appear once; larger inputs remain expandable.

Relevant evidence and exact provenance

  • A private read-only MCP mount records exact successful Radar producer payloads and issues turn-scoped references. Agent adapters preserve producer success/error state and references; neither a familiar tool name nor agent prose establishes provenance.
  • Assessment citations bind successful, retained Radar read results in the assessment's turn. Missing, invalid, truncated, partial, withheld, and unsupported results remain qualified. Successful empty results are scoped observations, not workload-health verdicts.
  • Findings includes target-workload facts, producer-established relationships, and unambiguous focused facts selected by the assessment. Unrelated cluster/namespace search results, inventories, and bulk change lists remain in Activity. Citing a whole tool response does not identify a particular row within it. Assessment details retain links to the complete cited sources.
  • Exact records and citation identity are retained independently of display grouping. Previous observations appear for meaningful differences; known timestamp/bookkeeping changes and repetitions of the same event or crash do not create duplicate history. Other evidence kinds use a conservative comparison.
  • Coverage limitations are grouped by affected source, with concise summaries and expandable original details/source links. Collection failures remain explicit, and healthy assessments still retain qualifications. Selection counts and processed log excerpts are not presented as complete collection coverage.
  • View source opens the original Activity result and highlights a matching excerpt when a reliable locator is available. Hover can preview related visible evidence without scrolling. Navigation, offscreen-update cues, and source anchors use the same visible-evidence boundary.

On-demand explanation

  • Explain simply generates only on click. Progress, answer, and retryable errors appear under the originating assessment beside Full analysis; reopening a saved explanation makes no request.
  • The server validates the originating assessment by durable event sequence within the same run. Saved events preserve the association across reload and restart, including explanations of historical assessments.
  • The prompt asks for a concise explanation of the saved assessment and steps, preserving uncertainty rather than starting another diagnosis. Activity retains execution details and a compact link back to the explanation. Completion respects the user's selected detail view and dismissed content.

Lifecycle, actions, and producer contracts

  • Replay retains follow-ups, evidence references, explanation origins, confirmation, and verification boundaries. Corrupt or discontinuous history is unavailable rather than silently treated as a valid empty run.
  • Apply outcomes are confirmed, failed, or unknown based on Radar write-result evidence, not agent exit status or prose. Confirmed or potentially completed writes initiate read-only verification; interruption, shutdown, restart, and context changes preserve uncertainty.
  • Apply requires explicit confirmation of the proposed instruction and investigation context. Managed-resource acknowledgements and credential/confidence warnings remain visible. New evidence retires stale Apply actions; earlier proposals remain readable and copyable as historical instructions.
  • Canonical Kubernetes API groups survive prompts, persistence, apply, and navigation. Timeline filtering respects groups before pagination. Public MCP routes and tool names remain stable.
  • Diagnose evidence describes log sampling, event/change limits, and unavailable reads. Expected previous-instance absence requires compatible container state and read outcome; denied, unavailable, and interrupted reads remain limitations.

Testing

  • Frontend type-check and complete embedded make build; 898 frontend tests, focused evidence/projection/state regressions, and AI/evidence-registry race tests. Local cold-import timing requires an explicit command-line test timeout; repository/runtime timeout settings are unchanged. Frontend CI passes with its normal settings.
  • Existing backend validation covers AI/run management, HTTP/SSE, MCP adapters, evidence references, persistence, previous logs, and apply outcome classification; CI runs the complete backend/shared-library suites and PostgreSQL integration tests.
  • Browser verification uses saved investigations and controlled stream fixtures: source round trips, relevant-evidence selection, grouped coverage, disclosure motion, history, explanation loading/result/error/retry, replay, historical proposals, and confirmation open/cancel. Light/dark, narrow, desktop, and wide layouts have been inspected. No cluster mutation is performed by these UI checks.

Scope and tradeoffs

  • The evidence ledger and explanation workflow target local OSS investigations. Updated public MCP producers benefit all consumers of that server version; hosted Findings/provenance parity requires corresponding hosted backend integration, not just a frontend package upgrade. Existing hosted entry/link controls are preserved.
  • Package-upgrade requirement: DiagnoseTarget, RunSummary, and run-creation inputs now require canonical group ("" for core resources). Hosted consumers must carry that identity through launch and replay before adopting this package revision. The new shared defaultConditionTone export also requires publishing a matching k8s-ui version and raising radar-app's peer floor before a package release. Merging this OSS PR does not publish either npm package; package versioning and hosted migration are separate release gates.
  • Diagnose combines cached resource state, historical events/changes, and live logs. Completion time is not a guarantee of an atomic or uniformly fresh observation.
  • Citations identify whole tool results, not individual observations or prose spans. Source highlighting is best effort; broad-result item selection and richer relationship/ranking models are follow-up work.
  • Explanation uses the existing agent execution profile, not a new tool-free sandbox. Any actual evidence collected during that turn remains subject to freshness restrictions. Real model latency and wording vary.
  • Apply requires a recommended instruction and operator confirmation, but does not introduce mandatory matched-citation gating. Generic evidence envelopes, new coverage/freshness platforms, hosted provenance integration, and broader agent-roadmap work are outside this PR.

Note

Medium Risk
Changes how AI investigations establish citations and how confirmed Kubernetes mutations are inferred from MCP write results—security- and operator-trust-sensitive paths, though read-only investigation turns remain gated on the private evidence registry.

Overview
Reframes local AI investigations around server-backed evidence instead of treating agent prose or MCP tool names as proof. Read-only turns now use a scoped /mcp-investigation mount that records exact Radar read-tool payloads and emits [[radar:evidence-ref=...]] markers; Claude/Codex/Cursor adapters strip those markers, track host success/error state, and retain uncapped producer text for validation before results are capped for the event log.

Assessments can cite up to three refs via root_cause_evidence_refs in the agent JSON; the run layer promotes only refs that match the turn ledger into rootCauseEvidence. apply_outcome.go classifies remediation as confirmed / failed / unknown from terminal Radar write-tool JSON (including dry-run and partial cases), not CLI exit codes. Apply prompts and requests carry canonical group identity; safeguarded apply adds manage_rollout to the write allowlist.

Adds an on-demand “Explain simply” turn that reuses a saved assessment without starting a new investigation or minting new verdict fields. Docs/README shift wording from “diagnose” to investigate where appropriate and document public MCP diagnose as a bounded, non-authoritative evidence bundle (log coverage, timestamps, Rollout group parameter).

Tool-result payload cap rises (32 KiB → 96 KiB) so bounded diagnose envelopes are not truncated in investigation history.

Reviewed by Cursor Bugbot for commit 9764530. Bugbot is set up for automated code reviews on this repo. Configure here.

@nadaverell
nadaverell requested a review from hisco as a code owner September 2, 2026 23:13
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Build an evidence-first AI investigation workspace

✨ Enhancement 🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Rebuilds AI investigations around live Activity and structured, source-linked Findings.
• Validates causal citations against exact, successful Radar tool results.
• Persists canonical targets, replay boundaries, apply outcomes, and post-change verification.
Diagram

sequenceDiagram
  actor Operator
  participant UI as Investigation UI
  participant API as Run API
  participant Runs as Run Manager
  participant Agent as AI Agent
  participant MCP as Private MCP
  participant Refs as Evidence Registry
  participant Store as Local Store
  Operator->>UI: Start investigation
  UI->>API: Canonical target
  API->>Runs: Create durable run
  Runs->>Agent: Scoped read turn
  Agent->>MCP: Call Radar tools
  MCP->>Refs: Record exact payload
  MCP-->>Agent: Payload plus reference
  Agent-->>Runs: Activity and conclusion
  Runs->>Refs: Validate cited results
  Runs->>Store: Persist events atomically
  Runs-->>UI: Replay then live stream
  UI-->>Operator: Activity and Findings
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Project evidence on the server
  • ➕ Centralizes evidence semantics for web, CLI, and future clients
  • ➕ Reduces the large client-side parsing and classification surface
  • ➕ Allows versioned, strongly typed findings in persisted history
  • ➖ Couples backend releases to presentation-oriented evidence schemas
  • ➖ Increases persisted payload size and migration requirements
  • ➖ Makes rapid UI hierarchy changes more expensive
2. Persist only normalized findings
  • ➕ Produces simpler and faster replay
  • ➕ Avoids reparsing historical tool payloads
  • ➕ Provides a compact, stable review artifact
  • ➖ Loses the exact chronological producer record
  • ➖ Makes projection bugs or schema upgrades difficult to repair
  • ➖ Weakens bidirectional navigation to raw agent activity
3. Use signed evidence tokens
  • ➕ Could validate references without an in-memory scope registry
  • ➕ Could support evidence exchange across processes or shareable URLs
  • ➖ Does not independently prove the retained tool step matched the payload
  • ➖ Introduces key management and expiry complexity
  • ➖ Unnecessary for the intentionally local, process-scoped experience

Recommendation: Keep the PR’s exact-payload registry and dual Activity/Findings model for the local workspace: it preserves raw provenance while failing closed on citations. Consider moving the deterministic evidence projection behind a versioned server API later if additional clients need the same hierarchy; signed tokens are not justified until cross-process sharing is required.

Files changed (104) +14276 / -1362

Enhancement (35) +6967 / -1015
agent_codex.goCapture Codex result provenance and errors +29/-7

Capture Codex result provenance and errors

• Extracts evidence references and records authoritative Codex tool success or failure details.

internal/ai/agent_codex.go

agent_cursor.goParse complete Cursor MCP outcomes +129/-17

Parse complete Cursor MCP outcomes

• Supports Cursor success, rejection, permission, lookup, and transport result variants while extracting evidence references.

internal/ai/agent_cursor.go

diagnoser.goAdd scoped evidence-aware investigation turns +196/-41

Add scoped evidence-aware investigation turns

• Adds target groups, evidence scopes, citation fields, apply outcomes, verification metadata, and private MCP routing.

internal/ai/diagnoser.go

parse.goParse strict causal evidence references +46/-8

Parse strict causal evidence references

• Parses up to three unique, well-formed evidence references as private untrusted model output.

internal/ai/parse.go

runs.goRebuild durable investigation lifecycle +949/-205

Rebuild durable investigation lifecycle

• Adds exact evidence binding, canonical groups, atomic replay, authoritative apply outcomes, and automatic read-only verification. It also hardens clear, stop, shutdown, context-switch, hydration, and subscriber races.

internal/ai/runs.go

diagnosecli.goAdd canonical groups to the diagnose CLI +31/-13

Add canonical groups to the diagnose CLI

• Adds '--group', built-in group inference, group-qualified output, and investigation terminology.

internal/diagnosecli/diagnosecli.go

render.goRender investigation conclusions and groups +11/-7

Render investigation conclusions and groups

• Shows group-qualified targets and reframes diagnose activity as evidence collection and conclusions.

internal/diagnosecli/render.go

registry.goAdd scoped evidence reference registry +125/-0

Add scoped evidence reference registry

• Introduces bounded active scopes that issue references for exact producer payloads and return immutable snapshots.

internal/investigationrefs/registry.go

fetch.goExport canonical built-in kind lookup +4/-3

Export canonical built-in kind lookup

• Exposes built-in resource-to-Kind normalization for API boundaries and typed conversions.

internal/k8s/fetch.go

recreate_stash.goSupport Rollout recreation stashing +1/-0

Support Rollout recreation stashing

• Adds Argo Rollout to resource kinds eligible for recreation snapshots.

internal/k8s/recreate_stash.go

server.goAdd private investigation MCP transport +89/-3

Add private investigation MCP transport

• Adds active-scope validation and middleware that records successful producer payloads before prepending evidence markers.

internal/mcp/server.go

tools.goClarify evidence contracts and completeness +63/-39

Clarify evidence contracts and completeness

• Reframes diagnose, propagates exact groups to extras, and preserves topology coverage metadata and RBAC warnings.

internal/mcp/tools.go

tools_diagnose.goExpand group-aware diagnose evidence +192/-46

Expand group-aware diagnose evidence

• Adds Argo Rollouts, strict group resolution, collection completeness metadata, RBAC-aware changes, and exact event attribution.

internal/mcp/tools_diagnose.go

tools_gitops.goExpose GitOps no-change outcomes +4/-1

Expose GitOps no-change outcomes

• Includes producer-confirmed 'noChange' in GitOps write results for mutation classification.

internal/mcp/tools_gitops.go

tools_workloads.goRecord expected previous-log absences +31/-4

Record expected previous-log absences

• Uses container restart status to distinguish expected missing previous logs from unknown collection failures.

internal/mcp/tools_workloads.go

meaningfulchanges.goAdd authorized, group-aware change evidence +106/-27

Add authorized, group-aware change evidence

• Supports Rollouts, pre-limit API-group filtering, distinct saturation signals, and source-level authorization coverage.

internal/meaningfulchanges/meaningfulchanges.go

ai_diagnose.goCanonicalize investigation API targets +151/-23

Canonicalize investigation API targets

• Resolves Kind and group at run creation, accepts verification turns, and adds replay boundary and history-failure SSE behavior.

internal/server/ai_diagnose.go

startup_log.goRename startup AI capability +6/-2

Rename startup AI capability

• Displays AI investigations in startup output and safely aligns longer labels.

internal/server/startup_log.go

DiffViewer.tsxImprove diff accessibility and wrapping +16/-12

Improve diff accessibility and wrapping

• Adds screen-reader labels, decorative icon hints, and overflow-safe wrapping for long values.

packages/k8s-ui/src/components/timeline/DiffViewer.tsx

Collapse.tsxRespect reduced-motion preferences +9/-2

Respect reduced-motion preferences

• Disables collapse and chevron transitions when reduced motion is requested.

packages/k8s-ui/src/components/ui/Collapse.tsx

WorkloadView.tsxPass API groups to AI actions +2/-1

Pass API groups to AI actions

• Extends the resource action context with the target API group.

packages/k8s-ui/src/components/workload/WorkloadView.tsx

store.goAdd timeline API-group filters +8/-3

Add timeline API-group filters

• Extends timeline queries with pre-pagination group filtering semantics.

pkg/timeline/store.go

diagnose.tsExpand investigation client contracts +68/-8

Expand investigation client contracts

• Adds groups, evidence references, mutation outcomes, verification, replay boundaries, and history failure handling.

web/src/api/diagnose.ts

DiagnoseSurface.tsxBuild responsive investigation shell +289/-107

Build responsive investigation shell

• Adds bounded scrolling, responsive master-detail history, target-aware headers, and accessible menu dismissal.

web/src/components/diagnose/DiagnoseSurface.tsx

Home.tsxImprove local investigation history +109/-74

Improve local investigation history

• Shows canonical targets, textual states, relative and exact times, and longer finding previews.

web/src/components/diagnose/Home.tsx

InvestigationEvidencePane.tsxAdd structured Findings evidence pane +2091/-0

Add structured Findings evidence pane

• Renders cited checks, failures, support, successful receipts, limits, history, and context with source navigation.

web/src/components/diagnose/InvestigationEvidencePane.tsx

InvestigationResourceEvidence.tsxRender configuration and secret evidence +235/-0

Render configuration and secret evidence

• Adds compact ConfigMap, Secret, and SealedSecret visuals without exposing sensitive values.

web/src/components/diagnose/InvestigationResourceEvidence.tsx

InvestigationView.tsxRebuild the Activity and Findings workspace +1773/-329

Rebuild the Activity and Findings workspace

• Adds simultaneous or tabbed panes, silent replay, bidirectional navigation, evidence projection, and safe apply-verification UX.

web/src/components/diagnose/InvestigationView.tsx

LocalDiagnoseAction.tsxLaunch group-qualified AI investigations +42/-25

Launch group-qualified AI investigations

• Renames actions to Investigate and propagates API groups from resources and issues.

web/src/components/diagnose/LocalDiagnoseAction.tsx

diagnoseEvidenceTypes.tsDefine structured evidence contracts +151/-0

Define structured evidence contracts

• Adds typed contracts for logs, crashes, resources, relationships, limitations, and evidence severity.

web/src/components/diagnose/diagnoseEvidenceTypes.ts

investigationEvidence.tsProject tool results into evidence findings +0/-0

Project tool results into evidence findings

• Introduces strict adapters and deterministic grouping for Radar resources, issues, logs, events, changes, topology, and network evidence.

web/src/components/diagnose/investigationEvidence.ts

investigationResourceEvidenceModel.tsModel redacted resource evidence +0/-0

Model redacted resource evidence

• Builds prioritized ConfigMap, Secret, and SealedSecret summaries with conservative sensitive-value detection.

web/src/components/diagnose/investigationResourceEvidenceModel.ts

parts.tsxMake transcript results evidence-aware +0/-0

Make transcript results evidence-aware

• Adds source links, tri-state tool outcomes, verification turns, honest conclusion cards, and authoritative apply states.

web/src/components/diagnose/parts.tsx

target.tsCentralize investigation target identity +0/-0

Centralize investigation target identity

• Adds canonical group-aware keys and Kubernetes-qualified target formatting.

web/src/components/diagnose/target.ts

DiagnoseCustomization.tsxExtend investigation action customization +11/-8

Extend investigation action customization

• Adds optional API groups to host-injected resource actions and adopts Investigate terminology.

web/src/context/DiagnoseCustomization.tsx

Bug fix (8) +162 / -80
store.goPersist atomic event batches safely +72/-40

Persist atomic event batches safely

• Adds transactional event batches, corruption detection, and store-derived clearing that preserves all running rows.

internal/ai/store.go

detect_scheduling.goMake admission findings group-aware +36/-21

Make admission findings group-aware

• Includes API groups in admission identities and prevents cross-group workload attribution.

internal/k8s/detect_scheduling.go

sqlite_store.goFilter SQLite timelines by API group +15/-0

Filter SQLite timelines by API group

• Applies API-group filtering before pagination while retaining events with unknown versions.

internal/timeline/sqlite_store.go

trace.goGroup-qualify network trace subjects +13/-1

Group-qualify network trace subjects

• Canonicalizes entry kinds and assigns the correct API group even when caches are unavailable.

internal/trace/trace.go

operations.goReport GitOps no-op operations +2/-0

Report GitOps no-op operations

• Marks already-running Argo termination requests as explicit no-change outcomes.

pkg/gitops/operations.go

memory_store.goFilter in-memory timelines by group +11/-0

Filter in-memory timelines by group

• Applies API-group filtering before result limits while retaining unknown-version events.

pkg/timeline/memory_store.go

DiagnoseContext.tsxTrack group-qualified running targets +13/-18

Track group-qualified running targets

• Adds API groups to target state and uses collision-safe canonical keys for live investigations.

web/src/components/diagnose/DiagnoseContext.tsx

IssuesPane.tsxPass issue API groups to investigations +0/-0

Pass issue API groups to investigations

• Includes each issue subject's group when rendering its Investigate action.

web/src/components/issues/IssuesPane.tsx

Refactor (3) +39 / -81
cache.goUse exported built-in kind lookup +1/-1

Use exported built-in kind lookup

• Switches typed object conversion to the exported canonical kind helper.

internal/k8s/cache.go

drawer-components.tsxExport condition tone mapping +1/-1

Export condition tone mapping

• Exposes the shared condition health classifier for investigation evidence cards.

packages/k8s-ui/src/components/ui/drawer-components.tsx

index.cssSimplify investigation result motion +37/-79

Simplify investigation result motion

• Removes staged pulses and glows, retaining short entry motion with reduced-motion support.

web/src/index.css

Tests (40) +6985 / -89
agent_claude_test.goVerify Claude exposes all write tools +21/-0

Verify Claude exposes all write tools

• Ensures safeguarded apply turns include every Radar write tool, including Rollout management.

internal/ai/agent_claude_test.go

agent_codex_test.goTest Codex evidence and error parsing +44/-2

Test Codex evidence and error parsing

• Covers marker extraction, producer errors, and tri-state terminal outcomes.

internal/ai/agent_codex_test.go

agent_cursor_test.goTest Cursor MCP result variants +105/-4

Test Cursor MCP result variants

• Validates evidence extraction and honest rendering of every supported Cursor result envelope.

internal/ai/agent_cursor_test.go

diagnoser_test.goTest evidence scopes and structured conclusions +324/-10

Test evidence scopes and structured conclusions

• Covers strict reference parsing, scope cleanup, group-bound prompts, tool outcomes, and larger evidence payloads.

internal/ai/diagnoser_test.go

runs_evidence_test.goTest fail-closed evidence binding +241/-0

Test fail-closed evidence binding

• Verifies citations require current-turn, exact, complete, successful Radar read results issued by the private transport.

internal/ai/runs_evidence_test.go

runs_test.goExercise run lifecycle and concurrency +1831/-30

Exercise run lifecycle and concurrency

• Adds extensive coverage for apply-verification jobs, replay ordering, interruption states, clear-history races, and canonical groups.

internal/ai/runs_test.go

store_test.goTest durable provenance and corruption handling +237/-3

Test durable provenance and corruption handling

• Covers evidence replay, atomic batches, corrupt transcripts, and multi-process terminal-history clearing.

internal/ai/store_test.go

diagnosecli_test.goTest CLI target group propagation +82/-12

Test CLI target group propagation

• Covers group inference, API request bodies, qualified headers, flags, and conclusion rendering.

internal/diagnosecli/diagnosecli_test.go

registry_test.goTest evidence registry lifecycle +83/-0

Test evidence registry lifecycle

• Validates active-scope enforcement, exact payload retention, defensive copies, reuse, and issuance limits.

internal/investigationrefs/registry_test.go

cache_typed_route_test.goUpdate built-in kind parity test +2/-2

Update built-in kind parity test

• Uses the exported helper when checking typed route coverage.

internal/k8s/cache_typed_route_test.go

detect_scheduling_integration_test.goTest admission API-group isolation +31/-0

Test admission API-group isolation

• Ensures same-named resources in different groups do not share status or creation evidence.

internal/k8s/detect_scheduling_integration_test.go

events_tool_test.goTest group-exact event evidence +109/-2

Test group-exact event evidence

• Covers pre-cap event totals, Rollout warnings, and same-kind API-group collisions.

internal/mcp/events_tool_test.go

issue_correlation_test.goCorrect cross-group correlation expectations +6/-6

Correct cross-group correlation expectations

• Confirms mismatched-group churn is filtered before limits and cannot create false saturation.

internal/mcp/issue_correlation_test.go

server_investigation_test.goTest private MCP evidence protocol +237/-0

Test private MCP evidence protocol

• Verifies scope enforcement, exact payload preservation, failure behavior, and unchanged public MCP results.

internal/mcp/server_investigation_test.go

tools_catalog_test.goPin the bounded diagnose contract +20/-1

Pin the bounded diagnose contract

• Checks non-authoritative wording, group schema, and parity between full and read-only tool catalogs.

internal/mcp/tools_catalog_test.go

tools_diagnose_evidence_test.goTest diagnose evidence completeness +340/-0

Test diagnose evidence completeness

• Covers log absence semantics, event and change limits, RBAC-limited coverage, and response metadata.

internal/mcp/tools_diagnose_evidence_test.go

tools_diagnose_test.goTest Rollout and group-exact diagnosis +166/-1

Test Rollout and group-exact diagnosis

• Validates canonical workload groups, dynamic Rollout lookup, and group-safe startup blocker attribution.

internal/mcp/tools_diagnose_test.go

tools_gitops_test.goTest GitOps no-change propagation +42/-0

Test GitOps no-change propagation

• Ensures already-terminating Argo operations return a visible no-change result.

internal/mcp/tools_gitops_test.go

tools_rollouts_test.goUpdate resource extras signature +1/-1

Update resource extras signature

• Adapts Rollout tool tests to group-aware resource extras.

internal/mcp/tools_rollouts_test.go

tools_topology_summary_test.goTest topology coverage preservation +69/-0

Test topology coverage preservation

• Ensures summarized topology retains warnings, scale limits, hidden kinds, discovery status, and array shapes.

internal/mcp/tools_topology_summary_test.go

meaningfulchanges_test.goTest change evidence coverage semantics +232/-0

Test change evidence coverage semantics

• Covers group collisions, merged caps, skipped unauthorized sources, and Argo Rollout changes.

internal/meaningfulchanges/meaningfulchanges_test.go

ai_diagnose_stream_test.goTest durable investigation streaming +391/-0

Test durable investigation streaming

• Covers replay boundaries, slow subscribers, hydration failures, permanent corruption, closures, and evidence provenance.

internal/server/ai_diagnose_stream_test.go

ai_diagnose_test.goTest target canonicalization and turn validation +80/-0

Test target canonicalization and turn validation

• Verifies built-in and custom groups plus rejection of invalid apply-verification combinations.

internal/server/ai_diagnose_test.go

startup_log_test.goUpdate startup capability expectation +1/-1

Update startup capability expectation

• Checks the renamed AI investigations startup row.

internal/server/startup_log_test.go

sqlite_store_test.goTest SQLite group filtering before limits +45/-0

Test SQLite group filtering before limits

• Validates collision removal, core groups, ordering, and unknown-version retention.

internal/timeline/sqlite_store_test.go

probes_test.goUpdate reachability documentation test +7/-7

Update reachability documentation test

• Pins automatic probing to the Reachability tab rather than Diagnose terminology.

internal/trace/probes_test.go

trace_test.goTest network subject groups +15/-0

Test network subject groups

• Verifies Ingress and Gateway API traces retain canonical groups during cache startup.

internal/trace/trace_test.go

DiffViewer.test.tsxTest non-color diff labels +26/-0

Test non-color diff labels

• Ensures added, removed, old, and new values have accessible textual labels.

packages/k8s-ui/src/components/timeline/DiffViewer.test.tsx

operations_test.goTest Argo termination no-op behavior +22/-0

Test Argo termination no-op behavior

• Ensures an already-terminating Application is not patched and reports no change.

pkg/gitops/operations_test.go

memory_store_test.goTest memory-store group filtering +44/-0

Test memory-store group filtering

• Validates collision removal, core groups, ordering, and unknown-version retention.

pkg/timeline/memory_store_test.go

diagnose.test.tsTest investigation API and SSE boundaries +221/-0

Test investigation API and SSE boundaries

• Covers group submission, replay callbacks, hydration failures, closures, and apply outcome forwarding.

web/src/api/diagnose.test.ts

DiagnoseSurface.test.tsxTest responsive investigation navigation +119/-7

Test responsive investigation navigation

• Pins bounded overflow, history breakpoints, header identity, breadcrumbs, and action visibility.

web/src/components/diagnose/DiagnoseSurface.test.tsx

Home.test.tsxTest distinguishable investigation history +93/-0

Test distinguishable investigation history

• Covers canonical labels, textual outcomes, exact timestamps, previews, and selected rows.

web/src/components/diagnose/Home.test.tsx

InvestigationEvidencePane.test.tsxTest evidence hierarchy and navigation +912/-0

Test evidence hierarchy and navigation

• Exercises citations, tiers, coverage limits, compact rendering, source anchors, and historical evidence.

web/src/components/diagnose/InvestigationEvidencePane.test.tsx

InvestigationResourceEvidence.test.tsxTest safe resource evidence visuals +233/-0

Test safe resource evidence visuals

• Covers ConfigMap redaction, Secret key-only handling, SealedSecret state, summaries, and row limits.

web/src/components/diagnose/InvestigationResourceEvidence.test.tsx

InvestigationView.test.tsTest workspace lifecycle decisions +553/-0

Test workspace lifecycle decisions

• Covers pane defaults, action gating, evidence conflicts, replay stability, apply uncertainty, and closure semantics.

web/src/components/diagnose/InvestigationView.test.ts

investigationEvidence.test.tsTest semantic evidence projection +0/-0

Test semantic evidence projection

• Extensively validates strict adapters, provenance, deduplication, citations, partiality, relevance, and verification history.

web/src/components/diagnose/investigationEvidence.test.ts

parts.test.tsxTest transcript and conclusion components +0/-0

Test transcript and conclusion components

• Covers reasoning beats, tool outcomes, likely-cause wording, all-clear qualification, remediation compaction, and apply truth.

web/src/components/diagnose/parts.test.tsx

target.test.tsTest canonical investigation target identity +0/-0

Test canonical investigation target identity

• Verifies singular/plural normalization, group collision isolation, and qualified labels.

web/src/components/diagnose/target.test.ts

mcpToolCatalog.test.tsTest honest diagnose catalog copy +0/-0

Test honest diagnose catalog copy

• Pins bounded evidence wording, non-authoritative semantics, and Rollout group documentation.

web/src/components/home/mcpToolCatalog.test.ts

Documentation (16) +33 / -25
README.mdRename AI diagnosis language to investigations +2/-2

Rename AI diagnosis language to investigations

• Updates product copy to describe agents as investigating rather than diagnosing clusters.

README.md

main.goClarify investigation history flags +2/-2

Clarify investigation history flags

• Renames AI history comments and help text from verdicts to conclusions.

cmd/explorer/main.go

mcp.mdDocument bounded diagnose evidence and API groups +10/-2

Document bounded diagnose evidence and API groups

• Defines 'diagnose' as a bounded evidence bundle, adds Argo Rollout support, and documents group-qualified identity.

docs/mcp.md

reachability.mdSeparate reachability from AI investigations +3/-3

Separate reachability from AI investigations

• Clarifies reachability terminology and the non-authoritative role of MCP diagnose evidence.

docs/reachability.md

agent.goAdopt investigation terminology +1/-1

Adopt investigation terminology

• Updates the agent abstraction comment to describe AI investigations.

internal/ai/agent.go

config.goUpdate AI configuration terminology +3/-3

Update AI configuration terminology

• Renames diagnosis and verdict references to investigations and conclusions in configuration documentation.

internal/config/config.go

IssuesView.tsxRename issue AI action +1/-1

Rename issue AI action

• Updates shared issue-view documentation from Diagnose to Investigate.

packages/k8s-ui/src/components/issues/IssuesView.tsx

RadarApp.tsxAdopt Investigate action terminology +2/-2

Adopt Investigate action terminology

• Renames resource-level Diagnose action documentation to Investigate.

web/src/RadarApp.tsx

AISettings.tsxRename AI settings section +1/-1

Rename AI settings section

• Updates settings documentation to AI investigations.

web/src/components/diagnose/AISettings.tsx

AgentSetupNotice.tsxReframe AI setup as investigations +5/-5

Reframe AI setup as investigations

• Removes guaranteed root-cause language and updates installation and restart guidance.

web/src/components/diagnose/AgentSetupNotice.tsx

agentCatalog.tsUpdate agent catalog terminology +1/-1

Update agent catalog terminology

• Describes supported agent setup in terms of AI investigations.

web/src/components/diagnose/agentCatalog.ts

MCPSetupDialog.tsxClarify MCP investigation capabilities +0/-0

Clarify MCP investigation capabilities

• Updates MCP setup copy and distinguishes optional in-cluster route probes.

web/src/components/home/MCPSetupDialog.tsx

mcpToolCatalog.tsDescribe diagnose as bounded evidence +0/-0

Describe diagnose as bounded evidence

• Updates the UI catalog with completeness limits, Argo Rollouts, and the API group parameter.

web/src/components/home/mcpToolCatalog.ts

SettingsDialog.tsxRename AI settings to investigations +0/-0

Rename AI settings to investigations

• Updates settings labels and removes guaranteed explanatory or root-cause language.

web/src/components/settings/SettingsDialog.tsx

WorkloadView.tsxRename network diagnosis prompt +1/-1

Rename network diagnosis prompt

• Reframes the workload hint as tracing a network path.

web/src/components/workload/WorkloadView.tsx

index.tsRename exported AI surface documentation +1/-1

Rename exported AI surface documentation

• Describes the standalone exported surface as AI investigations.

web/src/index.ts

Other (2) +90 / -72
bootstrap.goWire the private evidence registry +7/-0

Wire the private evidence registry

• Creates one shared registry for the investigation runner and private MCP handler.

internal/app/bootstrap.go

server.goMount private investigation infrastructure +83/-72

Mount private investigation infrastructure

• Adds the private MCP route, shared registry configuration, and evidence-enabled diagnoser startup requirements.

internal/server/server.go

@qodo-code-review

qodo-code-review Bot commented Sep 2, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Capped changes appear complete ✓ Resolved 🐞 Bug ≡ Correctness
Description
The get_resource adapter treats recent-change results as complete whenever recentChangesError is
absent, although the producer discards its saturation signal. A saturated empty result can therefore
appear as “No tracked recent changes,” while a saturated non-empty result omits the required
truncation warning.
Code

web/src/components/diagnose/investigationEvidence.ts[R2663-2665]

+        undefined,
+        !nonEmptyString(value.recentChangesError),
+        true,
Relevance

●●● Strong

Ignoring saturation can falsely assert complete evidence; analogous truncation and completeness
fixes were accepted.

PR-#1227
PR-#903

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
RecentForResource explicitly returns a saturation flag and warns that callers must not use
saturated output as evidence of absence, but get_resource ignores that return value. The new
adapter passes emptyIsAuthoritative=true while deriving completeness only from
recentChangesError; addChanges then emits an authoritative no-changes receipt for an empty
result, whereas the sibling diagnose adapter checks saturation and emits a truncation limitation.

internal/meaningfulchanges/meaningfulchanges.go[256-269]
internal/mcp/tools.go[1103-1137]
web/src/components/diagnose/investigationEvidence.ts[1584-1618]
web/src/components/diagnose/investigationEvidence.ts[2324-2369]
web/src/components/diagnose/investigationEvidence.ts[2653-2667]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new `get_resource` evidence adapter marks recent-change output complete based only on the absence of an error. The backend currently discards the saturation value returned by `RecentForResource`, so capped output can be presented without a limitation and a capped empty result can become an authoritative “No tracked recent changes” receipt.

## Issue Context
The dedicated `diagnose` adapter already handles `recentChangesSaturated` correctly. Apply the same contract to `get_resource`: preserve the backend saturation signal, serialize it in the result, use it when calculating completeness, and add a truncation limitation when true.

## Fix Focus Areas
- internal/mcp/tools.go[1103-1137]
- web/src/components/diagnose/investigationEvidence.ts[2653-2667]
- web/src/components/diagnose/investigationEvidence.ts[2324-2369]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Comment records change history ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The modified comment says AI preferences are now SELF-SAVING, documenting change history rather
than the current behavior alone.
Code

web/src/components/settings/SettingsDialog.tsx[166]

+  // AI investigation prefs are client-side (localStorage) and now SELF-SAVING: the
Relevance

●●● Strong

The comment explicitly describes implementation history, matching accepted precedent for correcting
stale or misleading comments.

PR-#1203

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 3036538 prohibits explicit change-history phrases in modified comments. The comment
at line 166 uses now to contrast the current self-saving behavior with an earlier implementation.

Rule 3036538: Disallow references to tickets or PR history in code comments
web/src/components/settings/SettingsDialog.tsx[166-168]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The comment uses `now SELF-SAVING`, which records implementation history in source code.

## Issue Context
Describe the current persistence behavior and its rationale without temporal change-history language.

## Fix Focus Areas
- web/src/components/settings/SettingsDialog.tsx[166-168]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. MCP errors bypass JSON helper ✗ Dismissed 📘 Rule violation ≡ Correctness
Description
The new investigation handler writes invalid and inactive scope errors with http.Error instead of
the standard JSON error helper, producing an inconsistent error response format.
Code

internal/mcp/server.go[65]

+			http.Error(w, "invalid investigation evidence scope", http.StatusBadRequest)
Relevance

●●● Strong

Backend handler format consistency is a concrete correctness issue, and accepted history favors
explicit handler fixes.

PR-#1368

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 3036617 requires backend handler error bodies to use the standard JSON error helper
rather than http.Error or other ad-hoc writers. The new handler directly calls http.Error for
both scope validation failures.

Rule 3036617: Use standard JSON error helper in HTTP handlers
internal/mcp/server.go[63-70]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The private MCP HTTP handler emits scope failures through `http.Error` rather than the standard JSON error path.

## Issue Context
Both invalid-scope and inactive-scope responses should retain their current 400/403 statuses while using the project's standard JSON error shape.

## Fix Focus Areas
- internal/mcp/server.go[63-70]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. Investigation uses hardcoded backgrounds ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
New investigation UI elements use hardcoded status backgrounds such as bg-amber-500/5,
bg-red-500/5, and bg-emerald-500/5 instead of the permitted theme background tokens.
Code

web/src/components/diagnose/InvestigationEvidencePane.tsx[459]

+      <div className="flex items-start gap-2 rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2.5">
Relevance

●●● Strong

Theme-token compliance is an established UI convention, with accepted history favoring removal of
hardcoded styling exceptions.

PR-#1449

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 3036653 permits only the four designated theme background utilities unless a
non-themable background is explicitly documented. The cited additions use raw amber, red, emerald,
and accent background classes without such an exception.

Rule 3036653: Use theme background tokens instead of hardcoded utility color classes
web/src/components/diagnose/InvestigationEvidencePane.tsx[459-459]
web/src/components/diagnose/InvestigationEvidencePane.tsx[669-670]
web/src/components/diagnose/InvestigationView.tsx[1691-1699]
web/src/components/diagnose/InvestigationView.tsx[1730-1739]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Several new investigation elements use raw Tailwind palette or accent background utilities instead of approved theme background tokens.

## Issue Context
Use `bg-theme-base`, `bg-theme-surface`, `bg-theme-elevated`, or `bg-theme-hover`; preserve status meaning through semantic text, borders, icons, or documented design-system variants.

## Fix Focus Areas
- web/src/components/diagnose/InvestigationEvidencePane.tsx[459-459]
- web/src/components/diagnose/InvestigationEvidencePane.tsx[669-670]
- web/src/components/diagnose/InvestigationView.tsx[1691-1699]
- web/src/components/diagnose/InvestigationView.tsx[1730-1739]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View medium (1)
5. relativeTime comment restates code ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The comment merely describes the compact age strings directly produced by the immediately following
relativeTime function and adds no rationale or hidden constraint.
Code

web/src/components/diagnose/Home.tsx[9]

+// Compact "3m ago" / "2h ago" age label.
Relevance

●●● Strong

The comment restates obvious behavior; similar stale or misleading comment corrections were
accepted.

PR-#1203

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 3036542 disallows comments that only translate immediately following code into
English. Line 9 describes the age labels visibly returned by relativeTime without explaining why
the implementation is needed.

Rule 3036542: Avoid explanatory comments that restate obvious code behavior
web/src/components/diagnose/Home.tsx[9-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The comment above `relativeTime` restates the function's obvious output.

## Issue Context
The function name and returned `m`, `h`, `d`, `mo`, and `y` strings already communicate this behavior.

## Fix Focus Areas
- web/src/components/diagnose/Home.tsx[9-17]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 41 rules
Review mode: 🧠 Deep: This is an unusually dense, cross-cutting change spanning AI orchestration, MCP authorization/evidence binding, persistence/replay, Kubernetes behavior, streaming, and substantial UI logic, with security- and mutation-sensitive blast radius and many independent defect opportunities.

Grey Divider

Tip of the day
💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread web/src/components/settings/SettingsDialog.tsx Outdated
Comment thread web/src/components/diagnose/Home.tsx Outdated
Comment thread internal/mcp/server.go
Comment thread web/src/components/diagnose/InvestigationEvidencePane.tsx Outdated
Comment thread web/src/components/diagnose/investigationEvidence.ts
Comment thread internal/ai/diagnoser.go
Comment thread internal/ai/diagnoser.go
Comment thread web/src/components/diagnose/InvestigationView.tsx Fixed
Comment thread web/src/components/diagnose/investigationEvidence.ts
@nadaverell nadaverell changed the title Build an evidence-first AI investigation workspace Integrate evidence-first Findings into AI Diagnose Sep 3, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread web/src/components/diagnose/InvestigationView.tsx Outdated
Comment thread web/src/components/diagnose/InvestigationView.tsx
…ions

Keep explanations beside their originating assessment, preserve evidence qualifications, and distinguish expected previous-log absence from failed collection. Refine history, disclosure motion, and source navigation throughout the investigation workspace.
@nadaverell nadaverell changed the title Integrate evidence-first Findings into AI Diagnose Integrate evidence-first Findings into AI investigations Sep 6, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 4 total unresolved issues (including 3 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d088a75. Configure here.

Comment thread web/src/components/diagnose/InvestigationView.tsx
Comment thread web/src/components/diagnose/Home.test.tsx Dismissed
@nadaverell

Copy link
Copy Markdown
Contributor Author

Finalization review — ready for required human approval

Reviewed final head 8ac5555.

Three bounded cross-model passes covered backend trust/lifecycle, evidence producers/public contracts, and frontend/shared UI. Self-review traced cross-layer behavior and exercised the saved-run UI; a focused post-fix cross-review approved the final head. This was whole-PR coverage by responsibility, not a claim that both reviewers audited every line.

No remaining confirmed must-fix finding. All nine checks are green; all 13 review threads are resolved. GitHub reports MERGEABLE and REVIEW_REQUIRED. No merge or publication performed.

Fixed in this round

  • ca6fcb1: seven unused destructuring bindings caused CI lint failure; fixed without changing normalization semantics or lint configuration.
  • 8ac5555: registered read-only get_cluster_upgrade_readiness was missing from the investigation read allowlist, causing legitimate mixed citations to invalidate the assessment citation set. Added the entry and a regression test. A registration/allowlist sweep found no other current gap.

Validation

  • Full frontend suite: 898 tests / 84 files pass locally with a 60-second timeout and two workers. The default 5-second cold-import auth tests time out in this workspace; final remote Frontend CI passes its normal configuration. No test configuration was relaxed in the PR.
  • Final make build, TypeScript, 19 focused presentation tests, relevant backend and nested shared-module suites pass.
  • Final AI/investigation-reference race tests pass.
  • Four browser captures inspected at narrow/desktop/wide layouts plus a replay/live fixture: no horizontal overflow, consistent history control, eight relevant evidence cards with all 31 raw tool calls retained.
  • Isolated browser-only stream fixture: unrelated broad result creates neither card nor notification; relevant result creates a cue that focuses its matching evidence. No live AI generation, Apply, or cluster write was used for this check.
  • Saved responsive captures precede the two narrow final fixes; neither fix changes rendered layout.

Scope cut / next work

Prioritize mounted replay→live→Apply→verify tests, a bounded tool-free Explain simply execution path, tool-registration parity tests, and explicit related-issue visibility semantics. Incremental file decomposition and design-system cleanup can follow. Do not reintroduce cluster-wide evidence dumps, timestamp-only histories, or programmatic-focus cross-highlighting.

Separate package-release gates: migrate versioned hosted consumers to required API group; publish the matching k8s-ui export and compatible peer range before radar-app publication. These do not block the OSS merge and are not solved by a frontend package upgrade alone.

The ledger below has 2 fixed, 15 deferred, 5 skipped entries. Deferred entries include overlapping improvements, existing testing/maintenance limitations, and separate publication requirements—not fifteen newly introduced regressions.

Full finding-by-finding triage and rationale
ID Verdict Finding Verified rationale / action
CI-1 Fix Unused destructures fail CI lint ca6fcb1 replaces unused bindings with cloned-object deletion / omitted JSON field. No config changes; 19 comparison tests pass.
A1 Fix Registered upgrade-readiness tool absent from read allowlist 8ac5555 adds get_cluster_upgrade_readiness; mixed resource+upgrade citation test verifies one legitimate tool cannot invalidate the whole set.
A-FU-A Defer Read/write allowlist ↔ MCP registration parity test Concrete future drift hazard. Current 23 read / 7 write entries match; no need to export a new runtime registry API now. Add a cross-package contract test next.
A-FU-B Defer Bind Apply to durable assessment and recommended-step index Current same-origin local API explicitly accepts confirmed fix text, while full MCP writes are already available in this mode (ai_diagnose.go:454-469). Useful stronger server-verifiable contract, not a new exploitable authority boundary introduced here.
A-FU-C / C3 Defer Enforce tool-free explanation rather than only prompting Real latency/UX follow-up. explanation.go constrains prose; runs.go:891-895 prevents assessment promotion. Do NOT ignore genuine tool evidence in freshness checks as C3 suggests: that would hide a real change. Implement a bounded tool-free execution path separately.
A-FU-D Defer Recheck versioned consent on resumed Apply Start checks consent, subsequent turns do not. Retained completed sessions can survive restart (runs.go:243-311). Add a consent-version regression/gate when changing that disclosure contract; no disclosure-version change here.
A-FU-E / A-test-gap Defer Test-only wrappers and missing empty-fix handler regression Run.append/finalize test helpers are low priority; handler has explicit non-empty fix guard. Add focused handler coverage / prune wrappers in cleanup, not another production change.
B1 Defer Explicit visibility for diagnose.relatedIssues Top evidence-contract follow-up: RelatedIssues composes filtered cache facts without an explicit availability receipt (internal/issues/grouping.go:17-31); the UI can retire a prior issue on a successful verification. Broader cache/observation coverage was explicitly excluded from this PR. Preserve unknown when that contract is added; do not call this proven exhaustive collection today.
B2 Defer CRD events missing involvedObject.apiVersion tools_diagnose.go:1089 rejects an unknown group for CRDs. Normal recorder events populate apiVersion. Need an explicit unknown-identity policy, not a speculative fallback mixing same-Kind resources.
B3 Skip Postgres parity allegedly lacks an always-on check CI .github/workflows/ci.yml:82-90 supplies Postgres DSN and RADAR_REQUIRE_POSTGRES_TESTS=1; the integration step fails if the DSN is lost. Local DSN gating is intentional.
B4 Skip Event-count-only changes should create history User explicitly approved suppressing repetition/timestamp-only history. evidenceDisplaySnapshot affects display history only; latest counts and complete Activity remain. An escalation-rate view could be a future product, not restoring duplicate cards.
B5 Skip Add a count/affordance for dropped broad findings User explicitly rejected the cluster-wide catchall. partitionInvestigationEvidence keeps target/producer-related facts and leaves broad results in Activity. Restore neither a 36-item bucket nor its badge.
C1 Defer Required group breaks a known versioned hosted consumer on upgrade Verified radar-hub-web/src/diagnose/FleetDiagnoseHost.tsx:102 and pages/fleet/ProblemsPage.tsx:150 omit group. Real package-release/migration gate, explicitly recorded in PR body. Tag-triggered publication is separate (.github/workflows/publish-radar-app.yml:12-15); do not silently default ambiguous identity or modify another repo during this finalization.
C2 Defer Explain healthy/inconclusive assessments A legitimate potential journey extension, not a v1 regression. Local server rejects non-root-cause explanation requests (explanation.go:19-20), so the alleged local dead-end cannot occur. Hosted fabricated explanation turns require the separate integration contract.
C4 Skip Missing event sequence admits all old assessments Current producer emits positive durable ids (ai_diagnose.go SSE send; runs.go appendEventsLocked). No evidence of a versioned consumer omitting them; defensive older-shape accommodation is explicitly out of scope.
C5 Defer Document workspace-section tint vocabulary Tints use theme tokens/light-dark correctly (index.css:45-50) but DESIGN.md only documents the primary accent system. Preserve approved design; clarify semantic section backgrounds in a design-system follow-up.
C6 Skip Mirror cross-highlighting on focus/blur User explicitly asked for hover-only after programmatic source focus lit up many cards. Deliberate source links remain keyboard-accessible. A future focus-visible-only preview could be evaluated, but the suggested onFocusCapture reintroduces the bug.
C7 Defer Mounted orchestrator regression harness Highest frontend testing follow-up: InvestigationView.test.ts currently tests an alert, not the full SSE/ref wiring. Pure helpers, API tests, backend lifecycle tests and browser fixtures cover much, but add replay→live→apply→verify component tests next.
C8 Defer Dead changedFromPrevious, preview-limit naming, reduced-motion spinners Small maintenance items; max-h-64 bounds the ConfigMap body visually. No meaningful user-facing break. Stray whitespace is not an action item.
C-architecture / self Defer Split large adapter / view / body files at existing seams investigationEvidence.ts ~3.5k lines, View/Pane ~2.2k each, parts ~2.7k. Separate producer adapters and the stream/reveal controller incrementally without changing UI policy. Current pure policy modules/shared Collapse are good boundaries, so a pre-merge rewrite increases risk.
Self-QA Defer Local cold-import auth test timing Default 5s runs time out in unchanged client.authRedirect tests on this workspace; full 60s run passes 898 and remote Frontend CI passes default configuration. Keep runtime and test config unchanged; investigate local dependency/import performance separately.
Self-package Defer New shared export requires matching published peer floor Publish workflow explicitly requires k8s-ui-first and compatible peer range. defaultConditionTone is newly exported; local monorepo typecheck succeeds but an older published peer cannot supply it. Document alongside C1 as a package-release gate; do not claim npm/Cloud release readiness.

Recommendation: merge this scoped OSS version after required approval; continue the recorded noncritical work in follow-up PRs.

@nadaverell
nadaverell merged commit 409d813 into main Sep 7, 2026
9 checks passed
@nadaverell
nadaverell deleted the feat/agent-diagnosis-review branch September 7, 2026 19:29
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.

2 participants