Skip to content
CAI
Software that uses CAICheck a score

svaloumas/valet

56.0

Adequate · 21 September 2026

5.5k

lines of production code

Go

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This release introduces Valet, a stateless Go server for asynchronous task execution, featuring a new \valetd\ daemon and comprehensive HTTP/gRPC APIs for managing jobs and pipelines. The architecture supports multiple storage backends (MySQL, PostgreSQL, Redis, memory) and job queues (RabbitMQ, Redis, memory), enabling flexible deployment configurations. Key additions include a structured error handling system, configurable logging, and a factory pattern for initializing core components like servers and repositories.

Features

Add MySQL and PostgreSQL storage drivers for job and pipeline data

The relational storage layer now includes new MySQL and PostgreSQL database drivers, each implementing the storage interface with methods to create and retrieve jobs and pipelines. The MySQL driver handles JSON serialization for task parameters and uses binary UUIDs, while the PostgreSQL driver uses native UUID types and JSON columns. Both drivers include health checks, connection pooling configuration, and comprehensive unit tests.

internal/repository/storage/relational · high confidence

Add Redis storage adapter for job persistence

Users can now store and retrieve job data using a Redis backend. The new \internal/repository/storage/redis\ package implements the \port.Storage\ interface, providing methods to create, read, update, and delete jobs, as well as fetching jobs by pipeline ID or status. This includes full test coverage for the Redis implementation.

internal/repository/storage/redis · high confidence

Add Swagger API documentation for Jobs and Pipelines

The \doc/swagger\ directory now contains the complete Swagger 2.0 specification (JSON, YAML, and Go annotations) for the Valet API. This adds formal documentation for the Jobs endpoints (create, get, list, update, delete, and results) and Pipelines endpoints (create, get, list, update, delete, and associated jobs), along with shared error response schemas. The API base path is set to /api and the version is 0.8.0.

doc · high confidence

Add dummy task implementation and tests

A new dummy task implementation has been added to the task package, providing a sample task callback that decodes task parameters and previous job results using the valet library. This includes the core logic in dummytask.go and corresponding unit tests in dummytask\_test.go to verify its behavior.

task · high confidence

Add environment variable loading with file fallback

A new \pkg/env\ package provides a \LoadVar\ function that retrieves environment variables, falling back to reading from files located at \/run/secrets/\<name\>\ if the environment variable is not set.

pkg/env · high confidence

Add gRPC and HTTP handlers for job management

The job handler now exposes both HTTP and gRPC interfaces for creating, retrieving, and deleting jobs. The HTTP handler (\http.go\) manages job creation, retrieval, and deletion via REST endpoints, while the gRPC handler (\grpc.go\) provides the same functionality over gRPC, utilizing generated protobuf definitions (\job\_service.proto\, \job\_request.proto\, \job\_response.proto\) and their Go implementations. This introduces a new communication channel for job operations alongside the existing HTTP API.

internal/handler/jobhdl · high confidence

Add gRPC service definitions for job result retrieval and deletion

New protobuf-generated Go files are added to \internal/handler/resulthdl/protobuf\, defining the \JobResult\ gRPC service with \Get\ and \Delete\ RPCs. The \GetJobResultResponse\ message uses \google.protobuf.Value\ for the \metadata\ field, allowing flexible metadata storage. These changes provide the server-side interface for handling job result queries and deletions via gRPC.

internal/handler/resulthdl/protobuf · high confidence

Add in-memory, Redis, and RabbitMQ job queue adapters

The job queue repository now supports three distinct backends for managing job queues: an in-memory FIFO queue, a Redis-based queue using LPUSH/RPOP, and a RabbitMQ adapter that publishes and consumes messages via AMQP. Each adapter implements the standard job queue interface (Push, Pop, CheckHealth, Close), allowing the system to route jobs through different storage and messaging systems depending on the deployment environment.

internal/repository/jobqueue · high confidence

Add pipeline CRUD endpoints via HTTP and gRPC

