oiax

module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2026 License: MIT

README

oiax

Declarative Git branch promotion reconciler for branch-per-environment GitOps repositories.

Status: released. Oiax is published on GitHub Releases: edge evaluation through the full equivalence ladder, the GitHub forge provider (and Azure DevOps as of 1.1.0), managed promotion requests, and backflow. Run it with the skaphos/oiax@v1 Action or the Azure Pipelines template; the floating @v1 tag tracks the latest v1.x.y. New here? Start with the getting-started guide.

Branch-based GitOps repositories model environments as long-lived branches — development → test → qa → production-stage-1 → main — and promote changes with pull requests between adjacent branches. Those promotion PRs are usually hand-made, go stale, and lose hotfixes applied downstream. Oiax treats them as reconciled resources instead: given a promotion graph declared in .oiax.yaml, it observes branch and forge state and ensures the pull requests required to move changes through the graph exist — exactly one active managed request per diverged edge, no duplicates. Requests for edges removed from the graph are deliberately left for a human to close. It is release-please's posture applied to environment promotion.

Oiax deliberately does not deploy applications, render manifests, or decide whether a change is safe to promote. Approval, validation, and policy gates stay where the repository already puts them: branch protection, required checks, CODEOWNERS, human review. (The name keeps the point — the Greek οἴαξ is the tiller: a hand stays on it.)

Quickstart

Declare the promotion graph at .oiax.yaml on the default branch:

apiVersion: oiax.skaphos.dev/v1
kind: PromotionGraph

metadata:
  name: environments

spec:
  branches:
    development:
      role: source
    test: {}
    qa: {}
    production-stage-1: {}
    main:
      role: terminal

  promotions:
    - from: development
      to: test
    - from: test
      to: qa
    - from: qa
      to: production-stage-1
    - from: production-stage-1
      to: main

  backflow:
    sources:
      - production-stage-1
      - main
    target: development
    strategy: cherry-pick

Then:

go install github.com/skaphos/oiax/cmd/oiax@latest

oiax validate    # semantic validation of the graph
oiax graph       # display the promotion topology
oiax plan        # compute pending actions (the dry run)
oiax reconcile   # plan, then apply

Oiax shells out to git for all repository state and backflow replay, and requires git 2.45 or newer (backflow uses git cherry-pick --empty=drop, added in git 2.45). The version is checked once at startup; on older git, plan and reconcile fail fast with a clear message naming the required floor and the detected version.

plan evaluates every promotion edge and prints the actions reconcile would apply; reconcile then creates, updates, and closes managed pull requests, including backflow. The one piece not yet implemented is validate's repository-state check (confirming configured branches exist as refs).

GitHub Action

The initial execution model is a GitHub Action — a thin composite wrapper around the release binary. The Action supports Linux runners on x64 and ARM64; standalone release binaries remain available for the other published platforms.

- uses: actions/checkout@v7
  with:
    fetch-depth: 0         # required: full history for correct equivalence detection
- uses: skaphos/oiax@v1
  with:
    config: .oiax.yaml
    mode: reconcile        # validate | plan | reconcile

Release automation advances @v1 only after publishing a successful v1.x.y release. The Action reads that release's manifest and downloads the matching binary, so wrapper and binary update together within v1.

fetch-depth: 0 is not optional: actions/checkout's default shallow clone (fetch-depth: 1) has no merge base, which silently degrades equivalence detection and yields spurious promotion requests. Oiax warns when it detects a shallow clone.

One trap worth knowing before anything else: pull requests created with the default GITHUB_TOKEN do not start on: pull_request checks automatically. GitHub queues opened, synchronize, and reopened runs for approval by a user with write access, so unattended promotion stalls when those checks are required. See GitHub's workflow-trigger documentation. Use a GitHub App installation token in production. See architecture for the full workflow example and token guidance.

