feat(lifecycle): replace progress comment with PR created message#423
Merged
zbigniewsobiecki merged 3 commits intodevfrom Feb 18, 2026
Merged
Conversation
chore: release - merge dev into main
chore: release - merge dev into main
Collaborator
|
🔍 Reviewing PR... |
nhopeatall
approved these changes
Feb 18, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
LGTM — Clean implementation that threads progressCommentId through the pipeline to replace progress comments with the final "PR created" message.
Verified:
- Data flow is correct:
ProgressMonitor.getProgressCommentId()→adapter.ts→agent-execution.ts→lifecycle.handleSuccess() - Backward compatible: all new parameters are optional, existing behavior preserved when
progressCommentIdis absent - Fallback safety:
safeUpdateOrAddCommentcatchesupdateCommentfailures and falls back toaddComment - No race condition:
getProgressCommentId()is read afterbackend.execute()completes (minutes later), well after the initial comment promise resolves - All 86 affected tests pass, typecheck clean, CI green
updateCommentalready exists on thePMProviderinterface — no new contract needed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
progressCommentIdthrough the execution pipeline:ProgressMonitor→AgentResult→adapter→agent-execution→lifecyclehandleSuccessnow callsupdateCommenton the existing progress comment instead of always callingaddCommentupdateCommentfails (e.g. comment deleted), falls back toaddCommentso the PR URL is never lostprogressCommentIdis optional; without it, existingaddCommentbehavior is preservedChanges
src/types/index.ts— AddedprogressCommentId?: stringtoAgentResultsrc/backends/progressMonitor.ts— AddedgetProgressCommentId(): string | nullpublic gettersrc/backends/adapter.ts— Capturesmonitor?.getProgressCommentId()in the returnedAgentResultsrc/triggers/shared/agent-execution.ts— PassesagentResult.progressCommentIdtolifecycle.handleSuccesssrc/pm/lifecycle.ts—handleSuccessacceptsprogressCommentId?, usesupdateComment+fallback when providedtests/unit/pm/lifecycle.test.ts— AddedupdateCommentmock; new tests for update, fallback, and no-progressCommentId casestests/unit/triggers/agent-execution.test.ts— Updated test + new test verifyingprogressCommentIdflows tohandleSuccesstests/unit/backends/progress.test.ts— NewgetProgressCommentId()getter testsTest plan
handleSuccessupdates comment whenprogressCommentIdprovidedhandleSuccessfalls back toaddCommentwhenupdateCommentfailshandleSuccessusesaddCommentwhen noprogressCommentId(backward compat)getProgressCommentId()returns null initially, correct ID after postingprogressCommentIdflows through pipeline fromAgentResulttohandleSuccessCard: https://trello.com/c/ogyS6225/45-the-pr-created-pm-comment-in-implementation-should-replace-last-pm-progress-comment-if-any-rather-than-always-creating-an-additi
🤖 Generated with Claude Code