Skip to main content

Module workspaces

Module workspaces 

Source
Expand description

The workspaces file: how many warm worktree slots each repository keeps on this host, and how many sessions it admits past them.

YAML, first match wins, matched on the same RuleMatch the rules file and the release-targets file use — a third match vocabulary over the same identities would drift. A separate file beside rules.yml and releases.yml rather than a key in either, so an older onevcs sharing the host reads a byte-identical registry and rules file and simply keeps opening fresh sessions.

Absent, every value is the shipped default, which is today’s behaviour exactly: pool: 0 (every session is cut fresh under runs/), overflow: unlimited, nothing deleted on return, and no maintenance. A host that never writes this file is unchanged.

Nothing here declares deny_unknown_fields, for the reason the other two host files do not: a document a newer build wrote loads on this one, which takes the keys it understands and ignores the rest, because an older onevcs refusing an operator’s whole file would stop every session on the host.

Structs§

Maintenance
What maintaining an idle slot means: a command, and the bound it runs under.
Span
A duration as this crate’s documents spell one: one or more digits, then exactly one unit letter — 7d, 36h, 90m, 600s.
WorkspaceDefault
A complete workspace policy: every field a rule may set, all of them decided.
WorkspaceRule
One rule: what it matches, and which parts of the policy it sets.
WorkspacesFile
A workspaces file, as it is stored on disk.

Enums§

Bound
A count that may be unbounded: unlimited, or a non-negative integer.

Constants§

DEFAULT_MAINTAIN_TIMEOUT
The bound a maintenance command runs under when the document names none.
OVERFLOW_ENV
The environment variable that overrides the resolved overflow bound for one process.
POOL_ENV
The environment variable that overrides the resolved pool size for one process.
VERSION
The version of the workspaces file this build writes, and the oldest it reads.

Functions§

default_path
Where a host configures its pools: one conventional path under the state root, and nowhere else — not reachable through the registry, for the reason the release-targets file is not.
first_matching
The index of the first of criteria that matches repo, by exactly the matcher the rules, releases and workspaces files use.