Skip to content

1 - Design Records

Why SOW uses its current repository layout and publication workflow, and how the design changed.

Design records explain the choices behind SOW’s repository layout, state model, and publication workflow. Article dates record when we documented a decision; modification dates record later revisions.

Start with these current design explanations:

The historical series follows the v0.1 program, its design decisions and tests, the v0.2 reset, and later releases. It links to dated source snapshots. Use SOW Docs for current commands and release notes for version-specific changes.

1.1 - Coordinated Publication Decision

The v0.4.0 decision to keep SOW’s native publication providers, and the earlier rclone proposal that did not ship.

SOW 0.4.0 kept the native filesystem and r2 publication backends. An earlier proposal used rclone and added remote audit and preview commands. SOW kept the native design because it needs to track each conditional write and its result.

See sow publish for the current command syntax.

Why keep native backends

A publication plan binds each file to an expected SHA-256 and operation. The backend must create immutable objects without overwriting existing content and update mutable pointers conditionally. SOW records the result so it can resume after an interruption.

A bulk-copy tool would need another identity and checkpoint model to preserve these rules. The 0.4 work instead improved the existing backend:

  • conditional multipart uploads;
  • separate response-header and body-idle timeouts;
  • retries for operations that can be repeated;
  • verification of changed files through the public URL.

This retained the existing publication state and avoided a transport migration.

Publication workflow

The native backend uploads packages and immutable metadata before updating the repository indexes. It then checks the public files and records a checkpoint for the target. The next publication compares the current build with that checkpoint.

Change target settings

A binding revision records changes to the target name, public URL, or cache lifetime. The target keeps its publication history. A different storage location requires a new target.

Resume an interrupted publication

SOW saves the plan and progress for each attempt. Before the commit decision, it can abandon the attempt after checking that the indexes have not changed. After that decision, recovery completes the saved plan. This gives each target one history for upload, verification, and recovery.

Configure serving separately

The operator configures HTTP access, caching, and client trust. SOW verifies publication through the configured public endpoint.

See Publication and recovery for the complete sequence. Use sow publish for configuration and commands.

1.2 - SOW Design Evolution: From Route Graphs to the Repository Core

How SOW moved from the v0.1 distribution platform to a repository engine, and how v0.2 through v0.9 refined that model.

SOW moved from a Git-based distribution control plane in v0.1 to a repository engine in v0.2. This article traces that change and the refinements through v0.9.0.

The versions below refer to released Git tags, including v0.9.0. Some archived plans used “v0.2” and “v0.3” for development designs. In particular, the C2 layout with RPM hardlinks inside each view was replaced before v0.2.0 shipped.

Four articles cover the earlier work in detail:

The short history

Release Main changes Public layout
v0.1 Git/CAS state, Routes, Edge authorization, cloud workflows, and Pigsty migration Retired
v0.2 Plain/Managed modes, one package pool per Repository, metadata-only views, retained Generations, and target publication Introduced the current pool/ + dists/ layout
v0.3 Removed V1, cached package facts, simplified Plain builds, and batched payload commits Unchanged
v0.4 Single-pass verification, independent RPM trust rings, target rebind, and migration/recovery fixes Unchanged
v0.5 Package-path reservations, removal and recovery fixes, signing checks, and reproducible Plain timestamps Unchanged
v0.6 Previous Plain RPM indexes, recorded Managed publication times, stronger file checks, consistent state reads, and less repeated I/O Unchanged
v0.7 Plain RPM pruning, password-file signing, tag 267 ECDSA/EdDSA verification, caret version ordering, and migration/publication/recovery fixes Unchanged
v0.8 Opt-in R2 conditional deletion (gc TARGET --delete), external secret/keyring symlinks, control.tar.lzma removal, stricter DEB/RPM/signature checks, and batched publication/GC Unchanged
v0.9 Fault-tolerant flat create/prune (--strict), RPM v6 and tag 278 OPENPGP multi-signature verification, sow.yaml support, ECDSA/DSA metadata signing, and direct max_cache_ttl grace Unchanged

The source tags preserve the earlier implementations: v0.1.0, v0.2.0, v0.3.0, v0.4.0, v0.5.0, v0.6.0, v0.6.1, v0.7.0, v0.7.1, v0.8.0, and v0.9.0.

v0.1: useful questions, too many product concepts

The first plan covered Git-backed state, content-addressed storage, Routes and Views, snapshots, remote providers, Edge authorization, and legacy migration. Forty-four ADRs, numbered through 0045, documented the decisions and their failure cases.

The combined scope made ownership difficult to explain. Several objects could describe the same package bytes and published paths. Local repository generation also depended on cloud, Edge, and migration concepts.

The v0.2 reset removed Git as the authoritative product database, the separate CAS layer, the Route/View/Snapshot command model, and Edge access control. It made local repository construction the core task.

v0.2: establish a small ownership model

v0.2 split the product into two execution paths:

  • Plain scans a caller-owned directory and rebuilds RPM or DEB metadata in place.
  • Managed owns a Workspace containing independent Repositories. Each Repository has its own Pool, Dists, SQLite state, locks, and recovery records.

This reset introduced the terms still used today: Package Object, Membership, Desired and Built state, Generation, and Changeset. Stable lock files coordinate access. Generated files replace the protocol pointers last. Managed journals record how to recover an interrupted operation.

The first implementation, called C2, still placed package hardlinks in each RPM view. That layout changed before release.

v0.2.0: make Repository root the delivery unit

The single-payload decision was written on 2026-08-05 and shipped in v0.2.0 on August 8. It removed package aliases from RPM views. One Repository has one canonical pool/ and metadata-only dists/. The complete root is the unit to copy, host, authorize, and publish.

v0.2.0 also separated local and remote state:

  • Package Objects, Desired/Built state, Generations, Changesets, and local retention belong to the Repository.
  • Publication Attempts, Applied Checkpoints, remote inventories, cache grace, and deletion records belong to one Repository and one target prefix.

Repositories do not deduplicate packages across their boundaries. A target prefix has one owner. Compatibility exports are separate copies outside the canonical Repository.

v0.3: simplify and optimize the same model

v0.3 kept the v0.2.0 public layout. It removed the V1 runtime and migration harness, introduced the package-facts cache, and made Plain generation a rebuildable one-pass operation. It also expanded Membership in batches and grouped payload commits to reduce filesystem work.

v0.4: strengthen verification and recovery

v0.4 made Managed deep verification a bounded single pass. RPM verification must succeed within one trust ring; it cannot combine partial results from unrelated rings. An explicit rebind operation can update mutable target settings. Migration, publication recovery, and public-delivery checks also became stricter.

An early coordinated-publication proposal considered using rclone for bulk transfer. The final design kept native providers so SOW could check object identity, record receipts, control commit order, and recover publication from the same state machine.

v0.5: preserve package URLs and committed state

v0.5.0, released on 2026-09-29, kept the same public layout and upgraded managed state to schema 13. The new pool-path indexes prevent different package bytes from taking over an existing URL, including a URL recorded by an earlier publication.

The release also fixed recovery after Dist removal and package re-addition, preserved committed changes after interruption, and checked conflicting signing policies before changing Desired state. Plain create --metadata-timestamp added an explicit timestamp for reproducible RPM metadata; its default is zero. See the v0.5.0 changelog for the full changes.

v0.6: verify once, preserve the result

v0.6 keeps schema 13 and the same public layout. It records one publication time for each new metadata build and reuses that time during recovery. File checks bind verified bytes to the opened file, so later steps can safely reuse verification results within an operation.

SQLite reads use a consistent snapshot. Commands preserve committed results when later maintenance fails. Plain RPM updates keep the current and immediately previous metadata sets, so clients can finish fetching files from the previous index.

These changes improve the existing model without another full repository scan or recovery state machine. See the v0.6.0 release note for behavior and upgrade details.

v0.7: flat RPM pruning, password files, and recovery hardening

v0.7.0 keeps schema 13 and the same public layout. It adds sow prune for stateless flat RPM directories: SOW groups .rpm files by (name, arch), keeps only the highest epoch:version-release in each group, updates repodata/ before deleting older RPM files, and rejects ambiguous top-level EVR ties before modifying files.

The release also adds password-file support for encrypted signing keys (--passfile, SOW_GPG_PASSFILE, and passfile in sow.yml), supports RPM header-only ECDSA and EdDSA signatures in tag 267, orders RPM caret (^) version segments alongside tilde (~) segments, and tightens schema migration, carried-forward view checks, and interrupted gc / retain rm plan recovery. See the v0.7.0 release note and v0.7.1 release note for details.

v0.8: opt-in R2 reclamation, external secret mounts, and scale hardening

v0.8.0 keeps schema 13 and the same public layout. It adds explicit R2 target reclamation (sow gc TARGET --delete) while leaving default R2 gc report-only: before deleting each expired candidate, SOW rechecks active protection roots, cache grace, object size, SHA-256 metadata, and ETag, then verifies storage and public HTTP 404/410 absence and records a causal-epoch deletion receipt so republishing identical bytes stays idempotent.

The release also allows symlinked external password files, key files, and trusted keyrings (such as Kubernetes Secret mounts) when every hop stays outside the workspace, drops legacy .deb control.tar.lzma support, enforces SHA-256+ digests on published repomd.xml.asc, allows sibling flat repositories to run concurrently, and accelerates large-repository publication and batched local GC. See the v0.8.0 release note for the full details.

v0.9: fault-tolerant flat indexing, RPM v6, and pragmatic simplification

v0.9.0 keeps schema 13 and the same public layout. Flat create and prune default to skipping corrupt, source, or conflicting packages with warnings while preserving a format’s prior index if every candidate fails; --strict restores fail-fast rejection. Both flat and managed paths add full RPM format v6 and native RPMSIGTAG_OPENPGP (tag 278) multi-signature verification, alongside identical duplicate main-header tolerance and Latin-1 DEB control normalization.

The release also removes platform-specific SQLite C ABI code by resolving physical database paths for WAL sidecars, accepts both sow.yml and sow.yaml, enables ECDSA/DSA metadata signing and FIFO passfiles, aligns new target GC grace directly with max_cache_ttl, and hardens CDN redirect verification and cross-region R2 overlap checks. See the v0.9.0 release note for the full details.

What survived every redesign

Several v0.1 rules continue in the smaller model:

  • Give each durable fact one owner.
  • Keep package bytes separate from rebuildable metadata.
  • Prepare immutable payload and metadata before replacing protocol pointers.
  • After a durable commit intent, complete the operation through forward recovery.
  • Check references and exact identity before deletion. Remote deletion also checks cache grace and provider capabilities.
  • Record compatibility results with the source version, client, provider, and environment that produced them.

The current rationale is in Design Principles, System Model, Single-Payload Repository, and Publication & Recovery. Use SOW Docs for commands and operating procedures, and Release Notes for version-specific changes.

1.3 - Publication & Recovery

How SOW uploads a repository, resumes interrupted publication, and removes unused files.

A build creates a local snapshot (Generation). Publication uploads its files to a target and records progress for recovery. Each target keeps a checkpoint that identifies its last completed publication.

State ownership

Repository records Target records
Packages, Desired state, and Built state Publication attempts and checkpoints
Generations and changesets Remote inventory
Retained package and metadata references Grace periods and deletion records

Publication order

freeze the plan
  -> upload packages
  -> upload immutable metadata
  -> record commit intent
  -> update protocol pointers, one view at a time
  -> verify storage and public URLs
  -> record the applied checkpoint

Package uploads create new objects or reuse identical bytes. They cannot overwrite an immutable path with different content. SOW records commit intent before it changes the first mutable APT index alias or protocol pointer.

Within a view, SOW uploads referenced content before the pointer:

RPM: checksum-named metadata -> repomd.xml.asc -> repomd.xml
APT: by-hash and direct indexes -> Release.gpg -> InRelease/Release

During an update, views can briefly use indexes from different builds. A detached signature and its index also change in separate writes. Clients can therefore need to retry an index refresh. Public verification completes before SOW records the checkpoint.

Public verification

SOW downloads changed files and affected index entry points through public_endpoint, then checks their contents. Unchanged packages do not need another download.

The public endpoint can still return cached files. SOW waits and retries within max_cache_ttl. HTTP(S) verification follows CDN redirects while blocking HTTPS-to-HTTP downgrades, verifying connected dial addresses against private loopback and link-local ranges, and refusing cross-origin redirects through an HTTP proxy. If verification fails, SOW does not record a new completed checkpoint.

Resume or abandon an attempt

Rerun the original sow publish TARGET command to resume. Recovery follows the saved plan rather than starting from a newer local build.

Saved state Next action
Before commit intent Retry publication, or use --abort to reconcile and abandon the attempt
After commit intent Retry publication to complete the saved update
Checkpoint recorded Finish remaining maintenance; a completed target needs no update
Conflicting file identity Inspect the named file and target configuration before retrying

--abort removes eligible private filesystem staging. It keeps remote objects and records abandoned uploads so a later attempt can reuse matching bytes.

Target identity

Storage identity consists of the provider, endpoint, region, and bucket. Target identity also includes the prefix. The first publication binds these values to the Repository, and SOW checks prospective target paths (endpoint + prefix) so filesystem targets do not overlap one another or workspace paths. Later attempts use that binding to find the correct history.

