mana-swift-event-sync/devlog/2026-05-25/macher.md
Till JS 1bb096be1e devlog: Repo-Historie nachgezogen (spieler+macher)
Erste Devlog-Befüllung; geerdet in den realen Commits, data.json via @mana/devlog-gen.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 01:44:32 +02:00

41 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
date: 2026-05-25
day: 1
view: macher
weekday: Montag
commits: 7
review: auto
---
# Montag, 2026-05-25 — Tag 1 (Macher-Sicht)
Tag eins: `ManaEventSync` entsteht als geteilte native Event-Sync-Lib —
sieben Commits, +2418 LoC, der native Counterpart zu `@mana/event-sync`.
Vereinheitlicht die zuvor doppelt von Hand gebaute Plumbing aus
`pageta-native` und `nutriphi-native`.
`3be550a` legt die Phasen E-4.0–E-4.2 hin: die vier Säulen `Core`
(Wire-Format/`EventEnvelope`), `Engine` (`EventSyncEngine` mit
Anonymous-Identität + `signIn`-Claim), `Transport` (HTTP + optional WS)
und `Storage` (SwiftData-`EventStorage`). Architektur-Invariante von
Beginn an: nur Plattform-Plumbing, keine App-Domäne — die Lib weiß
nichts von Articles oder Meals; Identität (`anon:<id>` vs JWT-`sub`)
wird in `makeEnvelope` gestempelt, nicht in der App.
Danach das Feinwerk:
- `4c1a141` (wire) — `sequenceNumber` als JSON-**String** decoden statt
als Zahl, sonst bricht Cross-Device-Sync (Wire-Parität zum Server,
der bei Drift gewinnt). `19dced0` macht den Fix lint-sauber
(c→container, nesting-disable).
- `d8cbdab` (lib) — Re-Encrypt-on-Claim plus `onError`-Hook: beim
Login werden anonyme Events neu attributiert **und** neu
verschlüsselt, bevor sie gepusht werden.
- `34e263a` (golden) — Replay-Parität gegen die geteilten
`event-kit`-Fixtures (E-4.3): dieselben Fixtures, die die TS-Seite
prüft, müssen nativ identisch replayen.
- `90cdbb1` (engine) — `hasPendingAnonymousEvents()` als Claim-Guard
für den Login-Hook, damit die App weiß, ob überhaupt etwas zu
übernehmen ist.
`ca6d024` zieht swiftlint `--strict` auf 0 Violations. Compliance-Linie
gehalten: keine 3rd-Party-Deps, nur Foundation/SwiftData/CryptoKit/OSLog
+ `ManaCore`.