Review And Durable History Flow
See how a reviewable proposal becomes durable history under the optional extension runtime.
What You'll Learn
- how a reviewable proposal moves toward execution
- how approval and rejection fit into the history flow
- how to read branch, head, and restored snapshot state after commit
Prerequisites
- You finished Approval and History Setup
- You already know the advanced runtime assembly
- You want to understand the operational flow after a proposal is created
Vocabulary Before The Flow
| Term | Meaning in this tutorial |
|---|---|
| Proposal | A submitted request waiting for approval or rejection |
| Seal | The history write that makes a terminal app snapshot durable |
| Head | The latest durable record for a branch |
| Restore | Reading the app snapshot stored for a durable record |
| Branch | A named line of history with its own latest head |
1. Create The Reviewable Request
import { governed } from "./server/governed-runtime";
const request = governed.action.addTodo.bind("Ship the history tutorial");This is still a typed runtime request. Governance adds an approval policy and proposal record when the runtime receives it.
2. Submit And Inspect The Proposal
const pending = await request.submit();At this point the result is either blocked, or it contains a pending proposal reference.
3. Resolve Pending Work
if (pending.ok && pending.status === "pending") {
await governed.approve(pending.proposal);
await pending.waitForSettlement();
}If the approval policy rejects instead, use reject(proposalId, reason) and no history record is published.
4. Read Durable History
const head = await governed.getLatestHead();
const restored = head ? await governed.restore(head.worldId) : null;Lineage only publishes the new visible snapshot after the history commit succeeds. That is the key difference from the base runtime.
5. Inspect Branch State
const branch = await governed.getActiveBranch();
const heads = await governed.getHeads();These queries let you inspect the committed history state after proposal execution.
Next
Go back to Guides when you need concrete production techniques, or to Lineage API and Governance API for package-level details.