Cookbook 21 · Operate
Workspace Source-to-Release
Pin a workspace's entities into an immutable revision, diff two revisions, carry one through a reviewed change request, and take it to the release gate -- no Git involved.
OperateCore15–30 min
What you build. A GitHub-free release train. A prompt (two versions) and a test set are authored live, then a managed snapshot pins them into revision R1 -- the identical request returns the identical revision, idempotent by content -- and pinning the prompt's v2 makes R2. The R2-vs-R1 diff names exactly the changed pin. A change request carries R2 through a second person's review (the author's self-review is refused) to technically_approved. A draft release into dev then moves to evaluating -- and its evaluation stays queued because this lab leaves the owner-only evaluator off. When enabled, B10.2 requires complete digest-matching candidate, dataset and judge pins and blocks this incomplete fixture rather than fabricating evidence. Every door past that boundary is demonstrated as the refusal it is: accept, quality signoff, apply, and the version tags that are never minted. This surface has no UI in the alpha; the journey is API/SDK-first.
Surfaces: Projects / Workspaces (API) Releases Audit Log
What you learn
- Pin named versions of named entities with
POST /projects/{id}/revisions:snapshot-- a content-hashed, immutable answer to "what exactly is running?" that needs no Git, no bundle, no object store - Trust the diff:
GET .../revisions/{R2}/diff?base={R1}is deterministic, keyed by (resource_type, logical_name), and names exactly what changed - Run a review without GitHub: the caliber backend's change request reserves the semver claim at creation, requires an assigned reviewer to submit, refuses the author's own review (
self_review_forbidden), and reachestechnically_approvedon the second person's approval - Create a release against an environment (four are seeded; only
devstarts active) with content-address digests and an idempotency key, and move it toevaluating - Operate the boundary knowingly: the evaluation stays
queued(never wait on it), and accept / quality signoff / apply each refuse with a documented reason -- the refusals are the demonstration
Implementation flow
flowchart LR E["Prompt v1, v2 + test set"] --> S1["Snapshot R1 (managed, ready)"] S1 --> IDEM["Identical pins -> identical revision"] E --> S2["Pin v2 -> R2"] S2 --> D["Diff R2 vs R1: one changed pin"] D --> CR["Change request on R2, reviewer assigned"] CR --> SELF["Author's review: 403 self_review_forbidden"] CR --> APR["Second person approves: technically_approved"] APR --> REL["Draft release into dev"] REL --> EV["Evaluate: evaluation queued -- and stays queued"] EV --> B1["Accept: 409 qa_go_decision_required"] EV --> B2["Signoff: 409 gate evidence missing"] EV --> B3["Apply: 409 only an approved release"]
Step-by-step UI only
Each step shows the exact navigation path, the fields to fill, the button to click, and a snapshot of the CALIBER screen you'll be on.
API · ProjectsBefore you start: start CALIBER withCALIBER_FEATURE_RELEASE_CANDIDATES=trueand a second account inCALIBER_OPERATOR_USERS. CheckGET /capabilitiesshows the flag enabled, create the workspace, and readGET /projects/{id}/environments.You'll see: Four seeded environments --dev,qa,staging,prod-- and onlydevstarts active.Screen snapshotcaliber · API · ProjectsRead / inspect this surface — no form to fill.API · Workspace sourceReadGET /projects/{id}/sourceandGET .../source/connection.You'll see:source_mode: caliber_managedwith a null source and no connection: managed snapshots need no Git. The Git import path (POST .../revision-imports) refuses with 409workspace_source_not_configured.Screen snapshotcaliber · API · Workspace sourceRead / inspect this surface — no form to fill.Prompt lifecycle › Prompts · Test SetsAuthor a prompt and give it a second version; create a test set. These are the entities the revision will pin.You'll see: An ordinary prompt with versions 1 and 2, and a test set at version 1.Screen snapshotcaliber · Prompt lifecycle › Prompts · Test SetsRead / inspect this surface — no form to fill.API · RevisionsSnapshot revision R1:POST /projects/{id}/revisions:snapshotwith two pins -- the prompt atversion_ref "1"and the test set at"1". Repeat the identical request.You'll see: Amanaged,readyrevision -- and the identical request returns the identical revision id: snapshots are idempotent by content.Screen snapshotcaliber · API · RevisionsRead / inspect this surface — no form to fill.API · RevisionsSnapshot R2 with the prompt pinned atversion_ref "2"(the test set unchanged).You'll see: A new revision id withrevision_numberone higher.Screen snapshotcaliber · API · RevisionsRead / inspect this surface — no form to fill.API · RevisionsDiff them:GET .../revisions/{R2}/diff?base={R1}. Also try a pin withresource_type: knowledge_base.You'll see: Exactly one changed pin (the prompt), nothing added or removed. The unsupported type is refused with 409resource_type_adapter_unavailable; a viewer's snapshot is 403.Screen snapshotcaliber · API · RevisionsRead / inspect this surface — no form to fill.API · Change requestsCreate a change request on R2 (semantic_version 1.0.0,review_backend caliber, the reviewer assigned) and:submitit.You'll see: Statusopen; the semver claim is reserved at creation.Screen snapshotcaliber · API · Change requestsRead / inspect this surface — no form to fill.API · Change requestsTry to review it as its author, then review it as the assigned second person (POST .../reviews {"head_id": ..., "decision": "approve"}).You'll see: The author is refused: 403self_review_forbidden. The reviewer's approval makes it technically_approved.Screen snapshotcaliber · API · Change requestsRead / inspect this surface — no form to fill.API · Releases (flagged)Create a release of R2 intodev(three 64-hex content digests, an idempotency key), replay the same key, thenPOST .../evaluate.You'll see: Adraftrelease; the replay returns the same release; evaluate moves it to evaluating with the evaluation queued while this lab leaves the evaluator flag off. An enabled worker requires complete digest-matching pins.Screen snapshotcaliber · API · Releases (flagged)Read / inspect this surface — no form to fill.API · Releases · Audit LogRead the refusals that guard everything beyond the boundary::accepton the change request,quality-signoffandoperations {"kind": "apply"}on the release.You'll see: 409qa_go_decision_required, 409 machine gate evidence is missing, 409 only an approved release can be applied -- andsnapshot_workspace_revision,create_workspace_change_request,submit_workspace_change_requestin the audit log. Version tags stay empty: only an accept mints one.Screen snapshotcaliber · API · Releases · Audit LogRead / inspect this surface — no form to fill.
Evaluation & quality gates
| Quality gate | Target |
|---|---|
| Environments | dev, qa, staging and prod are seeded with the workspace; only dev starts active |
| Snapshot idempotency | identical pins return the identical revision_id; a changed pin returns revision_number + 1 |
| Diff | exactly one changed pin (the prompt), nothing added or removed; a knowledge_base pin is 409 resource_type_adapter_unavailable; a viewer's snapshot is 403 |
| Second-person review | self-review 403; the assigned reviewer's approval makes the change request technically_approved; accept stays 409 qa_go_decision_required |
| The boundary | the release reaches evaluating with its evaluation queued, and it is still queued after a wait; signoff and apply refuse with their documented reasons; version tags stay empty |
| Audit | snapshot_workspace_revision, create_workspace_change_request and submit_workspace_change_request appear in the audit log |
Developer notes & gotchas
- Flags. Only
/projects/{id}/releases*is gated, byCALIBER_FEATURE_RELEASE_CANDIDATES(shared with cookbook 11's record-only candidate signoff -- a different feature). Revisions, snapshots, diffs, change requests, environments and version tags are ungated. - No UI, on purpose. The alpha ships this surface API-first; the Releases page's candidate section belongs to lab 11's feature. The lab says so instead of inventing screens.
- The reviewer needs two grants. An editor project role and the platform operator scope (
CALIBER_OPERATOR_USERS=admin,lab21-reviewer) -- review eligibility checks both. - Never wait on this fixture's evaluation. The lab leaves the owner-only evaluator disabled by default, and this fixture intentionally omits complete execution pins. The SDK's
wait_for_evaluationwould sit out its full 900 s timeout; an enabled worker blocks the incomplete plan rather than fabricating evidence. - One-way doors.
PUT /projects/{id}/sourceflips a workspace to git_managed with no reverse, after which managed revisions cannot be released beyond dev -- the lab never calls it. - Run it.
CALIBER_OPERATOR_USERS=admin,lab21-reviewer scripts/cookbook-env.sh up lab21 --flags release_candidates,cookbooks, thencd sdk/caliber-sdk && ../../caliber/.venv/bin/python examples/cookbooks/cookbook_21_workspace_source_to_release.py(under a minute;--cleanuparchives what it created).