MRVACOMMANDER(7)

NAME
mrvacommander - distributed CodeQL task queue and execution system

SYNOPSIS
server [environment]
agent [environment]

DESCRIPTION
mrvacommander coordinates analysis jobs over multiple worker nodes using queues, pluggable storage, and CodeQL execution. It consists of multiple interacting packages and entry points.

STRUCTURE

cmd/server
    Entry point. Loads configuration, initializes dependencies, runs queue subscriber with a dispatcher.

cmd/agent
    Entry point. Loads configuration, runs a processing loop: receive job, execute query, save result, update state.

CONFIGURATION

config/mcc
    Parses environment variables into structured configuration. Modules include: queue, storage, logger, commander.

SERVER SIDE MODULES

pkg/server
    Initializes:
      queue backend
      QLDB store
      artifact store Subscribes to queue and dispatches jobs to handler.

pkg/deploy
    Deployment helpers: validate environment variables, bootstrap key services.

AGENT SIDE MODULES

pkg/agent
    Receives jobs, executes CodeQL queries, stores outputs, marks completion.

pkg/state
    Tracks which jobs have been completed. Local file-backed.

SHARED MODULES

pkg/common
    Core types: Job, JobOutput, NameWithOwner, Query. Includes MinIO wrappers, external API access, and job spec parsing.

pkg/codeql
    Defines query structure and executes CodeQL against a database.

pkg/qldbstore
    Provides read-only access to CodeQL databases via:
      - MinIO (S3)
      - HTTP (hepc)
      - Filesystem

pkg/artifactstore
    Persists job results. Implementations:
      - MinIO
      - Memory

pkg/queue
    Job queue interface. Implementations:
      - RabbitMQ
      - In-memory single-node

utils
    Generic helpers:
      - HTTP download
      - tar.gz extraction

SEE ALSO
codeql(1), rabbitmq-server(1), minio(1)