Expand description
Version control and its remote host behind one host-neutral vocabulary.
The review unit is a ChangeRequest — GitHub maps it to a pull request,
and a later host maps it to whatever it calls the same thing. Vcs owns the
repository side (identities, sessions, preserved work) and RemoteHost owns
the host side (opening a change, reading its checks, merging it). A
rules file decides, per repository, how a change is published and whether
it needs an approval. Everything a process does along the way is emitted as an
Envelope.
§The shape of one change
session open → a --shared clone and one worktree, occupancy-leased: a warm
pool slot where the host keeps one, else cut for this run
→ work happens in the worktree
→ publish → fetch and merge the current base (bounded resolve-and-requeue)
→ the repository's own merge path verifies it: its pre-push
hook, or the host's required checks on the change request
→ local-direct squash, or a change request the host lands
→ session close → the branch is copied out and stays; a slot is returned
warm, a per-run worktree goesEverything durable lives under one state root (ONEVCS_HOME, otherwise
~/.onevcs): the registry document, the advisory locks and merge-queue state,
the per-session workspaces, the event streams, and their artifacts.
§Two surfaces over one decision
run is the command line: it answers a process, with an exit code and a line
of prose. A caller embedding this crate wants the decision itself, so the same
operations answer values — publish hands back a Publication,
close_session the session it released, session what the repository side
recorded, preserve what putting a branch on its origin did, recoverable the
branches that still hold unpublished work, and EventStream the envelopes one
session wrote. The command line is a rendering of those rather than a second path
through them.
Every command is: registered_identities and repositories are what
onevcs repos prints, register_checkout, resolve_repository,
publish_branch, recover, work_status, import_branch,
integrate, sync, sweep, rules_check, read_artifact,
review_comments, reply_to_comment, change_standings,
review_standings, retarget_change, reopen_change and EventLines are
the rest, and a command with no such operation fails this crate’s own contract
suite.
Re-exports§
pub use boundary::boundary_schema;pub use boundary::check_public_output;pub use boundary::check_public_output_with_evidence;pub use boundary::inspect_repository;pub use boundary::repository_boundary;pub use boundary::BoundaryInput;pub use boundary::BoundaryVerdict;pub use boundary::RepositoryBoundary;pub use boundary::TermMode;pub use boundary::TermRule;pub use boundary::TermScope;pub use boundary::Visibility;pub use declaration::Declaration;pub use declaration::DeclaredTarget;pub use declaration::InstructionTemplate;pub use declaration::RegistryId;pub use declaration::RetiredArtifact;pub use registry::Identity;pub use releases::Acknowledgement;pub use releases::Adoption;pub use releases::Baseline;pub use releases::BaselineRecord;pub use releases::DeclarationPolicy;pub use releases::DeclarationSource;pub use releases::Discovery;pub use releases::Probe;pub use releases::ReleaseAnswer;pub use releases::ReleaseDefault;pub use releases::ReleaseMethod;pub use releases::ReleaseRule;pub use releases::ReleaseSource;pub use releases::ReleaseStatus;pub use releases::ReleaseStyle;pub use releases::ReleaseTarget;pub use releases::ReleasesFile;pub use releases::RepositoryReleases;pub use releases::SupersededRelease;pub use releases::TargetName;pub use releases::TargetRelease;pub use releases::TargetSource;pub use rules::MergePolicy;pub use workspaces::first_matching;pub use workspaces::Bound;pub use workspaces::Span;
Modules§
- boundary
- The public boundary: what may leave this host for a public destination.
- branches
- The branch prefix: one string this host puts in front of every branch
onevcscuts, and the sanitizer that turns a caller’s proposed name into one git accepts. - cli
- The command-line argument surface.
- declaration
- The producer’s own release declaration: what one repository publishes.
- provenance
- What a branch records about how its work came to be there.
- registry
- The registry document: which repository identities exist, which checkouts belong to each, and where the rules file lives.
- releases
- The release-targets file: what each repository releases, and how a release of it is learned about.
- rules
- The rules file: how each repository publishes a change.
- workspaces
- The workspaces file: how many warm worktree slots each repository keeps on this host, and how many sessions it admits past them.
Structs§
- Artifact
Id - The id of a stored artifact.
- Artifact
Ref - Evidence too large for a payload: stored by the producing library and referenced by id, to be read back through that library.
- Branch
Holder - One place a copy of a branch is.
- Branch
Outcome - What one candidate of the train did.
- Branch
Publish Request - What to publish, for the branch-keyed verb that takes completed work.
- Branch
Ref - One branch of one identity: the pair a pass is told to leave alone by.
- Change
Checks - What a host reports about a change request’s checks, and where it looked.
- Change
Description - What a caller writes to a change request’s description.
- Change
Id - A host’s identifier for a change request.
- Change
Request - An open change request on the host.
- Change
Spec - What to open a change request for.
- Change
Standing - Where one change request stands, as the host reports it.
- Change
Standings - Where each change request stands, and what the read cost.
- Change
Standings Request - Which change requests to read, and the branch a merge into which is a landing.
- Check
- One check the host reports on a change request.
- Checkout
Audit - What the gate audit found about one checkout.
- Comment
Id - The host’s own stable id for a comment (GitHub’s node id).
- Description
- A change request’s description as the host holds it.
- Dimensions
- The envelope’s reserved top-level dimensions:
phase, optional and omitted from the wire when absent. - Event
Line - One line of a session’s event stream, as its writer left it.
- Event
Lines - A reader over one session’s event stream as text, which is what
onevcs eventsprints. - Event
Stream - A reader over one session’s event stream, as values rather than as text.
- Export
Request - What to export, and where to.
- Exported
- What an export made: the public branch and its one new commit, and nothing else.
- Failed
Holder - A place a deletion did not reach, and why.
- Git
- The git implementation of
Vcs. - GitHub
- The GitHub implementation of
RemoteHost, driven throughgh. - HeldBy
- What still holds a preserved branch: a live session, or a publication of it running right now.
- Identity
Maintenance - One identity, and what maintaining it came to.
- Import
Request - Which branch to make reachable from an identity’s registered checkouts.
- Imported
- What one import did.
- Integrate
Request - Which branches to merge into their base, in order.
- Integration
- What the whole train did.
- Labels
- The reserved label keys, plus whatever else a producer stamped.
- Line
Change - The lines a branch would land, as git counts them against the commit it forked from.
- Maintain
Report - What
pool maintaindid: every identity in scope, and what became of each. - Match
Fields - What a matcher may name beside
sourceandkind:phaseand the reserved labels, each by exact equality against what the envelope carries.roundis deliberately not among them, as the grammar says. - Matched
Rule - The rule a repository matched, and what it matched on.
- NetNegative
- A
LineChangethat removes more than it adds, and the only thing that can be one. - OnOrigin
- Where a branch was last put on its identity’s origin without being published.
- Open
Conflict - A merge left in progress in a session’s worktree, for the session to conclude.
- Pool
Status - What
pool statusreports: the capacity, and every slot. - Posted
Reply - What a reply did.
existingis true when a reply carrying the key was already on the host and nothing was posted. - Preserve
Request - What to preserve, and where to look for it.
- Preserved
- What preserving one branch did.
- Preserved
Branch - A branch that holds work outside its session.
- Providers
- The repository side and the remote-host side of one run.
- Prune
Report - What
pool prunedid: which slots it removed, and which it kept and why. - Publication
- What one publication did.
- Publish
Request - What one publication was asked for beyond the session it publishes.
- Read
Cost - What the host charged for one read, from the responses’ own allowance figures.
- Read
Marker - Opaque to callers; carries what the transport needs to read only what changed.
- Recover
Request - What to recover, for the branch-keyed verb that takes work a step left behind.
- Recoverable
- Preserved work, whether it reached its base, and what would land it.
- Registered
Checkout - One registered checkout of an identity.
- Registered
Repository - One registered repository identity, as
onevcs reposlists it. - Registration
- What
onevcs registerrecorded, and what the identity it recorded publishes under. - Reopen
Request - A closed change request to reopen, and the commit to restore its deleted base at.
- Reopened
- What reopening a change request did.
- Reply
Marker - The hidden last line of every reply this crate posts, parsed.
- Reply
Request - One reply to post.
- Required
Checks - What a host requires before a merge into a branch, and how much of the host that answer covers.
- Resolved
Policy - The publication policy a repository resolves to, and where each half of it came from.
- Resolved
Repository - What one repository argument resolves to.
- Retarget
Request - A change request to move onto another base.
- Retargeted
- What moving a change request did.
- Retire
Pass - The automatic pass over every finished branch in scope.
- Retire
Request - One retirement asked for by name.
- Retired
- One branch’s retirement: its classification, and what was done about it.
- Retirement
- What a branch is, and everything that says so.
- Retirement
Pass Report - What one automatic pass examined, and what became of each branch.
- Retirement
Query - Which branch to classify.
- Review
Comment - One comment on a change request, as the host holds it.
- Review
Read - What one read of a change request’s review feedback found.
- Review
Standings - Where each change request stands, what its review feedback says, and the cost.
- Review
Standings Request - Which change requests to read with their review feedback, and the root.
- Review
Target - One change request a review-and-standings read is asked about, and the marker an earlier read of its review feedback answered.
- Rules
Applied - What
rules applycomposed, and where it went. - Rules
Apply Request - What to compose, and whether to install it.
- Rules
Check - How one repository resolves against this host’s rules.
- Selection
- Which of the preserved work in scope a report is asked to answer with.
- Session
- An open session: a per-run shared clone plus a worktree, held under an occupancy lease.
- Session
Change - A session’s change request, as the host holds it right now.
- Session
Holder - One session that holds a repository’s workspace, as an enumeration reports it.
- Session
Record - Everything the implementation that opened a session records about it.
- Session
Request - What to open a session over.
- Session
Token - The handle a session is adopted, published, and closed by.
- Sha
- A commit hash.
- Slot
Maintenance - One slot, and what became of it.
- Slot
Status - One slot, as
pool statusreports it. - Source
- An open source word: whatever produced the event, by name.
- Stack
Base - What one assembly of a stack base did.
- Stack
Base Request - What to assemble, and from what.
- Stack
Parent - One parent of a stack base, and the head this assembly merged it at or found the branch already carrying.
- Status
Report - Everything this host knows about one piece of work, as
onevcs statusanswers it. - Subject
- A title that can be the subject of the commit a publication lands.
- Superseded
By - The retry that superseded a branch, as its record says.
- Supersession
- A record that a branch was superseded by a retry that landed.
- Sweep
Report - What one sweep examined, reclaimed, and retained.
- Synced
- What one fast-forward of a publication checkout did.
- Unknown
Cause - The read that failed, for a branch kept as
KeepReason::Unknown: which read it was, what it read, and the error it got — so a kept branch says what to look at rather than only that something could not be read. - Url
- A parsed absolute URL, re-exported so a caller needs no direct dependency on the parser this crate validates change-request URLs with. A parsed URL record.
- VcsEvents
- This crate’s vocabulary: what
Envelope,EventFilterandEventMatcherare the bus core’s generic types over. - Workspace
Capacity - How many sessions one identity can admit right now, and whether one request would be placed.
Enums§
- Base
Push - What the train does with the base once it has advanced it.
- Branch
Holder Kind - Which kind of place holds a copy of a branch.
- Change
Ref - A change request, named by the session that published it or by its URL.
- Change
State - Whether a change request is open, merged, or closed without merging.
- Check
Source - One place a host’s answer about a change request’s checks was read from.
- Check
State - Which of five states one check is in, as
Check::stateclassifies it. - Checks
Verdict - What the required checks on a change request’s head say, by the rules a publication’s watch reads them by.
- Comment
Kind - What kind of comment a
ReviewCommentis, and where it sits. - Derivation
- Whether a pass derived a branch’s verdict or reused one it recorded earlier.
- Detail
- The detail a recovery read computes. Both modes answer the same branches and decisions, including the command that recovers them.
- Draft
Reason - Why a change request is a draft, in the shape a machine reads it.
- Error
- Everything an
onevcsoperation can fail with. - Event
Kind - What an event says happened.
- Failure
Kind - Which failure ended a publication, and therefore which exit code says so.
- Gate
Audit - Whether a listing carries the gate audit, which is what
--audit-gatesasks for. - Holding
- How a host can tell that something still holds a branch.
- Identity
Outcome - What became of one identity.
- Import
Source - Where an import read the branch from.
- Integration
Ending - Where the train left the base.
- Integration
Status - What happened to one candidate of the train.
- Keep
Reason - Why a branch is kept.
- Landed
- Whether the work reached the base, and — where it did — what says so.
- Landing
Evidence - Which tier decided a landing, and the commit that is its evidence.
- Lifecycle
- Where a session is in its life.
- Liveness
- Whether a session’s owner is still running, which is what makes its lease real.
- Maintenance
Outcome - How a maintenance run ended.
- Merge
Outcome - What merging a change request did.
- Merge
Path Coverage - What runs a gate on an identity’s merge path.
- Mergeability
- Whether a change request can merge into its base, as
RemoteHost::mergeabilityanswers it. - Phase
- Which part of a change’s life an event belongs to.
- Preservation
- What preserving one branch found to do.
- Protection
Source - One of the ways a host protects a branch, each of which may name required checks.
- Provenance
- Why a branch was preserved, and therefore what recovering it must do.
- Publish
Outcome - How a publication ended.
- Required
Checks Answer - What an identity’s host says it requires before a merge.
- Retarget
Outcome - Whether a retarget moved the base.
- Retention
- What became of a branch whose publication did not land.
- Retire
Mode - Which classes a retirement may act on.
- Retire
Outcome - What a retirement did.
- Retirement
Class - What a branch is, for the question of whether it may be deleted.
- Retirement
Proof - What proves a branch holds no work beyond its base.
- Scope
- Which preserved work to look for.
- Slot
Outcome - What became of one slot.
- Slot
State - Where one slot is in its life, as
pool statusreports it. - Stack
Base Outcome - What one assembly of a stack base found to do.
- Sweeping
- Whether a sweep performs what it decided, which is what
--dry-runasks. - Trailer
Prefix Source - What decided the provenance trailer prefix.
- Wrote
- What one import did to the name it wrote.
Constants§
- DIMENSIONS
- The reserved top-level dimensions:
phasealone. - EXPORT_
AUTHOR_ EMAIL - The address every export’s commit is authored and committed under.
- EXPORT_
AUTHOR_ NAME - The name every export’s commit is authored and committed under.
- EXPORT_
SUBJECT - The one subject every export’s commit carries.
- HOST_
PREREQUISITE_ MARKER - How a merge-path hook begins the one line saying a refusal is this host’s rather than the work’s: a tool or a credential it needs is missing, and what follows the marker says which and how to install it.
- RESERVED_
LABELS - The reserved label keys, in the order the wire lists them.
- SOURCE_
WORD - The word this crate stamps as the source of every event it writes.
Traits§
- Hosting
- Where a
RemoteHostfor one repository comes from. - PhaseOf
- The phase an event of one of this crate’s kinds belongs to, where the kind alone decides it.
- Publication
Cancellation - Whether the caller of a publication has asked it to stop.
- Remote
Host - Everything
onevcsasks of a repository’s remote host. - Vcs
- Everything
onevcsdoes to a repository, independent of which version control system is underneath.
Functions§
- acknowledge_
release - Record the release somebody says carries a landing.
- adoption_
for - Which rung of the adoption chain one repository resolves to.
- assemble_
stack_ base - Assemble, advance, or confirm a synthetic stack base, and push what moved.
- change_
standings - Read where every named change request of one repository stands.
- classify_
retirement - What one branch is, for the question of whether it may be deleted:
retirable,superseded-with-changes, orkeepwith the one reason it is kept. - close_
session - Release a session’s worktree and its occupancy lease, keeping its branch.
- describe_
change - Replace the description of the session’s own change request — its body, and its title when one is given — and report the change as it stands after the write.
- export
- Export one directory of a private branch, as one neutral commit, onto a new local branch of a public repository.
- import_
branch - Make one branch reachable from an identity’s registered checkouts.
- integrate
- Merge finished branches into their base, in order.
- landing_
status - Whether one piece of work reached its base, and what says so.
- pool_
maintain - Maintain the idle slots of every identity in
scope. - pool_
prune - Remove every slot of one repository nobody is in — idle, or broken — whose clone retains no branch, and say why each other one was kept.
- pool_
status - The pool of one repository: its capacity with no per-open override, and every slot.
- preserve
- Put an unpublished branch on its identity’s origin, under its own name, without publishing it.
- publish
- Verify a session’s work and publish it, returning what the publication did.
- publish_
branch - Verify and publish a completed branch no session holds.
- publish_
with_ cancellation publish, stopping oncecancellationsays so.- read_
artifact - Read one stored artifact.
- read_
release_ declaration - What one repository declares that it publishes.
- ready_
change - Mark the session’s own change request ready for review, and report it as it stands.
- record_
supersession - Record that a branch was superseded by a retry that landed.
- recover
- Verify and publish a preserved branch that a step left behind, attesting it.
- recoverable
- Every preserved-but-unpublished branch in scope, and what would land each.
- register_
checkout - Register a checkout, resolving its origin to a repository identity.
- registered_
identities - Every repository identity this host has registered, in the order
onevcs reposlists them. - release_
discovery - Every target one repository has, and what each of them has released right now.
- release_
latest - What version of one target is released right now.
- release_
status - Whether the release that carries one landed change has happened yet.
- release_
targets - What one repository releases, and what it adopts.
- render_
release_ declaration - Render a declaration back as the TOML document it declares.
- reopen_
change - Restore a closed change request’s deleted base at
restore_base_atand reopen it, still a draft where it was one. - reply_
to_ comment - Answer one comment: in its thread where it has one, and otherwise as a new conversation comment whose first line links it. Never resolves a thread.
- repositories
- Every registered repository, in the order
onevcs reposlists them. - resolve_
repository - Resolve a repository argument — an identity key, a registered alias, an origin URL, or a path — to the identity it selects.
- retarget_
change - Move a change request onto
base, writing its description in the same request. - retire
- Delete one branch everywhere this host holds it, where its class permits.
- retire_
finished - Retire every branch in scope that provably holds no work beyond its base.
- review_
comments - Read a change request’s review feedback: every comment created or edited after
since, and every comment whose thread was resolved, unresolved or outdated since it, with the marker to pass next time. - review_
standings - Read where every named change request stands and its review feedback, in one aliased query per 150 change requests.
- rules_
apply - Compose the base and its overlays, validate the result, and install it — unless
it is a dry run — atomically at the registry’s rules location, or at the
conventional
rules.ymlunder the state root, recorded as the registry’s reference, where the registry names none. - rules_
check - Explain how one repository resolves against this host’s rules.
- run
- Run one parsed command line, returning the process exit code.
- run_
with - Run one parsed command line against supplied implementations of the two interfaces, returning the process exit code.
- session
- What the repository side recorded about a session.
- session_
change - The session’s own change request — the one
publishwould open or adopt for it, from its branch into the base its publication resolves — as the host holds it, orNonewhen the host holds none. - session_
holders - Every session recorded for one repository, live or not, in token order.
- sweep
- Reclaim the publication workspaces this host has finished with.
- sync
- Fast-forward a publication checkout to its origin.
- validate_
release_ declaration - Validate one release declaration’s text, and answer what it declares.
- work_
status - Report everything this host knows about one piece of work.
- workspace_
capacity - How many sessions the request’s identity admits right now, and whether the request itself would be placed.
Type Aliases§
- Envelope
- One event of this crate: the bus core’s envelope over this vocabulary.
- Event
Filter - Which envelopes pass: the bus core’s filter over this vocabulary.
- Event
Matcher - One matcher of an
EventFilter:source,kind, and theMatchFields—phaseand the five reserved labels a matcher may name. - Result
- The result type every fallible entry point in this crate returns.