Skip to content

🍋 deslopping: consolidate agent architecture (5+3 -> 2 agents + Mastra Workflow)#15

Draft
Spirizeon wants to merge 1 commit into
mainfrom
deslopping
Draft

🍋 deslopping: consolidate agent architecture (5+3 -> 2 agents + Mastra Workflow)#15
Spirizeon wants to merge 1 commit into
mainfrom
deslopping

Conversation

@Spirizeon
Copy link
Copy Markdown
Owner

Summary

Consolidated 8 agents (5 active + 3 unused) down to 2 agents + 1 Mastra Workflow using Mastra AI's Workflow API.

Architecture Changes

Before After
5 active agents + 3 unused 2 agents + 1 workflow
Procedural orchestration in src/index.ts (575 lines) testFixWorkflow using createWorkflow, createStep, .then(), .dountil()
3 separate test generators (unit/integration/E2E) Single researchTestAgent autonomously determines test type
Separate executor agent Execution toolchain built into researchTestAgent

What's New

  • researchTestAgent: Combined research + test generation + execution. Has 6 tools: readFile, writeFile, runTests, fetchAnalysis, storeTests, storeResults. Autonomously determines test type from file content.
  • testFixWorkflow: Mastra Workflow orchestration pipeline: discoverFiles -> researchAndGenerate -> .dountil(checkAndFix) -> createPR
  • src/index.ts: Reduced from 575 to 40 lines - just runs the workflow
  • webhook-server.ts: Reduced from 798 to 195 lines - single /webhook/generate-and-test endpoint

Files Deleted (7)

  • src/mastra/agents/testGeneratorAgent.ts, integrationGeneratorAgent.ts, e2eGeneratorAgent.ts, executorAgent.ts, orchestratorAgent.ts, myAgent.ts
  • src/mastra/tools/fs/runTestsTool.ts (duplicate)

Files Created (1)

  • src/mastra/workflows/testFixWorkflow.ts

Context Flow (unchanged)

All agent communication still flows through Redis (code_analysis:, test_results:, unit_tests:, code_patches:). The researchTestAgent stores everything to Redis; the editorAgent reads failures from Redis and fixes source files.

PR Checklist

  • TypeScript compiles (pre-existing .js extension warnings only)
  • All old agent references removed from source/tests
  • Docs updated (8 files)
  • Webhook consolidated and backward-compatible alias retained
  • Tests updated for new agent names

- Merged research-agent, testGeneratorAgent, integrationGeneratorAgent, e2eGeneratorAgent, executorAgent into single researchTestAgent with read/write/execute tools
- Created testFixWorkflow using Mastra createWorkflow: discoverFiles, researchAndGenerate, .dountil(checkAndFix), createPR
- Deleted 6 unused agent files and duplicate runTestsTool
- Simplified src/index.ts from 575 to 40 lines
- Consolidated webhook-server to single /webhook/generate-and-test endpoint
- Updated all docs and tests
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lemonx Ready Ready Preview, Comment May 14, 2026 10:36pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2c180dba-7a56-4f34-b1c2-2aaef6f0b268

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deslopping

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 and usage tips.

Comment thread src/webhook-server.ts
const result = await workflow.start({
inputData: {
repoPath: workspace,
files: files ?? undefined,
Comment thread src/webhook-server.ts
githubSha: commitSha,
},
});

Comment thread src/webhook-server.ts
)
.slice(0, 3);
}
app.post("/webhook/generate-and-test", generateAndTestHandler);
Comment thread src/webhook-server.ts
.slice(0, 3);
}
app.post("/webhook/generate-and-test", generateAndTestHandler);
app.post("/webhook/test-and-fix", generateAndTestHandler);
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