---
title: "Keep an unpublished draft hidden from a viewer"
description: "Verify an editor can save a shared document draft while a prepared viewer continues to see the last published version until explicit publication."
canonical_url: "https://vostride.com/agent-library/collaboration/shared-draft-published-boundary.md"
md_url: "https://vostride.com/agent-library/collaboration/shared-draft-published-boundary.md"
content_kind: "recipe"
topic: "collaboration"
---

# Keep an unpublished draft hidden from a viewer

Verify an editor can save a shared document draft while a prepared viewer continues to see the last published version until explicit publication.

## Risk

Draft and published state are distinct collaboration boundaries. Use a separate fixture viewer check instead of assuming the editor preview represents what other roles can see.

## Fixtures

- A disposable document has published version Public baseline and an editor-only draft capability.
- The prepared viewer fixture can read the published document through an independent authorized viewer session.
- The contract says Save draft does not publish, and Publish promotes the draft to the viewer-visible version.

## Steps

1. Open the editor, replace the draft body with Release candidate details, and choose Save draft.
2. Verify the editor reports Draft saved and displays the new body without claiming publication.
3. Run the prepared viewer check and verify it still sees Public baseline and excludes Release candidate details.
4. Choose Publish in the editor and verify the document reports the new published revision.
5. Run the same viewer check again and verify Release candidate details is now visible, then reload the editor to confirm the published revision identifier.

## Expected results

- The draft save changes editor-visible content without changing the viewer-visible published body.
- Explicit publication changes the viewer-visible body to the exact prepared draft.
- The editor and independent viewer agree on the new published revision after promotion.

## False-pass traps

- An editor preview cannot establish the visibility boundary for a viewer role.
- A viewer probe with editor credentials would silently invalidate the draft-isolation assertion.

## Cleanup

- Delete the disposable document and its draft revisions, then close the prepared viewer session.

## 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 test](/docs/agent-qa/configuration/test.md)
- [agent-qa first test](/docs/agent-qa/guides/first-test.md)
- [agent-qa web testing](/docs/agent-qa/guides/web-testing.md)

- [Collaboration QA recipes](/agent-library/collaboration.md)
- [Software factory QA library](/agent-library.md)
