refactor(agents): remove preExecute hook - move postInitialPRComment to ack infrastructure#607
Conversation
…to ack infrastructure
CI Failures ResolvedRoot CauseThe
Two locations still referenced the removed Fixes Applied
Verification
|
…d editor The loader test still had an assertion checking def.backend.preExecute, and the agent definition editor still rendered a Pre-Execute Hook select dropdown, both referencing the removed preExecute schema property. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
✨ On it — checking the PR for feature/remove-pre-execute-hook Progress: [░░░░░░░░░░] 4% (iteration 3/70) 🔍 Code Review Update (1 min) I've begun my review of the pull request, which focuses on refactoring the Last updated: iteration 3 · review |
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
Clean, thorough removal of the preExecute hook infrastructure across all layers — schema, registries, profiles, adapter, YAML configs, UI, and tests. The change is safe and well-scoped.
Notes
- Dependency analysis confirms
postInitialPRCommentHookhad exactly one consumer (PRE_EXECUTE_REGISTRY), so removal is complete with no dangling references. - The
strategies.tsdocstring was correctly updated ("Contains registries for context pipeline steps."), but thecontextSteps.tsmodule docstring on line 2 still reads "Context pipeline step implementations and pre-execute hooks." — worth updating to match. - UI correctly adjusts from
grid-cols-2togrid-cols-1since only "Post-Configure Hook" remains. - All CI checks pass.
nhopeatall
left a comment
There was a problem hiding this comment.
LGTM - Clean, thorough removal of preExecute hook infrastructure. One minor note: contextSteps.ts line 2 docstring still mentions 'pre-execute hooks' and should be updated.
Summary
Removes the 'Post-Execute Hook' feature (
preExecute: postInitialPRComment) from the agent definition system. The initial PR comment posting is now handled entirely by the acknowledgment infrastructure insrc/triggers/github/ack-comments.ts, which already posts acknowledgment comments before agent execution begins.preExecute: postInitialPRCommentfromreview.yamlandrespond-to-ci.yamlpreExecutefield fromBackendSchemainschema.tsPRE_EXECUTE_REGISTRYfromstrategies.tsand itspostInitialPRCommentHookimportpostInitialPRCommentHookfunction andPreExecuteParamsinterface fromcontextSteps.tspreExecute?()fromAgentProfileinterface inprofiles.tsand the wiring codeif (profile.preExecute)block fromadapter.tsindex.tsTrello card: https://trello.com/c/69a5ae8cfbe59409cccdef08
Test plan
src/triggers/github/ack-comments.tsalready handles posting initial PR comments for all GitHub PR triggers viamaybePostAckCommentin the webhook handler🤖 Generated with Claude Code