The \internal/handler/pipelinehdl\ package now exposes full Create, Read, Update, and Delete (CRUD) operations for pipelines. This includes new HTTP handlers (\http.go\) and gRPC handlers (\grpc.go\) that implement the \Pipeline\ service interface, along with the corresponding Protobuf definitions (\pipeline\_service.proto\, \pipeline\_request.proto\, \pipeline\_response.proto\) and their Go implementations. The HTTP handlers support creating pipelines with associated jobs, fetching single or multiple pipelines, updating, and deleting them, while the gRPC handlers provide the same functionality over a binary protocol.

internal/handler/pipelinehdl · high confidence

Add pipeline and job management service

The internal/core/service/pipelinesrv package now includes a new pipelineservice implementation that provides Create, Get, GetPipelines, Update, and Delete operations for pipelines and their associated jobs. This service layer handles UUID generation, time parsing, and validation before persisting pipeline and job data to the storage layer, enabling the HTTP endpoints to manage the full lifecycle of pipelines.

internal/core/service/pipelinesrv · medium confidence

Add task listing endpoints for HTTP and gRPC

Users can now retrieve a list of all registered tasks via a new GetTasks endpoint. This change introduces the implementation for both HTTP (using Gin) and gRPC (using protobuf), allowing clients to fetch task names from the underlying repository.

internal/handler/taskhdl · high confidence

Added gRPC service definitions for job result operations

New Protocol Buffer definitions have been introduced for the job result service, establishing the contract for retrieving and deleting job results via gRPC. The service exposes two RPCs, Get and Delete, which accept a job ID and return structured responses containing metadata and error states, enabling clients to interact with job result data through the new gRPC endpoints.

internal/handler/resulthdl/protos · high confidence

Expose job result retrieval and deletion via HTTP and gRPC endpoints

Users can now retrieve and delete job results through both HTTP and gRPC interfaces. The new handlers map service calls to appropriate HTTP status codes and gRPC status codes, handling not-found and internal error cases. A DTO helper is also provided to structure the response body for HTTP clients.

internal/handler/resulthdl · high confidence

Initial release of Valet as a configurable, stateless Go server for asynchronous task execution

The project introduces Valet, a stateless Go server designed for running tasks asynchronously and concurrently. It supports job and pipeline execution, allowing users to define custom task callbacks and schedule jobs or sequences of jobs. The server exposes HTTP and gRPC APIs, and is configurable via a YAML file that specifies job queue backends (in-memory, RabbitMQ, Redis), storage backends (in-memory, MySQL, PostgreSQL, Redis), and logging formats. The release includes a Dockerfile, docker-compose configurations for local development with all supported dependencies, a Makefile for building and testing, and standard repository files like README, CHANGELOG, LICENSE, and CODE\_OF\_CONduct.

(repo-wide) · high confidence

Introduce Job, Pipeline, and JobStatus domain models

Added new domain models for the core domain: Job, Pipeline, and JobStatus. The Job struct includes fields for task execution parameters, timeouts, scheduling, and status tracking. The Pipeline struct represents a sequence of jobs with status propagation and duration tracking. JobStatus defines the lifecycle states (Pending, Scheduled, InProgress, Completed, Failed) with JSON marshaling/unmarshaling support. These models provide the foundation for job scheduling, execution, and pipeline management.

internal/core/domain · high confidence

Introduce comprehensive configuration schema for server, storage, and job queues

The internal configuration system has been expanded to support multiple storage backends (MySQL, PostgreSQL, and Redis) and job queue providers (RabbitMQ, Redis, and memory). The config loader now validates these options and enforces required connection strings (DSN/URL) for each backend, while also allowing users to specify the server protocol (HTTP or gRPC) and logging format (text or JSON).

internal/config · high confidence

Introduce factory pattern for job queue, storage, and server initialization

The internal/factory package now provides centralized creation of core components. JobQueueFactory selects between memory, Redis, or RabbitMQ queue implementations based on configuration. StorageFactory instantiates in-memory, Redis, MySQL, or PostgreSQL storage backends. ServerFactory creates either an HTTP server with a standard router or a gRPC server with reflection enabled, wiring in job, result, pipeline, and task handlers. This change shifts the application from ad-hoc initialization to a structured, configurable setup for job queues, data storage, and network servers.

internal/factory · high confidence

Introduce in-memory storage implementation for jobs and pipelines

