[BUG] Automatic goal sync skips goal.completed webhooks
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
What happened?
Activity-derived goals can reach their target during automatic GitHub sync without dispatching the configured goal.completed webhook. src/lib/goals-sync.ts updates progress but does not detect the incomplete-to-complete transition or dispatch the event. The manual goal PATCH route dispatches completion notifications, but activity-derived progress is updated through /api/goals/sync and the cron route, so subscribers receive no completion event.
Expected: Completing an activity-derived goal through sync emits the same goal.completed event as a manual completion.
Proposed solution: Compare the stored and newly synced progress against the target, dispatch on the first incomplete-to-complete transition, and make repeated syncs idempotent. Add tests for a sync that reaches the target and a repeat sync that must not duplicate the event.
Steps to reproduce
- Configure a webhook subscription for
goal.completed. - Create an activity-derived goal with a target of one commit.
- Record matching GitHub activity and run goal sync (or wait for the cron sync).
- Observe that goal progress reaches the target but no completion webhook is sent.
Where is it?
Goals
Where did you see it?
Local development
Browser and device
Not browser-specific: server-side sync/webhook behavior. Local development on Linux x86_64, Node v26.13.1, Vitest 4.1.12.
Screenshots, console errors or logs
No screenshot applies to this server-side behavior. Validation: ./node_modules/.bin/tsc --noEmit completed successfully. Focused existing tests ./node_modules/.bin/vitest run test/goals-sync-lib.test.ts test/weekly-summary-combined.test.ts --reporter=dot passed (2 files, 28 tests), but do not assert webhook dispatch when automatic sync crosses the target. Full ./node_modules/.bin/vitest run: 3,405 passed, 54 failed; all failures were six component suites where JSDOM lacked localStorage, unrelated to goal sync. The sync transition/webhook regression described above is not currently covered.
Want to fix it?
- I'd like to work on this. A maintainer will assign you; please don't start before that.
- Lenguaje dominante
- TypeScript
- Estrellas
- 246
- Forks
- 436
- Merge medio
- 9 h 33 min
- PR fusionados (30 d)
- 213
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Priyanshu-byte-coder/devtrack
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Priyanshu-byte-coder/devtrack#4067 ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Priyanshu-byte-coder/devtrack#4066 ·
Los mantenedores suelen responder en 1 día
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModalPosiblemente ocupada @Nandaninaulaa la tomó hace 4 días. Abiertogood first issue level 1 level:beginner status:assigned type:design
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
Priyanshu-byte-coder/devtrack#3889 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Goals form: square arcade buttons for recurrence, Create goal and RefreshPosiblemente ocupada @KartikeyG-world la tomó hace 4 días. Abiertogood first issue level 1 level:beginner status:assigned type:design
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Priyanshu-byte-coder/devtrack#3877 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Goals: the error banner and the "No goals yet" hint show at the same timePosiblemente ocupada @KartikeyG-world la tomó hace 4 días. Abiertogood first issue level 1 level:beginner status:assigned type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Priyanshu-byte-coder/devtrack#3872 · 6 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Priyanshu-byte-coder/devtrack
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
makecindy/cindy#15342 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
kwitsch/claude-code-plugin-tooling#219 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
no-repo-link tool-submission
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
BraveOPotato/NoSignups#2618 ·
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100