Commit graph

47 commits

Author SHA1 Message Date
Natalie
576496ca3e feat(deploy): video-projects FUSE mount over DO Spaces
Generalize the photos-originals rclone-mount pattern to a video-projects
prefix so the video studio (and imajin ETL, per storage-portability-plan
§2.3) can read/write multi-GB project sources/renders as local files while
only hot data stays resident on plum (bounded VFS LRU cache). Lets a
small-disk laptop work with large footage without filling APFS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 21:10:13 -04:00
Natalie
46d350d8ce feat(send-queue): autoqueue toggle + message provenance
autoqueue: send_rate_config gains auto_queue (default true). When on, the
pending endpoint holds over-cap sends to drip out (burst-friendly); when
off, the cap is disabled and queued sends release immediately. Threaded
through getSendRateConfig/setSendRateConfig and GET/PUT /admin/send-rate-limit.

provenance: send_queue gains authored_by + dispatched_by (who composed the
text vs what triggered the send), a fixed vocabulary (user, claude-prospector,
claude-messenger, autoresponder, scheduled-worker, unknown) validated at the
enqueue boundary and recorded on insert. Nullable for legacy rows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 21:28:36 -04:00
Natalie
242d7cd1a8 feat(send-queue): burst-friendly outbound send-rate cap (default 10/5min)
The /client/imessage/send-queue/pending endpoint released up to 50 queued
sends per poll, so an enqueued burst all fired at once. Add a configurable
release cap: the endpoint now returns at most (maxSends − sent-in-window)
queued items, so a burst queues and drips out at the configured rate.

- macsync.send_rate_config single-row table, default max_sends=10,
  window_seconds=300 (10 per 5 min).
- entities/send-queue repo: getSendRateConfig / setSendRateConfig /
  countSentWithin.
- Admin control: GET/PUT /admin/send-rate-limit (service-token auth) so the
  cap is adjustable at runtime (wired to MCP via quinn.api separately).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 15:35:18 -04:00
Natalie
ab44591b8a fix(imessage): stop blob sync starving the periodic read cycle
The iMessage read cycle is driven by BaseSyncManager's 30s timer →
syncNow(), which is gated by 'guard !isSyncing'. performSync awaited
blobSyncManager.syncBlobs() inline, and that blob pass infinite-loops
when the upload backend is failing: /attachments/missing has no cursor,
so a full page of perpetually-failing uploads is re-fetched and re-failed
forever, the loop only breaking on a < pageSize page. performSync never
returned → isSyncing stuck true → every 30s read tick swallowed. Net
effect: messages only synced on app launch, drifting hours behind between
restarts (send-queue timers are independent, so they kept polling — the
tell that the timer fired but syncNow was gated).

Two fixes:
- Decouple the blob pass: fire it detached + in-flight-guarded instead of
  awaiting it on the read cycle, so a slow/failing blob backend can never
  hold isSyncing.
- Bound the blob loop: stop a pass after any full page that produced zero
  successful uploads (the same missing set would be re-fetched), instead
  of spinning forever.

Verified: read cycle now fires every ~30s on the live process without a
restart; blob pass logs 'stopping pass' and returns; store lag ~7s.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 14:37:40 -04:00
Natalie
464bbbd48d refactor(imessage): remove redundant contact-summary enrichment
The contact-summary sweep generated a 3-field digest (mostRecently /
overallSummary / recap) per iMessage contact via the model-boss chat
endpoint. It's redundant with the prospector, which already classifies
1271 prospects with tier + archetype + score + status — strictly richer
per-person intel for the contacts that matter. It was also the path that
wedged the server against the decommissioned model-boss host (2026-06-23).

Remove the generation path entirely: the per-sync sweep in
ingestContacts, the contact-summary feature module + its test, and the
now-orphaned chatJson client in shared/model-boss.ts (contact-summary was
its only caller). The connection circuit breaker stays — the
embedding-worker still calls the same coordinator and needs the same
wedge protection.

Kept the read-side data layer (summary_data column, summaryData field,
updateContactSummary, the /my/contacts surface field) dormant as the
landing spot if summaries are ever repopulated offline via batch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 14:02:10 -04:00
Natalie
1ebbd8e872 fix(imessage): circuit-break model-boss calls so a dead coordinator can't wedge ingest
The contact-summary sweep and embedding-worker call model-boss (GPU
coordinator) sequentially. When its host is offline every call paid the
full TCP-connect timeout (~3s) before failing; a sweep over ~1700
contacts serialised thousands of slow failures and stalled the whole
server — message ingest froze for hours while the listener stayed up
(observed 2026-06-23, coordinator host decommissioned).