To change the target name, public_endpoint, or max_cache_ttl, edit sow.yml and run sow publish TARGET --rebind. SOW appends a binding revision. Changes to the Repository, storage identity, or prefix require a new target.

Before changing max_cache_ttl, complete pending target maintenance. Finish active conditional-delete maintenance before changing public_endpoint. A shorter TTL does not shorten an already recorded grace period.

Remove a published view

A configured target with an applied checkpoint prevents withdrawal of its existing Dist, architecture, or signature pointers. SOW checks the complete published Generation—including views carried forward unchanged—and requires a full-repository sow build -r REPO before publishing a target withdrawal. To retire that target, remove its entry from targets in sow.yml, then run sow config check. This keeps the old remote files and publication history; it does not delete the remote repository.

You can then change the local Dist configuration and rebuild. To publish the reduced set of views, configure a new target with a different prefix and update clients to its URL. --rebind cannot change a target prefix. See sow publish for the configuration rules.

Retain and collect packages

A retained Generation stores metadata, manifests, and references to packages in the shared Pool. Local garbage collection checks all of these references:

  • current Desired and Built membership;
  • retained Generations;
  • active operations and recovery journals;
  • publication recovery and grace periods.

It removes a package only when no reference remains and the file still matches the recorded identity. Keeping a Generation therefore keeps its packages without making another package tree. If sow gc or sow retain rm is interrupted, SOW preserves its recorded plan so rerunning the command finishes or discards the interrupted plan safely.

Filesystem target deletion requires a known inventory, exclusive ownership, and an expired grace period. SOW conditionally deletes the recorded file, checks public absence, then records the result. R2 target GC records candidates by default. With sow gc TARGET --delete, SOW rechecks object identity, deletes eligible objects, confirms storage and public absence, and records receipts. See target GC.

1.4 - System Model

The objects and state transitions that connect packages, distributions, generations, and publication targets.

SOW uses configuration for repository settings, SQLite for managed state, and a public directory for client access. The model separates the packages you select from the files that SOW builds and publishes.

Objects

Workspace
├── Repository
│   ├── Pool: package objects
│   ├── Dists: package memberships and policies
│   ├── Desired state
│   ├── Built Generation
│   └── Retained Generations
└── Publication targets
    └── Repository + storage backend + prefix

Workspace

A Workspace contains sow.yml, the private .sow/ directory, and stable lock files. It groups configuration and lets commands discover the selected Repository.

Repository

A Repository owns one pool/, one dists/ tree, one state database, and one Generation sequence. Package deduplication is local to this Repository. Two Repositories with the same input packages each keep their own copy.

Package object

SOW identifies a package object by its SHA-256 after package signing. Name, version, release, and architecture describe the package; the digest identifies its bytes. Re-adding the same object reuses it. Different bytes at the same Pool path are a conflict.

Dist and membership

A Dist selects packages and settings for one format, RPM or DEB. A package can belong to several Dists while keeping one Pool file. Architecture-neutral packages (noarch or all) appear in each matching architecture view without another package copy.

Desired, Built, and Generation

Desired state records the selected packages and configuration. Built state records the last completed build. A Generation is an immutable inventory of that build, and a changeset compares two inventories.

An add --skip operation can change Desired state without rebuilding indexes. An interrupted build can also leave unfinished work. Use sow status to inspect the difference and sow build to apply pending changes or finish recovery.

Publication target

A target connects one Repository to a storage backend and prefix. Each target has its own publication attempts, checkpoints, inventory, and cleanup records.

See Publication and recovery for target identity and configuration changes.

State flow

package input
    -> inspect, sign if configured, and hash
    -> package object and membership
    -> Desired state
    -> render and validate
    -> Built Generation and changeset
    -> target publication attempt
    -> applied checkpoint

Managed operations record their progress in transactions and journals. SOW selects an active repository mutation by its pending state rather than wall-clock timestamp order, and recovery uses these records to finish or roll back the interrupted step.

Public and private files

Serve as a complete Repository Keep in the private workspace
<repo>/pool/ sow.yml
<repo>/dists/ .sow/ databases and journals
Generated indexes and signatures Locks, staging, and recovery files

A copy of the public tree can serve packages. To continue managing that Repository, keep the matching private workspace too. A public copy alone has no membership, retention, or publication history.

Locks and writers

The Workspace and each Repository have separate locks. Most reads use shared locks; writes use exclusive locks to prevent concurrent changes to the same state. sow status queries the lock state directly so you can inspect an active writer.

One workspace must own writes to each target prefix. These locks coordinate local processes, not independent workspaces on different hosts.

1.5 - Design Principles

Why SOW separates package storage, repository builds, and publication.

SOW separates package storage, repository builds, and publication. These principles explain where each kind of state belongs and how operations use it.

One owner for each record

Record Owner
Package bytes and identity Repository
Desired membership and Built state Repository
Generations and changesets Repository
Target bindings and revisions Repository and target
Publication attempts and checkpoints Repository and target prefix
Remote inventory and deletion records Repository and target prefix
Plain RPM previous-index marker (.sow-plain-rpm-history.json) Plain RPM directory

Each Repository stores its own copy of a package. Each publication target stores its own copy too. This keeps package retention and deletion independent across repositories and targets.

Store packages; rebuild indexes

In Managed mode, pool/ holds the package bytes. In Plain mode, the input directory holds them. Indexes and architecture views describe those packages and can be rebuilt.

Managed garbage collection removes a package only after its active, retained, and recovery references are gone. Plain mode rebuilds indexes directly from the current directory, and sow prune updates repodata/ for the retained highest-EVR RPMs before deleting superseded .rpm files.

Serve the complete public tree

A Managed Repository root contains pool/ and dists/. Copy or serve that complete root so clients can resolve package paths from the indexes. Use sow export rpm-leaf when a consumer needs a self-contained RPM architecture directory.

Keep the workspace’s sow.yml and .sow/ outside the HTTP root. They contain configuration, databases, locks, journals, and recovery files.

Upload packages before indexes

Publication uses this order:

packages -> immutable metadata -> protocol pointers -> grace period -> eligible deletion

Protocol pointers include repomd.xml, Release, and InRelease. SOW uploads referenced files before updating these pointers. Old files remain through the grace period so clients with cached indexes can still use them.

Recover according to the recorded state

After an interrupted Plain operation, run sow create or sow prune again. SOW scans the package directory, rebuilds the indexes, and completes any remaining Plain cleanup.

A Managed publication records its plan and progress. Before commit intent, SOW can reconcile an attempt and abandon it. After commit intent, rerun sow publish TARGET to complete the recorded update. Conflicting file identities stop recovery and identify the object to inspect.

Test the layout with its consumers

A package manager resolves package URLs; a mirror tool can also impose rules on its output directory. Test the complete Repository and an exported RPM leaf separately. Record the client version and layout with each result. The compatibility reference lists automated coverage.

Keep coordination local

Use one workspace as the writer for each target prefix. SOW coordinates local processes with locks. It does not arbitrate between independent workspaces.

R2 publication supports incremental uploads. Garbage collection records candidates by default. With sow gc TARGET --delete, SOW checks object identity before deletion and verifies absence afterward. Keep exclusive write access to the prefix throughout these checks.

1.6 - Why SOW Uses One Payload Tree per Repository

One package pool per repository, with metadata-only distribution views that share its files.

We drafted this decision on 2026-08-05 and shipped it in SOW v0.2.0 on 2026-08-08. SOW 0.9.0 still uses this layout. Each Repository stores one package tree and lets its distribution views reference that tree.

Decision

Each SOW Repository owns one public tree:

<repository>/
  pool/                         # package files
  dists/
    <dist>/
      <architecture>/           # RPM metadata only

The diagram shows an RPM view. APT indexes use dists/<dist>/main/binary-<architecture>/; its Release files sit at dists/<dist>/.

A package object has one payload path inside one Repository. Adding the same object to several Dists or architecture views adds membership and metadata references.

The complete pool/ + dists/ root is the supported copy, static-hosting, authorization, and publication unit. A single architecture leaf is a client view, not a complete package repository.

From the C2 development layout to v0.2.0

An earlier pre-release C2 development layout stored each package once in a root Pool, then created package hardlinks inside RPM views. This gave selected reposync clients a self-contained leaf without duplicating local bytes.

Hardlinks saved local disk space, but had costs elsewhere:

  • object storage expands each path into a separate key, so aliases duplicate payloads;
  • archives and cross-filesystem copies can expand or lose hardlink identity;
  • a package path inside a view looks independent, although the Repository still owns the file;
  • retention and garbage collection can confuse link counts with package references;
  • the repository layout has to follow a particular mirror tool’s output-directory rules.

Before v0.2.0 was tagged, the final single-payload design removed package aliases from RPM views. The archived C2 documents describe that development line.

How metadata reaches the Pool

APT already treats Filename as an archive-root-relative path, so a package entry names its pool path directly:

Filename: pool/p/pkg/pkg_1.0_amd64.deb

For RPM, SOW computes each <location href> from the actual view directory to the Pool path:

view:    dists/el9/x86_64/
payload: pool/p/pkg/pkg-1.0-1.x86_64.rpm
href:    ../../../pool/p/pkg/pkg-1.0-1.x86_64.rpm

The renderer and checker share the same path function. It calculates the relative path and escapes the file name. It then resolves the result and checks that it points to the original package inside the Repository.

This keeps the public tree relocatable. Keep the relative locations of pool/ and dists/ when you copy the repository. Then the same metadata works under another filesystem directory, HTTP origin, bucket, or prefix.

Rejected alternatives

Alternative Why SOW rejected it
Package hardlink/copy in every RPM view Creates path aliases and duplicate object keys
Symlinked payloads Object storage does not support them; static servers and archives handle them differently
Leading /pool/... href Different clients interpret it as host-root or repository-relative; it also breaks non-root prefixes
Absolute URL or xml:base Binds metadata to one origin and prevents unchanged relocation
CDN rewrite or redirect objects Requires extra routing configuration for the repository
Workspace- or bucket-global pool Requires cross-Repository coordination for locks, retention, and deletion

Mirror-tool compatibility is an export concern

An ordinary package client only needs to resolve metadata references and fetch package bytes. A mirror tool can also require that every package reside below the view directory you give it.

For consumers that require a standalone RPM leaf, use sow export rpm-leaf. It creates a directory outside the Repository with package files and regenerated local metadata, including when the selected RPM Dist was carried forward unchanged into the current Built Generation. Copy is the default. Use --hardlink on the same filesystem and keep exported package files read-only, because writing through a hardlink also changes the Pool file. The export is not a Generation, publication source, membership owner, or garbage collection root.

Client and mirror-tool results remain in the compatibility matrix. Use sow check to verify local paths, digests, and file references. Use the listed client tests to check package installation and mirroring.

Consequences

  • Package identity, membership, Generation, retention, and local GC stay Repository-scoped.
  • Publication attempts, checkpoints, remote inventory, grace, and deletion evidence stay target-prefix-scoped.
  • Each package file maps to one static object key.
  • Before deleting a payload, check its references and file identity. Do not use hardlink count to determine whether a file is still needed.
  • Copy the Repository root, or use the export command to create a standalone RPM architecture directory.

See Pool & Metadata Views for the current mechanism. System model and Publication and recovery define the ownership and lifecycle rules.

1.7 - The v0.2 Reset: Plain and Managed Instead of a Universal Control Plane

How SOW replaced the v0.1 Git/CAS/Edge platform with two small execution modes, explicit ownership, SQLite state, and a repository-focused release.

On 2026-07-31, after sealing the v0.1 source baseline, SOW began a product reset. The goal was a small repository engine that could replace Pigsty’s daily package-build workflow. It kept the earlier lessons about integrity and recovery while removing much of the control plane.

The result was the split still used today: Plain rebuilds caller-owned directories; Managed maintains repositories and their history.

The development design initially used C2 hardlinks inside RPM views. SOW replaced those hardlinks before the v0.2.0 release on August 8. Some archived plans called the C2 build “v0.2.0,” but the released tag already had one canonical Pool and metadata-only views.

Why reset instead of incrementally simplifying V1

The v0.1 model had coupled five different jobs:

  1. build valid APT/YUM/asset repositories;
  2. maintain package history and snapshots;
  3. migrate a large legacy Pigsty topology;
  4. publish to multiple cloud/CDN targets;
  5. enforce commercial Edge access.

Removing one feature at a time would leave the same Git/CAS/Route ownership model in place. The reset instead asked which facts the core repository engine truly needed to own.

The first phase excluded:

  • the V1 Git database, Route/Manifest/Quarantine model, or global content-addressed product layer;
  • upstream sync, pull/push/copy/move/promote surface, Edge entitlement, CDN bootstrap, or commercial topology;
  • remote publication/state, object storage, GC, snapshot/freeze, Managed export, or serving in the first phase;
  • modulemd, source-package building, Web UI, cross-Repository deduplication, or multi-writer operation.

Upstream synchronization and channel promotion were deliberately removed even though V1 had real streaming, fuzz, and deterministic-proof evidence for them. Package acquisition became an external task. Operators can prepare package sets with dedicated mirror or download tooling, then let SOW own admission, membership, build, and publication. Some phase-one exclusions—publication, retention, GC, and external export—returned before the final v0.2.0 tag under the smaller Repository ownership model.

Two isolated execution modes

Plain: rebuild what the caller owns

Plain mode operates on a caller-owned directory of RPM or DEB files:

