Skip to main content

Package registry

CLI publication and setup store packages in the object-backed registry. Configure VIGILO_EVALUATOR_REGISTRY_STORAGE_CONFIG for standalone commands, or supply an explicit RegistryBinding to library operations. Embedding hosts can also open a presigned-upload publisher through EvaluatorService::package_registry in vigilo::operations::evaluators. The host authenticates the caller and authorizes the bound publication namespace before deriving a caller handle with user(UserContext). The publisher uses the registry database and a private S3-compatible bucket. The database stores only release metadata, the exact archive digest and size, and verified references for the Wasm, README, and supporting files. Published archives are retained indefinitely.

Standalone processes can use VIGILO_EVALUATOR_REGISTRY_ENDPOINT for a different network route to the same physical bucket and prefix. The owner configuration still defines the durable registry identity.

Publication​

begin_upload looks up the version with one indexed query. A matching fingerprint returns the committed release. A mismatch returns a conflict. For a new version, the service records a private marker and issues a 15-minute PUT URL signed for the declared compressed length and conditional creation. Send every returned header and keep the URL private. Use the original preflight request to recover the outcome after an uncertain response.

finish_upload verifies the archive, logical fingerprint, embedded identity, and supported ABI. It verifies each extracted object before committing the release and the attempt claim in one transaction. The version becomes visible at commit. The publication window is one hour.

Keep the storage prefix exclusive to the registry and the bucket private. Configure the endpoint with an enforced upper bound on the total duration of an admitted write, including its commit. Supply the bound through UploadPolicy::new. URL expiry bounds when a write can start. The cleanup deadline also includes the write completion bound and a clock-skew margin. Publisher startup verifies that the endpoint rejects oversized and duplicate PUTs and rejects an unsigned access-control header.

The hosted database role needs read access to the registry identity and row-protected access to the release and claim tables. The operator publisher is available through EvaluatorClient::package_registry.

Cleanup​

Run cleanup against the same registry database and storage binding. The maintenance role needs complete claim visibility and insert access to record cleanup ownership.

vigilo evaluator cleanup once --storage-config ./registry-storage.toml
vigilo evaluator cleanup start --storage-config ./registry-storage.toml

A pass reads up to 64 expired markers and submits at most 256 deletions by default. An empty page makes zero database queries. A published claim preserves the release objects. An unpublished claim reserves the attempt for cleanup before deleting its objects, with the marker removed last. Partial deletions leave a marker for retry. Use the reported cursor with once --after to continue a page scan. start advances the cursor every five minutes and starts another scan when it reaches the end. An embedding host can schedule the same operation through Client::evaluator_registry_cleanup and RegistryCleanup::sweep.

Versioned package assets​

Mount EvaluatorService::package_assets on a dedicated HTTPS asset origin. The host provides the origin, registry storage binding, and the policy identity that can read public releases. The read role uses the existing row policies on evaluators and evaluator_package_releases and can read the registry identity. For private requests, pass the authenticated UserContext to PackageAssets::respond. The public route uses only the configured public identity, regardless of request credentials. Public serving is disabled without that identity.

PackageAssets::url uses a shared prefix for every resource in an exact version. These paths address version 1.2.0 of vigilo/sentiment.

  • /evaluators/public/vigilo/sentiment/1.2.0/files/README.md
  • /evaluators/public/vigilo/sentiment/1.2.0/files/media/example.png
  • /evaluators/public/vigilo/sentiment/1.2.0/archive

Use the private route for caller-authorized assets. Pass the raw percent-encoded path of a GET to respond and stream its verified body with the returned HTTP headers. Map missing and denied requests to 404 and leave errors uncached. Bound response writes at the origin so disconnected or slow requests release their body permits. The adapter reserves up to eight response bodies per service instance, takes one bounded registry lookup, and releases the database before reading private storage. The adapter verifies the stored object's size and digest before it sends a response.

Public responses allow a five-minute cache. Private responses use Cache-Control: private, no-store. README links resolve against the same release and visibility route. Markdown uses generated heading anchors and rejects raw HTML and unsafe destinations. PNG, JPEG, and WebP display inline. Other package assets and the exact archive download as attachments. External HTTPS destinations are links, including destinations authored as images.

Removed release retention​

Removing a release immediately closes its README and extracted-file routes. The original archive stays available to authorized readers. A removal queues the extraction for cleanup after 30 days. During run preparation, the registry keeps canonical files while a frozen run plan still needs them. Publishing the ready plan hands ownership to the cell and releases the registry reference. Cancellation or deletion of the preparing run also releases its reference.

vigilo evaluator cleanup removed --storage-config ./registry-storage.toml

Schedule the command per registry partition or call RegistryCleanup::sweep_removed. Each pass reserves a bounded page in the retirement index. It retries pinned, partial, or unconfirmed work, and deletes only the removed version's extracted objects. The role needs access to the retirement and preparation tables and permission to delete the extraction keys. Upload cleanup and serving have independent work budgets.

Cell staging and eviction​

Before publishing a ready run plan, preparation stages and verifies the exact Wasm for each distinct digest in the cell's run storage. It pins ready copies by tenant and storage binding. The verified run configuration records each object's key, digest and size. Workers load and compile those exact objects using the run's existing storage authority. Accepted admission and workers can continue while the artifact registry is unavailable.

Terminal runs release their pins. Every staged copy becomes eligible for eviction 24 hours after its last pin is released. An eviction claim retires the specific generation before deleting its key. New work can pin a replacement generation during that deletion. A failed deletion leaves the retired generation available for retry.

vigilo evaluator evict --storage-config ./cell-storage.toml --limit 64

Schedule the bounded command per cell storage binding, or call Client::evict_cell_evaluators from an embedding host. The operator needs visibility of all cell artifact and pin rows for that binding and authority to delete the exact retired cell objects.