Skip to main content
RUSTGRID

RustGrid Core

A durable system for serious autonomous work.

The interface is the visible layer. Underneath it, RustGrid coordinates tenants, projects, missions, agent runs, worker leases, repository access, quality results, workflow events, permissions, and operational history on a stateful Rust and PostgreSQL foundation.

System map

Separate intent, coordination, execution, and code state.

RustGrid is the control plane between people and execution workers. GitHub remains the code source of truth; workers perform repository work; RustGrid preserves the state and policy that connect the two.

Actors
Human operatorsProduct UIAPI clientsIntegrations
RustGrid control plane
ProjectsMissionsRunsWorkersQuality gatesPermissionsActivity
Execution plane
Worker fleetExecution environmentAgent runtimeExternal CI
Code and delivery
GitHub repositoriesBranchesPull requestsChecksWorkflow runs

Control plane and execution plane

Coordination does not depend on one agent runtime.

The control plane owns durable state and access decisions. Workers own execution. This boundary lets a worker specialize without changing the mission, project, validation, or review contracts around it.

RustGrid control plane

Owns operational truth

  • Tenant, project, and membership boundaries
  • Mission workflow state and context
  • Run creation, claiming, leases, steps, and events
  • Worker registration, credentials, capacity, and liveness
  • Repository bindings and execution manifests
  • Quality-gate results, activity, and delivery records

Worker execution plane

Owns the attempt

  • Claim eligible work with a bound credential
  • Prepare an execution environment
  • Read the repository and implement the mission
  • Keep the lease alive while work continues
  • Append progress, logs, and structured steps
  • Report an outcome and validation evidence

State model

Make transitions explicit enough to operate.

A mission and a run are related but distinct state machines. The mission shows where the work is in the delivery process; each run shows what happened in one execution attempt.

Mission workflow status/api/v1/tickets
backlogtodoin_progresspr_openedquality_gate_runningneeds_refinementawaiting_reviewready_for_reviewblockeddonecancelled

These are the current API status values. Product surfaces may render more human-readable labels without renaming the contract.

Agent-run status/api/v1/agent-runs
queuedrunningsucceededfailedcancelled

Attempts remain independently inspectable. A refinement creates another run rather than rewriting the previous result.

MISSIONIn progressThe worker owns an active run.
QUALITY GATEFailedStructured checks record the problem.
MISSIONNeeds refinementFeedback becomes part of the work context.
RUN 02SucceededA new attempt has a separate history.
MISSIONReady for reviewA human decision remains explicit.

Illustrative path using current status values; it does not represent production performance data.

Multi-tenancy and permissions

Scope is enforced below the interface.

Tenant context comes from the authenticated credential. Repository operations, mission lookups, run access, worker identity, activity, and permission checks are evaluated within that context.

Credential-derived tenant

Clients authenticate with a tenant-scoped JWT or API key. Client-supplied tenant selector headers are rejected.

Project boundaries

Membership, roles, custom fields, labels, missions, workers, and repository bindings remain addressable within project or tenant scope.

Structured permissions

Endpoints name required RBAC permissions; API keys carry explicit scopes; worker calls require the bound worker credential.

Cross-tenant masking

Tenant guards can mask resources outside the caller's tenant as not found rather than exposing their existence.

Run coordination protocol

Ownership, policy, access, and progress are separate checks.

The worker path is deliberately more explicit than “call an agent.” Every meaningful boundary has a concrete API operation and a durable record.

1 · Claim

Atomically select eligible work and create a running leased attempt.

claim-next
2 · Resolve

Read the mission, project, single active repository binding, required workflows, permissions, and execution policy.

manifest
3 · Authorize

Issue a short-lived GitHub App installation token restricted to the claimed run repository.

github-token
4 · Maintain

Extend the active claim while the owning worker continues its attempt.

lease
5 · Observe

Append sequenced progress events and structured run steps.

events · steps
6 · Resolve

Update the attempt with its terminal state, output summary, or error detail.

PATCH agent-runs/{id}

GitHub boundary

Repository access follows the work, not the worker forever.

The project stores the active repository binding. A worker with a valid lease resolves that binding through the run manifest and requests short-lived access for that repository. Long-lived GitHub installation credentials do not need to be handed to every worker.

Inbound webhook processing verifies GitHub events for pull requests, reviews, checks, workflows, and installation lifecycle changes. GitHub delivery records provide an integration audit surface.

Persistence and concurrency

Durability includes the difficult write paths.

RustGrid Core uses PostgreSQL persistence and explicit concurrency controls. The API exposes the semantics integrations need to retry safely, reject stale writes, and trace failures.

Idempotency

Replay-safe creates

Mutating routes document Idempotency-Key behavior so a network retry does not need to become duplicate work.

Optimistic concurrency

Version-aware updates

Strong ETags and If-Match preconditions protect versioned updates from silently overwriting newer state.

Request correlation

Traceable failures

x-request-id crosses response and error paths so callers and operators can refer to the same request.

Service and interface boundaries

Rust services. HTTP and gRPC interfaces. Contract-first behavior.

RustGrid Core is implemented as Rust-based services with HTTP and gRPC boundaries. Public browser and integration workflows use the documented HTTP API; the published OpenAPI artifact describes that surface.

HTTP API

Public resource contracts for projects, missions, workers, runs, gates, activity, webhooks, GitHub integration, billing-aware limits, and administration.

gRPC interfaces

A typed service boundary for internal and service-to-service integration without changing the public mission language or HTTP contracts.

PostgreSQL

Persistent relational state for tenant-scoped workflow objects, execution records, versioned updates, and integration delivery history.

Events, delivery, and auditability

The current view is not the whole explanation.

Run event streams, mission activity, tenant activity, webhook delivery attempts, and GitHub webhook delivery records provide different views of what the platform and its integrations did.

Inside a runSequenced

Progress, messages, and logs append with a sequence number. Consumers can replay pages in ascending order or resume the SSE stream after a known event.

Outside a runDelivery state

Webhook deliveries record pending, delivering, delivered, retrying, or dead-lettered state with attempt counts and error details where applicable.

Mission activityResource scope

Mission-specific activity gives the work surface a durable chronology around status and collaboration changes.

Tenant activityRBAC protected

The tenant activity feed can be filtered by resource and requires the documented audit:logs:read permission.

Reliability philosophy

Prefer explicit failure over invisible drift.

Autonomous systems become governable when the platform can say which boundary failed. RustGrid models ownership, expiration, concurrency, delivery attempts, validation states, and request correlation instead of collapsing every problem into “the agent stopped.”

Lease expiry

Distinguish a stale worker claim from a mission that never entered execution.

Quality failure

Keep a failed validation result separate from a run transport or repository-access error.

Delivery failure

Retry webhook delivery and retain attempt state rather than treating a transient receiver failure as success.

Stale write

Reject an outdated version precondition instead of allowing concurrent actors to overwrite state silently.

Scale the planes independently.

The platform separates coordination state from worker capacity. Add or specialize execution workers without migrating mission history, and evolve interface consumers without putting repository credentials into the public UI.