feat(insights): ship durable agent investigations#566
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Unkey Deploy
|
Greptile SummaryThis PR replaces deterministic insight decisions with a bounded investigation agent. The main changes are:
Confidence Score: 4/5The production read-only investigation path can invoke live anomaly detection.
apps/insights/src/generation.ts
|
| Filename | Overview |
|---|---|
| apps/insights/src/agent.ts | Adds bounded candidate selection, evidence reads, and validated finding materialization. |
| apps/insights/src/generation.ts | Integrates the agent into generation, billing, persistence, and observation handling; the evidence-reader setup leaves live anomaly detection enabled. |
| packages/ai/src/ai/tools/insights-agent-tools.ts | Adds strict request schemas and signal-bound evidence reads. |
| packages/ai/src/ai/insights/ops-context.ts | Adds a live anomaly-detection switch that defaults to enabled. |
| packages/shared/src/insights.ts | Simplifies the needs-context decision shape. |
| packages/evals/src/insight-production-shadow.ts | Updates historical shadow evaluation to use the bounded agent and disables live anomaly detection there. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Detected regressions] --> B[Eligible candidate shortlist]
B --> C[Bounded investigation agent]
C --> D[Signal-scoped evidence reader]
D --> E[Validated decision]
E --> F[Persist insight and observation]
F --> G[Resolve prior insights and effects]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[Detected regressions] --> B[Eligible candidate shortlist]
B --> C[Bounded investigation agent]
C --> D[Signal-scoped evidence reader]
D --> E[Validated decision]
E --> F[Persist insight and observation]
F --> G[Resolve prior insights and effects]
Reviews (1): Last reviewed commit: "feat(insights): restore bounded investig..." | Re-trigger Greptile
What changed
The total branch diff is 257 files with 11,845 additions and 32,278 deletions.
Why
Databuddy should explain a concrete business or product problem, show the evidence, ask for missing context when it matters, and continue working toward a fix. It should not emit anonymous metric cards or narrate internal agent behavior.
Rollout
Validation
bun install --frozen-lockfile --ignore-scriptsbun run lintbun run check-typesbun run test(including 3,512 AI tests)bun run buildgit diff --checkAI-assisted with Codex; the branch has been locally verified.