fix: import completed call logs#261
Conversation
|
Codex review: needs maintainer review before merge. Latest ClawSweeper review: 2026-05-22 12:28 UTC / May 22, 2026, 8:28 AM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection shows current main does not fetch the PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the call-log import after maintainers explicitly accept the default Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main does not fetch the Is this the best way to solve the issue? Mostly yes. App-state and history call-log records are the right source for completed-call metadata; the remaining solution-fit question is whether full Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 20e114aa9df2. |
|
ClawSweeper PR egg ✨ Hatched: ✨ glimmer Sunspot Lint Imp Hatch commandComment Hatchability rules:
Rarity: ✨ glimmer. What is this egg doing here?
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Addressed the ClawSweeper finding. What changed in the updated single commit:
Acceptance checks passed: @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Pushed a maintainer fixup in a407a2b. What changed:
Local proof:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
Fixes #256 by importing completed WhatsApp call logs from the app-state/history paths that actually carry them, instead of relying only on live call signaling events.
What changed
regularapp-state collection during sync so existing call-log records are emitted and stored idempotently.HistorySync.callLogRecordswhen WhatsApp includes call logs in history sync payloads.startTimecan be seconds, milliseconds, or microsecondsRoot cause
calls listmostly showed liveofferevents because completed call logs arrive as call-log records in WhatsApp app-state/history data. Theregularapp-state collection was not being replayed, so if WhatsApp had already advanced that collection before wacli knew how to store call logs, later delta syncs could not recover those records. The call-log parser also assumed millisecond timestamps and PN self identity, which made replayed records land under 1970/self-chat in local testing.Local verification
Full local gate passed:
Redacted live proof from a local store:
Before the fix, after sync:
{"success":true,"data":{"calls":null},"error":null}After the fix,
sync --onceimported the same-day completed call as a structured call-log row:{ "chat_jid": "<peer>@s.whatsapp.net", "chat_name": "<redacted>", "sender_jid": "<self>@s.whatsapp.net", "sender_name": "<redacted>", "call_id": "0002...1BC", "event_type": "call_log", "direction": "outbound", "media": "audio", "outcome": "connected", "call_type": "regular", "duration_secs": 9, "timestamp": "2026-05-22T07:44:30Z", "participants": [ {"jid": "<peer>@s.whatsapp.net", "outcome": "connected"} ] }This proves the missing completed-call case from #256: the imported row is no longer just an
offer; it has the peer chat, real timestamp, duration, direction, media, and connected outcome.