---
title: "Verify offline edit conflict preserves both versions"
description: "Test a sandbox draft edited while externally offline against a competing server revision, ensuring reconnect surfaces a conflict instead of silent loss."
canonical_url: "https://vostride.com/agent-library/network-recovery/offline-edit-conflict.md"
md_url: "https://vostride.com/agent-library/network-recovery/offline-edit-conflict.md"
content_kind: "recipe"
topic: "network-recovery"
---

# Verify offline edit conflict preserves both versions

Test a sandbox draft edited while externally offline against a competing server revision, ensuring reconnect surfaces a conflict instead of silent loss.

## Risk

Optimistic offline editing can overwrite a newer server revision while displaying a success toast. Keep both the local draft and competing revision in independent fixture records and require an explicit documented resolution path.

## Fixtures

- An owned sandbox document editor whose offline editing and conflict behavior are product requirements.
- An external network fixture that disconnects the client while keeping a separate sandbox writer available; both initial and competing revisions are recorded.
- A disposable document with distinct opening and closing paragraphs, a test editor account, and a read-only revision-history oracle.

## Steps

1. Open the initial document and verify its revision and both paragraphs against the baseline fixture.
2. After the external fixture confirms disconnection, replace the closing paragraph and verify the app labels the change unsynced or pending.
3. Have the prepared external writer change the opening paragraph on the server, then restore the client connection and verify a conflict or documented merge review appears.
4. Choose the documented resolution that retains the remote opening paragraph and local closing paragraph, and verify both are shown before accepting.
5. Save the resolution, reopen the document, and verify both intended edits; inspect revision history and verify the competing revision remains auditable rather than silently overwritten.

## Expected results

- The offline draft is visibly distinguished from a synchronized revision.
- The final document contains both independently prepared edits under the product merge policy.
- Revision history explains the conflict and final resolution without losing the competing server version.

## False-pass traps

- A server writer touching the same cached client session may fail to create an actual independent conflict.
- A success badge alone cannot prove that both authors edits survived.

## Cleanup

- Restore the fixture document and disable the external disconnection and competing-writer controls.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa first test](/docs/agent-qa/guides/first-test.md)
- [agent-qa hooks](/docs/agent-qa/guides/hooks.md)
- [agent-qa test](/docs/agent-qa/configuration/test.md)

- [Network recovery QA recipes](/agent-library/network-recovery.md)
- [Software factory QA library](/agent-library.md)