Added a new in-memory database implementation for storing jobs, job results, and pipelines. This new \memorydb\ package provides CRUD operations for jobs and job results, as well as methods to retrieve due jobs and jobs by pipeline ID, all backed by simple map structures. The implementation includes health checks, graceful shutdown, and sorting of results by creation or scheduled time. Tests have been added to verify the correct behavior of these storage operations.

internal/repository/storage/memorydb · high confidence

Introduce job result service for retrieving and deleting job outcomes

A new \resultsrv\ package has been added to the \internal/core/service/resultsrv\ location, providing a \ResultService\ that wraps a \port.Storage\ interface. This service exposes \Get\ and \Delete\ operations for job results, with the delete operation explicitly verifying the resource's existence before attempting removal. The implementation is accompanied by comprehensive unit tests covering success, not-found, and storage error scenarios.

internal/core/service/resultsrv · high confidence

Introduce job scheduling and management service

The jobsrv package now provides a new service for creating, retrieving, and deleting jobs, including support for scheduled execution via a 'runAt' timestamp and configurable task parameters. The service enforces business rules, such as preventing the deletion of jobs that belong to a pipeline, and validates task names against a registered repository. This change introduces the core logic for job lifecycle management within the application.

internal/core/service/jobsrv · high confidence

Introduce scheduler service for managing job execution and scheduling

Added a new scheduler service that handles two primary responsibilities: consuming jobs from a queue for immediate dispatch to the worker pool, and polling storage to schedule due jobs for execution. The service integrates with the existing work and storage interfaces to manage job lifecycles, including pipeline support and status updates.

internal/core/service/schedulersrv · high confidence

Introduce structured application error types

The application now uses a dedicated package (pkg/apperrors) containing specific error types for common failure states, including FullQueueErr, NotFoundErr, FullWorkerPoolBacklog, ResourceValidationErr, ParseTimeErr, and CannotDeletePipelinePipedJobErr. These structured errors provide more granular and descriptive error messages for queue limits, resource not found scenarios, validation failures, and pipeline job deletion restrictions.

pkg/apperrors · high confidence

Introduce task service and repository for managing task functions

A new task service and in-memory task repository have been added to the core service layer. The task repository allows registering and retrieving named task functions, while the service layer provides a wrapper to manage these tasks. Tests have been added to verify the registration and retrieval of task functions.

internal/core/service/tasksrv · high confidence

Introduce time and UUID generation abstractions

The codebase now includes new, abstracted interfaces for time and UUID generation, enabling easier testing and dependency injection. The \pkg/time\ package introduces a \Time\ interface with a \Now()\ method, implemented by \RealTime\ which returns the current UTC time. Similarly, \pkg/uuidgen\ provides a \UUIDGenerator\ interface with a \GenerateRandomUUIDString()\ method, implemented by \UUIDGen\ to produce random UUID strings. These changes allow consumers to inject mock implementations for testing or swap out default behaviors.

pkg/time · high confidence

Introduce valetd command-line entry point

Users can now start the valet daemon using the new \valetd\ binary. The entry point initializes the application with a \config.yaml\ configuration file, registers a \dummytask\ task type, and executes the service lifecycle.

cmd · high confidence

Introduced a new work service to manage and execute tasks and pipelines

A new work service has been added to the system, providing a dedicated mechanism for dispatching and executing both individual tasks and pipelines. The service manages a pool of concurrent workers and a queue for work items, allowing for configurable concurrency and queue capacity. It supports both task and pipeline execution modes, handling job state transitions (started, completed, failed) and result propagation through channels. The implementation includes a new \work\ package to represent work items and integrates with existing storage and task repository interfaces.

internal/core/service/worksrv · high confidence

Introduces HTTP and gRPC server implementations with a unified router

The server package now provides explicit HTTP and gRPC server wrappers that manage listening and graceful shutdown. The HTTP router is configured with middleware for JSON logging, CORS, and error recovery, and registers REST endpoints for jobs, results, pipelines, and tasks, along with a /api/status healthcheck endpoint.

internal/handler/server · high confidence

Introduces core domain and service port interfaces

A new port.go file defines the core interfaces for the application's domain and services. This includes the Storage interface for managing jobs, job results, and pipelines; the JobQueue interface for handling job execution; and service interfaces for Jobs, Results, Pipelines, Work, and Tasks. Additionally, it introduces the Scheduler interface for scheduling jobs and the Server interface for managing the application's lifecycle.

internal/core/port · high confidence

Behavioural changes

Extracted Redis client into a dedicated package with health check support

The Redis client implementation has been moved into a new \pkg/redis\ package, providing a dedicated \RedisClient\ struct that wraps the go-redis client. This change introduces a \CheckHealth\ method that performs a Redis PING to verify connectivity, which is used for job queue health checks. The package also includes tests for health status, URL validation, and key prefixing logic.

pkg/redis · medium confidence

Introduces configurable logging format with text and JSON support

The logging package now supports configurable output formats. Users can choose between text and JSON logging. The text format includes colored output with full timestamps, while the JSON format allows specifying a key for log data. This change provides more flexibility in how logs are formatted and consumed.

pkg/log · high confidence

Test coverage

Updated mock implementations for storage, time, and UUID generation

The mock package has been regenerated to align with updated core interfaces. The \MockStorage\ now includes methods for managing jobs, job results, and pipelines (Create, Get, Delete operations), as well as health check and close functionality. New mocks have been added for time (\MockTime\ with a \Now\ method) and UUID generation (\MockUUIDGenerator\ with a \GenerateRandomUUIDString\ method). These changes ensure the test suite can properly simulate storage interactions, time-dependent logic, and UUID creation.

mock · high confidence

Dependencies

Initial Go module setup with core dependencies

The project introduces a Go module definition (go.mod) and its corresponding checksums (go.sum), establishing the project's dependency graph. This includes the Gin web framework, gRPC, Redis and PostgreSQL client libraries, and various utility packages, enabling the application's core functionality.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 51 → 56 (+4.9)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 91 → 93 (+1.7)
  • Architecture 100 → 70 (-29.6)
  • Maturity 56 → 58 (+1.4)
  • Readiness 36 → 47 (+11.5)
  • Security 79 → 82 (+2.6)
  • Domain Modelling 57 → 60 (+3.7)

Resolved (44)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (10 lines × 2) (internal/handler/jobhdl/grpc.go)
  • Duplicated block (10 lines × 2) (internal/handler/jobhdl/grpc.go)
  • Duplicated block (10 lines × 2) (internal/repository/storage/memorydb/memorydb.go)
  • Duplicated block (10 lines × 2) (internal/repository/storage/memorydb/memorydb.go)
  • Duplicated block (10 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (10 lines × 6) (internal/handler/jobhdl/grpc.go)
  • Duplicated block (11 lines × 2) (internal/core/service/jobsrv/service.go)
  • Duplicated block (11 lines × 2) (internal/repository/storage/memorydb/memorydb.go)
  • Duplicated block (11 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (11 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (11 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (11 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (11 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (11 lines × 2) (internal/repository/storage/relational/postgres/postgres.go)
  • Duplicated block (12 lines × 2) (internal/handler/jobhdl/grpc.go)
  • Duplicated block (12 lines × 2) (internal/handler/jobhdl/http.go)
  • Duplicated block (12 lines × 2) (internal/repository/storage/redis/redis.go)
  • Duplicated block (12 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • …and 24 more

New (98)

  • Critical CVE: [GHSA redacted] (go.mod)
  • Critical CVE: [GHSA redacted] (go.mod)
  • Critical CVE: [GHSA redacted] (go.mod)
  • Deprecated module: github.com/streadway/amqp
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (10 lines × 2) (internal/core/service/jobsrv/service.go)
  • Duplicated block (10 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (10 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (10 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (10 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (11 lines × 2) (internal/handler/jobhdl/http.go)
  • Duplicated block (11 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (11 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (11 lines × 2) (internal/repository/storage/relational/postgres/postgres.go)
  • Duplicated block (12 lines × 2) (internal/handler/jobhdl/grpc.go)
  • Duplicated block (12 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (12 lines × 2) (internal/repository/storage/relational/mysql/mysql.go)
  • Duplicated block (12 lines × 3) (internal/handler/jobhdl/http.go)
  • Duplicated block (12 lines × 4) (internal/handler/jobhdl/http.go)
  • …and 78 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

svaloumas/valet was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 29e15bafcdc480ed854f8707642e91072c6dc772 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.