Skip to content

feat: Add Isolate kit - #291

Open
Dhruv2mars wants to merge 81 commits into
Lamatic:mainfrom
Dhruv2mars:feat/isolate
Open

feat: Add Isolate kit#291
Dhruv2mars wants to merge 81 commits into
Lamatic:mainfrom
Dhruv2mars:feat/isolate

Conversation

@Dhruv2mars

@Dhruv2mars Dhruv2mars commented Jul 24, 2026

Copy link
Copy Markdown

Isolate

Turn vague GitHub issues into verified reproduction evidence.

Live demo · Evaluation issue · Kit documentation

Isolate showing a reproduced outcome with two passing candidate runs and a rejected negative control

Problem

Open-source maintainers regularly receive issues that describe a symptom but omit the exact environment and commands needed to reproduce it. An AI agent can propose a plausible explanation, but its confidence is not evidence.

Isolate turns a public GitHub issue into a repeatable, machine-verifiable reproduction report inside a disposable sandbox.

What this kit adds

  • A deployed Lamatic planner flow that interprets normalized issue and repository context
  • A production Next.js reviewer interface with Markdown and JSON report export
  • Disposable Daytona sandboxes with deterministic dependency setup and immutable ref support
  • An authenticated HTTP MCP runtime for saved Lamatic MCP/Tools connections
  • A strict command policy limited to repository-owned package scripts
  • Bounded, redacted stdout/stderr plus exit code and duration evidence
  • Aggregate deadlines, concurrency protection, network isolation, and verified cleanup
  • A controlled public CLI fixture for repeatable evaluation

Trust boundary

The model investigates. The runtime verifies.

Lamatic forms a hypothesis and proposes a candidate probe plus a nearby negative control. It cannot mark its own work reproduced. The runtime derives one exact assertion from the issue and certifies reproduced only when:

  1. candidate run 1 passes;
  2. candidate run 2 passes again; and
  3. the negative control rejects the same assertion.

If that gate does not pass, Isolate returns not_reproduced_under_tested_conditions or blocked.

Architecture

flowchart LR
    A[Public GitHub issue] --> B[Deterministic intake]
    B --> C[Disposable Daytona sandbox]
    C --> D[Lamatic probe planner]
    D --> E[Runtime command policy]
    E --> F[Candidate twice plus control]
    F --> G[Deterministic evidence gate]
    G --> H[Markdown and JSON report]
Loading

Reviewer path

  1. Open the live demo.
  2. Click Use evaluation fixture (or paste another supported public issue), then click Run isolation.
  3. Inspect the hypothesis and the three recorded runs.
  4. Confirm the two candidate assertions pass, the negative control rejects, and sandbox deletion is reported.
  5. Download either portable report format.

The fixture describes the symptom and observed output without supplying the reproduction command. Isolate must inspect the repository and discover the correct repository-owned CLI invocation.

Verification

  • Live Lamatic planner flow deployed
  • Live Vercel application returns HTTP 200
  • Authenticated MCP discovery and tool execution verified
  • Real Daytona sandbox creation, public clone, probe execution, and deletion verified
  • Evaluation issue reproduced repeatedly with two candidate passes and a rejecting control
  • 134 automated tests passing (290 assertions)
  • TypeScript check passing
  • Next.js production build passing
  • AgentKit structural validation passing
  • Lamatic Studio runtime validation passing (flow re-serialised as a canonical Studio export)
  • No credentials committed

Scope

The initial release supports public Node.js, TypeScript, Bun, and terminal/CLI issues. Terminal-output certification uses an exact issue-derived stdout/stderr signature. For unsaved-exit TUI issues, the runtime drives a real PTY, verifies unchanged file state twice, and rejects the claim after a save control. Other issue classes remain blocked without a runtime-owned evidence adapter. Isolate does not edit repository source files, generate fixes, mount repository credentials, push branches, open pull requests, or publish packages.

Challenge checklist

  • Unique contribution under kits/isolate
  • Exported and deployed Lamatic flow with externalized references
  • Runnable kit application and one-click Vercel configuration
  • Public live demo and reviewer fixture
  • agentkit-challenge label applied
  • Required AgentKit files and links present

Status

Ready for final review. Implementation, submission materials, live demo, and reviewer walkthrough are complete.

Files Added