sow create /srv/repo

It scans packages, renders protocol metadata, validates the result, and installs pointers last. Plain owns its generated metadata but not a Workspace, Repository database, Generation history, or long-lived membership state.

Because the desired state is simply “the packages currently in this directory,” the correct recovery strategy is to rerun the build. Later releases made that principle even more explicit by removing Plain journals and repeated package reads, and v0.7.0 added sow prune for stateless highest-EVR RPM retention under the same directory-owned recovery model.

Managed: own lifecycle and history

Managed mode introduces a Workspace with independent Repositories:

Workspace
├── sow.yml
├── .sow/                    private state, locks, SQLite, journals
└── <repository>/
    ├── pool/                canonical package bytes
    └── dists/               client protocol views

Each Repository owns its Pool, Package Objects, Membership, Desired State, Built Generation, Changeset, lock, database, and recovery state. Different Repositories do not silently deduplicate or share counters.

A Dist is a named RPM or DEB membership set. Architecture Views are projections of that membership, not new owners. Neutral packages (noarch / all) project into every applicable architecture without duplicating logical membership.

Decisions that replaced V1 concepts

V1 concept v0.2 replacement
Git commit/ref as canonical state Per-Repository SQLite plus explicit filesystem/journal evidence
Global CAS and Route materialization Repository-owned Pool and protocol views
View/Snapshot/Stable ref graph Dist membership, Desired revision, Built Generation, retained state
One universal command interface Separate Plain and Managed commands
Implicit legacy topology Strict sow.yml plus explicit names and selectors
Cross-product publication saga Repository build kept separate from target publication
Reuse V1 packages directly Narrow parser/renderer/version/signing ports only

The critical simplification was that operators can understand private control state and public repository bytes without Git or an Edge router.

Desired versus Built

Managed mode made interrupted state explicit:

  • Desired State is the current package and membership intent in SQLite.
  • Built Generation is the last complete public tree that rendered and validated successfully.
  • Changeset is the exact delta between two built states.

Desired can advance before a new Built Generation completes. The operation journal records unfinished work, and status shows the difference between Desired and Built. Recovery uses the recorded operation phase to decide what steps remain.

P0 through P3

The work followed a strict dependency sequence:

Phase Contract
P0 Plain create, real RPM/DEB metadata, signing, Pigsty-compatible filtering, pointer-last replacement
P1 Workspace/Repository/Dist lifecycle, strict config, package identity, membership, and query
P2 Add/remove/policy/build operations, journals, crash recovery, and safe mutation
P3 Check, Changeset, handoff, scale, compatibility, and clean-delivery evidence

Each phase had an API contract, implementation specification, adversarial review, and acceptance record.

The first Managed RPM layout kept canonical files in a root Pool and added hardlinks below each architecture View. Metadata used a safe local pool/... href. This C2 layout made a pinned AlmaLinux 9 reposync flow work and avoided duplicate local bytes because aliases shared an inode.

The design had a hidden deployment cost:

  • object storage expands each path into a separate full object;
  • archive and cross-filesystem copies can lose hardlink identity;
  • every Dist/architecture alias looks like another canonical payload;
  • retention and GC risk depending on inode/link-count behavior;
  • the whole Repository no longer maps one-to-one to static object keys.

The 2026-08-05 snapshot records this C2 implementation and its local test results.

The single-payload contract was written on 2026-08-05, committed as the “next” design on August 7, and implemented before the August 8 release tag. The final release therefore shipped:

<repository>/
  pool/       one canonical payload per Package Object
  dists/      metadata-only APT/RPM views

Default EL reposync became an accepted compatibility limitation; a standalone RPM leaf moved to an explicit external export. The complete reasoning is preserved in Single-Payload Repository.

What the reset reused

The team did not start from blank code. It retained only narrow components that had no V1 ownership assumptions:

  • RPM/DEB parsing and native version comparison;
  • metadata rendering, compression, signing, and validation;
  • safe filesystem primitives;
  • selected client fixtures and fault patterns;
  • exact package identity and provenance checks.

The new core had no dependency on Git state, Route receipts, Edge components, legacy migration, or cloud control code. Those components were kept for reference or removed.

From acceptance tests to release

The development line recorded P0/P1 acceptance on August 1, P1–P3 acceptance on August 2, and a local release-gate run on August 5. The final v0.2.0 source was tagged on August 8 after the single-payload implementation, packaging, and CI corrections landed.

The final release also shipped filesystem and R2 publication, retained generations, external RPM leaf export, and local GC. R2 remote deletion was disabled from the start; GC for R2 only reported candidates.

What still defines SOW

  • Plain and Managed are isolated modes with different recovery costs.
  • Workspace is configuration/discovery scope; Repository is package/history scope.
  • Package Object identity is immutable; Membership is logical and many-to-many.
  • Desired and Built states are distinct.
  • Writers use stable lock files and install protocol pointers last. Managed journals record interrupted operations; Plain recovers by rebuilding.
  • CLI syntax, JSON envelopes, and exit classes provide a defined automation interface.
  • Protocol, client, mirror-tool, and provider compatibility are reported separately.

The current forms are documented in Get Started, System Model, and Design Principles.

Primary source snapshots

Continue with Design Evolution for the v0.3 through v0.8 changes that followed.

1.8 - What SOW v0.1 Actually Proved

A summary of 112 dated v0.1 reports covering client compatibility, scale, recovery, migration, and cloud-provider behavior.

The v0.1 archive contains 112 dated reports from 2026-07-11 through July 31. They record client tests, scale measurements, failure recovery, migration, and cloud-provider experiments. This article summarizes the main results and links to representative reports.

Each result belongs to the source revision, fixtures, clients, and environment recorded in its report. The compatibility reference lists current compatibility.

Evidence timeline

Window Reports What the work concentrated on
2026-07-11 3 Real APT/DNF client baseline, 72,310-package manifest scan, 50k upstream streaming
2026-07-12 35 APT/YUM protocol behavior, CAS/GC, publication ordering, recovery, MinIO, performance, migration, build/supply-chain gates, and cloud harness design
2026-07-13 2 RPM trust closure and selected-set materialization recovery
2026-07-14–16 14 Legacy topology, family migration, physical ownership, full-copy adoption, and package-signature inventory
2026-07-17–20 39 Cloudflare/R2/COS/Edge safety, provider attestation, cutover receipts, configuration bounds, and checkpoint-fenced deletion
2026-07-22 10 Descriptor/path identity across stage, apply, prune, rollback, and residue cleanup
2026-07-26–29 7 Recursive durability, hostile-writer limits, replacement outcomes, preserved audits, and provider corrections
2026-07-30–31 2 Clean-room APT/YUM/asset MVP and final legacy-source baseline

What had strong supporting evidence

Real package clients and large repositories

The first evidence set used real APT and DNF clients rather than validating only generated XML or text. It also measured scale explicitly:

These measurements supported streaming processing and bounded concurrency for large repositories.

Protocol limits found in testing

Failed experiments identified limits in the proposed protocols:

These experiments showed why protocol syntax and client transactions need separate tests.

Failure and recovery

The archive exercised interrupted sync, publication, materialization, snapshot, archive, and remote-restore paths. Later reports bound file operations to descriptors and exact path identities, then covered rollback, quarantine, and preserved evidence.

Representative records include:

These tests led to distinct recovery paths: abandon uncommitted work, complete work after commit intent, or stop when recorded evidence conflicts.

Legacy migration

The migration evidence enumerated old Make targets, physical layouts, repository families, consumer configuration, package-signature inventory, and rollback. It used read-only copies and exact receipts before mutation.

This work validated a specific Pigsty cutover path. It also established a method: record migration assumptions as data, check them before each step, and retire the migration code after the cutover.

Provider and Edge experiments

The archive contains real and simulated R2, MinIO, Cloudflare, COS, and Edge tests. Representative reports include:

Some tests used designated nonproduction resources; others ran offline or against mocks. The reports distinguish these environments. Storage behavior measured on R2, MinIO, or COS applies to that service and the API tested.

What became part of the design method

The work established six practices:

  1. State what was tested. Distinguish source checks, simulated failures, client tests, and tests against a real service.
  2. Keep failed test results. They identify conditions where the design does not work.
  3. Record inputs with each result. Source revision, container/client version, provider, route, and fixture belong with the result.
  4. Measure scale. Large repositories need measured memory, call count, and concurrency behavior.
  5. Test each new layout. Keep historical results with the model they tested.
  6. Check each release build. Test supported platforms, scan dependencies, and run static analysis. Check that the build can be reproduced.

These practices now appear in Design Principles and the current compatibility reference.

Primary source

The immutable v0.1.0 evidence directory contains every dated report, including commands, results, and test conditions.

Continue with The v0.2 Reset to see how those lessons were kept while the product model became much smaller.

1.9 - SOW v0.1 Decision Ledger: What Survived and What Was Retired

All 44 surviving v0.1 architecture decisions: their original purpose and how each changed after the repository model reset.

The v0.1.0 tag contains 44 architecture decision records (ADRs), numbered 0001 through 0045; 0006 is absent. Each ADR records a problem, the decision made at the time, and the conditions that implementation had to meet. This table shows what happened to those decisions after the repository model changed.

Fate Meaning
Retained The principle remains in current SOW with substantially the same boundary.
Evolved The problem remains, but ownership or implementation changed.
Migration history The decision governed the Pigsty/V1 cutover.
Retired The decision belonged to the removed Git/CAS/Route/Edge model.

Decision dates run from 2026-07-11 through July 28. ADR-0035 also has amendments from July 29 and July 31. Most early ADRs entered Git together on July 19, after implementation had begun. This table summarizes ADR-0032 without a direct link because it names obsolete infrastructure details.

Core state, publication, and trust

ADR Original decision Later fate
0001 Git was canonical state, SHA-256 CAS owned package bytes, refs expressed views/history, and publication used target sagas. Evolved. Git/CAS/Route ownership retired; single ownership, pointer-last publication, independent target state, and evidence gates survived.
0002 Public routes, immutable generations, and client/provider compatibility had separate acceptance gates. Evolved. Route machinery retired; protocol/client/provider evidence remains separate.
0003 Snapshots required verified generation copies and inventory-bound retention. Evolved. CopyObject snapshot trees retired; retained generations now store metadata and reference sets without payload copies.
0004 Edge token verification and deployment had one versioned cross-provider contract. Retired. Edge entitlement is no longer part of the SOW repository engine.
0005 Every legacy Make target was mapped to SOW, retirement, or policy rejection. Migration history. The mapping completed its cutover role and left the active product.
0007 Public and gated packages shared one canonical repository instead of a separate Pro bucket. Retired. The commercial Edge topology left product scope; the more general single-owner lesson remains.
0008 GC followed complete reachability and required explicit confirmation for destructive work. Evolved. Current GC checks references and exact identity. The old --apply --confirm interface retired; remote deletion also checks cache grace and provider capability.
0009 Once a remote generation became visible, recovery rolled forward rather than inventing rollback. Retained. Commit intent remains the boundary between abandon/reconcile and forward-only recovery.
0010 Metadata signing bound exact public/private identities and treated rotation as a repository-wide transition. Evolved. Current signer evidence and trust-ring rules preserve exact identity without the V1 ref topology.
0011 Remote deletion required target ownership, inventory, checkpoint, grace, and conditional-delete evidence. Evolved. R2 reports by default. In 0.8.0 an explicit gc TARGET --delete rechecks identity and verifies storage and public absence.
0012 Private origins, cache topology, and exact purge mapping were explicit deployment contracts. Retired. CDN/private-origin deployment is outside current SOW.
0013 A persisted plan was recovery input to revalidate, never authority to replay blindly. Retained. Managed recovery still rebinds plans, files, target identity, and public evidence.
0014 RPM provenance recorded exact packet evidence and distinguished ingestion policy from historical proof. Evolved. Current package authentication and independent trust rings replace the V1 receipt encoding.
0015 Configuration named a target; published refs and checkpoints belonged to canonical state. Retained. Target-neutral generations and target-prefix attempts/checkpoints remain separate owners.
0016 Cloud adapters used concrete, bounded SDK/API contracts instead of a generic provider abstraction. Evolved. Concrete provider boundaries survived; V1 Edge/COS details retired.
0017 Accepted RPM signatures had to close against a stable repository keyring and opened payload identity. Evolved. v0.4 independent multi-ring verification strengthens the same trust boundary.
0018 A selected package set staged, validated, committed, and recovered as one bounded local transaction. Evolved. Managed operations use recovery journals. Plain stages metadata and replaces pointers last; an interrupted Plain build is rebuilt.

Legacy topology, compatibility, and migration

