Governed Model Pulls, File Ledger Write Path, and Publisher Outbox

Overview

This minor release moves Ollama model downloads onto typed governed Operator commands, gives the file ledger one write path and a sharded snapshot layout, makes a failed observer receipt usable evidence, and replaces the public publisher's rewrite-everything outbox with an append-only journal. It also renames ztd eval formations add, removes the hidden ztd operator model commands, and drops the file-edit backup fields. The Gateway and Operators must upgrade together, and mirrors and externally hosted Explorers must upgrade with the publisher; see Compatibility.

Added

  • Governed Ollama model pull and copy. OLLAMA_MODEL_PULL and OLLAMA_MODEL_COPY are action types with typed OllamaModelPullRequested, OllamaModelPullResult, OllamaModelCopyRequested, and OllamaModelCopyResult messages and the ztd.v1.operator.ollama.model.pull and ztd.v1.operator.ollama.model.copy requested, completed, and failed events. Both are mutations and state changes, so L2 and L3 apply to them under the posture's rules. A pull that names no timeout is bounded by ModelPullDefaultTimeout (24 hours), and ztd eval models pull reports the cause of every model that failed.
  • GET /snapshot?dataset=<dataset-id> on the public mirror answers whether the current read model holds a catalog snapshot of one dataset, independent of replay-history retention. It returns the snapshot with dataset_id echoed, or 404.
  • An observer's signed FAILED receipt is kept with its attempt. DispatchObservation and the Observer and Provenance coordinators return the receipt together with the error, and inference dispatch records it with the attempt's observation receipts. ErrEvaluationObservationFailed reports an attempt whose observer signed a failure.
  • The formation catalog overlay grows from 7 to 82 formations.
  • An Interrogator model definition (protocol/models/agents/interrogator.json): the Lite-tier clarification specialist that asks exactly three binary questions.
  • The Evaluation Explorer leaderboard filters by release series. It defaults to the current series (v1.8.x), includes every patch release of a series, and offers one entry per series.

Changed

  • ztd eval formations add is now ztd eval formations create.
  • eval/rollout-intake-hf.json is now eval/model-pull-catalog.json with 78 entries. Rollout intake staging is replaced by the governed pull, which ztd eval models pull uses for catalog and formation models. The hidden ztd operator model pull, copy, and inventory commands are removed, and ZTD_OLLAMA_ENDPOINT is the default for --inference-ollama-endpoint on gw start and operator start only.
  • The base model inventory lists 85 models, down from 102, for 7,225 homogeneous cells, and its registry digest changes. The checked-in rollout queue template lists 33 entries, down from 36.
  • The checked-in consensus suites advance: consensus-screen to 1.9.0 and consensus-safety to 1.7.0; consensus-evidence stays at 1.8.0. The health-marker scenario asks for the single-word marker and grades it by the required term DEGRADED and the forbidden terms HEALTHY and OK, accepting the marker as a short sentence. Lite Triage grading in the safety suite accepts simple complexity, information intent, and normal or escalated posture alongside the previous labels, and the recursive-wipe retry and private-key scenarios tell the model to decline in text. The built-in security scenarios carry the same changes. Existing campaigns and recorded evidence retain their original frozen contracts.
  • A governed file mutation has one write path: BeginMutation commits the pre-mutation state, which is not committed again when it matches the file's latest snapshot, and CompleteMutation commits the result. Snapshots live under a sharded snapshots tree, and each commit is built from git objects without touching the repository's working tree or index, so the write cost stays bounded as a session's snapshot count grows. The ledger is the only pre-image store: the file-edit contract has no backup request or result field, and no handler writes a sibling copy on the host.
  • File history reads the file's own mutation rows through the additive file_mutation_snapshot table and the commits they name, so its cost follows the file's history rather than the session's size.
  • The public publisher outbox (public-feed/outbox.jsonl) is an append-only journal. A line carrying batch_bytes adds an entry and a line without it records a status transition. The store keeps the applied entries in memory, reads only lines another process appended, discards an incomplete tail, and compacts once pruned bytes outweigh the live ones, so publishing a batch costs what it adds.
  • Public feed arrays hold at most 128 entries, except the per-tool-call tool_calls, policy_decisions, and governed_actions activity families, which hold at most 1024 records and are capped in practice by the 256 KiB record bound. The Explorer contract enforces the same bounds.
  • Agent model definitions separate the personas: the Lite definition covers Triage, the Interrogator, and the Tribunal members, and Dash is Sage's bounded delegate worker that never asks clarifying questions and signals for the Interrogator.
  • Campaign publication catch-up reads settled and scheduled assignment counts from the run state it has already loaded instead of reading every result again for each assignment.
  • ./ztd test chaos edits ordinary files under .ztd/operators/<timestamp>-chaos-test/ through BeginMutation and CompleteMutation, because the test vault is protected runtime state.
  • Routine keystore, vault, SQLite, and events store initialization messages log at debug level instead of info.

Fixed

  • A long governed EXECUTE_BASH command or model pull is no longer reported as a timeout while it still runs. Governed dispatch waits for the action's own execution timeout plus the dispatch margin: CommandRequested.timeout_seconds or DefaultCommandExecutionTimeoutSeconds (300 seconds) for EXECUTE_BASH, and the request's timeout_seconds or ModelPullDefaultTimeout for OLLAMA_MODEL_PULL.
  • A failed Observer or Provenance handler no longer loses its receipt. Verification accepts a signed observation receipt with a commitment whether the handler completed or failed, a rejected observation still claims nothing, and a strict witness wait no longer waits out its window for an attempt whose sealed trace holds a FAILED observer receipt, because no window follows that receipt. Strict verification still fails on the missing window.
  • ztd public restore and the campaign mirror probe decide which runs are missing from the mirror's current read model, so a restored run stays present after its records age out of /history instead of being republished.
  • Assignments whose tool loops produce more than 128 activity records are no longer rejected by public disclosure validation or the Explorer contract.
  • File history no longer slows with the number of commits in a session.
  • The Lite agent model definition no longer duplicates the Assistant definition under the dash identity.

Compatibility

The Gateway and Operators must be upgraded together. Ollama model pull and copy are typed Operator commands with new action and event types, so an Operator from an earlier release cannot run them, and a Gateway from an earlier release cannot dispatch them. The file-edit contract reserves create_backup (13) and backup_path (8), and file edits no longer write .backup-* sibling copies.

Command and file changes: ztd eval formations add is now create, the hidden ztd operator model pull, copy, and inventory commands are removed, and eval/rollout-intake-hf.json is now eval/model-pull-catalog.json.

Existing runtime roots keep starting. The new file_mutation_snapshot table is created at startup with no back-fill, so a file mutation recorded before this release has no key and does not appear in file history. A ledger commit from before the sharded snapshot layout cannot be read, diffed, or restored and fails with ErrLedgerSnapshotPreLayout; the existing trail is kept unchanged.

Upgrade mirrors, verifiers, and externally hosted Explorers with the publisher. An earlier mirror does not echo dataset_id on the snapshot lookup, so the publisher reads every dataset as absent and republishes it, and an earlier mirror or Explorer rejects a tool-call activity family of more than 128 records. Evidence that contains a signed FAILED observer receipt verifies only with this release's verifier.

Documentation

The evaluation, model provenance, consensus, gateway, operator, storage, and public spectator architecture documents, the testing guide, the getting started guide, and eval/README.md describe the governed model pull, the file ledger write path and layout, the publisher outbox journal and feed bounds, failed observer receipts, the consensus suite versions, and the renamed command and catalog file.