---
title: "Verify synchronized attachments preserve content and ownership"
description: "Test an owned sandbox integration that transfers an attachment, checking byte integrity, parent-record mapping, and correct handling of a same-name control."
canonical_url: "https://vostride.com/agent-library/integrations-sync/attachment-sync-integrity.md"
md_url: "https://vostride.com/agent-library/integrations-sync/attachment-sync-integrity.md"
content_kind: "recipe"
topic: "integrations-sync"
---

# Verify synchronized attachments preserve content and ownership

Test an owned sandbox integration that transfers an attachment, checking byte integrity, parent-record mapping, and correct handling of a same-name control.

## Risk

Attachment names are weak identifiers and can collide across source records. An independent digest and parent mapping must both match to prove that a successful transfer produced the intended content in the intended destination.

## Fixtures

- An owned sandbox source and destination with two mapped records, each holding a harmless same-name attachment with different contents.
- An external source fixture adding the chosen attachment to record A and a documented integration attachment-support contract.
- A read-only artifact oracle exposing source and destination digests, byte lengths, parent identifiers, and finalized transfer state.

## Steps

1. Open destination records A and B and verify their mapping identities before the prepared source attachment update.
2. Apply the external source fixture and complete a sync cycle, then verify A shows one new attachment with the expected filename.
3. Open B and verify its existing same-name attachment remains associated with B and has not been replaced.
4. Inspect the independent artifact oracle and verify A destination digest and byte length match A source fixture, its parent mapping is correct, and B digest remains unchanged.

## Expected results

- The transferred bytes match the intended source attachment exactly.
- The new attachment belongs to the correct mapped parent record.
- The same-name control on the other record remains unchanged.

## False-pass traps

- Matching filenames can conceal content from the wrong parent record.
- A completed transfer status cannot establish that the finalized object is untruncated or correctly linked.

## Cleanup

- Remove the run-specific attachment from both sandboxes and retain only approved baseline 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)

- [Integration and synchronization QA recipes](/agent-library/integrations-sync.md)
- [Software factory QA library](/agent-library.md)