ADR Original decision Later fate
0019 EL7 metadata format and compressor behavior were frozen for legacy consumers. Migration history. Current compatibility documentation, not this freeze, defines supported platforms.
0020 Every legacy physical path and selector group received an explicit owner. Migration history. It prevented ambiguous cutover but is not a current repository model.
0021 Cross-EL yum/infra/{arch} projections were reproduced with exact frozen evidence. Migration history. The special projection left active product scope.
0022 Package history could not be broken merely because physical ownership moved. Evolved. Generations, retained references, and migration journals now preserve continuity without V1 routes.
0023 Canonical Git objects were rebound to exact bytes before admission and use. Evolved. Git authority retired; descriptor/path/digest identity checks remain.
0024 Materialized route receipts acted as narrow read/retirement capabilities. Evolved. Route receipts retired; capability-bound inspection and deletion survived.
0025 Locks bound an exact process instance and stable lock inode rather than elapsed time. Evolved. Stable lock inodes and rejection of timeout-based lock stealing survived; the V1 process-instance lease mechanism did not.
0026 Offline archive creation used a durable intent and strict archive admission. Retired. Offline archive projection left current SOW scope.
0027 Legacy bytes entered canonical state only after exact path, package, and provenance admission. Migration history. The adoption program completed; strict package admission remains in narrower form.
0028 DEB inspection opened only the control archive needed for metadata and rejected ambiguous containers. Retained. Narrow parsing and bounded input remain part of the APT package boundary.
0029 Client floors and the EL8 freeze were explicit owner policy, not inferred from code. Migration history. Current platform policy lives in the compatibility reference and release notes.
0030 Missing legacy YUM bodies could be repaired only from a reviewed blocker-set digest. Migration history. The narrow negative-provenance exception did not become a general ignore flag.
0031 Gated legacy content required exact checksum repair and activation evidence. Retired. Pro activation left product scope; fail-closed repair remained a general lesson.

Provider and Edge control plane

ADR Original decision Later fate
0032 Only one exact owner-designated Cloudflare test tuple could bypass normal production rejection. Retired. It was a narrow historical test exception, never a general deployment rule.
0033 Read-only provider readiness had its own registry and ownership evidence. Retired. Provider bootstrap registry left current SOW.
0034 Worker bootstrap used leases, two-phase recovery, exact resources, and reversible state. Retired. Cloudflare deployment is no longer repository-engine responsibility.
0035 Provider identity, runtime bindings, log sink, and lease ownership were attested before use. Retired. The exact Edge control plane left product scope.
0036 R2 lacked conditional DeleteObject, so an explicit checkpoint-fenced unconditional-delete fallback was allowed behind a deterministic capability probe and repeated identity/fence proofs. Evolved. SOW 0.8.0 uses explicit opt-in and separate identity and absence checks under a single-writer prefix. See target GC.
0037 Gated publication had to prove denial at the Edge before uploading confidential bytes. Retired. Edge access control is now an external deployment responsibility.
0038 YUM cutover required an expiring receipt bound to exact endpoints, generation, and trust bytes. Migration history. It made a dangerous consumer cutover auditable and then retired.
0039 Caret had one canonical URL spelling across Go, Edge, logs, and origin routing. Evolved. The route was retired; canonical encode-once path handling remains.

Bounded configuration and derived-state recovery

ADR Original decision Later fate
0040 Configuration cardinality and expanded topology were bounded before allocation or execution. Retained. Current parsers and state wires keep explicit size/cardinality limits.
0041 Unknown final projection stages were preserved for audit rather than guessed away. Evolved. Current recovery still preserves contradictory evidence and fails closed.
0042 Derived-state replacement had explicit success, rollback, preserved, and blocked outcomes. Evolved. Managed journals record operation phases; recovery stops when recorded state and files disagree.
0043 File mutation checked descriptor identity and defined the limit against a hostile writer using the same OS user. Retained. Path checks reject identity changes; OS permissions remain the boundary against other writers.
0044 Preserved audit copies could be retired only through an exact capability and confirmation token. Evolved. The V1 command retired; exact capability-bound deletion remains a design rule.
0045 Unjournaled residue had a bounded classifier and could never be silently adopted or deleted. Retained. Current recovery distinguishes known state, safe residue, and contradictory evidence.

The pattern behind the ledger

The decisions that continued share a few rules:

  • Give each fact one owner.
  • Check exact identity before mutation.
  • Prepare immutable content before committing pointers.
  • Recover forward after commit intent.
  • Check references and deletion conditions before removing data.
  • Set input limits and define the product scope.
  • Record compatibility against the client and provider tested.

Their current implementation is described in Design Principles, System Model, and Publication & Recovery.

The v0.1.0 ADR directory remains the immutable primary source. The next article summarizes the separate v0.1 evidence record.

1.10 - The Original SOW v0.1 Program: A Git for Package Repositories

Why SOW began as a Git/CAS/Route/Edge control plane, what that model achieved, and why the product later reset around a smaller Repository core.

The v0.1 program began on 2026-07-11 and was sealed as v0.1.0 on July 31. It aimed to replace Pigsty’s Makefile-and-rclone workflow with one Go control plane for APT, YUM, and static assets. That control plane covered local state, package history, upstream sync, channels, views, snapshots, two clouds, CDN behavior, commercial access control, and migration.

The guiding phrase was “Git for artifact repositories.” Package distribution has immutable content, mutable names, history, promotion, publication, and rollback. The analogy helped describe those needs, but it also expanded the scope of the product. SOW later retired the Git/CAS/Route/Edge model; System Model describes the current model.

The problem the first design tried to solve

The legacy system already published dozens of stable URLs used by APT, DNF, scripts, and installation endpoints. A replacement had to preserve those URLs while adding properties the Makefile workflow could not express safely:

  • one identity for every accepted package body;
  • desired state separated from what each cloud had actually published;
  • snapshots and retained history without guessing which files were still live;
  • incremental upload and purge proportional to the change set;
  • recovery after a crash between metadata preparation and pointer publication;
  • provenance for upstream indexes, package signatures, and migration exceptions;
  • private commercial objects that could not leak through a public index or cache key;
  • compatibility evidence from real APT/DNF clients rather than metadata syntax alone.

The original program deliberately treated these as one connected ownership problem.

The selected v0.1 model

Git was canonical state

.sow/state was a normal Git worktree operated through an embedded Go library. Manifests, refs, provenance, configuration hashes, target checkpoints, and security labels were Git content. SQLite was only a rebuildable query projection.

This gave every state transition a durable history and made one ref update the local commit boundary. It also meant that package-management state, publication state, migration state, and operator intent all had to fit one Git-shaped authority.

CAS owned the bytes

Package bodies lived in an immutable SHA-256 pool. Published trees used hardlinks into that pool, so package references determined whether a file could be removed. This made local deduplication and history inexpensive, but required one filesystem and made materialized paths, receipts, and inode identity part of the product contract.

Refs expressed product meaning

Repository, View, Snapshot, Stable, History, and per-target remote refs described the meaning and retention of content. A mutable view could move without erasing stable or historical reachability. Removing a view changed references; garbage collection remained a separate operation that checked all remaining references.

Each target had its own publication history

Cloudflare R2 and Tencent COS were independent targets. Each target prepared immutable objects, persisted commit intent, moved protocol pointers, purged the CDN, verified public visibility, and advanced its own checkpoint. One target succeeding could not be rolled back merely because the other failed.

The publication order was:

immutable payload
  -> immutable metadata
  -> durable commit intent
  -> mutable protocol pointer
  -> public verification
  -> checkpoint
  -> grace
  -> deletion after reference and identity checks

Current publication retains this ordering. Cache grace and provider deletion checks apply to remote garbage collection.

Routes and Edge were part of repository correctness

The public tree preserved legacy paths, while generation-aware routes selected immutable metadata. Private objects lived behind an Edge contract shared by Cloudflare Worker and EdgeOne. Authentication had to run before origin access; tokens could not enter origin URLs, cache keys, or logs.

This design made CDN routing, token verification, provider deployment, log sinks, and cache topology prerequisites of the repository model.

Why the design was attractive

The model gave each part of the system explicit rules:

  • every durable fact had an explicit owner;
  • immutable bytes and mutable names were separated;
  • local and remote publication states were observable independently;
  • pointer-last publication made partial work recoverable;
  • GC checked all package references before deletion;
  • plans and receipts were revalidated instead of blindly trusted;
  • client compatibility, provider compatibility, and implementation evidence were distinct;
  • the exact legacy migration surface was treated as data, not tribal knowledge.

These rules continued in later releases with fewer supporting mechanisms.

Why the product reset

By the end of July, SOW v0.1 had accumulated:

  • Git commits and refs as an internal database protocol;
  • a global content-addressed store and hardlink materialization layer;
  • Route, View, Snapshot, Generation, Projection, Receipt, and Lease concepts;
  • APT/YUM/asset synchronization and legacy migration inside the core binary;
  • cloud SDK, edge bootstrap, provider attestation, purge, token, and private-origin logic;
  • forty-four surviving ADR files and 112 dated evidence reports.

Each individual addition answered a real failure mode. Together they created several problems.

First, too many objects could appear to own the same package and public path. A package was simultaneously a CAS object, a manifest entry, a View member, a materialized Route, a Snapshot reference, and a remote target object.

Second, local repository generation was coupled to cloud and Edge lifecycle decisions. An operator who only wanted to build a YUM or APT repository inherited the conceptual cost of commercial access control and distributed publication.

Third, the migration program had become a permanent product subsystem. Exact legacy topology, Make targets, CDN behavior, and old provider exceptions were valuable during cutover but did not belong in the long-term repository abstraction.

Finally, recovering every derived path under hostile-writer and crash conditions required more identity, journal, quarantine, and retirement machinery than the core job justified.

Upstream synchronization and channel promotion were another deliberate scope cut. V1 had tests for streaming downloads, malformed input, URLs, and verification order, but acquisition introduced its own policy, retry, provenance, and remote-ownership model. The reset made package acquisition an external input concern so SOW could own repository admission and publication without also becoming a universal mirror orchestrator.

What survived the reset

v0.1 lesson Maintained form
Every durable fact has one owner Repository and target-prefix ownership in System Model
Canonical data differs from projections One pool/ plus metadata-only dists/
Pointers commit after payload preparation Publication & Recovery
Post-commit recovery is forward-only Managed operation and publication journals
Plans and paths are untrusted input Exact identity, containment, and rebind checks
Deletion requires complete evidence References and exact object identity; cache grace and provider capability for remote deletion
Generated server config is derived state The complete Repository root is the hosting unit; serving remains explicit operator configuration
Compatibility is a matrix Platforms & Integrations
Historical evidence never upgrades itself Dated Design and Release records

What was retired

  • Git as product state and SQLite as a disposable cache;
  • a cross-product CAS and hardlink-based materialization layer;
  • the Route/View/Snapshot public command model;
  • generated Nginx includes, Route receipts, and V1 serving-control state;
  • built-in upstream synchronization, promotion, and legacy Make-target migration;
  • Edge token entitlement and private-origin topology as repository prerequisites;
  • the multi-cloud publication control plane and provider bootstrap/attestation system;
  • V1-specific projection receipts, leases, quarantine commands, and recovery surfaces.

Some implementation ideas later returned under a narrower boundary: SOW manages repositories and their publication. Package acquisition and serving remain external tasks.

Timeline

Date Milestone
2026-07-11 Goal, brainstorm, technical research, client and scale baselines
2026-07-12 Core Git/CAS/publication contract and first protocol/provider evidence
2026-07-13–16 Package trust, transaction, legacy topology, and migration closure
2026-07-17–20 Provider bootstrap, Edge confidentiality, deletion capability, and input bounds
2026-07-22–29 Path-identity, hostile-writer, quarantine, and residue-recovery hardening
2026-07-30–31 Clean-room MVP evidence and v0.1.0 source seal
2026-08-01 onward Plain/Managed reset and eventual retirement of the V1 runtime

Primary sources and next records

The immutable v0.1.0 docs/ tree preserves the original architecture contract, requirements traceability, migration material, ADRs, and evidence for the historical implementation.

Continue with the v0.1 Decision Ledger, v0.1 Evidence Ledger, and v0.2 Reset.

2 - Release Notes

Changes and upgrade instructions for each SOW release.

Read the changes and upgrade steps for each SOW release, with the newest version first.

SOW 0.9.0 makes flat create and prune fault-tolerant by default with a --strict opt-in, adds RPM format v6 and native OPENPGP multi-signature verification, accepts both sow.yml and sow.yaml, supports ECDSA/DSA metadata keys and FIFO passfiles, and aligns target GC grace directly with max_cache_ttl. Workspaces on 0.5.0 through 0.8.0 keep schema v13; review any target with max_cache_ttl: 0s before upgrading. See the 0.9.0 upgrade guide.

SOW 0.8.0 adds opt-in R2 conditional deletion (sow gc TARGET --delete), allows external secret and keyring symlinks outside the workspace, drops .deb control.tar.lzma support, hardens DEB/RPM verification, and accelerates large-repository publication and GC. Workspaces on 0.5.0 through 0.7.1 keep schema v13; complete any interrupted 0.7.1 local GC before upgrading. See the 0.8.0 upgrade guide.

SOW 0.7.1 upgrades to Go 1.27.4, refreshes dependencies, and fixes recovery, input validation, and S3/R2 handling. Workspaces on 0.5.0 through 0.7.0 need no schema migration. See the 0.7.1 upgrade guide.

SOW 0.7.0 adds flat RPM pruning and password-file signing, fixes migration and recovery defects, and updates dependencies. Workspaces on 0.5.0 through 0.6.1 need no schema migration. See the 0.7.0 upgrade guide.

SOW 0.6.1 updates Go to 1.27.3, refreshes dependencies, and improves invalid-input diagnostics. Workspaces already on 0.5.0 or 0.6.0 need no schema migration. See the upgrade guide.

2.1 - SOW v0.9.0

