Repository navigation
Description
Currently, the 'processPullRequestCommentJob' posts a comment to indicate it is "Starting work on follow-up changes". This comment includes check-marked IDs (e.g., '3497728780✓') which act as a guard to prevent reprocessing the same follow-up comment.
When the job completes (either by pushing new changes or by determining no changes are needed), it posts a second comment ("Applied the requested follow-up changes" or "Analyzed the follow-up request").
This leaves two bot comments. The initial "Starting work" comment is now redundant.
Task:
- Modify 'src/jobs/processPullRequestCommentJob.js'.
- The completion comments (both for success-with-changes and success-with-no-changes) must be updated to include the reprocessing guard. The footer of these comments should include the string:
'---
Processing comment ID[s]: {comment_id}✓, {comment_id}✓...'
This ensures the reprocessing guard is transferred to the final comment. - After the completion comment is successfully posted (in both success scenarios), add logic to delete the initial 'startingWorkComment'.
- Introduce a short delay (e.g., 3 seconds) before deleting the 'startingWorkComment'. This ensures a brief overlap where both comments exist, guaranteeing the reprocessing guard is always present.
Implementation Steps:
-
In 'src/jobs/processPullRequestCommentJob.js', locate the 'if (commitResult)' block.
-
Find where 'prCommentBody' is constructed. Append the reprocessing guard footer to it before it's posted. The footer should look like:
'\n\n---\n_Processing comment ID${unprocessedComments.length > 1 ? 's' : ''}: ${unprocessedComments.map(c => String(c.id) + '✓').join(', ')}_' -
Locate the 'else' block (for no commitResult).
-
Find where 'noChangesBody' is constructed. Append the same reprocessing guard footer to it before it's posted.
-
After the 'completionComment = await octokit.request(...)' call in both the 'if' and 'else' blocks, add the logic to delete the 'startingWorkComment' (which was stored when the job started).
// Add this logic after the completionComment is posted in both success blocks if (startingWorkComment && startingWorkComment.data.id) { await new Promise(resolve => setTimeout(resolve, 3000)); // 3s delay try { await octokit.request('DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}', { owner: repoOwner, repo: repoName, comment_id: startingWorkComment.data.id }); correlatedLogger.info({ commentId: startingWorkComment.data.id }, 'Removed \'starting work\' comment'); } catch (deleteError) { correlatedLogger.warn({ commentId: startingWorkComment.data.id, error: deleteError.message }, 'Failed to remove \'starting work\' comment'); } }
Activity
integry commentedon Nov 6, 2025
I will modify 'src/jobs/processPullRequestCommentJob.js' to implement this logic.
propr-dev commentedon Nov 6, 2025
🤖 AI processing has started for this issue using claude-sonnet-4-5-20250929 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claude-sonnet-4-5-20250929ai-fix/222-refactor-clean-up-startin-20251106-1546-claude-sonnet-4-5-20250929-levmainissue-222-20251106-1546-claude-sonnet-4-5-20250929-levfix(ai): Resolve issue #222 - Refactor: Clean up 'starting work' comm…
feat(ai): I fixed both CodeQL "Missing rate limiting" alerts (#221 and …
feat(ai): I changed how the rate limiter is set up in `packages/api/t…
I found two causes and fixed both. The first is proven from the PR ti…
[3686 by Claude Opus 5.5] A follow-up comment on a ProPR pull request…