Add a connectivity circuit breaker in shared/model-boss.ts: after 3
consecutive connection failures it opens for a 60s cooldown and fails
fast (no fetch), auto-probing once afterwards to recover. The
contact-summary sweep now bails the moment the breaker is open instead
of queueing doomed per-contact work. HTTP error responses still count as
reachable — the breaker tracks connectivity, not request success.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 13:30:15 -04:00
Natalie
cae15ae9f1 fix(@applications/@mac-sync): 🐛 update lan instead of local in all configs
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-10 03:12:06 -07:00
Natalie
06a8ace642 feat(imessage): improve incremental sync with date-based watermarking
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 18:43:38 -06:00
Natalie
982cee2982 feat(apps): add incremental sync overlap for recent messages
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 18:36:01 -06:00
Natalie
0bffc51524 feat(contacts): enable contact render polling opt-in
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-22 13:34:08 -07:00
Natalie
42b9229a9f feat(@applications/@mac-sync): add async actor-based iMessage sender with timeout guard
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-22 01:56:05 -07:00
Natalie
9373b14ab4 fix(@mac-sync): 🐛 add keychain search list cleanup on sign failure
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-21 22:03:45 -07:00
Natalie
48217173a4 feat(imessage): add fallback sms retry logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-21 21:06:28 -07:00
Natalie
5290e1de2f feat(imessage): improve iMessage service detection and error handling
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-21 20:24:45 -07:00
Natalie
b104ee1b12 fix(@mac-sync): 🐛 add debug flag for send-queue tracing
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-21 19:39:09 -07:00
Natalie
08c638532c feat(sync): add trace logging hooks
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-21 19:04:28 -07:00
Natalie
e5cad45ec3 feat(@applications/mac-sync): add timeout handling for osascript send
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-21 18:43:35 -07:00
Natalie
c2c7870915 feat(photos): improve search weighting and type safety
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-19 00:04:30 -07:00
Natalie
9a9040cad5 feat(@applications/mac-sync): add message metadata fields
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 23:58:09 -07:00
Natalie
b95d6c40af fix(@applications/mac-sync): 🐛 update mac sync send queue queries and db table names
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 21:12:47 -07:00
Natalie
a8a5654e97 fix(client): 🐛 change put to post for attachment upload endpoint
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 01:19:51 -07:00
Natalie
b2882a0751 fix(@applications/mac-sync): 🐛 adjust body limit to 1gb
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 00:12:23 -07:00
Natalie
e496834530 feat(server): add body length tracking middleware
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 00:06:04 -07:00
Natalie
bbf86b31c5 feat(apps/mac-sync): add debug logging for attachment uploads
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-17 23:59:42 -07:00
Natalie
b5706cbb99 fix(@applications/mac-sync): 🐛 fix identity validation logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-17 23:41:30 -07:00
Natalie
60df5f8c57 fix(@applications/mac-sync): 🐛 update token and error logging privacy handling
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-17 23:05:13 -07:00
Natalie
1a6facd1ef fix(api): 🐛 add token validation and error logging for uploads
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-17 22:23:05 -07:00
Natalie
e5437a9baa fix(@applications/mac-sync): 🐛 update blob sync id handling
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-17 21:34:11 -07:00
Natalie
2568866c70 feat(@applications): implement mac-sync identity and photo workflows
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-17 20:27:05 -07:00
Natalie
638845e150 fix(imessage): 🐛 fix empty-server initial-load detection
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-15 23:40:58 -07:00
quinn
19e4dc440a imessage initial-sync robustness: hold watermark on partial failure + log progress every 50 convs 2026-05-15 23:07:15 -07:00
Natalie
e3078ab5fd fix(shared): 🐛 update quinnApiURL doc clarity
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-15 23:03:42 -07:00
Natalie
0fa6c132ec docs(shared): 📝 update quinnApiURL documentation
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-15 21:55:31 -07:00
Natalie
ff9abc5e3c feat(@mac-sync): update handoff docs with verified paths
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-15 21:17:32 -07:00
quinn
e02ee2be00 schema rename: postgres namespace icloud.* → macsync.* (24 tables + index names) 2026-05-15 18:52:46 -07:00
quinn
10acb9f262 rename service identifier: QUINN_ICLOUD_DB_URL → QUINN_MACSYNC_DB_URL (postgres schema 'icloud.*' unchanged) 2026-05-15 18:48:57 -07:00
quinn
1295aec3e9 merge fixes: typecheck (attributedBody → base64 string), syncNow race coalescing, test alignment 2026-05-15 18:35:50 -07:00
quinn
8cc2c50fed merge batch 7: TODO marker for /my/* auth model divergence (ssoRequired vs serviceTokenAuth) 2026-05-15 18:22:37 -07:00
quinn
8c2943dd5f merge batch 6: web App.tsx routes, AppShell nav, api/client apiDelete, api/mail sendMail, Mail tab compose+deep-link 2026-05-15 18:20:11 -07:00
quinn
4ba759ba92 merge batch 5: server surfaces (admin/client/my route registration), my/calendar, my/mail, features/imessage/service typedstream decode 2026-05-15 18:16:46 -07:00
quinn
cb92645142 merge batch 4: server app + entities (device/contact/conversation/event/message) 2026-05-15 18:12:49 -07:00
quinn
c420741292 merge batch 3: MacSyncApp menu (reminders+notes+contacts), Info.plist; deploy/entitlements kept apricot 2026-05-15 18:08:15 -07:00
quinn
bf3879feba merge batch 2: imessage, iphoto, ContentTypeMapping/ConfigFile already-superset 2026-05-15 18:06:23 -07:00
quinn
cc1d40f7f6 merge batch 1: top-level metadata, shared, ical, imail 2026-05-15 18:02:04 -07:00
quinn
f4bd7e6829 merge: restore plum-only additive files atop apricot baseline 2026-05-15 17:06:07 -07:00
quinn
90443dad36 apricot baseline: contacts-sync-core + BlobSyncManager + embedding/search/sync-history 2026-05-15 17:05:39 -07:00
quinn
b8b63ac63d plum baseline: Phase 1/3/4/5 work (BaseSyncManager, SendQueue layer, ireminders, inotes) 2026-05-15 17:05:13 -07:00