Fault-tolerant flat create and prune with –strict, RPM v6 and native OPENPGP multi-signature verification, sow.yaml support, and direct max_cache_ttl grace.

SOW 0.9.0 makes flat create and prune resilient to bad packages by default, adds full RPM format v6 and native OPENPGP signature verification, accepts both sow.yml and sow.yaml, and aligns target GC grace periods directly with max_cache_ttl. The database stays at schema v13.

Fault-tolerant flat repositories

Plain sow create and sow prune now skip corrupt, unreadable, source (src/nosrc), and coordinate-conflicting packages (including Debian version-equivalent conflicts such as 1.0-1 vs 1.00-1), as well as unmatched --protect names, with warnings so valid packages still publish. Pass --strict to fail before writing on any skipped package or conflict.

sow create /srv/flat                 # skip bad inputs with warnings
sow create /srv/flat --strict        # fail fast on any bad or conflicting input
sow prune /srv/flat --dry-run        # preview superseded RPMs safely
  • Per-format isolation: If every candidate of one format fails, SOW preserves that format’s previous index, history, and completion state while still publishing valid packages of the other format (including in fresh --pigsty directories).
  • Mixed-directory prune: sow prune updates the RPM index, leaves the DEB index intact, and carries forward existing repo_complete digests for still-present DEBs without prematurely hashing newly arrived unindexed DEBs.
  • Structured warnings: Human output prints warnings to stderr. Successful --json output includes warnings and skipped in the stdout envelope and leaves stderr empty.
  • Safe single-pass checks: SOW retains file-identity, size, and modification-time checks across scan, publication, signed RPM installation, and deletion without repeating full decompression read-backs.

RPM v6, package parsing, and signing

  • RPM format v6 and native OPENPGP signatures: SOW supports RPM format v6 packages (lead major versions 3 through 6, PAYLOADSHA256 without PAYLOADSHA256ALGO, and native RPMSIGTAG_OPENPGP tag 278 OpenPGP v4 and v6 signature arrays) across flat create, prune, --sign-with, and Managed add, build, and check, including dual- and multi-signed RPMs. When tag 278 is present, it is authoritative over legacy signature tags.
  • Real-world RPM and DEB compatibility: RPM indexing accepts identical duplicate main-header tags (such as the duplicate SOURCERPM found in EL10 packages) while still rejecting conflicting main tags and duplicate signature-header tags. Binary .deb control files with legacy Latin-1 bytes (>= 0x80) are normalized to UTF-8, and .asc OpenPGP keyrings tolerate comment headers outside armor fences.
  • Broader signing keys and passfiles: Metadata signing accepts ECDSA and DSA keys alongside RSA and EdDSA (Ed25519/Ed448). --passfile, SOW_GPG_PASSFILE, and passfile support regular files, symlinks (including Kubernetes Secret mounts), and named pipes (FIFOs with a 2-second deadline), strip an optional UTF-8 BOM and final LF/CRLF, and surface bounded helper stderr diagnostics on failure.

Managed workspaces, publication, and CLI

  • Direct max_cache_ttl grace: New target GC grace records use the configured max_cache_ttl directly instead of enforcing a hardcoded 30-day floor and 24-hour padding. Existing recorded NotBefore deadlines remain effective, and backward NTP clock steps keep the time-witness high-water mark.
  • Target ergonomics and safety: authoritative_workspace, single_writer, and exclusive_write_authority default to true when omitted (explicit false remains rejected). R2 region defaults to auto, dotted bucket names and shorthand durations such as 24h or 0 are accepted and normalized, and overlapping R2 targets on the same (endpoint, bucket, prefix) are rejected across region spellings such as auto vs us-east-1.
  • Hardened HTTP verification: Public HTTP checks follow CDN redirects, block hop-by-hop HTTPS-to-HTTP downgrades, validate connected dial IPs against private loopback and link-local ranges, and refuse cross-origin redirects through an HTTP proxy. Harmless foreign files outside pool/ and dists/ at the target root are ignored.
  • Workspace config, SQLite, and recovery: Workspaces accept either sow.yml or sow.yaml (preserving support for a legacy repository directory named sow.yaml beside sow.yml), and explicit -C/--workdir never falls back to CWD or SOW_DIR. SQLite resolves the physical database path before probing -wal/-shm/-journal sidecars and enforcing single-hardlink invariants, eliminating Darwin-specific C ABI code. Missing .sow/workspace.lock in a populated workspace requires explicit offline recovery, while sow init repairs missing per-repository locks under workspace.lock.
  • Managed ergonomics: sow check reports sow.yml limit/exclude drift as dirty instead of an integrity error, verifies APT by-hash files by content digest when hard links are broken, and tolerates .DS_Store under .sow/. sow rm --check stays strictly read-only without touching .sow/<repo>/stage, sow add -R ignores unreadable non-package files, legacy schema v12 migration-required errors consistently exit 6, and interrupted v0.7.1 local GC plans containing an empty manifest array now resume directly.
  • CLI and packaging: Duplicate flags use last-wins semantics, boolean flags accept =true/=false, --timeout 0s is accepted, sow log export FILE resolves symlinked parent directories (such as macOS /tmp), and release archives and Linux packages ship the sow binary and LICENSE directly.

Upgrade and downloads

Warning

Review any publication target configured with max_cache_ttl: 0s before upgrading. New target GC grace records now follow max_cache_ttl without a 30-day floor, so superseded objects with 0s TTL can become eligible at the next target GC. Previously recorded later NotBefore deadlines remain effective.

Workspaces on 0.5.0 through 0.8.0 stay on schema v13 and need no database migration. Stop workspace writers, back up the complete workspace with hard links preserved, install SOW 0.9.0, and run sow build and sow check for each repository. Interrupted 0.7.1 local GC plans with an empty manifest array now resume directly under 0.9.0 without needing the 0.7.1 binary first. See the upgrade guide.

Linux and macOS archives, Linux RPM and DEB packages, and their checksums are on the download page. See the full changelog.

.rpm

Download asset
FileChecksum
sow-0.9.0-1PGSTY.aarch64.rpm Linuxarm64SHA-256 0da15045da7480cc04221ec27f47bffa5f8312535604d4061a0ea9ef4b9407a8
sow-0.9.0-1PGSTY.x86_64.rpm Linuxamd64SHA-256 d14739581e3bdbdd0717538d42c1fd45e3bc535e3e5c22b6aba9924115f53006

.deb

Download asset
FileChecksum
sow_0.9.0-1PGSTY_amd64.deb Linuxamd64SHA-256 324de319cc18a57554295663718604664e217a9b456088b8661d985da38bc8a6
sow_0.9.0-1PGSTY_arm64.deb Linuxarm64SHA-256 e44285d96635aa98fc49920cbadbfe03a2f900ade4b9f68faa4a56bfe3583467

.tar.gz

Download asset
FileChecksum
sow_0.9.0_darwin_amd64.tar.gz macOSamd64SHA-256 3dc63c798a99593ab38f83ab6e8cef3b771e597a91f106751298038b069bbbd7
sow_0.9.0_darwin_arm64.tar.gz macOSarm64SHA-256 1d0011597c1e39799e12d8ffd7d1616ef90c835f5675b7b97cc397e7d7d93fd2
sow_0.9.0_linux_amd64.tar.gz Linuxamd64SHA-256 2e5210cfdd771f7042889ed22df5fcde408bb3d412ede69cbf601ec2a8eaacdc
sow_0.9.0_linux_arm64.tar.gz Linuxarm64SHA-256 15cca2d9e90016ef2f345f33b3182245db60ad074fc93756e0ee1436e97b7443

2.2 - SOW v0.8.0

Reclaim expired R2 objects on demand, sign with mounted secrets, and maintain large RPM and DEB repositories with fewer reads.

SOW 0.8.0 lets operators reclaim expired objects on R2 and use mounted secrets for signing. Large Managed repositories need fewer storage requests during publication and can reclaim local packages in batches. The database stays at schema v13.

Reclaiming R2 objects

sow gc TARGET still writes a candidate report by default. Add --delete to act on an earlier report or run deletion directly. Before removing an object, SOW rechecks active publications, cache grace, object size, SHA-256 metadata, and ETag. It then verifies storage absence and a public HTTP 404 or 410 and records a causal-epoch deletion receipt.

sow gc prod --json
sow gc prod --delete --json

Keep the target prefix under one workspace’s exclusive control. If deletion is interrupted, rerun with --delete; running without --delete rejects an unfinished conditional-delete report. A package republished after an earlier report receives the protection of its new publication, and republishing identical bytes stays idempotent. See target GC.

Signing and package formats

  • External password files, key files, and trusted keyrings can use symlinks, including Kubernetes Secret mounts. Every hop must stay outside the workspace. Plain create applies the same rule at the flat repository root. Temporary RPM passfile scratch files are zero-overwritten before removal, and GNUPGHOME is forwarded to rpmsign when set.
  • Plain create --sign-with cryptographically verifies the resulting OpenPGP package signature. New Managed RPM metadata publications (repomd.xml.asc) now enforce SHA-256+ digests alongside APT metadata. RPM and APT readers also enforce stricter signature framing and header validation.
  • DEB control archives support uncompressed tar, gzip, bzip2, xz, and zstd. SOW drops control.tar.lzma decompression and removes the unmaintained kjk/lzma and pault.ag/go/debian/deb dependencies; repack any binary DEB that uses control.tar.lzma before importing it.

Publication, recovery, and CLI

  • R2 reuses the recorded SHA-256 of an unchanged immutable pool/ object when the listed path, size, and ETag match. Filesystem publication reuses verified hashes within a session and prunes empty pool/ and dists/ parent directories after conditional deletes.
  • Local GC processes large backlogs in bounded batches and automatically replays interrupted retain-remove-* tombstones (sow check surfaces unfinished ones). SQLite batches membership and publication updates, and reopened writer connections retain WAL persistence and immediate transactions.
  • Plain create and prune release the parent directory lock after binding so sibling directories run concurrently. create rejects running inside a managed .sow workspace ancestor or over an interrupted .sow-prune-repo-complete marker without --pigsty. Managed recovery unifies workspace.lock -> repo.lock ordering for dist new, dist rm, and repo migrate.
  • Read-only inspection commands (config check, repo ls, repo show, dist ls, dist show) work on frozen sow/v2 workspaces. log prune --json populates top-level operation, where -r NAME --json populates top-level repository, and workspace discovery surfaces a hint when sow.yaml is present without sow.yml.

Toolchain and dependencies

Source builds require Go 1.27.4 or newer. CI adds macOS contract tests and signed Managed APT/DNF container tests alongside the pinned Silo 20261112 publication suite.

Component 0.7.1 0.8.0
Go 1.27.4 1.27.4
AWS SDK S3 1.114.10 1.116.0
modernc/sqlite 1.62.0 1.63.0
modernc/libc 1.81.0 1.82.12
klauspost/compress 1.20.4 1.20.5
golang.org/x/crypto 0.58.0 0.59.0
pault.ag/go/debian 0.21.3 0.21.4
GoReleaser 2.20.1 2.20.3

Upgrade and downloads

Stop workspace writers and back up the complete workspace with hard links preserved. If local GC was interrupted on 0.7.1, complete sow gc -r REPOSITORY -C WORKSPACE with the 0.7.1 binary before replacing it. Its recovery plan may contain an empty manifest array that needs the old reader. Then install 0.8.0 and run sow build and sow check for each repository. Workspaces on 0.5.0 through 0.7.1 already use schema v13. See the upgrade guide.

Linux and macOS archives, Linux RPM and DEB packages, and their checksums are on the download page. See the full changelog.

.rpm

Download asset
FileChecksum
sow-0.8.0-1PGSTY.aarch64.rpm Linuxarm64SHA-256 b371f2a70fabe792e42b447adfabe826b586d4c974bf1ebe562ba291c74c2ed7
sow-0.8.0-1PGSTY.x86_64.rpm Linuxamd64SHA-256 2417e1e43023937ae4fc519ef88324be25d487fd971f19e0a8ecdef65516f269

.deb

Download asset
FileChecksum
sow_0.8.0-1PGSTY_amd64.deb Linuxamd64SHA-256 9ea46405e43e07d4fbd7db1271630c8d656463905c0d0ffa91a4a47932d276f9
sow_0.8.0-1PGSTY_arm64.deb Linuxarm64SHA-256 f569512c479acf84277acce8e1b00b230eb3c8e68751b5c8802d7f01b7eca10a

.tar.gz

Download asset
FileChecksum
sow_0.8.0_darwin_amd64.tar.gz macOSamd64SHA-256 e4af9e9ff76cd7d0f56ee2970b4334c9ef864284871078f924a1800ad4785a6c
sow_0.8.0_darwin_arm64.tar.gz macOSarm64SHA-256 4f56903f52ebc7307d60a43b6b03f64628b866dd1a1f86ec29c6486804272c51
sow_0.8.0_linux_amd64.tar.gz Linuxamd64SHA-256 d2de548971d399ff0a825cfebc0827bb78590be9af0948b18bc1d223248958b1
sow_0.8.0_linux_arm64.tar.gz Linuxarm64SHA-256 483403ea407eb5d9251d9d693fb811f6bbe325d82bb0c8f5cacd2b890b53ba07

2.3 - SOW v0.7.1

SOW 0.7.1 upgrades to Go 1.27.4, refreshes dependencies, and fixes recovery, package validation, and S3/R2 handling.

