Skip to content

refactor(triggers): thin agent execution facade#1284

Merged
aaight merged 1 commit into
devfrom
feature/agent-execution-facade-docs
May 9, 2026
Merged

refactor(triggers): thin agent execution facade#1284
aaight merged 1 commit into
devfrom
feature/agent-execution-facade-docs

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented May 9, 2026

Summary

Card: https://trello.com/c/69fdee572a6522696c72c6f1

This finishes the agent execution facade cleanup by keeping runAgentExecutionPipeline() as a high-level orchestration path and moving remaining runtime/follow-up details behind helper modules.

Changes

  • Added agent-execution-runtime.ts for execution context setup, lifecycle hook loading, runAgent() invocation, post-run PR/work-item linking, PM summaries, and callbacks.
  • Added agent-execution-followups.ts for recursive post-completion review dispatch and splitting auto-chain dispatch, while keeping recursion centralized through the facade.
  • Removed the biome-ignore lint/complexity/noExcessiveCognitiveComplexity suppression from agent-execution.ts.
  • Updated trigger docs to map the extracted helper modules and the current execution flow, including PR/work-item linking, PM summaries, post-completion review, splitting auto-chain, and auto-debug.

Verification

  • npx vitest run --project unit-triggers --project unit-core tests/unit/triggers/shared/agent-execution.test.ts tests/unit/triggers/agent-execution.test.ts tests/unit/triggers/shared/webhook-execution.test.ts tests/unit/triggers/sentry-webhook-handler.test.ts tests/unit/pm/webhook-handler.test.ts
  • npx vitest run --project unit-core tests/unit/architecture-docs.test.ts
  • npm run lint:fix
  • npm run lint (passes; reports existing complexity warnings in src/integrations/alerting/_shared/materialize.ts and src/triggers/sentry/webhook-handler.ts)
  • npm run typecheck
  • npm test

Integration tests were not run because this change does not alter handler wiring or credential scope behavior.

🕵️ codex · gpt-5.5 · run details

@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2026

Codecov Report

❌ Patch coverage is 93.49112% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/triggers/shared/agent-execution-runtime.ts 88.88% 10 Missing ⚠️
src/triggers/shared/agent-execution-followups.ts 98.14% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

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

LGTM - The facade remains source-compatible, the extracted runtime/follow-up helpers preserve the previous execution flow, and CI is green.

🕵️ codex · gpt-5.5 · run details

@aaight aaight merged commit ffc0e8e into dev May 9, 2026
9 checks passed
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