core/workbench-ui/schema-snapshot.json
Shay 1fe56e9b6f feat(workbench): calibration + serving-metrics readers — the gold-tether loop, visible (Wave M B1)
First Wave M / Phase B piece (GATING): read-only backend that makes the
calibrated-learning / serving-discipline loop inspectable — 'the engine
earns the right to guess', ADR-0175.

The workbench computes NONE of these numbers:
- GET /calibration/classes — per-class gold-tether view from the persisted
  practice arena ledger (evals/gsm8k_math/practice/v1/report.json per_class).
  Each class's reliability_floor is the engine's own one-sided Wilson
  conservative_floor (via ClassTally.reliability); PROPOSE (θ=0.85) / SERVE
  (θ=0.99) license verdicts come from core.reliability_gate.license_for.
  Failures-first ordering. A test proves the reader's floor equals a direct
  conservative_floor() call — no re-implementation.
- GET /serving/metrics — the live correct/refused/wrong counts read unchanged
  from the committed train_sample + holdout_dev report.json (currently
  4/46/0 and 5/495/0 — wrong=0). Never re-runs a lane.

Honest current state: the committed practice ledger's three classes
(additive/divisive/multiplicative) are all below N_MIN=10, so none has
earned a license yet — the reader shows exactly that, no fake green light.

- workbench/calibration.py: pure readers; imports core.reliability_gate;
  EvidenceUnavailableError -> 501 (fail-closed) when the artifact is absent.
- schemas + TS mirrors (CalibrationClass, ServingMetrics); both snapshots
  regenerated (deterministic); both drift gates pass.
- trust boundary: read-only over committed artifacts + engine-owned
  derivation; no execution, no mutation, no license ever changed.

Verified: 30 Python tests (incl. the no-reimplementation proof + fail-closed),
390 vitest, both schema drift gates, snapshots deterministic.
2026-06-13 00:38:16 -07:00

287 lines
5.1 KiB
JSON

{
"ArtifactDetail": [
"content_type",
"content"
],
"ArtifactRef": [
"artifact_id",
"kind",
"path",
"digest",
"created_at"
],
"AuditEvent": [
"event_id",
"source",
"source_path",
"timestamp",
"event_type",
"mutation_boundary",
"summary",
"ref_id",
"payload_digest",
"payload"
],
"CalibrationClass": [
"class_name",
"correct",
"wrong",
"refused",
"committed",
"reliability_floor",
"coverage",
"propose_required",
"propose_licensed",
"serve_required",
"serve_licensed"
],
"ChatTurnResult": [
"prompt",
"surface",
"articulation_surface",
"walk_surface",
"grounding_source",
"epistemic_state",
"normative_clearance",
"normative_detail",
"trace_hash",
"refusal_emitted",
"hedge_injected",
"mutation_mode",
"identity_verdict",
"safety_verdict",
"ethics_verdict",
"proposal_candidates",
"turn_cost_ms",
"checkpoint_emitted",
"turn_id"
],
"DemoRunResult": [
"demo_id",
"all_passed",
"what_this_proves",
"what_this_does_not_prove",
"scenarios"
],
"DemoScenarioRunResult": [
"scenario_id",
"status",
"passed",
"proposer_wrong",
"evidence_class",
"decision_reason",
"trace_hash",
"problems",
"response"
],
"DemoScenarioSummary": [
"scenario_id",
"title",
"expected_status",
"evidence_class",
"proposer_wrong",
"what_this_proves",
"what_this_does_not_prove"
],
"DemoSummary": [
"demo_id",
"title",
"description",
"evidence_class",
"scenario_count",
"read_only",
"scenarios"
],
"EvalLaneSummary": [
"lane",
"versions",
"read_only",
"description"
],
"EvalRunResult": [
"lane",
"version",
"split",
"passed",
"metrics",
"cases",
"source_digest"
],
"MathProposalDetail": [
"wrong_zero_assertion",
"proposed_change_payload",
"reasoning_trace_id",
"reasoning_trace_steps",
"evidence_hashes",
"handler_name",
"suggested_ratify_cli"
],
"MathProposalSummary": [
"proposal_id",
"domain",
"shape_category",
"proposed_change_kind",
"structural_commonality",
"evidence_count",
"replay_equivalence_hash"
],
"MathRatifyResult": [
"proposal_id",
"change_kind",
"handler_name",
"routing_status",
"message",
"suggested_cli",
"applied",
"target_path",
"evidence_hash"
],
"MathReasoningStep": [
"step_index",
"step_kind",
"claim",
"justification",
"input_pointers",
"output_payload"
],
"PackDetail": [
"manifest_digest",
"manifest"
],
"PackSummary": [
"pack_id",
"source",
"manifest_path",
"version",
"language",
"modality",
"determinism_class",
"checksum",
"checksums"
],
"ProposalDetail": [
"proposed_chain",
"replay_evidence",
"source",
"evidence",
"artifact_refs",
"suggested_cli"
],
"ProposalRef": [
"candidate_id",
"source_kind"
],
"ProposalSummary": [
"proposal_id",
"state",
"source_kind",
"replay_equivalent",
"created_at",
"downstream_effect"
],
"RunDetail": [
"turns",
"manifest"
],
"RunSummary": [
"session_id",
"source",
"turn_count",
"started_at",
"updated_at",
"checkpoint_present",
"checkpoint_revision",
"artifact_refs",
"evidence_gap"
],
"RunTurnRef": [
"turn_id",
"trace_hash",
"timestamp",
"trace_path",
"surface_excerpt",
"trace_integrity"
],
"RuntimeStatus": [
"backend",
"git_revision",
"engine_state_present",
"checkpoint_revision",
"revision_warning",
"active_session_id",
"mutation_mode"
],
"ServingMetrics": [
"lane",
"correct",
"refused",
"wrong",
"sample_count",
"source_path",
"source_digest"
],
"TurnJournalEntrySchema": [
"turn_id",
"timestamp",
"trace_hash",
"prompt",
"surface",
"articulation_surface",
"walk_surface",
"grounding_source",
"epistemic_state",
"normative_clearance",
"verdicts",
"refusal_emitted",
"hedge_injected",
"proposal_candidates",
"turn_cost_ms",
"checkpoint_emitted",
"trace_integrity",
"journal_digest"
],
"TurnJournalSummarySchema": [
"turn_id",
"timestamp",
"prompt_excerpt",
"surface_excerpt",
"trace_hash",
"grounding_source",
"trace_integrity"
],
"TurnReplayComparison": [
"turn_id",
"comparison_basis",
"origin_state",
"original_trace_hash",
"replay_trace_hash",
"equivalent",
"replay_turn_cost_ms",
"divergences"
],
"TurnReplayDivergence": [
"path",
"original",
"replay",
"severity"
],
"TurnVerdict": [
"outcome",
"runtime_detail"
],
"VaultEntry": [
"entry_index",
"epistemic_status",
"epistemic_state",
"metadata",
"versor_digest"
],
"VaultSummary": [
"source_path",
"entry_count",
"store_count",
"reproject_interval",
"max_entries",
"persisted"
]
}