SOW 0.7.1 updates the Go toolchain and dependencies. It also fixes recovery, package validation, RPM export, and S3/R2 handling.

Download the release from GitHub or the Download page.

These notes cover changes since 0.7.0. Database schema v13, configuration schema sow/v3, the CLI, and the public repository layout remain compatible. Workspaces on 0.5.0 through 0.7.0 need no schema migration.

Recovery and repository state

  • Recover interrupted legacy dist.new and dist.init operations when effective signing is absent.
  • Preserve unproven C2 migration stage files intact under .sow/<repo>/abandoned/ and report their location. Empty stages are removed, repeated recovery is safe, and local GC can proceed. Inspect the reported files before removing them.
  • Reopen directory cursors between deletion batches so cleanup completes on macOS APFS and BSD filesystems.
  • Keep multi-statement SQLite reads in one read-only transaction. Split large Dist membership queries below SQLite’s parameter limit.
  • Normalize legacy repository time records with fractional seconds and reject years outside 1..9999.

Package validation and RPM export

  • Reject RPM v6 consistently in Plain create, every prune path, and Managed ingestion.
  • Limit decompressed DEB control archives and APT/RPM metadata streams, including oversized PAX headers.
  • Recognize Linux renameat2 unsupported-operation errors and retain the portable fallback.
  • Allow export rpm-leaf when an unrelated filesystem publication target is unmounted. Physical path overlap is still rejected.
  • Use the selected Dist’s recorded build publication time for the exported metadata signature. A later build of another Dist no longer changes that time. The exported repomd.xml data timestamp remains 0.
  • Accept repeated package inputs when sow add receives both explicit files and their parent directory.

S3 and R2

The updated AWS SDK retries bodyless HTTP 429 responses. SOW preserves the HTTP error classification when those retries are exhausted.

SOW also finds HTTP status codes inside joined errors. An HTTP 404 during multipart abort means the upload is already removed. Error XML responses for listing and multipart operations now have size limits.

Toolchain and dependencies

Source builds require Go 1.27.4 or newer. All 35 required module versions were checked against the latest available versions during release preparation.

Component 0.7.0 0.7.1
Go 1.27.3 1.27.4
AWS SDK core / S3 1.47.8 / 1.114.9 1.48.0 / 1.114.10
Smithy 1.28.8 1.28.9
klauspost/compress 1.20.3 1.20.4
modernc/libc 1.80.1 1.81.0
golang.org/x/sys 0.49.0 0.50.0
GoReleaser 2.20.0 2.20.1

AWS internals, pprof, x/mod, x/sync, and modernc compiler dependencies are also updated. The local RPM parser security patch is retained. Third-party notices match the new release builds.

Upgrade

Stop workspace writers and back up the complete workspace with hard links preserved. Install 0.7.1, then build and check each configured Repository:

sow version
sow build -r REPOSITORY -C /srv/sow
sow check -r REPOSITORY -C /srv/sow

An unchanged build is a no-op. Workspaces from 0.3 or 0.4 still need sow repo migrate REPOSITORY first. Plain repositories have no database migration.

SOW 0.6.1 and older cannot read configurations containing passfile. Remove those fields before downgrading. RPM v6 remains unsupported.

The release includes four Linux/macOS archives, two RPMs, two DEBs, and SHA256SUMS. See the upgrade guide and complete changes.

.rpm

Download asset
FileChecksum
sow-0.7.1-1PGSTY.aarch64.rpm Linuxarm64SHA-256 633dec35eede026280143f272783fddf3453361a71df3b38f134567b9f921b0e
sow-0.7.1-1PGSTY.x86_64.rpm Linuxamd64SHA-256 d4ccae2f3a184d28a92da695cdb46848a46496d137399063ca1d40250fc112c4

.deb

Download asset
FileChecksum
sow_0.7.1-1PGSTY_amd64.deb Linuxamd64SHA-256 127559a2fec7d7532ad1a8d41dce0ba2d61ada3454fa7ef7fc82756d3ab99bd1
sow_0.7.1-1PGSTY_arm64.deb Linuxarm64SHA-256 8d69f623a1741aff4dc4c001059f3fc4279d5b0430d25c4d72704a72ff77dc4e

.tar.gz

Download asset
FileChecksum
sow_0.7.1_darwin_amd64.tar.gz macOSamd64SHA-256 cc1d68911bc80c473d73ace6cbfd2ab586394ea0fb44709fb597d3b4fd44731c
sow_0.7.1_darwin_arm64.tar.gz macOSarm64SHA-256 8120188108b98c79beab3bc0c081f0a4bed15c45533ff43bf69f4be8672551a4
sow_0.7.1_linux_amd64.tar.gz Linuxamd64SHA-256 d1fd60997a86a2048bfe38a5b23a5bcab07e1d99b171133e64ff2b75e4694179
sow_0.7.1_linux_arm64.tar.gz Linuxarm64SHA-256 2adbe314ec4033825bc54effd870bfdbdd366858a35145e7831d298f72438f5c

2.4 - SOW v0.7.0

SOW 0.7.0 adds flat RPM pruning and password-file signing, fixes recovery and publication defects, and preserves workspace formats.

SOW 0.7.0 adds flat RPM pruning and a shared password-file signing interface. It also fixes defects in migration, recovery, publication, RPM signature verification, and version ordering found during the release review.

Availability: SOW 0.7.0 is available on GitHub and the Download page.

These notes cover the changes since 0.6.1. Database schema v13, configuration schema sow/v3, and the public repository layout stay unchanged. Workspaces on 0.5.0 through 0.6.1 need no schema migration.

Prune old RPM versions

sow prune DIR keeps the highest Epoch/Version/Release for each package name and architecture, publishes the filtered index, then deletes older RPMs.

sow prune /srv/candidate --dry-run --protect age_18 --protect age_18-llvmjit
sow prune /srv/candidate --protect age_18 --protect age_18-llvmjit
  • --dry-run validates and previews without writes. Each repeatable --protect NAME preserves all versions of an exact package name and must match a package.
  • --metadata-timestamp SECONDS sets the index publication time, with the same default of 0 as create.
  • Replacement packages must pass embedded digest checks. SOW binds the verified and indexed bytes to a stable file identity, including change time, and checks it before every deletion and before completion. An in-place rewrite with restored size and mtime stops further deletion.
  • You can resume an interrupted cleanup by rerunning sow prune. SOW refreshes an existing repo_complete marker only after successful completion. Errors report completed changes, and SOW does not restore already deleted packages.

Prune works on top-level regular binary RPMs in a local publication source. It rejects managed workspaces, DEB packages or indexes, package symlinks, source RPMs, equal EVRs within a name/architecture group, RPM v6 packages, signed repomd.xml, and independent metadata that SOW cannot generate. It does not sign packages. Clients with cached old indexes may still need the old RPMs: account for that before publishing a pruned repository.

See the prune command reference.

Sign with password files

Use --passfile PATH, SOW_GPG_PASSFILE, or a per-key passfile in sow.yml for protected RPM package keys and RPM/APT metadata keys, including GPG agent keys.

sow create ./packages --sign-with 0123456789ABCDEF --passfile /run/secrets/gpg-password

The priority is CLI, per-key configuration (including a legacy passphrase reference), then environment. The file contains one nonempty UTF-8 line, at most 64 KiB. SOW removes one final LF or CRLF without trimming spaces or tabs. Use a literal path, not file://. Relative CLI/environment paths use the current directory; configured paths use the workspace root. SOW searches no default file.

The interface also covers signing preflight, initialization, migration, leaf export, and recovery of interrupted operations. Credentials do not enter process arguments, repository state, or public files. Password files must be regular files with no symlinks in the path. Keep them outside the repository with private access permissions. Legacy metadata passphrase references remain supported.

See the password-file contract, including command coverage and external GPG requirements.

RPM compatibility

  • ECDSA and EdDSA signatures: accept these header signatures in RPM’s tag 267 (RPMSIGTAG_DSA), where modern RPM stores them. Real Ed25519 and ECDSA packages now verify; SOW still rejects a mismatched RSA signature in that tag.
  • Caret ordering: fix Version and Release comparisons so a snapshot such as 2.0^20250611 sorts before 2.0.1. Managed version limits consequently retain the newer release.
  • Foreign metadata: create keeps its existing behavior of replacing repomd.xml without groups, updateinfo, modules, or unknown records that SOW does not generate. This preserves compatibility with legacy Pigsty repositories, including the modules generated by Pigsty v4.4.0 on EL8/9. Human output now warns about dropped types; JSON output adds dropped_metadata when nonempty. SOW does not maintain the external metadata files or signatures themselves.
  • Prune metadata guard: prune rejects those independent records before mutation and rechecks before publication. Prune allows SQLite and zchunk encodings of the package indexes. Prune also rejects an old index larger than the 16 MiB inspection limit. Create can still replace oversized or malformed indexes, but cannot report types it could not inspect.

If clients need the extra metadata, continue maintaining it with the appropriate generator. Refresh external repomd.xml.asc signatures after rebuilding.

Managed repositories and recovery

  • Migrated repositories remain writable. A completed C2 migration retains the identity of the Generation it created. Later builds no longer cause check, build, add, or gc to reject that migration anchor, and repo rm no longer mistakes a completed migration for an active transition. Affected repositories recover after upgrading without manual database repair.
  • Protect every published pointer. The withdrawal guard now checks the complete published Generation, including views unchanged by the latest publication. SOW rejects removing a Dist, architecture, or signing companion while a configured target still publishes it. Retire that target binding first, or publish under a new target name and prefix. Retired public files remain available for you to remove separately; ordinary publication does not withdraw them automatically.
  • Unrelated offline targets no longer block operations. Publication, abort, and target GC compare the selected target against prospective paths of other targets. SOW still rejects actual physical path overlap.
  • Recover interrupted plan writes. SOW can discard empty, partial, or hash-invalid GC plans in the planned phase before any deletion. It can rebuild retained-removal plans while the original target still exists. Contradictory state after destructive work remains an error.
  • Export carried-forward Dists. export rpm-leaf accepts a clean Dist that a later Generation did not rebuild, with or without signing.
  • Tolerate a backward clock step. Mutation recovery identifies the sole active operation by its ID instead of choosing by wall-clock order.

Dependencies and release checks

Component 0.6.1 0.7.0
AWS SDK core / S3 1.47.3 / 1.114.4 1.47.8 / 1.114.9
Smithy 1.28.6 1.28.8
SQLite / libc 1.61.0 / 1.79.0 1.62.0 / 1.80.1
Debian package parser 0.21.1 0.21.3
YAML go.yaml.in/yaml/v3 3.0.5 go.yaml.in/yaml/v4 4.0.0
GoReleaser 2.18.3 2.20.0

Go 1.27.3 remains the build baseline. YAML retains strict single-document validation and canonical configuration output. This release updates the bounded local RPM parser patch and third-party notices with the dependency changes.

Integration now requires protected-key signing tests on EL8, EL9, and EL10. The EL8 test detects whether rpmsign --rpmv3 exists and skips only the unsupported repeated-signature case. Release gates cover unit and race tests, APT/DNF clients, S3-compatible publication, static analysis, vulnerability reachability, reproducible clean-source builds, and archive/RPM/DEB contents. Hosted R2 live testing is optional and was not run for this review; macOS amd64 was cross-built on the arm64 review host.

Upgrade

Stop writers, back up the complete workspace while preserving hard links, install 0.7.0, then run these commands for each configured Repository:

sow version
sow build -r REPOSITORY -C /srv/sow
sow check -r REPOSITORY -C /srv/sow

An unchanged build is a no-op. Workspaces from 0.3 or 0.4 still need sow repo migrate REPOSITORY first. Plain repositories have no database migration.

SOW 0.6.1 and older cannot load a configuration that contains passfile; remove those fields before downgrading. The no-symlink rule for password files remains in force. SOW does not support RPM v6.

The release produces Linux and macOS archives for amd64 and arm64, two RPMs, two DEBs, and SHA256SUMS. See the installation guide and all changes since 0.6.1.

.rpm

Download asset
FileChecksum
sow-0.7.0-1PGSTY.aarch64.rpm Linuxarm64SHA-256 ea62ad17c62c39c606c2c942d6f0b0acbfb1d0788df71d872746b653753fefdf
sow-0.7.0-1PGSTY.x86_64.rpm Linuxamd64SHA-256 3111afe9857fc44d22a63072ab520d47cd96df4074b632f255c4087030833055

.deb

Download asset
FileChecksum
sow_0.7.0-1PGSTY_amd64.deb Linuxamd64SHA-256 9e579c560b0564bd45481f5d205cfa76edadcb1eedd6e787bd845ed5aba5425f
sow_0.7.0-1PGSTY_arm64.deb Linuxarm64SHA-256 4384d343890e84dec8f917c5f8d6a8612bc98af28b55aec96000f1ea9d2bb59b

.tar.gz

Download asset
FileChecksum
sow_0.7.0_darwin_amd64.tar.gz macOSamd64SHA-256 21f276d940b44264be67ac1b020e50004ec9e77292f12061b880093175f01af1
sow_0.7.0_darwin_arm64.tar.gz macOSarm64SHA-256 bd4232eec5d329a51ed2db8f58d43341c30875e8693278b4c5d10c946d814433
sow_0.7.0_linux_amd64.tar.gz Linuxamd64SHA-256 4ad5c1faa853f3e295abab3b1c070b1e9d2c337af3afcbca7384808c3c3df291
sow_0.7.0_linux_arm64.tar.gz Linuxarm64SHA-256 9453c84501406a0a31044120c9b26ef0eb4865bf45c0d204efd043cf650b323c

