Skip to content

Voice call history (Python-LXST-bounded rebuild) - #1081

Open
torlando-tech wants to merge 7 commits into
mainfrom
feat/android-voice-call-history-python-parity
Open

Voice call history (Python-LXST-bounded rebuild)#1081
torlando-tech wants to merge 7 commits into
mainfrom
feat/android-voice-call-history-python-parity

Conversation

@torlando-tech

Copy link
Copy Markdown
Owner

Voice call history (Python-LXST-bounded rebuild)

Android voice call history rebuilt to stay strictly within unmodified Python LXST 0.5.1 facts and lifecycle behavior.

Feasibility boundary

  • LXST-kt is pinned to immutable v0.0.8; no LXST change was needed (parity proven against Python LXST).
  • Persisted outcomes reduced to: CONNECTED_ENDED, MISSED_INCOMING, DECLINED_LOCAL, REJECTED_REMOTE, BUSY_REMOTE, CANCELLED_LOCAL, NOT_CONNECTED, FAILED, INTERRUPTED.
  • No authoritative UNANSWERED, DROPPED, or media/transport terminal causes.
  • Outgoing ringing unavailable; connectedAt = established-callback observation time.
  • Single serialized service owner; durable admission before exposure; identity-scoped blocking (delivery + telephony); migration/transfer at format v8.

Scope

  • Reduced domain model (9 outcomes, 7 Columba-observed failure reasons)
  • Room storage v5/v6 with reduced CHECK constraints, deletion authority, recovery
  • Serialized service lifecycle owner + symmetric native/Python callback adapters
  • Incoming durable admission via existing pre-ringing policy seams
  • Migration/transfer, deletion, non-resurrection, identity scoping
  • Voice history UI + Call details with honest ambiguity (no unsupported claims)
  • Obsolete-code absence; reduced exact-candidate matrix

Verification

  • Unit suites: data 378, rns-api 247, rns-host 565/565, app 6038 - all green.
  • ktlint, detekt, Android lint, minified releases (both flavors) pass.
  • Migration/import round trips for every reduced outcome pass.

Not merged. Review against the reduced feasibility boundary.

CallFinalOutcome (9 outcomes), CallFailureReason (7 prerequisite causes), UnconnectedOutcome scoping, immutable CallLifecycleRecorder, AcceptedCallObservation. Build fresh per reduced model (Task 5).
Add call_history + call_history_deletions via MIGRATION_4_5 (version 4->5). Reduced CallHistoryDao rejects removed outcomes (no UNANSWERED/DROPPED/media), finalizes connected as CONNECTED_ENDED, persists Columba-observed FAILED reasons, preserves deletion authority and non-resurrection. Released schemas/migrations untouched (new 5.json only). (Task 6)
…zed lifecycle\n\nIntroduce a single CallCallbackAdapter contract (incoming ringing, established,\ngeneric ended, busy, rejected, local decline, local cancel) and a\nSerializedLifecycleCallbackAdapter that routes LXST events into the shared\nAcceptedCallLifecycle owner. Identity mismatches fail closed without mutating\nhistory; busy/rejected are scoped to outgoing pre-connection attempts.\n\nWire both NativeCallManager and PythonCallManager to the same contract via the\nCallCoordinator call-state/call-ended listeners, and route hangup() to the\nlocal decline/cancel intents before the telephone hangs up.\n\nEquivalent callback APIs across both backends; symmetric tests cover established,\ngeneric ended, busy, rejected, local decline/cancel, identity-mismatch\nfail-closed, and ringing informational no-op. All flavors compile and check.
Add reduced call-history export/import to encrypted .columba migration at format
version 8: CallHistoryExport/CallHistoryDeletionExport, idempotent import by
attempt ID, conflict skip, transactional rollback, deletion authority with
non-resurrection, and open-call recovery as INTERRUPTED. Wire exporter/importer and
remove duplicate Hilt bindings so PersistenceModule is the single provider.

