Skip to content

refactor(triggers): extract agent execution types#1266

Merged
aaight merged 1 commit into
devfrom
refactor/agent-execution-types
May 8, 2026
Merged

refactor(triggers): extract agent execution types#1266
aaight merged 1 commit into
devfrom
refactor/agent-execution-types

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented May 8, 2026

Summary

Refactors the shared agent execution contract into a dedicated type-only module while preserving the existing public import path from agent-execution.ts.

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

Changes

  • Added src/triggers/shared/agent-execution-types.ts with AgentExecutionConfig and the internal AgentExecutionContext contract.
  • Re-exported AgentExecutionConfig from agent-execution.ts so existing imports continue to compile.
  • Constructed a typed execution context inside runAgentExecutionPipeline() after validation and work-item ID re-resolution, preserving the no-agentType guard and function signature.
  • Updated type-only imports in webhook, PM, and GitHub integration code to use the new type module and avoid coupling type consumers to the runtime pipeline module.
  • Added type-level characterization coverage for the re-export and context shape.

Testing

  • npx vitest run --project unit-triggers tests/unit/triggers/shared/agent-execution.test.ts tests/unit/triggers/shared/agent-execution-types.test.ts tests/unit/triggers/shared/webhook-execution.test.ts
  • npm run typecheck
  • npm run lint:fix
  • npm run lint (passes with existing complexity warnings in unrelated Sentry/alerting files)
  • npm test

🕵️ codex · gpt-5.5 · run details

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 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 extraction keeps the public re-export intact, moves type-only consumers to the dedicated module, and builds the execution context after validation/work-item re-resolution without changing the pipeline signature or behavior. CI is green, and the targeted type characterization test passes locally.

🕵️ codex · gpt-5.5 · run details

@aaight aaight merged commit a2dcd9c into dev May 8, 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