merge: feat/phase1 into task/9

This commit is contained in:
Lucas Winther committed 2026-10-30 20:53:22 +01:00
commit 839d9697b0
12 files changed
+792 -272

No files matched your search

+2 -9
View File
@@ -27,20 +27,13 @@ Small, specific, independently actionable. Remove only when actually done.
- [ ] Plugins: reload re-imports entry files only; edits to a plugin's other modules need a server restart.
- [ ] Plugins: rate limiting is per run (each run builds its own client), not per plugin (spec §11); share a limiter per plugin in Phase 2.
- [ ] Plugins: `ctx.log` reaches `source_runs.log` only after the run ends, so a crash mid-run loses it.
- [ ] Sync: two concurrent runs of one connection outside the job queue (e.g. a manual run) can still race on `source_records`.
Queued syncs are serialised by `lockKey`.
- [ ] Restore: a new child work whose parent+position collides with an existing child of a re-matched parent fails
with `ImportError("conflict")` instead of being merged or repositioned.
- [ ] Restore: an unlink of identical attachment bytes between the pre-write and the commit could remove the file;
mitigated by re-writing after commit, not locked.
- [ ] Export bundles hold attachment bytes in memory; very large libraries need a streaming zip.
- [ ] Sync: `list` records are snapshotted but not applied to `lists` (Trakt/Hardcover emit them). Decide
the mapping (one list per record, items by matched work) and apply it through the change engine.
- [ ] Sync: accepting a `removed` event on an engagement de-duplicated across sources soft-deletes it even if
another connection still reports it; consider detaching that connection's `engagement_sources` row instead.
- [ ] Sync: pending `changed`/`conflict` events for a value the source has since moved past stay pending;
consider superseding them when a newer value for the same field arrives.
- [ ] Sync: two concurrent runs of the same connection (outside the job queue, e.g. a manual run) can both insert a new
`source_records` row for one key. Queued syncs are serialised by `lockKey`.
- [ ] Sync: `ingestListens` does one lookup and one insert per listen; batch it for large backfills.
- [ ] Admin merge does not merge colliding children recursively; colliding children stay under the tombstoned parent.
- [ ] Matching: a shared parent resolved without external IDs or position (title/year reuse in
`packages/core/src/matching.ts`) has no unique key, so concurrent matches can create it twice.