Architecture
Loopwright runs bounded repository work inside isolated sandboxes and verifies every candidate against independent evidence. Choose between simple repository taskpack automation or fine-grained controller and registry governance.
Contents
Execution chain
- Admit: Validate task boundaries and acquire a monotonic SQLite lease fence.
- Execute: Run an isolated Pi role with trusted host bindings and optional decision routing.
- Verify: Evaluate the candidate against independent checks and authenticated gate receipts.
- Publish & Remember: Settle pull request publication and propose reviewed memory separately.
Operating modes
Loopwright supports two single-run modes sharing one verification kernel, plus bounded multi-generation evolution (@loopwright/evolution) over isolated child LocalRunStore runs:
| Dimension | Declarative taskpack | Managed controller |
|---|---|---|
| Target user | Repository maintainers and local CLI users | Platform and security operators |
| Files authored | One .loopwright/taskpack.yaml in repo |
Out-of-repo registry.yaml and controller.yaml |
| Digest pinning | Compiled automatically by host | Pinned manually via SHA-256 (--registry-sha256) |
| Execution graph | Single compiled author + check pipeline | Custom multi-step agent and check DAG |
| Credential wiring | Mapped from local CLI, Action, or App environment | Explicit credentialBindings and path templates |
| Key advantage | Zero boilerplate; local CLI or GitHub automation | Duty separation, custom gates/MCP, local CLI control |
| Walkthrough | Declarative Taskpack | Managed Controller |
Configuration surfaces
Every Loopwright document uses apiVersion: loopwright.dev/v1alpha1 across declarative and managed configuration surfaces:
| Mode or scope | Document kind |
Top-level keys | Reference guide |
|---|---|---|---|
| Declarative mode | Taskpack |
apiVersion, kind, metadata.name, spec |
Taskpack |
| Managed mode | TrustedRegistry |
apiVersion, kind, metadata.name, spec |
Controller and Registry |
| Managed mode | ControllerConfig |
apiVersion, kind, spec |
Controller and Registry |
| Managed mode | TaskContract |
apiVersion, kind, spec |
Task Contract |
| Shared policy | spec.sandbox |
Nested under Taskpack.spec |
Sandbox Backends |
| Shared policy | DecisionPolicy |
apiVersion, kind, spec |
Decision Routing |
| Evolution mode | EvolutionCampaign |
apiVersion, kind, metadata.name, spec |
Evolution Campaign |
| Entry points | Action or GitHubAppConfig |
Workflow or apiVersion, kind, spec |
GitHub Action · GitHub App |
Runtime baseline
Deployment host qualification (qualifyDeploymentHostProfile) enforces these baseline prerequisites across Action, App, and CLI surfaces:
| Component | Baseline requirement | Enforcement scope |
|---|---|---|
| Node runtime | Node.js 26.x (built-in node:sqlite) |
Required across Action, App, CLI, and workspace builds (gpustack/loopwright provisions it automatically) |
| Package manager | npm 11.x |
Workspace dependency installation and builds |
| Host platform | darwin/arm64, linux/arm64, linux/x64 |
Unlisted OS or architecture targets fail closed |
| Storage and clock | Local POSIX filesystem; <= 1000 ms clock drift |
Network mounts (nfs, smb, fuse, sshfs) and clock jumps fail closed |
| Sandbox backend | Seatbelt, bubblewrap, Landlock, or Docker | Negotiated against taskpack spec.sandbox policy |
| Optional tools | Python 3.11+ (runner bridge); Hugo extended 0.170.1+ (docs site) |
Needed only when exercising runner helpers or building site/ |
Trust boundaries
Trusted hosts bind credentials, runtimes, handlers, and external services. Taskpacks and model output cannot grant authority. Local runs enforce neutral .git and <controlRoot> protection while GitHub entrypoints enforce triggers, PR publication, and .github/workflows/** dual-key locks.
Large overlays stream through SHA-256 verified CAS blob pointers (1 MiB chunks, up to 16,384 files and 16 GiB) instead of inline base64 buffers. Local fixture proof never establishes live provider qualification, and unknown external effects stay unknown until reconciled.