MigrationCallHistoryImportTest (16) and MigrationCallHistoryRoundTripTest (4) cover
every reduced outcome, deletion authority, rollback, and identity deletion.
Add the reduced call-history UI: Voice history cards (Chats Voice segment),
Call details with Call again / View peer / block / delete, local search,
date grouping, and navigation. Replace unsupported outcome copy with reduced neutral
labels (Connected then ended / Not connected; no UNANSWERED/DROPPED/media),
show outgoing ringing as unavailable, and preserve inferred INTERRUPTED
presentation.

Add identity-scoped blocking (schema v6, BlockedPeerDao/repository), blockIdentity
across RnsCore/AIDL/native+python, and AnnounceRepository telephony lookup.

37 new Compose/navigation/viewmodel tests; all app/module suites green.
@greptile-apps

greptile-apps Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds identity-scoped Android voice-call history while limiting persisted outcomes to evidence available from the pinned LXST implementations.

  • Adds Room schemas, migrations, repositories, deletion authorities, and recovery for durable call records.
  • Introduces serialized host-process lifecycle recording for native and Python call backends.
  • Extends migration format v8 to transfer call records and non-resurrection tombstones transactionally.
  • Adds history and detail UI, navigation, identity-aware blocking, and cross-module tests.

Confidence Score: 5/5

The PR appears safe to merge because no concrete blocking or independently actionable non-blocking defect remains after reviewing the persistence, lifecycle, migration, IPC, and presentation paths.

Durable admission, terminal updates, deletion authority, migration rollback, restart reconciliation, and IPC mappings preserve their stated contracts across the changed native and Python call paths.

Important Files Changed

Filename Overview
rns-host/src/main/kotlin/network/columba/app/rns/host/call/ServiceCallLifecycle.kt Adds serialized durable admission, transition recording, terminal finalization, and restart reconciliation without an accepted defect.
rns-api/src/main/java/network/columba/app/rns/api/call/AcceptedCallLifecycle.kt Coordinates accepted-call observations, retries, cleanup, and process-local ownership across both backends.
app/src/main/java/network/columba/app/migration/CallHistoryMigrationImporter.kt Validates the reduced evidence model and imports tombstones before records within the encompassing Room transaction.
app/src/main/java/network/columba/app/migration/MigrationImporter.kt Integrates format-v8 call history into the existing transactional database import.
data/src/main/java/network/columba/app/data/db/ColumbaDatabase.kt Advances the Room schema with explicit migrations for call history and deletion authority.
data/src/main/java/network/columba/app/data/db/dao/CallHistoryDao.kt Implements idempotent lifecycle transitions, terminal writes, deletion checks, and open-attempt recovery.
data/src/main/java/network/columba/app/data/db/dao/CallHistoryDeletionDao.kt Atomically records deletion authority and removes finalized calls to prevent later resurrection.
rns-ipc/src/main/kotlin/network/columba/app/rns/ipc/client/ClientRnsCore.kt Keeps the changed Binder-facing core contract aligned with its AIDL and server adapters.
app/src/main/java/network/columba/app/ui/screens/VoiceHistoryContent.kt Adds the identity-scoped voice-history presentation and interaction surface.
app/src/main/java/network/columba/app/viewmodel/ChatsViewModel.kt Exposes call-history state and actions to the Chats presentation layer.

Sequence Diagram

sequenceDiagram
    participant Backend as Native/Python LXST backend
    participant Adapter as Serialized callback adapter
    participant Lifecycle as Service call lifecycle
    participant DB as Room call history
    participant Repo as Call history repository
    participant UI as History/details UI
    Backend->>Adapter: call observation
    Adapter->>Lifecycle: attempt-scoped transition
    Lifecycle->>DB: persist admission/transition/outcome
    DB-->>Lifecycle: durable acknowledgement
    Repo->>DB: identity-scoped query
    DB-->>Repo: call records
    Repo-->>UI: history flow
    UI->>Repo: delete finalized record
    Repo->>DB: atomically add tombstone and delete record
Loading

Reviews (1): Last reviewed commit: "Port UI and navigation with honest ambig..." | Re-trigger Greptile

@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant