How vire-systems/vire-core works
Vire Core accepts build requests, validates project configuration and repository inputs, records build metadata and lifecycle state, then schedules isolated workers to produce artifacts. Its main runtime branches are worker execution and garbage collection of abandoned containers. The README documents several end-to-end relationships whose implementation files were not sampled; those edges cite the README. Source excerpts show worker/runtime and shared event handling details, but do not establish every API or scheduler call.
Main entry points: worker.py Worker Process · make_worker.py Worker Dispatch · create_worker.py Worker Launcher · models.py SQLite Build Store
Components 21
Request Intake
- FastAPI Layer
Vire/api/routers - Request Validation
Vire/core/validate_request.py - Manifest Validation
Vire/project_manifest/validator.py - Repository Inputs
Vire/core/core_utils/fetch_buildreq.py - Build Registration
Vire/core/register_with_queue.py
Build Scheduling
- SQLite Build Store
BuildScheduler/Scheduler/db/sqlite_orm/models.py - Scheduler Loop
BuildScheduler/Scheduler/scheduler_loop.py - Worker Dispatch
BuildScheduler/Scheduler/core/make_worker.py - Worker Launcher
BuildScheduler/Scheduler/manage_worker/create_worker.py
Worker Execution
- Worker Process
BuildScheduler/worker/worker.py - Build Job Setup
BuildScheduler/worker/core/create_container_job.py - Worker Cleanup
BuildScheduler/worker/core/cleanup_container.py - Artifact Streaming
BuildScheduler/worker/worker.py
Container Runtime
- Runtime Interface
shared/container_runtimes/base_runtime.py - Docker Adapter
shared/container_runtimes/runtimes/docker_runtime.py - Garbage Collector
BuildScheduler/GC/gc.py - Container Reaping
BuildScheduler/GC/core/delete_containers.py
Shared Services
- Event Handling
shared/event_handling/handler.py - State Transitions
shared/state_transition.py
Other components
- Build Requester
- Docker Engine
Connections 26
- Build Requester → FastAPI Layer: submits build
- FastAPI Layer → Request Validation: validates request
- Request Validation → Manifest Validation: checks manifest
- Request Validation → Repository Inputs: fetches repository
Vire/core/validate_request.py - FastAPI Layer → Build Registration: registers build
- Build Registration → SQLite Build Store: stores metadata
- Build Registration → Scheduler Loop: queues build
- Scheduler Loop → SQLite Build Store: reads queued jobs
- Scheduler Loop → Worker Dispatch: dispatches builds
- Worker Dispatch → SQLite Build Store: reads build data
BuildScheduler/Scheduler/core/make_worker.py - Worker Dispatch → Worker Launcher: launches worker
BuildScheduler/Scheduler/core/make_worker.py - Worker Launcher → SQLite Build Store: updates status
BuildScheduler/Scheduler/manage_worker/create_worker.py - Worker Launcher → Worker Process: starts process
- Worker Process → Build Job Setup: creates job container
BuildScheduler/worker/worker.py - Build Job Setup → Runtime Interface: uses runtime
- Runtime Interface → Docker Adapter: implemented by
shared/container_runtimes/runtime_registry.py - Docker Adapter → Docker Engine: controls containers
- Worker Process → Artifact Streaming: streams artifacts
BuildScheduler/worker/worker.py - Artifact Streaming → Docker Adapter: streams container files
BuildScheduler/worker/worker.py - Worker Process → Worker Cleanup: removes container
BuildScheduler/worker/worker.py - Garbage Collector → Container Reaping: scans and reaps
BuildScheduler/GC/gc.py - Container Reaping → Runtime Interface: lists and removes
BuildScheduler/GC/core/delete_containers.py - Worker Process → State Transitions: tracks lifecycle
BuildScheduler/worker/worker.py - Worker Process → Event Handling: dispatches events
BuildScheduler/worker/worker.py - Worker Dispatch → State Transitions: tracks lifecycle
BuildScheduler/Scheduler/core/make_worker.py - Worker Launcher → State Transitions: tracks lifecycle
BuildScheduler/Scheduler/manage_worker/create_worker.py