Skip to content

feat: Add outage-detector kit#263

Open
amanbud4530 wants to merge 25 commits into
Lamatic:mainfrom
amanbud4530:add-outage-detector
Open

feat: Add outage-detector kit#263
amanbud4530 wants to merge 25 commits into
Lamatic:mainfrom
amanbud4530:add-outage-detector

Conversation

@amanbud4530

@amanbud4530 amanbud4530 commented Jul 17, 2026

Copy link
Copy Markdown

PR Checklist

1. Select Contribution Type

  • Kit (kits/outage-detector/)

2. General Requirements

  • PR is for one project only (no unrelated changes)
  • No secrets, API keys, or real credentials are committed — .env.example only, .env.local gitignored
  • Folder name uses kebab-case and matches the flow ID (outage-detector)
  • All changes are documented in README.md (purpose, setup, usage, required credentials)

3. File Structure

  • lamatic.config.ts present with valid metadata (name, description, tags, steps, author, envKey)
  • flows/outage-detector.ts present — self-contained flow file (meta + inputs + references + nodes + edges)
  • agent.md and constitutions/default.md present
  • apps/.env.example present with placeholder values only
  • No hand-edited flow node graphs — nodes/edges mirror the real Lamatic Studio export; only prompts and generativeModelName were replaced with @references, as the format requires

4. Validation

  • npm install && npm run dev works locally (confirmed working)
  • PR title is clear: feat: Add outage-detector kit
  • GitHub Actions workflows pass
  • CodeRabbit / reviewer comments addressed — pending review
  • No unrelated files or projects modified
  • Added the outage-detector kit configuration, metadata, tags, deployment links, environment templates, and generated-file ignores.
  • Added documentation covering setup, flow behavior, agent capabilities, operating rules, credentials, thresholds, and known caveats.
  • Added a self-contained outage-detection flow that:
    • Accepts incoming support tickets through a trigger.
    • Searches the shared support-tickets vector store for up to eight candidates.
    • Vectorizes and upserts each incoming ticket.
    • Uses Instructor LLM verification to identify genuine shared root causes while rejecting customer-side causes.
    • Uses a Condition node to route results when confidence reaches 0.75.
    • Uses a second Instructor LLM node to draft internal and customer-facing messages for confirmed outages.
    • Uses an add/passthrough node for unflagged results and returns a structured response.
    • Exports both the modern flat flow definition and a config_json compatibility representation.
  • Added model configurations and system/user prompts for correlation verification and message drafting.
  • Added the Next.js demo app with:
    • Synthetic ticket queue data.
    • Server-side Lamatic flow orchestration.
    • Environment-based workflow selection.
    • Ticket submission history and active-ticket highlighting.
    • Structured flow-result display.
  • Added Tailwind CSS v4 styling, CSS custom properties, PostCSS configuration, shared class utilities, and a shadcn/Radix-based reusable Button component.
  • Added Next.js, TypeScript, React, Lamatic, Tailwind, form, validation, and UI dependencies.

@coderabbitai

coderabbitai Bot commented Jul 17, 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

Adds a complete Outage Detector kit: a Lamatic flow for ticket retrieval, correlation verification, confidence routing, and message drafting; a configured Next.js demo with synthetic tickets; environment and deployment configuration; agent prompts and rules; and supporting documentation.

Outage Detector flow