2.5 - SOW v0.6.1

SOW 0.6.1 updates Go to 1.27.3, refreshes dependencies, and fixes invalid-input diagnostics without changing workspace formats.

SOW 0.6.1 is a maintenance release with updated dependencies and clearer error messages. It keeps the CLI, database schema v13, configuration sow/v3, and public repository layout. Workspaces already on 0.5.0 or 0.6.0 need no schema migration.

Get the packages and archives from the download page, with checksums from the v0.6.1 release.

Toolchain and dependencies

Source builds now require Go 1.27.3 or newer. All release binaries use Go 1.27.3. The release updates the libraries used for encryption, S3 access, compression, SQLite, and Debian package parsing.

Dependency Version
ProtonMail go-crypto 1.5.2
AWS SDK for Go / S3 1.47.3 / 1.114.4
klauspost/compress 1.20.3
modernc SQLite / libc 1.61.0 / 1.79.0
pault.ag/go/debian 0.21.1
go.yaml.in/yaml/v3 3.0.5
golang.org/x/crypto / x/sys 0.58.0 / 0.49.0

YAML parsing moves to the module maintained by the YAML organization. Existing sow.yml files use the same format. The RPM parser retains its existing local security patches. Updated third-party notices ship with every archive and Linux package.

Maintenance fixes

  • Invalid paths and OpenPGP armor now produce useful diagnostics instead of %!w(<nil>). The fixes cover log export, RPM metadata generation, signature validation, and workspace checks. SOW still rejects the same invalid inputs.
  • CI snapshot packages read their version from the Makefile, removing a hard-coded version. This release updates release tools and GitHub Actions, including GoReleaser 2.18.3, deadcode 0.52.0, and govulncheck 1.9.0.

Upgrade

Stop workspace writers and back up the complete workspace before replacing the executable. Install 0.6.1, then build and check each Repository:

sow version
sow build -r REPOSITORY -C /srv/sow
sow check -r REPOSITORY -C /srv/sow

Replace REPOSITORY with a name from sow.yml. An unchanged repository reports a no-op build and keeps its Generation and timestamps. See the installation guide for package commands and migration from 0.3 or 0.4.

Release validation covered package tests, race checks, APT/DNF clients, S3-compatible transport, and 50,000-package RPM metadata generation. Upgrade and rollback checks used RPM/DEB workspaces created by the published 0.6.0 binary, operated by 0.6.1, then reopened by 0.6.0.

Vulnerability scan result

Source analysis and a control build with symbols found no affected symbols or imported packages. GO-2026-5932 concerns the unused legacy golang.org/x/crypto/openpgp package. SOW uses the maintained ProtonMail fork; the legacy package is absent from all four release-target import graphs.

The release build strips symbol tables from the release binaries. For these binaries, govulncheck -mode=binary falls back to module-level precision and reports that notice. This explains why its binary scan differs from the source scan.

The release includes Linux and macOS archives for amd64 and arm64, two RPMs, two DEBs, and SHA256SUMS. See the complete changes for the source diff.

2.6 - SOW v0.6.0

SOW 0.6.0 keeps previous Plain RPM indexes, records Managed publication times, strengthens verification and recovery, and reduces repeated I/O.

SOW 0.6.0 improves repository updates, file verification, and recovery after an interruption. It keeps the current command set, configuration format, and public repository layout. A Managed workspace already on 0.5.0 needs no database migration.

This note covers the changes since 0.5.0. Use the installation guide for upgrade steps and the download page for release availability.

Changes for repository operators

Area Change in 0.6.0 Effect on your workflow
Plain RPM updates Keep current and immediately previous checksum-named metadata Clients can finish fetching metadata referenced by the previous index
Managed builds Record one publication time for metadata and signatures Recovery preserves the original time; unchanged builds keep their existing output
File verification Check file identity throughout authenticated reads SOW detects replaced or rewritten files, including rewrites that restore the modification time
Signing keys Read complete OpenPGP key bundles SOW checks all supplied trusted keys and rejects malformed input
State and recovery Preserve locks, consistent reads, and committed results Maintenance errors do not make completed changes appear to have rolled back
Large repositories Reuse verified data and limit parallel work Builds, imports, checks, and publication avoid repeated work

Plain RPM updates keep the previous indexes

A client first downloads repomd.xml, then requests the metadata files named inside it. An update between those requests could previously remove the old metadata files before the client fetched them.

Plain sow create now keeps the current and immediately previous checksum-named RPM metadata sets. An unchanged run does not advance this window. SOW can remove older metadata after the next changed index.

The small .sow-plain-rpm-history.json file records the retained references. Keep it when copying a directory for further builds. It is not an operation journal; interrupted Plain builds still recover by rerunning create.

This window does not retain removed package files or cover every client cache lifetime. For caches that span several updates, keep the required packages and metadata in your publication layer. The YUM migration guide explains publication order, signatures, and cached clients.

Plain timestamps remain explicit. --metadata-timestamp still defaults to 0. Keep the greatest published timestamp when replacing another generator or restoring older package content.

Managed builds keep one publication time

A new Managed build records one UTC time, with whole-second precision, before it publishes the affected Dist indexes. The same value supplies APT Release dates, RPM repomd.xml data timestamps, and metadata signature times. RPM revision remains the Generation number.

The chosen time respects previous build times and the selected signing key’s activation time. An unusable or not-yet-valid key causes an error. Keep the host clock correct.

Recovery reuses the recorded time. It rejects a changed time before publishing further Dist entry points. A no-op build creates no new Generation and does not refresh timestamps or signatures.

This behavior applies to new metadata-building operations, including automatic builds from add and rm, and new Dists. Layout migration and older journals keep their previous timestamp rules. Standalone export rpm-leaf output still uses RPM data timestamp 0.

An rm --check preview remains read-only. It predicts membership, paths, actions, and the resulting revision and Generation. Execution chooses its own publication time. Time-dependent bytes, hashes, and sizes can therefore differ from the preview.

Verify the file that was actually read

Metadata and package checks now bind the digest to the opened file’s identity before and after reading. The same checks apply to fast validation and reused verification results. They detect file replacement and same-size rewrites, including changes that restore the original modification time.

Concurrent hard-link creation can change file attributes without changing package bytes. SOW handles this case and retains the identity from the successful verification. This keeps read-only hard-link exports compatible with repository checks.

Path traversal also checks that opened entries match the entries inspected earlier. Parent directories need traversal permission; they no longer need directory-listing permission merely to reach a known child. Package files still need read access, and controlled paths still reject unsafe symlinks and file types.

Read complete signing-key bundles

A trusted-key file can contain several public keys or consecutive armored key blocks. SOW now reads the complete input instead of stopping after the first block. It rejects malformed, truncated, or unsupported key material instead of silently skipping it.

A signing key reference must still identify exactly one primary key. Put bundles in trusted_keys; use one signing identity for each metadata or package-signing setting. The signing reference describes both cases.

Keep state and recovery results consistent

SQLite identity checks now preserve locks held by existing connections. Composite repository queries read related state from one database snapshot. Eligible WAL databases undergo validation once per open, avoiding repeated full validation during one connection’s work.

A database commit can succeed before a later checkpoint or cleanup fails. SOW now preserves the committed command result in that case. Inspect the result, sow status, and sow log before retrying; a nonzero exit does not prove rollback.

Dist status also reports unfinished repository maintenance, including local GC and log pruning. Matching Desired and Built package counts no longer hide this pending work. Removal logs preserve policy-driven outcomes as well as explicitly selected removals.

For an already-started development-era C2 layout transition, repo migrate --abort keeps the trusted transition marker. It can also finish before the first journal or base manifest exists. If a journal binds a plan, SOW verifies that plan against its recorded base manifest and rejects conflicting control records.

A nonempty temporary migration stage moves intact into .sow/<repo>/abandoned/. The command reports the retained path or cleanup problem in stderr and JSON warnings. Stage-cleanup warnings do not prevent abandonment. The public tree remains unchanged. Once selected, the Repository name remains available in migration failure responses.

A fresh C2 repository still cannot start a migration. An older abort that already removed its trusted marker requires a matching backup or a new workspace. See repo migrate for the supported recovery paths.

Reduce repeated work

The release reduces I/O without adding another full repository scan or recovery state machine:

  • Reuse authenticated DEB bytes for parsing and checking within the same operation.
  • Reuse current payload and Dist verification results where their file identities still match.
  • Reuse verified RPM export output instead of reading the same copy again.
  • Avoid duplicate writes while staging imports and remove an unused initial output-tree hash.
  • Query memberships for the selected packages and reuse package data already loaded for the operation.
  • Keep package-staging workers independent and bounded by the requested concurrency.

sow check still reads and hashes each unique physical package on every run. These changes do not turn it into a fingerprint-only check.

R2 inventory checks now use at most eight concurrent HEAD requests per page. The queued work and completed results stay bounded, including cancellation and failures. Upload retries no longer restart the idle timeout merely by seeking in the source file. Actual transfer progress is required. R2 garbage collection remains report-only.

Build, packaging, and validation

Source builds require Go 1.27.2 or newer. Quality checks use staticcheck 0.8.2. Upstream verification for the patched RPM parser also works when Go selected a downloaded toolchain.

The release targets remain Linux and macOS on amd64 and arm64. Packaging produces four archives, two RPMs, two DEBs, and SHA256SUMS. Archives and packages retain their license files and third-party notices. Deterministic source delivery excludes local agent instructions from the delivered product source.

Regression tests cover file replacement, restored modification times, concurrent hard links, and complete key bundles. They also cover commit cancellation, post-commit failures, metadata-time recovery, migration abort, Plain index retention, and bounded R2 requests. The release also removes unused code and brittle Go runtime I/O instrumentation.

Local release checks covered the macOS and Linux suites, race checks, APT/DNF integration, and S3-compatible transport. They also covered 50,000-package RPM metadata generation, packaging, and an upgrade from the published 0.5.0 binary. Use your actual package clients and publication target for deployment acceptance.

Upgrade from 0.5.0

Database schema v13, configuration schema sow/v3, and the public pool/ + dists/ layout remain unchanged.

  1. Stop workspace writers.
  2. Back up the complete workspace, preserving hard links.
  3. Install SOW 0.6.0.
  4. Run these commands for each Repository:
sow version
sow build -C /srv/sow -r REPOSITORY
sow check -C /srv/sow -r REPOSITORY

Replace REPOSITORY and /srv/sow with your values. A current 0.5.0 repository needs no schema migration or forced rebuild; build reports a no-op. Publish only when you intend to deliver a new Built Generation to a configured target.

For 0.3 or 0.4 workspaces, run sow repo migrate REPOSITORY before building. See the complete upgrade procedure.

2.7 - SOW v0.5.0

SOW v0.5.0 adds Plain RPM publication timestamps and fixes repository recovery, signing, and package paths.

SOW 0.5.0 adds publication timestamps for existing YUM repositories and fixes Managed repository recovery, signing, and package-path handling. It also reduces repeated package verification during builds.

Install the release from Download SOW. If you use a Managed workspace from 0.3 or 0.4, migrate each Repository before further writes.

Upgrade a Managed workspace

  1. Stop commands that write to the workspace.
  2. Back up the complete workspace, including sow.yml, .sow/, and all Repository roots.
  3. Install SOW 0.5.0.
  4. Migrate, build, and check each Repository. Replace pgsql and /srv/sow with your names.
sow repo migrate pgsql -C /srv/sow
sow build -r pgsql -C /srv/sow
sow check -r pgsql -C /srv/sow

The migration updates the database to schema v13. Configuration remains sow/v3, and the public layout remains pool/ plus dists/. The first build refreshes RPM authentication and APT metadata records. Later builds reuse matching RPM verification records.

Use SOW 0.5.0 or newer with the migrated database. For backup and installation steps, see Install and upgrade.

Preserve YUM publication time

EL7 YUM can reject a new repomd.xml if its largest data timestamp is older than the cached value. Changing the checksum, revision, or file modification time does not satisfy that comparison.

Use the new option when replacing an existing metadata generator:

# Set PUBLISH_TIME from the repository's publication history.
sow create /srv/yum.candidate --metadata-timestamp "$PUBLISH_TIME"
Setting Result
Default RPM data timestamps remain 0
--metadata-timestamp SECONDS Sets the timestamp of all three RPM data records
Accepted value An integer from 0 to 253402300799
Plain repomd.xml revision Remains 0
Package bytes and DEB indexes Unchanged by this option
Compressed XML and gzip headers Unchanged when only the timestamp changes

The option applies to create. Managed builds, publication, and RPM leaf export do not accept it. A repeated build with the same package bytes and options produces the same metadata; forced package re-signing can change the input bytes.

Keep the highest published timestamp in your maintenance script. Increase it when content changes, including when you restore an older package set. If a previous conversion reset timestamps to zero, use the pre-conversion publication history to recover that value.

If clients verify repository signatures, sign the final repomd.xml after each change. --sign-with signs RPM packages; it does not sign the index. The YUM migration guide covers timestamp selection, index signing, and testing with existing client caches.

