Skip to content

refactor(server): drop dead snapshotAll; quote identifiers in trigger DDL#13

Merged
grrowl merged 1 commit into
mainfrom
fix/006-dead-code-identifier-quoting
Jun 13, 2026
Merged

refactor(server): drop dead snapshotAll; quote identifiers in trigger DDL#13
grrowl merged 1 commit into
mainfrom
fix/006-dead-code-identifier-quoting

Conversation

@grrowl

@grrowl grrowl commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Lands plan-006 on main (0.3.2 patch).

  • Deletes snapshotAll — zero callers in src/ or tests/, not exported; superseded by compileSubsetQuery in handleSub and never removed.
  • Quotes interpolated identifiers in installTriggers' CREATE TRIGGER DDL (table/pk), matching the discipline the rest of the codebase already follows. Safe today (identifiers are regex-validated at registration), but makes the helper robust if a future caller bypasses the registry.

Identifier values stay bound/single-quoted; the regex remains the real gate. sqlite_master stores the same unquoted name either way, so ensureTriggers' orphan-reaping set-diff is unaffected.

No new tests: deletion proven by grep+typecheck; quoting fully pinned by the existing trigger suites (cdc/compaction/schema-evolution/ensure-triggers). Validated on main: typecheck + full suite (153 passed) + build green. Supersedes feat/ssr PR #7.

🤖 Generated with Claude Code

… DDL

`snapshotAll` had zero callers in src/ or tests/ and was never exported
from src/server/index.ts — deleting it removes an unquoted table-name
interpolation that modelled the wrong habit.

`installTriggers` now double-quotes every identifier position (trigger
name, table name, pk column) for consistency with sql-compiler.ts and
ensureTriggers' existing DROP. The regex gate (assertValidCollection)
remains the real safety net; quoting just makes the helper safe even if
a future caller bypasses the registry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@grrowl grrowl merged commit f4c4eaf into main Jun 13, 2026
1 check passed
grrowl added a commit that referenced this pull request Jun 13, 2026
Bug-fix batch from the deep-audit follow-up (audit-excluded SSR topic aside):
client reconnect-wedge fix (#12), wire-input hardening + error sanitization
(#15, ADR-0012), catch-up N+1 batching (#14), plus expanded error/wire test
coverage (#11) and dead-code/identifier-quoting cleanup (#13).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant