feat: platform backbone and field capture complete (checkpoint)

Platform backbone (plan 2026-10-13-plattform-rueckgrat), all tasks reviewed:
- webhooks with delivery table, retries and stable delivery id
- calendar handlers; a finished task removes its Outlook event
- tasks, automations, inspections, varroa, treatments, feedings,
  harvests, colonies, wintering, stock and bottling record domain events
  in the same transaction; legacy post-commit calls removed
- row locks through one helper (lockRowForUpdate, lockRowsForShare,
  lockRowsForUpdate)
- job framework with JobRun, cli exit codes, cleanup, task templates,
  daily evaluation, hourly app-backup and the rekey job
- system API and page "Verwaltung > System" with retry
- @nestjs/schedule removed, guard tests against in-process schedulers

Field capture T3 (plan 2026-10-13-t3-erfassung-am-stand), all tasks reviewed:
- inspection photo offline without metadata
- bulk capture for treatments, feedings and varroa (backend + frontend)
- offline stand mode with service worker, offline pages and packs
- offline session, cold start and logout on shared devices

Docs: ARCHITECTURE.md assumptions and sections updated, TASKS.md.
Gates: backend lint, typecheck, 1770 unit, 420 e2e, build, no schema
drift; frontend lint, typecheck, 913 tests, build. Not rolled out.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Nick SzaunigandClaude Opus 5.5 committed 2026-10-14 11:36:38 +02:00
1 parent c01a38835a
commit cdd30cf3ee
288 files changed
+39165 -2853

No files matched your search

@@ -5,6 +5,7 @@ import {
DOMAIN_EVENT_TYPES,
dailyDedupeKey,
NewDomainEvent,
utcDay,
} from './domain-event-types';
type CreateManyArg = {
@@ -208,6 +209,21 @@ describe('domain event catalog', () => {
);
},
);
it.each([
['2027-05-01T00:00:00.000Z', '2027-05-01'],
// Late evening in Berlin is still the same UTC day ...
['2026-10-13T23:30:00+02:00', '2026-10-13'],
// ... and shortly after midnight in Berlin the UTC day before.
['2026-10-14T01:30:00+02:00', '2026-10-13'],
])('utcDay(%s) is %s', (instant, day) => {
expect(utcDay(new Date(instant))).toBe(day);
});
it('utcDay yields a day dailyDedupeKey accepts', () => {
const day = utcDay(new Date('2026-10-13T08:15:00.000Z'));
expect(dailyDedupeKey('TaskDue', 't1', day)).toBe('TaskDue:t1:2026-10-13');
});
});
// The @ts-expect-error lines are checked by `npm run typecheck`: if the