ForgeCI

Distributed CI / Go / self-hosted

ForgeCI is a distributed CI engine built from scratch in Go.

It parses repository-local DAGs, persists orchestration in PostgreSQL, leases work to remote runners, transports immutable source, and reports results back to GitHub.

DAG scheduling · remote execution · durable leases · immutable source · artifacts and cache · GitHub-native SCM

Native SCM / 02

Native GitHub event flow

GitHub-specific authentication and status reporting stay at the boundary. The scheduler and runner protocol operate on provider-neutral runs, jobs, snapshots, and leases.

  1. 01GitHub push / PR
  2. 02Signed webhook
  3. 03Durable delivery
  4. 04Exact event revision
  5. 05Immutable snapshot
  6. 06DAG scheduling
  7. 07Remote runners
  8. 08Artifacts / cache / logs
  9. 09GitHub Check

Correctness ledger / 03

Correctness claims and evidence

Each claim links to executable tests, mutation checks, or integration harnesses.

P-01

Exact revision execution

If an event references commit A and its branch advances to B, ForgeCI still executes A.

Mechanism

Exact SHA fetch, detached checkout, SHA verification, immutable snapshot.

P-02

Fenced work ownership

A stale runner cannot complete work after lease ownership has moved.

Mechanism

PostgreSQL lease identity, expiry, and runner-matched renewal and completion.

P-03

One delivery → at most one run

Retrying the same accepted delivery does not create another pipeline run.

Mechanism

Run, snapshot association, jobs, dependencies, and SCM trigger persist in one transaction.

P-04

Cross-runner artifacts

A downstream job restores declared output without relying on a shared mutable workspace.

Mechanism

Durable content-addressed artifact storage with explicit publication and restoration.

P-05

Durable external status

A lost create response or restart does not orphan the desired GitHub Check state.

Mechanism

Persistent desired state and bounded reconciliation using a deterministic external ID.

P-06

ForgeCI runs ForgeCI

The real project DAG executes through PostgreSQL, the server, and two remote runner processes.

Mechanism

Isolated committed source, two submissions, artifact retrieval, cache reuse, and failure fixture.

System blueprint / 04

Control-plane and runner boundaries

SCM / triggers↓control plane + PostgreSQL↓fenced job leases↓remote runners↓source / artifacts / cache / logs
ForgeCI architecture showing the CLI and GitHub SCM entering the control plane, PostgreSQL durable state, content-addressed storage, and remote runners
The diagram is copied from the repository root when the Pages artifact is assembled. Read the architecture notes.

Captured self-hosting run / 05

Captured self-hosting run

This is a static capture produced by the shared self-hosting proof driver. It is not live status. Every value below is loaded from the committed evidence summary.

Loading committed capture...

Bootstrap hostGitHub Actionsprovides Linux + Docker
ForgeCI execution boundary
PostgreSQLForgeCI serverRunner ARunner B

forge.yaml → seven jobs → evaluated result

  1. 01 / Trigger
    Submit the real pipeline

    Use committed source and the root forge.yaml.

  2. 02 / Distribute
    Claim eligible jobs

    Two real runner processes execute independent work.

  3. 03 / Transport
    Move immutable inputs

    Source snapshots and explicit artifacts cross runner boundaries.

  4. 04 / Observe
    Read durable state

    Inspect job placement, stored logs, and run result.

  5. 05 / Prove
    Check correctness

    Compare source digests, cache access, and failure propagation.

  6. 06 / Report
    Trace the SCM path

    Finish with exact revision and GitHub Check reconciliation evidence.

Design boundaries / 08

Deliberate non-goals.

  • Kubernetes runner scheduling
  • Autoscaling
  • GPU scheduling
  • Runner labels / selectors
  • Automatic reassignment after runner loss
  • General pipeline secrets
  • RBAC / multi-tenancy
  • Highly available control plane
  • Hostile-code isolation