From 4dda005eb1cdf7be637865ab661362c059f5bfb7 Mon Sep 17 00:00:00 2001 From: Hermes Date: Mon, 10 Aug 2026 20:28:56 -0700 Subject: [PATCH] P2-1 through P2-4: mark done in backlog --- DC-PRODUCTION-GRADE-BACKLOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DC-PRODUCTION-GRADE-BACKLOG.md b/DC-PRODUCTION-GRADE-BACKLOG.md index 4b3fce9..84d5ef9 100644 --- a/DC-PRODUCTION-GRADE-BACKLOG.md +++ b/DC-PRODUCTION-GRADE-BACKLOG.md @@ -24,10 +24,10 @@ If an item is too big for one tick, implement a sub-part, push that, and note pr ## P2 — Code Quality & Technical Debt -- [ ] **P2-1: Version drift fix** — Update `VERSION` file from `1.14.9` to `1.15.0`. Update `CLAUDE.md` line 247 from `1.13.4` to `1.15.0`. -- [ ] **P2-2: Delete dead legacy files** — `git rm dashcaddy-api/scripts/legacy/comprehensive-test.js dashcaddy-api/scripts/legacy/test-security-fixes.js status/api/test-api.js`. Verify zero references first. -- [ ] **P2-3: ESLint no-empty fix** — Add `{ allow: 'catch' }` to the `no-empty` rule in `.eslintrc.js`, OR add `// intentionally ignored` comments. Goal: `npx eslint src/ routes/` exits 0 errors. -- [ ] **P2-4: Fix no-useless-escape** — `routes/auth/session-handlers.js:39` — `\-` inside character class → `-` (at end of class to avoid range). +- [x] **P2-1: Version drift fix** — Done (commit 140aa5d). VERSION 1.14.9→1.15.0, CLAUDE.md 1.13.4→1.15.0. +- [x] **P2-2: Delete dead legacy files** — Done (commit 140aa5d). Removed comprehensive-test.js + test-security-fixes.js (-878 lines). (status/api/test-api.js is untracked.) +- [x] **P2-3: ESLint no-empty fix** — Done (commit 140aa5d). Added `no-empty: ['error', { allowEmptyCatch: true }]` to .eslintrc.js. 3 errors→0. +- [x] **P2-4: Fix no-useless-escape** — Done (commit 140aa5d). routes/auth/session-handlers.js:39 `\-` → `.-` (dash moved to end of char class). - [ ] **P2-5: Test handle leaks** — Run `npx jest --detectOpenHandles --silent 2>&1 | grep -i leak` and add teardown (`afterEach(() => clearInterval/clearTimeout)`) to tests that leave open handles. Focus on `totp.routes.test.js` (22s) and `containers.routes.test.js` (28s). - [ ] **P2-6: Refactor config-schema.js validateConfig** — Complexity 44 → extract sub-validators for each config section. Behavior-preserving refactor only. - [ ] **P2-7: Refactor middleware.js auth function** — Complexity 24, nesting depth 6 → extract auth-logic branches into named helper functions.