Configuration and documentation:

  • kits/isolate/.env.example
  • kits/isolate/.gitignore
  • kits/isolate/README.md
  • kits/isolate/agent.md
  • kits/isolate/constitutions/default.md ("Isolate Constitution")
  • kits/isolate/lamatic.config.ts
  • kits/isolate/model-configs/isolate-reproduction-model.ts
  • kits/isolate/prompts/isolate-reproduction-system.md
  • kits/isolate/prompts/isolate-reproduction-user.md

Lamatic flow:

  • kits/isolate/flows/isolate-reproduction.ts (Lamatic flow definition)

Next.js application core:

  • kits/isolate/apps/.env.example
  • kits/isolate/apps/.gitignore
  • kits/isolate/apps/DESIGN.md
  • kits/isolate/apps/PRODUCT.md
  • kits/isolate/apps/styles.d.ts
  • kits/isolate/apps/next-env.d.ts
  • kits/isolate/apps/next.config.ts
  • kits/isolate/apps/package.json
  • kits/isolate/apps/tsconfig.json
  • kits/isolate/apps/app/globals.css
  • kits/isolate/apps/app/layout.tsx
  • kits/isolate/apps/app/page.tsx

API routes:

  • kits/isolate/apps/app/api/investigate/route.ts
  • kits/isolate/apps/app/api/mcp/route.ts

Frontend components:

  • kits/isolate/apps/components/investigation-workbench.tsx

Runtime and service libraries:

  • kits/isolate/apps/lib/concurrency.ts
  • kits/isolate/apps/lib/deadline.ts
  • kits/isolate/apps/lib/http-errors.ts
  • kits/isolate/apps/lib/investigate.ts
  • kits/isolate/apps/lib/investigation-request.ts
  • kits/isolate/apps/lib/lamatic-planner.ts
  • kits/isolate/apps/lib/runtime/certification.ts
  • kits/isolate/apps/lib/runtime/claim.ts
  • kits/isolate/apps/lib/runtime/daytona.ts
  • kits/isolate/apps/lib/runtime/evidence.ts
  • kits/isolate/apps/lib/runtime/github.ts
  • kits/isolate/apps/lib/runtime/investigation-report.ts
  • kits/isolate/apps/lib/runtime/mcp.ts
  • kits/isolate/apps/lib/runtime/plan.ts
  • kits/isolate/apps/lib/runtime/policy.ts
  • kits/isolate/apps/lib/runtime/probe.ts

Test suite:

  • kits/isolate/apps/tests/certification.test.ts
  • kits/isolate/apps/tests/claim.test.ts
  • kits/isolate/apps/tests/concurrency.test.ts
  • kits/isolate/apps/tests/daytona.test.ts
  • kits/isolate/apps/tests/deadline.test.ts
  • kits/isolate/apps/tests/evidence.test.ts
  • kits/isolate/apps/tests/github.test.ts
  • kits/isolate/apps/tests/http-errors.test.ts
  • kits/isolate/apps/tests/investigate.test.ts
  • kits/isolate/apps/tests/investigation-report.test.ts
  • kits/isolate/apps/tests/investigation-request.test.ts
  • kits/isolate/apps/tests/lamatic-planner.test.ts
  • kits/isolate/apps/tests/mcp.test.ts
  • kits/isolate/apps/tests/plan.test.ts
  • kits/isolate/apps/tests/probe.test.ts

Assets:

  • kits/isolate/assets/isolate-evidence.jpg

Lamatic Flow (kits/isolate/flows/isolate-reproduction.ts)

Node types introduced:

  • triggerNode_1 (type: triggerNode, "API Request"): Receives advance_schema containing issue, repositoryContext, ref, and policyFeedback fields from incoming API request.
  • LLMNode_887 (type: dynamicNode, "Generate Text"): Executes system and user prompts (@prompts/isolate-reproduction-system.md, @prompts/isolate-reproduction-user.md) using generative model configuration from @model-configs/isolate-reproduction-model.ts (Gemini 3.1 Flash Lite).
  • responseNode_triggerNode_1 (type: responseNode, "API Response"): Maps LLM output to JSON response by embedding LLMNode_887.output.generatedResponse into a plan field with application/json content type.

Data flow:

  • triggerNode_1 forwards API request to LLMNode_887 via default edge.
  • LLMNode_887 processes issue context and produces reproduction plan via LLM inference.
  • responseNode_triggerNode_1 receives LLM output and returns structured plan response via default edge.
  • Response edge directly connects triggerNode_1 to responseNode_triggerNode_1 for response routing.

