Skip to content

fix(connector): recover corrupt admission journals safely - #2

Open
arzvaak wants to merge 4 commits into
mainfrom
codex/admission-recovery
Open

arzvaak wants to merge 4 commits into
mainfrom
codex/admission-recovery

Conversation

@arzvaak

@arzvaak arzvaak commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

A corrupt admissions.json could stop pairing. Reset reported success but left the broken file in place, so the next attempt failed again.

Reset now keeps a private backup of the damaged file and writes a recovery marker before moving it. Healthy journals are preserved, and storage failures are reported instead of returning success.

Existing conversations remain readable after recovery. If a matching message is already stored on Desktop, its retry is acknowledged without sending it again. If delivery cannot be confirmed, the phone blocks the old prompt and explains what to do. To resume sending, start a new conversation on the phone. Its fresh identity is recorded before sending, so recovery stays safe across restarts and clock changes.

The connector source and tests match the Desktop follow-up in BharatCode-ai/bharatcode-desktop#60. This addresses the shared issue noted on Mobile #1.

Checked: 65 connector tests, 76 Mobile tests, 15 security tests, TypeScript and lint passed. The Desktop integration test uses the actual server and a local test model; retries added no extra prompt submissions or model calls. Reset also passed through the packaged Linux app's renderer and IPC with a synthetic corrupt journal.

This follow-up has not been verified with a physical phone against the new package or on Windows/macOS. Full release acceptance is still pending.

@shrey16

shrey16 commented Oct 31, 2026

Copy link
Copy Markdown

Independent follow-up: the 36 focused Desktop access/API/recovery tests pass; the companion Desktop connector suite passes all 65 tests, and both source copies match byte-for-byte. The failing mobile job stops at npx expo install --check: react-native 0.88.0 versus expected 0.88.1. This is now tracked narrowly in #3; do not disable the check or use a force downgrade. Please land that patch alignment and rerun CI so we can integrate this with Desktop #60. Thanks for preserving uncertain-delivery protection instead of resetting it away.

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.

2 participants