Run the example
From an Obversa checkout, run:examples/packages/workspace.ts. See the
workspace contract for the API and its limits.
What the example checks
- Repository: It creates a Git repository with a committed
README.md. - Anchor: It captures the repository and verifies the anchor before use.
- Lease and fork: It acquires one writer lease and creates a child worktree from the captured revision.
- Child state: It reads the child
HEADandREADME.md. The command fails if the revision or file contents differ from the captured repository. - Cleanup: A
finallyblock removes the temporary root. That root contains both the repository and its sibling worktree directory.
Report
The command prints one JSON object with three fields:revision: The revision read from the child worktree.anchor: The captured-anchor digest returned by the acquired lease.branch: The Git ref for the child branch.