Running CI on Azure DevOps instead? An Azure Pipelines steps template wraps the same binary — for GitHub-hosted repositories and for Azure Repos, which Oiax supports as a second forge provider (managed Azure Repos pull requests, backflow branches, and Azure Boards conflict artifacts). See Deploying Oiax from Azure Pipelines.

Documentation

License

MIT © 2026 Rillan AI LLC


Skaphos is a project of Rillan AI LLC, a Missouri limited liability company. Released under the MIT License.

Directories

Path Synopsis
cmd
oiax command
Command oiax is the declarative Git branch promotion reconciler.
Command oiax is the declarative Git branch promotion reconciler.
internal
cienv
Package cienv identifies the CI system the current process runs under.
Package cienv identifies the CI system the current process runs under.
cli
Package cli wires the Cobra command tree.
Package cli wires the Cobra command tree.
config
Package config loads and syntactically validates Oiax configuration.
Package config loads and syntactically validates Oiax configuration.
engine
Package engine holds the provider-neutral core of Oiax: promotion graph validation, edge evaluation, and planning.
Package engine holds the provider-neutral core of Oiax: promotion graph validation, edge evaluation, and planning.
forge
Package forge defines the provider-neutral interface Oiax uses to observe and mutate change requests on a Git forge.
Package forge defines the provider-neutral interface Oiax uses to observe and mutate change requests on a Git forge.
forge/azuredevops
Package azuredevops is the Azure Repos forge provider (ADR 0009): Provider implements forge.Forge over the Azure DevOps REST API — managed pull requests, oiax/ branch pushes and deletes, merge-strategy policy discovery, and durable conflict artifacts as Azure Boards work items.
Package azuredevops is the Azure Repos forge provider (ADR 0009): Provider implements forge.Forge over the Azure DevOps REST API — managed pull requests, oiax/ branch pushes and deletes, merge-strategy policy discovery, and durable conflict artifacts as Azure Boards work items.
forge/forgetest
Package forgetest is a shared, provider-agnostic conformance suite for forge.Forge implementations.
Package forgetest is a shared, provider-agnostic conformance suite for forge.Forge implementations.
forge/github
Package github implements the forge.Forge interface against the GitHub REST API.
Package github implements the forge.Forge interface against the GitHub REST API.
forge/marker
Package marker owns the machine-readable Oiax metadata block a managed change request carries in its body, and the forge-neutral labels that accompany it.
Package marker owns the machine-readable Oiax metadata block a managed change request carries in its body, and the forge-neutral labels that accompany it.
git
Package git shells out to the system git executable for ref state, reachability, patch identity, and backflow branch construction.
Package git shells out to the system git executable for ref state, reachability, patch identity, and backflow branch construction.
gittest
Package gittest is the hermetic git test harness shared by every package that drives real git subprocesses in tests: internal/git, internal/cli, internal/reconcile, and internal/forge/github.
Package gittest is the hermetic git test harness shared by every package that drives real git subprocesses in tests: internal/git, internal/cli, internal/reconcile, and internal/forge/github.
reconcile
Package reconcile is the coordination layer: it is the only place where git observations and forge requests become engine.EdgeObservations, and the only place engine actions become forge calls.
Package reconcile is the coordination layer: it is the only place where git observations and forge requests become engine.EdgeObservations, and the only place engine actions become forge calls.
tmpl
Package tmpl renders the human-facing text Oiax authors: managed-request titles and bodies, the durable backflow-conflict artifact, and the merge backflow strategy's --no-ff merge-commit message.
Package tmpl renders the human-facing text Oiax authors: managed-request titles and bodies, the durable backflow-conflict artifact, and the merge backflow strategy's --no-ff merge-commit message.
version
Package version carries build-time version metadata, injected via -ldflags by GoReleaser (see .goreleaser.yaml).
Package version carries build-time version metadata, injected via -ldflags by GoReleaser (see .goreleaser.yaml).
pkg
api/v1
Package v1 defines the public configuration types for Oiax.
Package v1 defines the public configuration types for Oiax.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL