Skip to content

task/006: Remove legacy Database.patch and tarn close loop - #2

Merged
Igloczek merged 1 commit into
masterfrom
task/006-clean-database-legacy-hooks
Jun 30, 2026
Merged

Igloczek merged 1 commit into
masterfrom
task/006-clean-database-legacy-hooks

Conversation

@Igloczek

@Igloczek Igloczek commented Jun 30, 2026 •

Copy link
Copy Markdown
Collaborator

Implements tasks/006-clean-database-legacy-hooks.md from the ponytail audit backlog.

Goal

Delete MySQL-era lifecycle hooks that are no-ops or irrelevant for bun:sqlite.

Scope

  • Remove Database.patch() and its call in src/server/server.ts (and test/mock-testdb.ts if present).
  • Simplify Database.close(): drop tarn.js unhandledRejection retry loop; keep WAL checkpoint + single R.close().
  • Confirm schema upgrades still run via runPendingUpgrades during connect().

Acceptance criteria

  • Database.patch has zero references.
  • Database.close() has no unhandledRejection listener or retry while loop.
  • Graceful shutdown still checkpoints WAL and closes SQLite without errors in smoke test.
  • bun run test:backend passes.

Depends on

Nothing.

Verification

bun run test:backend
rg "Database\\.patch|unhandledRejection|tarn" src/server/database.ts src/server/server.ts

Audit reference

Finding #17 — legacy DB hooks.

@Igloczek

Copy link
Copy Markdown
Collaborator Author

/ponytail-review

Pure deletion of MySQL-era lifecycle hooks. No new abstractions.

Lean already. Ship.

3 files changed, 2 insertions(+), 35 deletions(-)

@Igloczek
Igloczek force-pushed the task/006-clean-database-legacy-hooks branch from 379df1b to 8e27a77 Compare June 30, 2026 11:42
@Igloczek
Igloczek merged commit 7f36ce9 into master Jun 30, 2026
1 check passed
Igloczek added a commit that referenced this pull request Jun 30, 2026
Add smtp, chat, sms, and template-body schema variants to
GenericNotificationForm and migrate 24 additional provider families
(SMTP, API email, chat-token, SMS) onto shared schemas.

- 59 bespoke notification .vue files remain (down from 94)
- 36 providers now use GenericNotificationForm via schemas
- Lazy-load remaining bespoke forms via import.meta.glob
- Net deletion of ~350 LOC vs schema additions

Depends on task 034 (merged). Ponytail audit finding #2 phase 2.

# Conflicts:
#	src/components/notifications/SMTP.vue
#	src/components/notifications/index.ts
#	src/components/notifications/notification-form-schemas.ts
@Igloczek
Igloczek deleted the task/006-clean-database-legacy-hooks branch June 30, 2026 12:58
Igloczek added a commit that referenced this pull request Aug 8, 2026
task/006: Remove legacy Database.patch and tarn close loop
Igloczek added a commit that referenced this pull request Aug 8, 2026
Add smtp, chat, sms, and template-body schema variants to
GenericNotificationForm and migrate 24 additional provider families
(SMTP, API email, chat-token, SMS) onto shared schemas.

- 59 bespoke notification .vue files remain (down from 94)
- 36 providers now use GenericNotificationForm via schemas
- Lazy-load remaining bespoke forms via import.meta.glob
- Net deletion of ~350 LOC vs schema additions

Depends on task 034 (merged). Ponytail audit finding #2 phase 2.

# Conflicts:
#	src/components/notifications/SMTP.vue
#	src/components/notifications/index.ts
#	src/components/notifications/notification-form-schemas.ts
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