High-level behavior:
The flow receives a GitHub issue, repository snapshot, optional commit reference, and policy feedback. The LLM node interprets the issue as untrusted input and produces a structured reproduction plan that specifies either terminal-based candidate/control commands or TUI-based unsaved-exit probe instructions. The runtime then executes this plan in an isolated Daytona sandbox, certifies candidate and control probe evidence against the issue's observed assertion, and reports pass/fail outcome based on the evidence gate criteria (two candidate passes and negative control rejection).

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Changes

Isolate adds a complete issue-reproduction kit. It includes Lamatic planning, Daytona sandbox execution, evidence certification, MCP and HTTP APIs, a Next.js workbench, documentation, configuration, and tests.

Isolate reproduction workflow

Layer / File(s) Summary
Contracts and planning flow
kits/isolate/README.md, kits/isolate/agent.md, kits/isolate/flows/*, kits/isolate/prompts/*, kits/isolate/constitutions/*, kits/isolate/lamatic.config.ts
Defines the planner workflow, operating rules, evidence contract, deployment configuration, and safety constraints.
Runtime contracts and certification
kits/isolate/apps/lib/runtime/*, kits/isolate/apps/lib/deadline.ts, kits/isolate/apps/lib/investigation-request.ts
Adds schemas and validators for plans, claims, probes, commands, deadlines, reports, and certification results.
Investigation orchestration and providers
kits/isolate/apps/lib/investigate.ts, kits/isolate/apps/lib/lamatic-planner.ts, kits/isolate/apps/lib/runtime/daytona.ts, kits/isolate/apps/lib/runtime/mcp.ts
Connects GitHub issue intake, Lamatic planning, Daytona sandbox execution, probe certification, cleanup, concurrency limits, and authenticated MCP tools.
Web application and project setup
kits/isolate/apps/app/*, kits/isolate/apps/components/*, kits/isolate/apps/package.json, kits/isolate/apps/tsconfig.json, kits/isolate/apps/globals.css
Adds the Next.js application shell, responsive workbench UI, investigation and MCP routes, project configuration, and export controls.
Runtime integration validation
kits/isolate/apps/tests/*
Tests evidence extraction, command policy, deadlines, GitHub intake, Lamatic requests, Daytona lifecycle behavior, investigation orchestration, MCP behavior, error mapping, and concurrency handling.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 1.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the primary change: adding the Isolate kit.
Description check ✅ Passed The description is comprehensive, on-topic, and documents the kit purpose, architecture, verification, scope, and safety constraints.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Kit: kits/isolate

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ✅ Pass

🎉 All checks passed! This contribution follows the AgentKit structure.

@github-actions

Copy link
Copy Markdown
Contributor

Failure recorded at 2026-07-24T10:48:07Z UTC. If this PR is not fixed within 4 weeks it will be automatically closed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
kits/isolate/apps/lib/runtime/daytona.ts (1)

344-436: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Biome's noUnsafeFinally is still tripping on lines 433 and 711 — the restructure didn't actually clear it.

Both blocks now correctly preserve the primary error/log the cleanup failure per the earlier review's intent, but Biome flags any throw inside a finally, conditional or not (confirmed: its rule engine doesn't reason about the surrounding if). The static analysis hints for this diff still show [error] 433-433 and [error] 711-711 for "Unsafe usage of 'throw'", so this will keep failing lint even though the runtime semantics are sound now.

Move the "throw only if the body succeeded" decision outside the finally block entirely to satisfy both the linter and the original request.

🧹 Move the conditional throw out of `finally`
-    } catch (error) {
-      probeError = error;
-      throw error;
-    } finally {
+    } catch (error) {
+      probeError = error;
+    } finally {
       let cleanupError: unknown;
       let cleaned = false;
       for (let attempt = 0; attempt < 2; attempt += 1) {
         ...
       }
-      if (!cleaned) {
-        if (probeError) {
-          console.error("Isolate probe cleanup failed after probe failure", cleanupError);
-        } else {
-          throw cleanupError;
-        }
-      }
+      if (!cleaned && probeError) {
+        console.error("Isolate probe cleanup failed after probe failure", cleanupError);
+      }
+      this.pendingProbeCleanupError = !cleaned && !probeError ? cleanupError : undefined;
     }
+    if (probeError) throw probeError;
+    if (this.pendingProbeCleanupError) throw this.pendingProbeCleanupError;

Apply the analogous restructuring to resetWorkspace's try/catch/finally around line 675-715.

Also applies to: 675-715

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@kits/isolate/apps/lib/runtime/daytona.ts` around lines 344 - 436, Restructure
the probe cleanup flow so the finally block performs cleanup and records
cleanupError but contains no throw; after the try/finally completes,
conditionally throw cleanupError only when no probeError occurred, while
preserving primary probe errors and cleanup logging. Apply the same pattern to
resetWorkspace’s try/catch/finally cleanup flow, ensuring both paths satisfy
noUnsafeFinally without changing error precedence.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/isolate/apps/lib/investigate.ts`:
- Around line 63-82: Update assertRequiredLocalServiceStarted to detect
arbitrary repository service-script names instead of only the literal service,
server, and api keys, so local-service commands require the corresponding
package-manager run command. Preserve the existing local-URL and rejection
behavior, and escape the captured serviceScript before interpolating it into new
RegExp because repositoryContext is untrusted.

In `@kits/isolate/apps/lib/runtime/github.ts`:
- Around line 57-60: Update the request timeout handling around AbortSignal.any
to avoid relying on the affected runtime behavior: retain a strong reference to
the composed timeout signal for the request lifetime, or use a runtime-supported
equivalent that cannot be garbage-collected before firing. Preserve
options.signal composition and the 10-second timeout, and verify the deployed
Node.js runtime includes the required GC fix.

In `@kits/isolate/apps/package.json`:
- Around line 15-17: Update the dependency declarations in package.json to use
compatible Next.js 14–15 and React 18 releases, including matching react-dom and
both `@types/react` packages. Then regenerate the lockfile so it reflects the
selected versions and resolved dependency graph.

In `@kits/isolate/prompts/isolate-reproduction-system.md`:
- Line 8: Update the TUI unsaved-exit evidence contract to replace the
unsupported “bun --cwd” wording with the allowed structured workspace form “bun
run --cwd <relative-package-directory> <script>”. Preserve the existing
requirements for working-directory-relative artifact paths and all runtime-owned
fixture, input, assertion, repeat, and cleanup behavior.

---

Outside diff comments:
In `@kits/isolate/apps/lib/runtime/daytona.ts`:
- Around line 344-436: Restructure the probe cleanup flow so the finally block
performs cleanup and records cleanupError but contains no throw; after the
try/finally completes, conditionally throw cleanupError only when no probeError
occurred, while preserving primary probe errors and cleanup logging. Apply the
same pattern to resetWorkspace’s try/catch/finally cleanup flow, ensuring both
paths satisfy noUnsafeFinally without changing error precedence.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 39f9c593-c9b1-4fa4-9812-1fbd0bec986d

📥 Commits

Reviewing files that changed from the base of the PR and between f36ec09 and 449590a.

📒 Files selected for processing (24)
  • kits/isolate/README.md
  • kits/isolate/agent.md
  • kits/isolate/apps/lib/investigate.ts
  • kits/isolate/apps/lib/investigation-request.ts
  • kits/isolate/apps/lib/lamatic-planner.ts
  • kits/isolate/apps/lib/runtime/claim.ts
  • kits/isolate/apps/lib/runtime/daytona.ts
  • kits/isolate/apps/lib/runtime/evidence.ts
  • kits/isolate/apps/lib/runtime/github.ts
  • kits/isolate/apps/lib/runtime/mcp.ts
  • kits/isolate/apps/lib/runtime/policy.ts
  • kits/isolate/apps/package.json
  • kits/isolate/apps/tests/claim.test.ts
  • kits/isolate/apps/tests/concurrency.test.ts
  • kits/isolate/apps/tests/daytona.test.ts
  • kits/isolate/apps/tests/evidence.test.ts
  • kits/isolate/apps/tests/investigate.test.ts
  • kits/isolate/apps/tests/investigation-report.test.ts
  • kits/isolate/apps/tests/investigation-request.test.ts
  • kits/isolate/apps/tests/lamatic-planner.test.ts
  • kits/isolate/apps/tests/mcp.test.ts
  • kits/isolate/apps/tsconfig.json
  • kits/isolate/lamatic.config.ts
  • kits/isolate/prompts/isolate-reproduction-system.md

Comment thread kits/isolate/apps/lib/investigate.ts Outdated
Comment thread kits/isolate/apps/lib/runtime/github.ts Outdated
Comment thread kits/isolate/apps/package.json Outdated
Comment thread kits/isolate/prompts/isolate-reproduction-system.md Outdated
@Dhruv2mars

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
kits/isolate/apps/lib/investigate.ts (1)

161-164: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Mission update: the "bun --cwd" briefing never got the memo.

This runtime-injected evidenceGuidance string still tells the planner "when command uses bun --cwd, adjust the path" — the exact wording already corrected to bun run --cwd in kits/isolate/prompts/isolate-reproduction-system.md. Left as-is, a TUI-mode plan following this instruction literally can emit the unsupported bun --cwd runner form, which the command policy rejects, costing a plan-repair retry for the whole tui_unsaved_exit evidence path.

🕵️ Sync the wording with the fixed prompt file
-Resolve every build-artifact path from the effective working directory of command; when command uses bun --cwd, adjust the path for that directory.
+Resolve every build-artifact path from the effective working directory of command; when command uses bun run --cwd, adjust the path for that directory.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@kits/isolate/apps/lib/investigate.ts` around lines 161 - 164, Update the
`evidenceGuidance` text for `assertion?.kind === "tui_unsaved_exit"` to refer to
the supported `bun run --cwd` form instead of `bun --cwd`, while preserving the
existing path-adjustment instruction and all other guidance.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@kits/isolate/apps/lib/investigate.ts`:
- Around line 161-164: Update the `evidenceGuidance` text for `assertion?.kind
=== "tui_unsaved_exit"` to refer to the supported `bun run --cwd` form instead
of `bun --cwd`, while preserving the existing path-adjustment instruction and
all other guidance.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 783ba816-1b42-45f9-8a7e-4ace6c7baa69

📥 Commits

Reviewing files that changed from the base of the PR and between 449590a and 0d67c1d.

⛔ Files ignored due to path filters (1)
  • kits/isolate/apps/bun.lock is excluded by !**/*.lock
📒 Files selected for processing (13)
  • kits/isolate/apps/lib/investigate.ts
  • kits/isolate/apps/lib/runtime/daytona.ts
  • kits/isolate/apps/lib/runtime/github.ts
  • kits/isolate/apps/lib/runtime/investigation-report.ts
  • kits/isolate/apps/next-env.d.ts
  • kits/isolate/apps/package.json
  • kits/isolate/apps/styles.d.ts
  • kits/isolate/apps/tests/investigate.test.ts
  • kits/isolate/apps/tests/investigation-report.test.ts
  • kits/isolate/apps/tests/lamatic-planner.test.ts
  • kits/isolate/apps/tests/plan.test.ts
  • kits/isolate/apps/tsconfig.json
  • kits/isolate/prompts/isolate-reproduction-system.md

@Dhruv2mars

Dhruv2mars commented Jul 30, 2026

Copy link
Copy Markdown
Author

@akshatvirmani Done: the PR is ready for final review. All CodeRabbit findings are addressed and resolved, CodeRabbit approved the exact current head, repository validation and the full local test/typecheck/build gate pass, and the production demo is deployed and Ready.

@github-actions

Copy link
Copy Markdown
Contributor

Hi @Dhruv2mars! 👋

Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review.

Steps to follow:

  1. Read through all CodeRabbit comments carefully
  2. Address each issue raised (or reply explaining why you disagree)
  3. Push your fixes as new commits
  4. Once all issues are resolved, comment here so we can re-review

This helps keep the review process efficient for everyone. Thank you! 🙏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
kits/isolate/apps/lib/investigate.ts (1)

280-289: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep the Agent hypothesis field consistent with the remaining investigation paths.

This exploratory evidence review assigns report.summary to hypothesis, while certified and TUI paths return the planner hypothesis and the UI labels result.hypothesis as the preliminary Lamatic hypothesis. Use the planner hypothesis if this field must continue representing the agent’s planner hypothesis; otherwise adjust the field name/contract and update the UI to prevent calling the post-runtime summary an agent hypothesis.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@kits/isolate/apps/lib/investigate.ts` around lines 280 - 289, Update the
exploratory evidence-review return object in the investigate flow to use the
planner’s hypothesis for the `hypothesis` field, matching the certified and TUI
paths, instead of `report.summary`. Preserve the existing report summary in its
appropriate report field, and keep the `result.hypothesis` UI label consistent
with the value’s planner-hypothesis contract.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@kits/isolate/apps/lib/investigate.ts`:
- Around line 280-289: Update the exploratory evidence-review return object in
the investigate flow to use the planner’s hypothesis for the `hypothesis` field,
matching the certified and TUI paths, instead of `report.summary`. Preserve the
existing report summary in its appropriate report field, and keep the
`result.hypothesis` UI label consistent with the value’s planner-hypothesis
contract.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3aa13f47-e669-4460-ba34-8fcf3a224640

