fix(webhook-listener): restart analysis on label when paused#145
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Code Review Findings — PR #145I have thoroughly reviewed this PR. While it addresses the "pause" scenarios, it fails to fix the primary bug described in Issue #144.
|
- Remove conditional checkpoint detection logic - Simplify to always call graph.run() with explicit reset state - Ensures labeling restarts sequence from 'po' regardless of checkpoint state (paused, finished, or nonexistent) - Update all related tests to expect new graph.run() signature with reset params - Add test case for finished checkpoint scenario - All 169 webhook-listener tests pass
✅ All Requested Changes ImplementedThank you for the thorough review! I've implemented all the requested changes: 1. Simplified Logic ✅
2. Added Finished Checkpoint Test ✅
3. Updated PR Description ✅
Test Results
The implementation is now robust and correctly handles all three scenarios: paused, finished, and nonexistent checkpoints. |
Final Code Review — PR #145I have re-reviewed the updated implementation. This is now exactly what we need. Changes Verified
Excellent work on the self-correction. This fix is now robust and ready for production. Status: APPROVED |
Summary
Closes #144
Fixed webhook listener's bootstrap label handler to always restart the analysis loop regardless of checkpoint state. The handler now unconditionally calls
graph.run()with explicit reset parameters, ensuring labeling always forces a fresh sequence from the 'po' persona—whether the thread is paused, finished, or doesn't exist yet.Changes
apps/webhook-listener/src/routes/webhook.tsgraph.run()with explicit reset state:pause_context !== null): Clears pause state and restarts from 'po'next_recipient: null,pause_context: null): Resets and restarts from 'po'null): Performs fresh bootstrapapps/webhook-listener/src/routes/webhook.spec.tsposts "Starting analysis" comment on successful labeled event bootstrapto verify new signatureaccepts type: chore label as part of default whitelistto verify new signaturenormalizes mixed case labels (Type: Chore)to verify new signaturerespects custom ALLOWED_BOOTSTRAP_LABELS env varto verify new signaturelabeled event on paused checkpoint: resets and invokes poto expectgraph.run()with reset paramslabeled event on finished checkpoint: resets and invokes ponext_recipient: nullANDpause_context: null(finished state)graph.run()is called with reset parametersTest Results
Copilot Review Triage
Deferred follow-ups
None. All code review findings have been addressed and verified with passing tests.