Repository navigation
fix(webhook): stop enqueueing validate-configs on push - #496
Conversation
Every push enqueued a `validate-configs` job next to `sync-repo`. No worker acts on that job name: the webhook worker handles sync-installation and sync-repo, and for any other name it only logs "Generic event logged" at debug level. Each push therefore added a job that was stored and never did anything. handlePush now enqueues sync-repo only, with the same payload and priority, and still invalidates the cached .gitwire.yml when a push changes it. Validating .gitwire.yml on push is not an active capability. Validation runs on request, through the policy preview API and the dashboard's playground. The jobs already stored in Redis are left untouched. They belong to the separate Redis cleanup decision. tests/unit/webhook-push-enqueues-sync-only.test.js covers the enqueue, the absence of validate-configs, and the cache invalidation. It fails on the previous handler and passes on this one. Nineteen deliberate mutations of the handler each make it fail. Signed-off-by: Alajmah <55954113+Alajmah@users.noreply.github.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🤖 AI Code Review — ✅ Approved
Confidence: high · Findings: 0
AI judgment: APPROVE · Evidence: COMPLETE · Authority: advisory
Evidence complete · 2/2 changed files accounted for
GitWire AI Review Gate (bundle-driven v2) · Structured schema · Scope-validated · AI recommendation — maintainers and repository policy retain authority
Merged and deployed: verification (2026-11-22)Merge. Re-confirmed before the merge: head Publish. CI run 45074507952: success, 17 jobs, Deploy. Deploy run 45075114617: success. Security Scan passed. Deploy Immutable Release passed through its stages: executor gate, app, dashboard. The release record now points to
No new
|
| Moment | Jobs of that name | Newest of those, enqueued at | Newest job of any name, enqueued at |
|---|---|---|---|
| Before the merge, 21:51:54Z | 249 | 20:45:52Z | 20:45:52Z |
| After the deploy, 22:02:29Z | 249 | 21:52:21Z | 21:52:21Z |
| After a later push, 22:05:05Z | 249 | 21:52:21Z | 22:03:44Z |
The job of 21:52:21Z belongs to the merge's own push. The previous release processed it, before the deploy replaced the app container. The push of 22:03:40Z was processed by the new release: it added its webhook job and no validate-configs job.
The 249 stored jobs are untouched, by decision.
Status
Create only. Merge and deploy need review.
What this changes
Every push enqueued a second job named
validate-configs, next tosync-repo(packages/web/src/lib/webhookHandlers/handlePush.js). No worker acts on that name. The webhook worker handlessync-installationandsync-repo; for any other name it only logsGeneric event loggedat debug level. Each push therefore added a job that was stored and never did anything.This PR removes that one enqueue.
handlePushnow enqueuessync-repoonly, with the same payload and priority. It still invalidates the cached.gitwire.ymlwhen a push changes that file.Validating
.gitwire.ymlon push is not an active capability. Validation runs on request: through the policy preview API and the dashboard's playground.What this does not touch
validate-configsjobs already stored in Redis (249 at the last count) stay as they are. Deleting them belongs to the separate Redis cleanup decision.Tests
packages/web/tests/unit/webhook-push-enqueues-sync-only.test.jsis new and has 8 tests. It covers the singlesync-repoenqueue with its payload and priority, the absence ofvalidate-configs, and the config cache invalidation on the three paths that trigger it and the cases that must not.["sync-repo", "validate-configs"].Verification
Manual CI run on this branch, commit
7a0b5c5: https://github.com/Octo-Lex/GitWire/actions/runs/45063790692. All 16 jobs passed;publish-release-imagesis skipped on a manual run by design.A merge publishes a release and redeploys the three release services.