Layer / File(s) Summary
Workflow definition
kits/outage-detector/flows/outage-detector.ts, kits/outage-detector/lamatic.config.ts
Defines retrieval, indexing, verification, conditional routing, drafting, response mapping, and kit metadata.
Correlation and drafting contracts
kits/outage-detector/model-configs/*, kits/outage-detector/prompts/*, kits/outage-detector/constitutions/default.md
Defines model configurations, prompt inputs and outputs, candidate matching rules, ticket-ID provenance, and message requirements.

Demo application

Layer / File(s) Summary
Demo runtime and flow execution
kits/outage-detector/apps/lib/*, kits/outage-detector/apps/actions/*, kits/outage-detector/apps/package.json, kits/outage-detector/apps/*.json, kits/outage-detector/apps/*.mjs, kits/outage-detector/apps/.env.example, kits/outage-detector/.env.example, kits/outage-detector/.gitignore, kits/outage-detector/apps/public/data/*
Configures the Next.js app, Lamatic client, typed flow execution, environment validation, fallback responses, and synthetic ticket data.
Interactive demo interface
kits/outage-detector/apps/app/*, kits/outage-detector/apps/components/ui/*
Adds the ticket queue, submission workflow, result log, status rendering, styling, and reusable button utilities.

Kit documentation

Layer / File(s) Summary
Kit documentation
kits/outage-detector/README.md, kits/outage-detector/agent.md
Documents the flow behavior, agent contract, local setup, credentials, outputs, and known thresholds or branch behavior.

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 25.00% 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 states the main change: adding the outage-detector kit.
Description check ✅ Passed The PR description follows the template and covers the required checklist items, files, and validation notes.
✨ 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 17, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Kit: kits/outage-detector

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.

@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: 11

🤖 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/outage-detector/agent.md`:
- Around line 25-26: Update the incoming-ticket indexing description to state
that every ticket is indexed into the shared `support-tickets` vector store
configured by the outage-detector flow, removing the implication that each
ticket uses its own isolated store.

In `@kits/outage-detector/apps/actions/orchestrate.ts`:
- Around line 3-5: Move configuration extraction into processTicket in
kits/outage-detector/apps/actions/orchestrate.ts: import ../../lamatic.config,
resolve the step definition and workflowEnvKey, derive workflowId, and pass it
to submitTicket. In kits/outage-detector/apps/lib/lamatic-client.ts, remove
config parsing and environment extraction, and update submitTicket to accept the
resolved workflowId parameter.

In `@kits/outage-detector/apps/app/globals.css`:
- Around line 5-116: Extract the repeated static color values in the global
selectors, buttons, panels, badges, and detail text into descriptive CSS custom
properties declared under :root, then replace each hardcoded color with the
corresponding variable while preserving the current appearance and layout.

In `@kits/outage-detector/apps/app/page.tsx`:
- Around line 38-110: Refactor the Outage Detector page’s JSX to use Tailwind
CSS v4+ utility classes instead of static classes such as container, grid,
panel, and ticket-row, and replace the raw button in the stepForward flow with
the shadcn/ui Button component. Preserve the existing ticket queue, submission
state, log rendering, and conditional output behavior while applying shadcn
components where appropriate.

In `@kits/outage-detector/apps/data/synthetic_tickets.json`:
- Around line 1-19: Remove the duplicate synthetic_tickets.json payload from the
kits/outage-detector location, update any README or mission instructions that
reference it to use the canonical public/data asset, and ensure the Next.js
frontend relies exclusively on that public drop-zone file.

In `@kits/outage-detector/apps/package.json`:
- Around line 10-15: Add the mandated Next.js app dependencies to the
dependencies manifest: Tailwind CSS v4 or newer, shadcn/ui component support,
react-hook-form, zod, and lucide-react, while preserving the existing Next.js
and React versions.

In `@kits/outage-detector/constitutions/default.md`:
- Around line 3-21: Update the constitutions’ outage-analysis rules to
explicitly treat raw customer tickets and historical records as untrusted data,
requiring agents to ignore any instructions or directives embedded within them.
Preserve the existing classification and messaging requirements while ensuring
ticket content can only provide factual evidence, not alter agent behavior.

In `@kits/outage-detector/flows/outage-detector.ts`:
- Around line 338-343: Update the condition represented by value
"conditionNode_526-addNode_838" to require the verdict field same_root_cause to
equal true in addition to confidence being at least 0.75. Also require
matched_ticket_ids to be non-empty if that field is available, while preserving
the existing flagged-branch routing for valid matches.

In `@kits/outage-detector/lamatic.config.ts`:
- Line 14: Update the deploy URL in the Lamatic configuration to clone from the
canonical Lamatic/AgentKit repository instead of amanbud4530/AgentKit, while
preserving the existing root directory and environment parameters.

In `@kits/outage-detector/prompts/outage-detector_InstructorLLMNode_837_user.md`:
- Around line 1-4: Update the prompt using InstructorLLMNode_311.output to
include the candidate ticket records alongside matched_ticket_ids, and instruct
the drafting agent to derive impacted accounts only from records whose IDs are
listed in matched_ticket_ids. Preserve the existing suspected component,
reasoning, and new-ticket inputs.

In `@kits/outage-detector/README.md`:
- Around line 24-33: Add a language identifier, such as text, to the opening
fenced code block containing the API Trigger flow diagram in the README, leaving
the diagram content unchanged.
🪄 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

Run ID: a52182a6-b2b3-4abd-9dbb-8f4692698769

📥 Commits

Reviewing files that changed from the base of the PR and between 0ada432 and 9ddcc39.

⛔ Files ignored due to path filters (1)
  • kits/outage-detector/apps/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (24)
  • kits/outage-detector/.gitignore
  • kits/outage-detector/README.md
  • kits/outage-detector/agent.md
  • kits/outage-detector/apps/.env.example
  • kits/outage-detector/apps/actions/orchestrate.ts
  • kits/outage-detector/apps/app/globals.css
  • kits/outage-detector/apps/app/layout.tsx
  • kits/outage-detector/apps/app/page.tsx
  • kits/outage-detector/apps/data/synthetic_tickets.json
  • kits/outage-detector/apps/lib/lamatic-client.ts
  • kits/outage-detector/apps/next-env.d.ts
  • kits/outage-detector/apps/next.config.mjs
  • kits/outage-detector/apps/package.json
  • kits/outage-detector/apps/public/data/synthetic_tickets.json
  • kits/outage-detector/apps/tsconfig.json
  • kits/outage-detector/constitutions/default.md
  • kits/outage-detector/flows/outage-detector.ts
  • kits/outage-detector/lamatic.config.ts
  • kits/outage-detector/model-configs/outage-detector_InstructorLLMNode_311.ts
  • kits/outage-detector/model-configs/outage-detector_InstructorLLMNode_837.ts
  • kits/outage-detector/prompts/outage-detector_InstructorLLMNode_311_system.md
  • kits/outage-detector/prompts/outage-detector_InstructorLLMNode_311_user.md
  • kits/outage-detector/prompts/outage-detector_InstructorLLMNode_837_system.md
  • kits/outage-detector/prompts/outage-detector_InstructorLLMNode_837_user.md

Comment thread kits/outage-detector/agent.md Outdated
Comment thread kits/outage-detector/apps/actions/orchestrate.ts
Comment thread kits/outage-detector/apps/app/globals.css
Comment thread kits/outage-detector/apps/app/page.tsx Outdated
Comment thread kits/outage-detector/apps/data/synthetic_tickets.json Outdated
Comment thread kits/outage-detector/constitutions/default.md
Comment thread kits/outage-detector/flows/outage-detector.ts
Comment thread kits/outage-detector/lamatic.config.ts Outdated
Comment thread kits/outage-detector/README.md Outdated
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@coderabbitai
coderabbitai Bot requested review from amanintech and d-pamneja July 17, 2026 11:47

@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/outage-detector/apps/actions/orchestrate.ts (1)

6-27: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Interpolate the workflow environment key dynamically.

Agent, our intel reveals a slight vulnerability in your fallback protocols. By hardcoding "OUTAGE_DETECTOR" in your error reasoning string, you risk sending field operatives on a wild goose chase if headquarters ever reassigns the environment key in the configuration.

Your mission, should you choose to accept it, is to hoist the workflowEnvKey extraction out of the try block and dynamically interpolate it into the fallback reasoning string. This ensures our operatives are always inspecting the correct assets.

This message will self-destruct in five seconds.

🕶️ Proposed mission directives (fix)
-export async function processTicket(ticket: TicketPayload): Promise<FlowResult> {
-  try {
-    const step = lamaticConfig.steps.find((s) => s.id === "outage-detector");
-    const workflowEnvKey = step?.envKey ?? "OUTAGE_DETECTOR";
-    const workflowId = process.env[workflowEnvKey];
+export async function processTicket(ticket: TicketPayload): Promise<FlowResult> {
+  const step = lamaticConfig.steps.find((s) => s.id === "outage-detector");
+  const workflowEnvKey = step?.envKey ?? "OUTAGE_DETECTOR";
+
+  try {
+    const workflowId = process.env[workflowEnvKey];
 
     if (!workflowId) {
       throw new Error(
         `Workflow ID environment variable "${workflowEnvKey}" is not set. Please add it to your .env.local file.`
       );
     }
 
     return await submitTicket(ticket, workflowId);
   } catch (err) {
     console.error("Flow execution failed:", err);
     return {
       status: "Else",
       confidence: 0,
       matched_ticket_ids: [],
       suspected_component: "unknown",
       reasoning:
-        "Flow call failed — check OUTAGE_DETECTOR, LAMATIC_API_KEY, LAMATIC_PROJECT_ID, and LAMATIC_API_URL in .env.local",
+        `Flow call failed — check ${workflowEnvKey}, LAMATIC_API_KEY, LAMATIC_PROJECT_ID, and LAMATIC_API_URL in .env.local`,
🤖 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/outage-detector/apps/actions/orchestrate.ts` around lines 6 - 27, Move
the workflowEnvKey extraction before the try block in processTicket so it
remains available to the catch fallback, then interpolate workflowEnvKey in the
returned reasoning instead of hardcoding "OUTAGE_DETECTOR". Preserve the
existing configuration lookup and error-handling behavior.
🤖 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/outage-detector/apps/actions/orchestrate.ts`:
- Around line 6-27: Move the workflowEnvKey extraction before the try block in
processTicket so it remains available to the catch fallback, then interpolate
workflowEnvKey in the returned reasoning instead of hardcoding
"OUTAGE_DETECTOR". Preserve the existing configuration lookup and error-handling
behavior.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2e2a586b-3c4a-43b3-952f-b3309aaa2c28

📥 Commits

Reviewing files that changed from the base of the PR and between 9eae653 and d115aa8.

📒 Files selected for processing (2)
  • kits/outage-detector/apps/actions/orchestrate.ts
  • kits/outage-detector/apps/lib/lamatic-client.ts

@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: 1

🤖 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/outage-detector/apps/app/page.tsx`:
- Around line 53-64: Update the ticket highlighting condition in the tickets
slice map so it identifies the active ticket based on the current index and
slice start, including the index = 0 case. Replace the hardcoded i === 1 logic
in the tickets.map rendering while preserving the existing slice range and
styling.
🪄 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

Run ID: 7fd26594-65cd-4ba9-a758-8f217bef4707

📥 Commits

Reviewing files that changed from the base of the PR and between d115aa8 and 85451f5.

⛔ Files ignored due to path filters (1)
  • kits/outage-detector/apps/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • kits/outage-detector/README.md
  • kits/outage-detector/apps/app/globals.css
  • kits/outage-detector/apps/app/page.tsx
  • kits/outage-detector/apps/components/ui/button.tsx
  • kits/outage-detector/apps/lib/utils.ts
  • kits/outage-detector/apps/package.json
  • kits/outage-detector/apps/postcss.config.mjs
  • kits/outage-detector/constitutions/default.md

Comment thread kits/outage-detector/apps/app/page.tsx Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Studio Runtime Validation (Phase 2)

Studio validation failed. The kit was rejected by Lamatic Studio.

Errors

outage-detector

  • Flow: outage-detector — config_json.nodes must be a non-empty array

Please fix the errors above and push a new commit to re-run validation.
Refer to CONTRIBUTING.md for guidance.

@amanbud4530

Copy link
Copy Markdown
Author

/validate

@github-actions

Copy link
Copy Markdown
Contributor

📡 Running Studio validation — results will appear here shortly.

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 22, 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.

@akshatvirmani

Copy link
Copy Markdown
Contributor

/validate

@github-actions

Copy link
Copy Markdown
Contributor

📡 Running Studio validation — results will appear here shortly.

@akshatvirmani

Copy link
Copy Markdown
Contributor

@amanbud4530 phase 2 is failing

@amanbud4530

Copy link
Copy Markdown
Author

@amanbud4530 phase 2 is failing

@akshatvirmani, what is the error message?

@akshatvirmani

Copy link
Copy Markdown
Contributor

/validate

@github-actions

Copy link
Copy Markdown
Contributor

📡 Running Studio validation — results will appear here shortly.

@akshatvirmani

Copy link
Copy Markdown
Contributor

@amanbud4530

Copy link
Copy Markdown
Author

@akshatvirmani
Dug into this a bit more since the error didn't match anything I could find in CONTRIBUTING.md. Not certain this is the actual cause, but wanted to share what I found in case it's useful.

The error:

config_json.nodes must be a non-empty array

What I checked: searched the entire CONTRIBUTING.md for every mention of config_json/config.json. The only place it appears is in "What NOT to Do":

❌ Don't use the old config.json format — Studio now exports lamatic.config.ts

I don't see it mentioned anywhere else in the doc, including the @reference system section.

The documented current format (which my flow file follows, and which passes Phase 1) is a flat .ts file exporting nodes/edges directly:

export default { meta, inputs, references, nodes, edges };

This also matches kits/content-generation/flows/agentic-generate-content.ts — the kit CONTRIBUTING.md names as the reference for simple Next.js kits.

My tentative guess: it's possible Phase 2's validator is still checking for the older config_json.nodes shape and hasn't been updated to match the current lamatic.config.ts/flat .ts format described in CONTRIBUTING.md — but I want to flag this as a guess rather than something I've confirmed, since I don't have visibility into how the Phase 2 validator actually works internally.

What I've tried so far:

  • Added a config_json export as a hedge (commit bdb0427), wrapping the existing nodes/edges — confirmed via the Actions log this exact commit was what got validated, and the error was identical. So a simple missing-field fix on my end doesn't seem to be it.
  • Kit passes Phase 1 structural validation, and the deployed app works end-to-end (demo link in lamatic.config.ts).

Would appreciate a steer on whether this guess is on the right track, or if there's something else Phase 2 expects that I'm missing. Happy to make changes once I know what it's actually looking for.

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 24, 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.

Actionable comments posted: 5

Caution

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

⚠️ Outside diff range comments (1)
kits/outage-detector/flows/outage-detector.ts (1)

420-422: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Remove the duplicate response edge.

Lines 421 and 422 connect addNode_601 to the response node with identical source, target, and handles. Keeping both can execute the response twice or make graph validation ambiguous; retain only the intended edge.

🤖 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/outage-detector/flows/outage-detector.ts` around lines 420 - 422, Remove
the duplicate edge from addNode_601 to responseNode_triggerNode_1 in the flow
definition. Retain only the intended connection with the shared source, target,
and handles, and delete the redundant edge entry.
🤖 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/outage-detector/.env.example`:
- Around line 9-11: Update the comment above OUTAGE_DETECTOR in the environment
template to reference the local lamatic.config.ts file, removing the incorrect
parent-directory path while preserving the existing description.

In `@kits/outage-detector/apps/app/page.tsx`:
- Around line 75-90: Update the shared result contract and the `log.map`
rendering in `page.tsx` to represent execution failures explicitly: preserve the
flagged state for `"Condition 1"`, map `"Else"` or failed `processTicket`
outcomes to a distinct error state and badge, and reserve “normal” only for
successful non-flagged results.

In `@kits/outage-detector/apps/package.json`:
- Line 14: Update the lamatic dependency in the apps package manifest from
latest to the tested fixed version, then regenerate and commit the app lockfile
so installations remain reproducible.

In `@kits/outage-detector/flows/outage-detector.ts`:
- Around line 428-436: Include the existing config_json object in the default
export alongside meta, inputs, references, nodes, and edges, while retaining the
named export so both access patterns use the same nodes/edges object.

In `@kits/outage-detector/README.md`:
- Line 33: Update the Markdown code fences in README.md by replacing the closing
```text fences on lines 33 and 45 with bare ``` fences, while preserving the
opening language-specific fence and all enclosed content.

---

Outside diff comments:
In `@kits/outage-detector/flows/outage-detector.ts`:
- Around line 420-422: Remove the duplicate edge from addNode_601 to
responseNode_triggerNode_1 in the flow definition. Retain only the intended
connection with the shared source, target, and handles, and delete the redundant
edge entry.
🪄 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: 8de9bb0f-1062-4026-90de-4203cc155d19

📥 Commits

Reviewing files that changed from the base of the PR and between d115aa8 and bdb0427.

⛔ Files ignored due to path filters (1)
  • kits/outage-detector/apps/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (14)
  • kits/outage-detector/.env.example
  • kits/outage-detector/README.md
  • kits/outage-detector/agent.md
  • kits/outage-detector/apps/app/globals.css
  • kits/outage-detector/apps/app/page.tsx
  • kits/outage-detector/apps/components/ui/button.tsx
  • kits/outage-detector/apps/lib/utils.ts
  • kits/outage-detector/apps/package.json
  • kits/outage-detector/apps/postcss.config.mjs
  • kits/outage-detector/constitutions/default.md
  • kits/outage-detector/flows/outage-detector.ts
  • kits/outage-detector/lamatic.config.ts
  • kits/outage-detector/prompts/outage-detector_InstructorLLMNode_837_system.md
  • kits/outage-detector/prompts/outage-detector_InstructorLLMNode_837_user.md

Comment thread kits/outage-detector/.env.example
Comment thread kits/outage-detector/apps/app/page.tsx
Comment thread kits/outage-detector/apps/package.json Outdated
Comment thread kits/outage-detector/flows/outage-detector.ts Outdated
Comment thread kits/outage-detector/README.md Outdated
@amanbud4530

Copy link
Copy Markdown
Author

@akshatvirmani

Phase 2 failing — this looks like a workflow configuration issue, not something in my kit

The "Checkout PR head" step is failing with:

Error: Refusing to check out fork pull request code from a 'workflow_run' workflow.
This workflow runs with the base repository's GITHUB_TOKEN, secrets, default-branch
cache scope, and runner access. Fetching and executing a fork's code in that trusted
context commonly leads to "pwn request" vulnerabilities. To opt in, review the risks
at https://gh.io/securely-using-pull_request_target and set
'allow-unsafe-pr-checkout: true' on the actions/checkout step.

This is a GitHub Actions security guardrail, not an error in my kit. The Phase 2 workflow triggers on workflow_run (which runs with elevated base-repo permissions), and its checkout step doesn't currently set allow-unsafe-pr-checkout: true — which GitHub requires to check out a fork's code inside that trusted context.

Since my PR is from a fork (amanbud4530/AgentKitLamatic/AgentKit), this will block Phase 2 the same way for any external contributor's PR, not just this one. Fixing it would mean adding allow-unsafe-pr-checkout: true to the actions/checkout@v4 step in the Phase 2 workflow (with the appropriate review of the security tradeoff GitHub describes at that link), since there's nothing in my kit's content that can work around a checkout step that refuses to run at all.

@akshatvirmani

Copy link
Copy Markdown
Contributor

/validate

@github-actions

Copy link
Copy Markdown
Contributor

📡 Running Studio validation — results will appear here shortly.

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