CALIBER
Quickstart

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 reaches technically_approved on the second person's approval
  • Create a release against an environment (four are seeded; only dev starts active) with content-address digests and an idempotency key, and move it to evaluating
  • 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.

  1. API · Projects
    Before you start: start CALIBER with CALIBER_FEATURE_RELEASE_CANDIDATES=true and a second account in CALIBER_OPERATOR_USERS. Check GET /capabilities shows the flag enabled, create the workspace, and read GET /projects/{id}/environments.
    You'll see: Four seeded environments -- dev, qa, staging, prod -- and only dev starts active.
    Screen snapshot
    caliber · API · Projects
    API · Projects
    Read / inspect this surface — no form to fill.
  2. API · Workspace source
    Read GET /projects/{id}/source and GET .../source/connection.
    You'll see: source_mode: caliber_managed with a null source and no connection: managed snapshots need no Git. The Git import path (POST .../revision-imports) refuses with 409 workspace_source_not_configured.
    Screen snapshot
    caliber · API · Workspace source
    API · Workspace source
    Read / inspect this surface — no form to fill.
  3. Prompt lifecycle › Prompts · Test Sets
    Author 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 snapshot
    caliber · Prompt lifecycle › Prompts · Test Sets
    PromptsPrompts · Test Sets
    Read / inspect this surface — no form to fill.
  4. API · Revisions
    Snapshot revision R1: POST /projects/{id}/revisions:snapshot with two pins -- the prompt at version_ref "1" and the test set at "1". Repeat the identical request.
    You'll see: A managed, ready revision -- and the identical request returns the identical revision id: snapshots are idempotent by content.
    Screen snapshot
    caliber · API · Revisions
    API · Revisions
    Read / inspect this surface — no form to fill.
  5. API · Revisions
    Snapshot R2 with the prompt pinned at version_ref "2" (the test set unchanged).
    You'll see: A new revision id with revision_number one higher.
    Screen snapshot
    caliber · API · Revisions
    API · Revisions
    Read / inspect this surface — no form to fill.
  6. API · Revisions
    Diff them: GET .../revisions/{R2}/diff?base={R1}. Also try a pin with resource_type: knowledge_base.
    You'll see: Exactly one changed pin (the prompt), nothing added or removed. The unsupported type is refused with 409 resource_type_adapter_unavailable; a viewer's snapshot is 403.
    Screen snapshot
    caliber · API · Revisions
    API · Revisions
    Read / inspect this surface — no form to fill.
  7. API · Change requests
    Create a change request on R2 (semantic_version 1.0.0, review_backend caliber, the reviewer assigned) and :submit it.
    You'll see: Status open; the semver claim is reserved at creation.
    Screen snapshot
    caliber · API · Change requests
    API · Change requests
    Read / inspect this surface — no form to fill.
  8. API · Change requests
    Try 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: 403 self_review_forbidden. The reviewer's approval makes it technically_approved.
    Screen snapshot
    caliber · API · Change requests
    API · Change requests
    Read / inspect this surface — no form to fill.
  9. API · Releases (flagged)
    Create a release of R2 into dev (three 64-hex content digests, an idempotency key), replay the same key, then POST .../evaluate.
    You'll see: A draft release; 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 snapshot
    caliber · API · Releases (flagged)
    API · Releases (flagged)
    Read / inspect this surface — no form to fill.
  10. API · Releases · Audit Log
    Read the refusals that guard everything beyond the boundary: :accept on the change request, quality-signoff and operations {"kind": "apply"} on the release.
    You'll see: 409 qa_go_decision_required, 409 machine gate evidence is missing, 409 only an approved release can be applied -- and snapshot_workspace_revision, create_workspace_change_request, submit_workspace_change_request in the audit log. Version tags stay empty: only an accept mints one.
    Screen snapshot
    caliber · API · Releases · Audit Log
    API · Releases · Audit Log
    Read / inspect this surface — no form to fill.

Evaluation & quality gates

Quality gateTarget
Environmentsdev, qa, staging and prod are seeded with the workspace; only dev starts active
Snapshot idempotencyidentical pins return the identical revision_id; a changed pin returns revision_number + 1
Diffexactly 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 reviewself-review 403; the assigned reviewer's approval makes the change request technically_approved; accept stays 409 qa_go_decision_required
The boundarythe 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
Auditsnapshot_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, by CALIBER_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_evaluation would sit out its full 900 s timeout; an enabled worker blocks the incomplete plan rather than fabricating evidence.
  • One-way doors. PUT /projects/{id}/source flips 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, then cd sdk/caliber-sdk && ../../caliber/.venv/bin/python examples/cookbooks/cookbook_21_workspace_source_to_release.py (under a minute; --cleanup archives what it created).

CALIBER : Contextual Adaptive Lifecycle for Intelligent Build, Evaluation, and Refinement — Cookbooks — every recipe is UI-implementable on the shipped platform. Source + assets under docs-site/cookbooks/<nn>-…/. Regenerate with python3 docs-site/cookbooks/training/build.py.