These correction examples are an explicitly historical 4.1.0 publication.
Their original source commits and hashes are retained in Platform's merged
history and pinned in work-run-correction-openapi-sdk-fixtures.json. They do
not establish compatibility with the current 5.1.0 API. Contract development
and publication now belong to servers/retvest-platform/contracts/; no hosted
site or package registry was changed by this source reconciliation.
title: API reference publication notes
tags: [api, openapi, sdk, developer-experience]
updated: 2026-07-09
API Reference Publication Notes
retvest-site owns public API publication notes, not the runtime OpenAPI
exporter. retvest-contracts owns the shared OpenAPI artifact contract,
retvest-platform owns API routes, schemas, auth metadata, generated OpenAPI
snapshots, and release evidence, and retvest-sdk owns SDK and CLI
distribution claims.
Current State
- Correction OpenAPI evidence exists in owner repos:
retvest-contractscarriesopenapi/openapi.jsonat version4.1.0,openapi/work-run-correction-fixtures.json,openapi/work-run-correction-consumer-pin.json, andopenapi/retvest-contract-artifact-manifest.json;retvest-platformcarriescontracts/openapi-work-run-corrections.v1.json. - The site-rendered Work Run correction OpenAPI JSON and HTML snapshots are
committed as source artifacts at
docs/api/openapi.jsonanddocs/api/index.html, with Docusaurus static mirrors atdocs/static/api/openapi.jsonanddocs/static/api/index.html. Those static artifacts are byte-for-byte Docusaurus mirrors of the canonical source artifacts. The committed correction slice is a pinned source-publication snapshot; it is not proof that a newly bumped shared contract has been propagated to every consumer. - The customer-facing API overview lives in
docs/api-reference.md; keep this source note paired with that page until generated snapshots are committed. - The rendered publication status lives in
docs/api-publication-status.md; keep it paired with this source note so docs readers can see the same source-only boundary. docs/api/openapi.jsonanddocs/api/index.htmlare the canonical source artifact paths for the reviewed correction slice.- Hosted API docs, generated SDKs, package registries, and customer automation examples must stay pending until the owner evidence exists. Customer automation examples must stay pending until the owner evidence exists. The rendered correction slice is not hosted API docs proof, package-registry proof, or customer automation evidence.
docs-api/work-run-correction-openapi-sdk-fixtures.jsonis a site-side source fixture for public Work Run correction examples and records historical correction evidence paths. It also pins the owner source artifact digests used by the committed rendered JSON/HTML so provenance tampering is rejected even in site-only validation. It is not hosted API docs proof, package-registry proof, or customer automation evidence.- The fixture is pinned to OpenAPI version
4.1.0and schema hash905a9f3c0b3bf0f90eb4a0a2c6f9369ef72fd4c92cb0dfe627cf950811af9d8a. These docs describe only verified append-only correction behavior from that source-publication fixture: create pending rows, read history and audit metadata, apply, reject, or request retry. They are source-publication examples, not hosted API docs or generated customer automation. - Public examples in this repo must stay metadata-only and must not include bearer tokens, customer content, raw prompts, generated answers, citation bodies, private evidence refs, or full UUID-heavy payloads.
Site-Side Checks
docs-api/rag-stream-sse-contract.json is a site-side publication fixture for
POST /rag/query/stream. It defines the ordered citation, token, error,
and done event vocabulary and fail-closed treatment for fragmented frames,
malformed payloads, disconnects, duplicate terminal events, and citation/source
resolution. It does not replace the platform-owned route contract or prove a
fresh end-to-end stream. Platform, SDK, and app digest pins and runtime tests
remain cross-repository acceptance work.
Validate API publication artifacts and wording:
make api-publication-artifacts
Build the Docusaurus source after docs changes:
make docs-build
Validate the committed Work Run correction OpenAPI JSON/HTML artifacts and their static mirrors:
make api-publication-artifacts
Run the full owner-repo gate before handoff:
make verify
Correction API Publication Slice
The Work Run correction docs now expose source-publication anchors for the review lifecycle while hosted API publication remains pending:
POST /admin/work-runs/{work_run_id}/correctionsfor create.GET /admin/work-runs/{work_run_id}/correctionsfor list.POST /admin/work-runs/{work_run_id}/corrections/{correction_id}/applyfor apply.POST /admin/work-runs/{work_run_id}/corrections/{correction_id}/rejectfor reject.POST /admin/work-runs/{work_run_id}/corrections/{correction_id}/retryfor retry-request.GET /admin/work-runs/{work_run_id}/corrections/auditfor audit metadata.docs/work-run-correction-audit.mdfor role-aware audit visibility, metadata-only hash-chain examples, request IDs, and Retry-After handling.docs/work-run-correction-api-errors.mdfor checked fixture IDs, typed Problem codes, request IDs, Retry-After, idempotency, expected-version, cursor pagination, and unsafe retry boundaries.docs-api/work-run-correction-openapi-sdk-fixtures.jsonfor the site-side fixture recording endpoint names, request and response fields, lifecycle statuses, pagination and audit metadata, and SDK helper route fragments.
The site-side publication set is intentionally explicit so the docs index, sidebar, footer, API page, and API publication notes can be checked together:
| Source page | Publication role |
|---|---|
docs/work-run-correction-lifecycle.md |
Operator state model for draft, pending review, applied, rejected, superseded, stale-version refresh, and retry-after wait states. |
docs/recording-corrections.md |
Operator runbook for recording corrections, reading append-only history, reading audit metadata, and handling Problems. |
docs/work-run-correction-create.md |
Source-only create examples for pending corrections and idempotent create retries. |
docs/work-run-correction-list.md |
Source-only list examples for cursor pagination, tenant-safe unavailable states, and read retries. |
docs/work-run-correction-audit.md |
Source-only audit visibility examples for role-aware metadata, hash-chain fields, and unsafe payload boundaries. |
docs/work-run-correction-apply.md |
Source-only apply examples for expected-version review decisions and unsafe retry suppression. |
docs/work-run-correction-reject.md |
Source-only reject examples for bounded reason codes and unsafe retry suppression. |
docs/work-run-correction-retry.md |
Source-only retry-request examples for expected_work_run_version, unresolved approval/export gates, already-finalized Problems, and invalid-transition Problems. |
docs/work-run-correction-api-errors.md |
Fixture-aligned Problem examples, request IDs, Retry-After, idempotency, expected-version conflicts, and cursor handling. |
docs/work-run-correction-sdk-examples.md |
Verified TypeScript and Python source-package helper names, shipped correction limits, typed Problem handling, and lower-level helper code while package registry release evidence remains pending. |
These anchors must remain source-publication examples even though retvest-site
now renders reviewed correction-slice JSON/HTML from the owner artifacts. Keep
request id, Retry-After, idempotency, expected-version, expected_work_run_version, cursor pagination, shipped
limits, and typed Problem handling described as bounded examples. The site may
name the checked contract evidence paths above, but do not claim hosted docs,
customer automation, package-registry availability, or public API-doc rendering
outside the committed correction slice before the owner evidence exists.
Done Definition
Public API publication can graduate only when:
retvest-contractsandretvest-platformprovide reviewed OpenAPI source artifacts and contract checks.- This docs source renders the same correction snapshot without remote API-doc assets.
retvest-sdkconsumes the same committed snapshot for SDK and CLI distribution claims.- Every owner-repo consumer copy is byte-synced to the newly bumped shared contract before public copy treats that contract as current.
- Hosted docs DNS, indexing, and smoke proof exist before public copy claims
docs.retvest.comis live.