WebHooker/tests
RhenCloud b313cdc2fe
fix: prevent cascade deletion of routes when updating groups
Previously, saveGroups() used DELETE FROM d1_groups followed by re-insertion,
which triggered ON DELETE CASCADE and wiped all routes whenever any group was updated.

Changes:
- Use INSERT...ON CONFLICT DO UPDATE (upsert) instead of delete-then-insert
- Only delete groups that are actually being removed
- Delete routes first, then delete groups (proper cascade order)
- Load existing group IDs before saving to detect deletions

This fixes the critical bug where updating one group's metadata would
delete all routes across all groups.

Data recovery: Used D1 Time Travel to restore from bookmark
000018f9-00000002-000050de-f23b7bfe5ccdc00e9c9dec3a4de8bc81 (before
the problematic group update), recovering 18 routes.
2026-09-10 22:29:47 +08:00
..
__snapshots__ fix(push): link branch ref in title as inline code 2026-08-17 00:01:32 +08:00
fixtures chore(quality): provider fixtures, formatter snapshots, platform contract tests, CI, CodeQL, dependabot 2026-08-15 17:30:51 +08:00
admin-api.test.ts feat(ui): update ui style 2026-08-16 22:46:07 +08:00
admin.test.ts feat(ui): update ui style 2026-08-16 22:46:07 +08:00
audit.test.ts feat: migrate to Nuxt 4 (Nitro) and Tailwind CSS v3 2026-08-13 17:43:33 +08:00
config-store.test.ts fix: prevent cascade deletion of routes when updating groups 2026-09-10 22:29:47 +08:00
custom-replay.test.ts feat(reliability): idempotency store, custom webhook replay protection, correlation ids 2026-08-15 17:03:32 +08:00
d1-stores.test.ts feat(logs): populate send log detail and fix dedup re-claim condition 2026-08-24 22:51:11 +08:00
delivery-metrics.test.ts feat(ui): update ui style 2026-08-16 22:46:07 +08:00
delivery.test.ts feat(queue): async delivery via Cloudflare Queues with retry backoff and DLQ 2026-08-15 17:03:35 +08:00
discord.test.ts feat(ui): update ui style 2026-08-16 22:46:07 +08:00
feishu-inbound.test.ts chore: auto-fix lint & formatting [skip ci] 2026-08-26 16:39:02 +00:00
filter-ast.test.ts feat(config): valibot schemas, schema version, migrations, filter AST 2026-08-15 17:03:42 +08:00
formatter-registry.test.ts refactor(core): message tracker abstraction and formatter plugin registry 2026-08-15 17:03:39 +08:00
formatter-snapshot.test.ts chore(quality): provider fixtures, formatter snapshots, platform contract tests, CI, CodeQL, dependabot 2026-08-15 17:30:51 +08:00
formatter.test.ts fix(check): key check_run in-place edits on check name + head_sha 2026-08-31 01:17:13 +08:00
groups.test.ts feat: migrate to Nuxt 4 (Nitro) and Tailwind CSS v3 2026-08-13 17:43:33 +08:00
helpers.ts feat: migrate to Nuxt 4 (Nitro) and Tailwind CSS v3 2026-08-13 17:43:33 +08:00
html-to-text.test.ts fix(formatters): strip HTML from comment bodies so bot notifications render cleanly 2026-08-15 17:55:38 +08:00
idempotency.test.ts feat(reliability): idempotency store, custom webhook replay protection, correlation ids 2026-08-15 17:03:32 +08:00
install.test.ts feat(ui): update ui style 2026-08-16 22:46:07 +08:00
invites.test.ts feat(ui): update ui style 2026-08-16 22:46:07 +08:00
message-tracker.test.ts feat(ui): update ui style 2026-08-16 22:46:07 +08:00
payload.test.ts chore: auto-fix lint & formatting [skip ci] 2026-08-17 07:51:36 +00:00
platform-contract.test.ts chore(quality): provider fixtures, formatter snapshots, platform contract tests, CI, CodeQL, dependabot 2026-08-15 17:30:51 +08:00
provider-fixtures.test.ts chore(quality): provider fixtures, formatter snapshots, platform contract tests, CI, CodeQL, dependabot 2026-08-15 17:30:51 +08:00
providers.test.ts refactor(push): move commits to description, comparison to changes field 2026-08-16 22:46:11 +08:00
queue-consumer.test.ts feat(feishu): add Feishu inbound webhook, /gh commands and card actions 2026-08-27 00:07:05 +08:00
schema.test.ts feat(config): valibot schemas, schema version, migrations, filter AST 2026-08-15 17:03:42 +08:00
send-log-batch.test.ts chore: auto-fix lint & formatting [skip ci] 2026-08-17 07:51:36 +00:00
send-log.test.ts feat: migrate to Nuxt 4 (Nitro) and Tailwind CSS v3 2026-08-13 17:43:33 +08:00
telegram-commands.test.ts feat: migrate to Nuxt 4 (Nitro) and Tailwind CSS v3 2026-08-13 17:43:33 +08:00
telegram.test.ts fix(telegram): render HTML with markdown-it and strip HTML from Discord bodies 2026-08-24 22:51:26 +08:00
token-store.test.ts feat: migrate to Nuxt 4 (Nitro) and Tailwind CSS v3 2026-08-13 17:43:33 +08:00
webhook-tenant.test.ts feat(ui): update ui style 2026-08-16 22:46:07 +08:00
webhook.test.ts chore: auto-fix lint & formatting [skip ci] 2026-08-13 12:37:09 +00:00