📥 Commits

Reviewing files that changed from the base of the PR and between 0d67c1d and f0967d7.

📒 Files selected for processing (2)
  • kits/isolate/apps/lib/investigate.ts
  • kits/isolate/apps/tests/investigate.test.ts

@akshatvirmani

Copy link
Copy Markdown
Contributor

/validate

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

📡 Running Studio validation — results will appear here shortly.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Studio Runtime Validation (Phase 2)

Studio validation passed. The kit loaded successfully in Lamatic Studio.

This PR is ready for final review and merge.

Dhruv2mars and others added 2 commits August 6, 2026 21:05
The exploratory path returns the post-runtime evidence-review summary in
the hypothesis field while the certified and TUI paths return the planner
hypothesis, but the UI labelled every case "Agent hypothesis". Add an
explicit hypothesisSource field and label the section from it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Studio runtime validation rejected the flow with "config_json.nodes must
be a non-empty array". Every Studio-exported flow in this repository
serialises meta/inputs/references/nodes/edges as JSON with quoted keys;
this flow used unquoted JavaScript object keys. Re-serialise the flow and
model config in the canonical format and rename the externalised prompt
and model-config files to the documented <flow>_<node>_<role> convention.

The node graph, edges, meta, and inputs are byte-for-byte equivalent after
parsing; only serialisation and reference file names changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/isolate/apps/components/investigation-workbench.tsx`:
- Line 24: Update the exploratory determination in the investigation component
to treat hypothesisSource === "evidence_review" as exploratory before applying
the existing verdictOwner === "lamatic" fallback for older responses. Ensure the
verdictOwner type also permits "runtime" when it models the API response, and
preserve the corresponding header and findings behavior.

In `@kits/isolate/flows/isolate-reproduction.ts`:
- Line 115: Update the output mapping for the LLM node so REPORT_MODE preserves
the expected top-level report envelope instead of wrapping the generated
response under plan. Keep the existing plan contract for non-report output, and
ensure parseInvestigationReport() receives the report payload at the expected
top level.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 65bc0c4b-ab70-4d6f-a743-9aa88e82ba5f

📥 Commits

Reviewing files that changed from the base of the PR and between f0967d7 and 0989252.

📒 Files selected for processing (7)
  • kits/isolate/apps/components/investigation-workbench.tsx
  • kits/isolate/apps/lib/investigate.ts
  • kits/isolate/apps/tests/investigate.test.ts
  • kits/isolate/flows/isolate-reproduction.ts
  • kits/isolate/model-configs/isolate-reproduction_llmnode-887_generative-model-name.ts
  • kits/isolate/prompts/isolate-reproduction_llmnode-887_system.md
  • kits/isolate/prompts/isolate-reproduction_llmnode-887_user.md

Comment thread kits/isolate/apps/components/investigation-workbench.tsx
Comment thread kits/isolate/flows/isolate-reproduction.ts
Dhruv2mars and others added 2 commits August 6, 2026 21:13
CodeRabbit's pre-merge docstring coverage check reported 1.56% against an
80% threshold. Add JSDoc to every exported function, class, and route
handler across lib/, app/api/, and components/, plus the internal helpers
that carry the safety-relevant reasoning: the command policy tokenizer,
the deadline budget, output redaction, and the certification gate.

Documentation only; no behaviour change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The report now carries hypothesisSource so a reader can tell a pre-probe
planner hypothesis from a post-probe evidence-review summary. Record that
in the README alongside the outcome table.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Dhruv2mars

Copy link
Copy Markdown
Author

/validate

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

📡 Running Studio validation — results will appear here shortly.

The evidence-review path returns verdictOwner "runtime", so the component's
exploratory branch was unreachable: an evidence review was headed
"Runtime-certified" and its runs were scored pass/reject against a gate that
never ran. Derive exploratory from hypothesisSource, keeping the verdictOwner
check for responses that predate that field.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Dhruv2mars

Copy link
Copy Markdown
Author

@akshatvirmani All CodeRabbit findings are addressed and every review thread is resolved. Studio validation passes. This is ready for review — please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants