Commit Graph

183 Commits

Author SHA1 Message Date
jubnl 915ab84faf refactor(demo,backup): seed and reset through DemoRepository, live-connection backup statements through MaintenanceRepository, isDemoUserId through an injected DemoService 2026-09-24 02:04:32 +02:00
jubnl e76818627b refactor(plugins): the trip-write role gate through a repository, in isolation 2026-09-24 01:58:22 +02:00
jubnl 425d889983 refactor(share): public share links, the pre-init photo fallback, and collection-places survivors through repositories 2026-09-24 01:24:21 +02:00
jubnl a5665b5d2d fix(server): plan 3g close-out — transactional book first-save, skeleton reconcile and share-link create; unknown-key entry patches are no-ops again; parity and authorization pins for the journey repositories 2026-09-24 00:49:55 +02:00
jubnl 8bcfd92142 refactor(doc-sync): connections, reconciler and controller-SQL relocation through repositories 2026-09-24 00:40:23 +02:00
jubnl d79f4cc605 refactor(collections): saved places, copy-to-trip, labels and invitations through repositories 2026-09-24 00:11:01 +02:00
jubnl 1d72c6909b refactor(integrations): dawarich connection, sync, tracks and review-flow through repositories 2026-09-23 23:55:52 +02:00
jubnl 3a4646a7bb refactor(server): journey-table survivors in trips, photos, memories, auth-cleanup and plugin-contributions through repositories 2026-09-23 23:37:01 +02:00
jubnl 992f9ae4a7 refactor(collections): access model, hydration, export/import and list CRUD through repositories 2026-09-23 23:29:15 +02:00
jubnl 407e50c295 refactor(journey): public share links, TREK Studio books and the journal facades through repositories 2026-09-23 23:09:13 +02:00
jubnl 24ad08a014 refactor(journey): journey stats, entries, photos, contributors and suggestions through repositories 2026-09-23 23:05:59 +02:00
jubnl 6486159289 refactor(journey): journey and trip access control, CRUD and the trip-sync engine through repositories 2026-09-23 22:29:55 +02:00
jubnl 847a538509 refactor(atlas): visited countries, regions and bucket list through repositories 2026-09-23 21:40:36 +02:00
jubnl 8b94a5a03e refactor(vacay): vacation plans, entries, shares and holiday calendars through repositories 2026-09-23 21:13:35 +02:00
jubnl c6687b2574 refactor(notifications): reminder crons, mailer, ntfy and webhook transports through repositories 2026-09-23 20:59:07 +02:00
jubnl 4258f05926 refactor(notifications): in-app notifications and channel preferences through repositories 2026-09-23 20:33:07 +02:00
jubnl f47a7d4568 refactor(school-holidays): country and region catalog through repositories 2026-09-23 20:30:29 +02:00
jubnl 3a039d5b19 refactor(packing): packing items, bags and templates through repositories 2026-09-23 19:40:08 +02:00
jubnl 0c5843f00e refactor(todo): todo items through repositories 2026-09-23 19:32:26 +02:00
jubnl c7c2018cda refactor(budget): budget items, members, payers and settlements through repositories 2026-09-23 19:14:57 +02:00
jubnl d7aba126cd refactor(collab): notes, polls, messages and links through repositories 2026-09-23 18:58:15 +02:00
jubnl bceaf4b134 refactor(memories): unified, immich and synology photo sync through repositories 2026-09-23 18:38:36 +02:00
jubnl 399ca58a7d refactor(files): trip files and file links through repositories, with transactions added 2026-09-23 18:22:02 +02:00
jubnl db2db7f5a3 refactor(photos): trek photos, memories access and cache sweeps through repositories 2026-09-23 17:58:20 +02:00
jubnl 6102929e8d refactor(calendar): calendar reads and reservation visibility through one predicate 2026-09-23 16:38:47 +02:00
jubnl 5c14f228ce test(server): plan 3d — MCP test helper constructors follow the accommodations and days services 2026-09-23 16:01:13 +02:00
jubnl 2aeecd98fa refactor(accommodations): stays through repositories inside the existing transactions 2026-09-23 15:57:51 +02:00
jubnl 26233434f6 refactor(feeds): ICS feed tokens and anonymous feeds through repositories 2026-09-23 15:12:13 +02:00
jubnl 7ee0403eaf refactor(reservations): reservations, endpoints and travelers through repositories 2026-09-23 14:58:36 +02:00
jubnl 3a26d03b00 refactor(roadtrip): roadtrip tables through repositories 2026-09-23 14:44:10 +02:00
jubnl 93324e71c4 feat(server): plan 3d groundwork — dialect helpers, visibility predicate, feed and cron context ratchets 2026-09-23 13:52:38 +02:00
jubnl 175eb3b11b fix(server): plan 3c close-out — non-finite ids bound as NULL, trip id parsed once at every places/days/ws gate
Platform: NulSafeSqlitePlatform now renders a bound NaN as NULL and
+/-Infinity as 9e999/-9e999, matching better-sqlite3's own legacy binding
(rule 22 extension) — the program-wide fail-safe for any caller that still
passes an unguarded Number(untrusted) into a converted statement.

PlacesService.verifyTripAccess and RealtimeGateway.handleJoin stop doing
that: verifyTripAccess parses once with toRowId and threads the parsed id
through create/import/bulk/rating/export.gpx (deleting the seven
toRowId(tripId) ?? -1 sites), and handleJoin gets a Number.isFinite guard.
DaysService gets the same treatment across list/create/getDay/reorder/
insert/resyncAccommodationDays, closing the gap where a hex-spelled trip id
could renumber a real trip's days while the raw-bind inverted-accommodation
guard silently matched nothing.

DatabaseService.getTripTitle is deleted; PlacesService injects
TripsRepository directly and calls getTitle itself.

Template/cheap-item cleanup: DayAssignmentsRepository.listForTimeSort uses
$castTo instead of an unknown bridge; the duplicated TagRow interface in
Places.repository.ts is now imported from Tags.repository.ts;
AssignmentWithPlaceRow extends the guarded DayAssignmentRow instead of
restating its columns; PlaceShadowPicksRepository.totals drops its
unreachable ??-fallback branch; Places.repository.ts's updatePlace types
the NOT NULL name column as string; trip-members.service.ts's
transferOwnership threads one parsed trip id through all three writes and
corrects two stale "raw-bind seam" docstrings that were actually Number()
seams; a dead canAccessTrip mock is removed from reservations.e2e.test.ts.

Tests: the 23 new no-explicit-any warnings in TRIP-SVC-069 are typed
(lint back to 2416); HTTP and WS regression coverage for the non-finite
and non-canonical id shapes across places/days routes, mutation-proved;
TRIP-JOIN-005 asserts the exact concurrent-join settlement instead of
>= 1; a new tests/unit/db/transaction-yield.test.ts pins rule 24's
measured transaction-yield/dirty-read/nested-BEGIN behaviour.
2026-09-23 12:22:36 +02:00
jubnl 18a4784ebd refactor(trips): trips through repositories 2026-09-23 09:33:48 +02:00
jubnl f19face405 refactor(places): import paths through repositories 2026-09-23 08:53:54 +02:00
jubnl 94c6efbbcc refactor(trip-members): membership, guests and the trip read model through repositories 2026-09-23 08:00:39 +02:00
jubnl cee6310e59 refactor(server): trip-membership, place-shadow, place-enrichment, place-photos and query helpers through repositories 2026-09-23 06:41:03 +02:00
jubnl f41da98df3 refactor(assignments): day assignments through repositories 2026-09-23 06:27:21 +02:00
jubnl d7f5bc64c1 refactor(days): days and day notes through repositories 2026-09-23 05:31:36 +02:00
jubnl d2e0d7e320 refactor(trips): trip access through TripsRepository; demo seed in a request context; dialect helpers for the trips cluster 2026-09-23 04:46:18 +02:00
jubnl 769b9577ec refactor(server): trip-access primitives async at every caller 2026-09-23 02:46:39 +02:00
jubnl 33b9488653 refactor(auth): AuthService and account cleanup through repositories 2026-09-22 23:17:17 +02:00
jubnl daef15be70 refactor(tokens): MCP and API tokens through McpTokensRepository 2026-09-22 20:23:11 +02:00
jubnl 57f4e29b9a refactor(auth): users table through UsersRepository; JWT and MFA lookups repository-backed 2026-09-22 19:39:01 +02:00
jubnl 66703efeb7 feat(db): generated entities declare their repository type; test casts dropped 2026-09-22 18:01:45 +02:00
jubnl 761cd14b2b fix(server): plan 3a review follow-ups — fail closed without an ORM at every choke point; seam and D5 ratchet tests; dead method and DDL copies removed 2026-09-22 16:54:45 +02:00
jubnl 6fafcd72f2 fix(settings): drop dead wiring and the speculative deleteForUser; strict row assertions 2026-09-22 15:47:02 +02:00
jubnl 59fa932ec8 test(server): harness constructors follow the Task 5 repository signatures; one test ORM per handle in the plugin host 2026-09-22 15:19:58 +02:00
jubnl 6763648c45 refactor(settings): user and instance settings through repositories
SettingsRepository (getForUser/upsertForUser/getOne/deleteForUser) replaces
the per-user settings table's raw SQL; SettingsService drops DatabaseService
entirely. instance-api-keys.ts's readInstanceApiKey/writeInstanceApiKey/
resolveApiKey take an explicit AppSettingsRepository/UsersRepository instead
of a raw connection.

An earlier version resolved those two repositories itself from the active
MikroORM request context, so none of its six callers needed to change. That
worked in production and e2e (always inside a real request) but broke
service construction in plain unit tests across every calling domain
(addons, auth x2, maps, transit, unsplash - 185 failures on a full run),
since none of them wrap a request context. Each of those six services now
injects its own AppSettingsRepository/UsersRepository and passes them
through explicitly, matching how every other converted repository in this
migration is consumed; their own SQL is untouched (outside Plan 3a).
2026-09-22 15:08:49 +02:00
jubnl 98e906a88e chore(addons): well-known gate wraps only the addon read in a request context; drop unused test factories 2026-09-22 14:23:39 +02:00
jubnl 6db91c8bf3 refactor(addons): addon catalog and photo providers through repositories 2026-09-22 14:06:57 +02:00