Repository and publication fixes

  • Dist removal no longer deletes a package that was later added to another Dist.
  • SOW checks signing policies and pool-path conflicts before committing Desired changes.
  • Recovery preserves committed package selections and completes interrupted cleanup.
  • A published package path stays bound to its content after local garbage collection. Publication recovery does not overwrite that path with different bytes.
  • File names that differ only by case cannot create a second Pool URL, even for identical bytes. Case-insensitive workspaces and filesystem targets also reject directory aliases.
  • Concurrent export rpm-leaf --hardlink and check commands no longer report unchanged package bytes as corrupt.
  • Local gc skips publication records whose packages exist only on the remote target.
  • Input paths can use symlinked parent directories. Package files themselves must pass the existing file checks.
  • SQLite checkpoints delayed by readers no longer turn a completed write into a reported failure. macOS writable connections use fullfsync.

Signing and command output

APT signature verification now accepts GnuPG’s final-newline convention. New metadata signatures use SHA-256, and new builds check whether the signing key is currently usable. Agent signing fixes the signing time and selects the available signing subkey. New APT publications reject weak signature digests; historical verification keeps its recorded rules.

sow repo migrate reports the old and new schema versions. An unmigrated Repository shows the migration command. Commands interrupted by SIGINT or SIGTERM return exit code 130. Rejected add batches show per-file errors. file:// R2 credentials must point to regular files.

RPM dependencies

New regression cases cover pre-transaction and post-transaction script requirements, including combinations used by Cloudberry, Percona, and Grafana packages. Dependency rendering continues to follow modern createrepo_c behavior. See createrepo_c PR #427 for the upstream change.

For package-signing workflows, use RPM format v4. SOW 0.5.0 does not support RPM format v6 signatures. The generated repository metadata uses XML; it does not include SQLite rpm-md or module streams. See Compatibility for formats and client coverage.

Builds and packages

Source builds require Go 1.27.1 or newer. The release uses x/crypto v0.56.0 and GoReleaser v2.18.2. Archives and native packages include THIRD_PARTY_NOTICES.

The release contains four Linux/macOS archives, two RPMs, two DEBs, and SHA256SUMS. Get a specific artifact from the v0.5.0 release. Compatibility tests are in qa/compat/; performance tests are in qa/perf/. The S3 integration fixture uses a digest-pinned pgsty/silo image.

2.8 - SOW v0.4.0

SOW v0.4.0 reduces repeated verification, verifies RPM key sets independently, adds target rebinding, and improves migration and publication recovery.

SOW 0.4.0 improved Managed repository verification and recovery. check reads each physical package once for its content hash. RPM verification keeps separate trust decisions for separate key sets. Publication targets can change their public URL or cache lifetime through an audited rebind operation.

Plain behavior and the public pool/ and dists/ layout stayed the same. This page describes version 0.4.0; use the installation guide to upgrade to the current release.

Upgrade from 0.3 to 0.4

Stop workspace writers and back up the complete workspace, preserving hard links. Install 0.4.0, then migrate each configured Repository before continuing maintenance:

set -euo pipefail
rsync -aH /srv/sow/ /srv/sow.backup-before-0.4.0/
sow repo migrate pigsty -C /srv/sow
sow repo migrate pgsql -C /srv/sow
sow check -r pigsty -C /srv/sow
sow check -r pgsql -C /srv/sow

The example has repositories named pigsty and pgsql; use the names from your sow.yml. Keep the backup for rollback because SOW 0.3 cannot open the migrated database.

Schema v11 fixed a 0.3 status bug: a Repository could appear clean while one of its Dists remained dirty. Status is now updated in the transaction that changes the Dists. Migration also repairs recorded publication and signer information. A historical signing identity that was never recorded remains unverified.

Schema v12 added an append-only history of publication-target bindings. Initial bindings, migration backfills, and later rebinds have separate revisions.

One content hash per physical package

Each sow check performs one complete content hash for each unique physical package, including files whose cached fingerprint still matches. Hard links to the same file share that result. SOW ties verification to the file it read and detects replacements or changes during the check.

The same result is reused when checking retained generations, the final manifest, and changes. Adding Dists or retained generations does not multiply package hashing. DEBs and unsigned RPMs need one full read. A signed RPM uses at most one additional read from the main header to the end of the file for signature verification.

Package-cache queries are limited to the selected digests and run in bounded SQLite batches. A warm build of the 64 MiB test package reads no package content. A changed fingerprint and missing cache row share one verification pass.

Verify each RPM trust set separately

RPM signature packets are checked against each candidate key set independently. Every recognized packet must verify within that set, and at least one verified signature must authenticate the payload.

This supports historical CentOS signatures and deliberately dual-signed packages. It also prevents SOW from combining partial successes across unrelated key sets into a false single-key verification result.

The current policy keys, retained-generation keys, and combined trusted keys use the same signature read. Additional keys change trust decisions without adding package reads.

Update publication-target settings

Use sow publish TARGET --rebind to update mutable target settings while preserving its storage identity and recovery state:

May change with --rebind Requires a new target
Target name Repository identity
public_endpoint Provider or storage endpoint
max_cache_ttl Region, bucket, or prefix

A normal publish reports changed settings and requests --rebind. Rebind takes the publication locks, records a revision, and can resume an interrupted publication after its commit decision. Pending cleanup restricts TTL and filesystem public-URL changes. Previously recorded cache deadlines remain in effect.

Check public files and recover interrupted uploads

Filesystem and R2 HTTP(S) checks now use separate deadlines for response headers and stalled bodies. Large files can take more than two minutes as long as data continues to arrive.

SOW checks the ordinary client URL. Stale content and 404 responses wait up to max_cache_ttl; temporary 408, 425, 429, and 5xx responses use a shorter retry window. Oversized responses fail verification. Filesystem cleanup checks for a public 404 or 410 after deletion. R2 cleanup remains report-only.

Other publication changes include:

  • Check filesystem path aliases before creating a target binding, including case aliases on case-insensitive volumes.
  • Resume an interrupted pointer update when it contains the recorded old or new bytes. Report unexpected content for investigation.
  • Verify the changed public objects instead of downloading the complete generation on every publication.
  • Use retryable reads and writes, idle timeouts, and bounded conditional multipart uploads for R2. Check the whole-object SHA-256 before completing an upload.

CLI and maintenance fixes

  • Repeating sow add builds a selected Dist left dirty by --skip or a configuration change, even if the package is already in the pool.
  • sow rm --check uses the same configuration checks as removal and returns a read-only preview.
  • Every Managed command has readable text output. The sow.cli/v1 JSON format preserves partial or diagnostic results when a command fails.
  • Signer records stay consistent through partial builds, Dist changes, migration, retention, and garbage collection.
  • Retired APT builder, external-sort, empty-Dist, and Git-tracked by-hash code was removed.

Build and release checks

The release used Go 1.27.0, up from Go 1.26.5 in 0.3. AWS SDK, SQLite, compression, and cryptography dependencies were updated. Build checks pinned staticcheck v0.8.1, deadcode v0.49.0, and govulncheck v1.7.0.

Release checks covered Go tests, static analysis, vulnerability and RPM-fork source checks, race tests, Linux amd64/arm64 builds, and the package-read limits described above.

The release includes four Linux/macOS archives, two RPMs, two DEBs, and SHA256SUMS. Archives contain sow, README.md, CHANGELOG.md, and LICENSE. Linux packages install the license with the executable.

Get version 0.4.0

Use the v0.4.0 GitHub release for this version’s artifacts and checksums. Run sow version after installation, then follow the migration steps above for a 0.3 workspace.

For a new installation today, use the current download page. Current behavior is documented in Managed Workspaces, Signing Model, and Publication & Recovery.

2.9 - SOW v0.3.0

SOW v0.3.0 reduces repeated package reads and database queries, batches package commits, and adds build progress events.

SOW 0.3.0 reduced repeated package reads and database queries. Plain generation uses one pass over package content. Managed builds cache parsed package data and commit new pool files in batches. This release also removed retired runtime and publication code.

Plain: read each package once

The default unsigned sow create path hashes and parses each RPM or DEB once. --jobs controls parallel work. SOW renders metadata from the parsed results, then checks that the package set and file attributes still match before writing the indexes.

An interrupted Plain build can be rerun from the package directory. Version 0.3 removed its operation journal, rollback copies, and repeated package hashing; Managed recovery remained unchanged.

Pigsty preprocessing now keeps RPMs whose headers report i386, i486, i586, or i686. They remain in the repository metadata and repo_complete checksum manifest. The DEB i386 and exact Patroni 3.0.4 filters remain in place.

Managed: fewer queries and package reads

Membership tables gained reverse indexes by package SHA-256. SOW now loads Desired and Built membership in one ordered query instead of querying each object. In the project’s benchmark, listing a 5,000-object Dist fell from about 4.1 seconds to 33 milliseconds. A 50,000-object Dist completed in under a second.

Schema v10 added a rebuildable cache of parsed package data, keyed by package SHA-256. Import verifies and parses a new package, then saves the data needed to render its metadata. Builds load this data in batches. Missing or damaged cache entries are rebuilt from verified package files.

For an unchanged pool, warm builds use device, inode, size, modification time, and change time to recognize unchanged files. A changed fingerprint triggers a full SHA-256 check. sow check continues to read and verify the complete package content.

RPM metadata and DEB architecture indexes use bounded --jobs concurrency. Generation manifests and change records are written in batches.

Batch commits and build progress

Managed builds move packages into the public pool in batches of up to 512 objects or 1 GiB. SOW persists each destination directory before removing pending names. Recovery handles an interrupted batch whether a package exists in the pending directory, the pool, or both.

Pending files use their final 0644 mode inside a private 0700 directory. Builds no longer hold a file descriptor for every pending package throughout the operation, which reduces resource use in large repositories.

Long builds write build_progress events for rendering, package promotion, Dist publication, normalization, and finalization. Use sow log to inspect this progress.

One active repository implementation

The release removed the retired V1 CLI and runtime, cloud/CDN publication code, Edge worker, completed migration program, and their obsolete tests. The active CLI uses one repository implementation.

R2 publication keeps the storage operations SOW needs: list, HEAD, GET, and conditional PUT. Remote garbage collection reports candidates without deleting them.

Other changes

  • Local garbage collection handles a unique recorded pool-path alias on case-insensitive filesystems. It checks the package path, size, and digest before removal.
  • Archives include LICENSE. RPM and DEB packages install Apache-2.0 license files at /usr/share/licenses/sow/LICENSE and /usr/share/doc/sow/copyright.
  • CI covers formatting, module consistency, static analysis, dead-code checks, tests, race detection, source delivery, and package builds.
  • Integration tests cover mixed RPM/DEB workflows and an unsigned Plain APT installation on Ubuntu 22.04. They also test DNF signature transitions on AlmaLinux 8/9 and pgsty/el10, plus conditional S3 operations against a pinned MinIO version.

Get version 0.3.0

Use the v0.3.0 GitHub release for that version’s Linux/macOS archives, Linux RPM/DEB packages, and SHA256SUMS. Run sow version after installation. The source tag requires Go 1.26.5 or newer.

For a new installation today, use the current download page. Current behavior is documented in Plain Mode, Managed Workspaces, and Platforms & Integrations.

2.10 - SOW v0.2.0

SOW v0.2.0 introduced Plain and Managed RPM/DEB repositories, signing, publication, retained generations, and RPM leaf export.

SOW 0.2.0 introduced Plain and Managed workflows for RPM and DEB repositories. It builds static package repositories with one Go executable on Linux or macOS.

This page describes the 0.2.0 release. Use the current documentation for installation and operations today.

Build a flat repository

Plain mode indexes RPM and DEB files at the top level of a directory:

sow create /srv/repo

For RPMs, it writes repodata/. For DEBs, it writes Packages and Packages.gz. A mixed directory gets both. Plain mode uses the directory contents as its state and needs no workspace or database.

The release also added --sign-with to sign unsigned RPM packages. Use --overwrite to replace existing RPM signatures. Plain mode does not generate or sign an APT Release file.

Manage a repository over time

Managed mode records package membership and builds named Dists:

mkdir -p /srv/sow
cd /srv/sow
sow init .
sow repo new pigsty
sow dist new el9 --format rpm -r pigsty
sow add /path/to/packages/*.rpm -r pigsty -d el9
sow check -r pigsty

Each Repository stores a package file once under pool/. Its Dists contain RPM or APT metadata under dists/. Builds record generations so SOW can report changes and retain selected repository states.

Version 0.2.0 added:

  • sow/v3 configuration and package membership policies;
  • metadata signing for RPM and APT, plus RPM package signing;
  • status, check, changes, and operation logs;
  • recoverable publication to filesystem and R2 targets;
  • retained generations and local garbage collection;
  • rpm-leaf export for tools that need a standalone RPM directory.

Serve or publish the complete Repository tree so metadata can reach the shared package pool. sow publish manages upload order and recovery for configured targets. R2 cleanup reports candidates without deleting remote objects.

Release testing and source

The release added APT/DNF and S3-compatible integration workflows, plus a tag-driven GoReleaser pipeline for Linux/macOS archives and Linux RPM/DEB packages. Historical code and tests are available under the v0.2.0 source tag.

For the current release, use Download. Current client and storage coverage is listed in Platforms & Integrations.