Repository navigation
Weekly defect review: bundle listing past D1 bind cap, all-or-nothing settings update - #75
DennisAlund wants to merge 2 commits into
Conversation
listBundles and getBundleSummariesBulk bound one parameter per bundle id. D1 rejects a statement past 100 parameters, so a deployment with roughly 100 or more active bundles got SQLITE_ERROR (too many SQL variables) on the bundles page and GET /bundles. Link counts now group without an IN list and the summaries run in slices of 50 ids, merged afterwards. Regression test lists 120 bundles with and without a range.
updateAppSettings validated and wrote one field at a time, so a request rejected with 400 on a later field (an unknown theme, a non-boolean filter) had already stored the earlier ones, while telling the caller nothing was saved. All fields are now validated first and written only when the whole request is valid. Regression test sends a valid slug length and filter with an invalid theme and checks that neither is stored.
|
Flagged for developer judgment. None of these are changed in this PR. Dependency drift
Admin JSON handlers accept wrong field types and return 500
In-memory rate limiter never evicts expired windows (src/rate-limit.ts) Reviewed with no finding: redirect and KV cache handling, link and slug repositories (batch atomicity, click guards), slug generation (no modulo bias), SSRF guard in Generated by Claude Code |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
shrtnr | e78e874 | Oct 02 2026, 07:20 PM |
Weekly defect-hunting review. Two defects fixed, each with a regression test that fails before the fix and passes after.
yarn test: 102 files, 1598 tests green. No change undersrc/pages/,src/admin/,src/client.ts,src/styles.tsor admin routes, soyarn e2ewas not run.Fixes
1. Bundle listing exceeds D1's 100 bound-parameter cap (
905a871)listBundlesandClickRepository.getBundleSummariesBulkbound one parameter per bundle id inIN (...)lists.GET /bundlesfail withSQLITE_ERROR: too many SQL variables.bundle-service.test.ts, "lists and summarises more bundles than one statement can bind" (120 bundles, with and without a range).2. Settings update applied partially on a rejected request (second commit)
updateAppSettingsvalidated and wrote one field at a time.theme) had already stored earlier fields such asslug_default_lengthorfilter_bots.admin-service.test.ts, "stores no field when a later field in the same request is invalid".Spec hashes are unchanged (no spec or SDK surface change), and all three SDK hashes match
./scripts/spec-hash.sh.🤖 Generated with Claude Code
https://claude.ai/code/session_01GtFhVu3q2zrePMFkLtF5hs
Generated by Claude Code