7 Commits

Author SHA1 Message Date
root ff0b8fee25 fix(log+ingest): fix concurrent chunk upload log loss and wallet address duplicate key race
Two bugs found during device 6A906030 upload replay analysis:

1. create_log() used file_put_contents(FILE_APPEND) without LOCK_EX.
   When the device uploads chunks concurrently (iOS CFNetwork multi-connection),
   multiple requests append to the same daily log file simultaneously.
   Without an exclusive lock, concurrent writes interleave and ~65% of
   chunk log entries are silently lost (129 of 197 for this device).
   Fix: add LOCK_EX to prevent interleaving.

2. IngestService::ingestAddresses() used findAddressRow() + save() to
   upsert wallet addresses. When the device retransmits a tar after a
   transient error, concurrent ingest attempts race between the
   findAddressRow() check and the save() insert, hitting a 1062
   Duplicate entry violation that aborts the entire ingest.
   Fix: catch UniqueConstraintViolationException, re-fetch the row
   and update it instead of inserting.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 10:46:07 +00:00
hashbro 5be0313ccd fix: ip 2026-09-19 01:03:23 +08:00
hashbro db574cc629 feat: ds 2026-08-24 06:23:07 +08:00
hashbro 7c0066562f feat: new channel 2026-08-15 02:56:38 +08:00
hashbro 5453d9d69b feat: xxbb 2026-08-14 20:16:36 +08:00
hashbro 6bf33e2761 Harden C2 file logging for Baota permission failures.
Swallow create_log mkdir/write errors so missing public/log ownership cannot take down requests, and document the www:www permission fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-09 16:07:56 +08:00
hashbro 74a67c3900 init 2026-08-08 05:09:01 +08:00