ddollar/foreman
59.4
Adequate · 26 September 2026
1.2k
lines of production code
Ruby
primary language
4
measurements over time
What this system is
This release introduces a comprehensive process management framework, featuring a new \foreman-runner\ script and a modular CLI architecture with support for environment files and process scaling. It significantly expands export capabilities by adding native templates for systemd, launchd, runit, Bluepill, and Upstart, while refactoring the export engine to use a shared base class and template-based generation. The release also establishes a formal release and distribution workflow with new Rake tasks and a gemspec, accompanied by extensive test coverage for all export formats and core components.
Features
Add Bluepill process export template
Users can now export application configurations as Bluepill process management files. The new \master.pill.erb\ template generates Bluepill configuration files that define application processes, including start commands, working directories, environment variables, logging, and graceful shutdown signals.
data/export/bluepill · high confidence
Add Foreman manual page
The repository now includes a manual page (man/foreman.1) for the Foreman CLI tool. This documentation covers the usage of the 'start', 'run', and 'export' commands, detailing available options such as '--formation', '--env', '--procfile', '--port', '--timeout', '--app', '--log', '--template', and '--user'. It also documents global options like '--root' and lists supported export formats including bluepill, inittab, launchd, runit, supervisord, systemd, and upstart.
man · high confidence
Add launchd plist export for macOS services
Users can now export their application configuration as a launchd plist file, enabling native macOS service management. The generated plist includes environment variables, command arguments, and logging paths, allowing the application to be run as a background service on macOS.
data/export/launchd · high confidence
Add runit service and log templates
The runit exporter now includes new ERB templates for service and log management. The service template (run.erb) configures the process execution with environment variables and redirects stderr to stdout. The log template (log.erb) sets up a dedicated log directory with specific permissions (2750) and ownership, then starts svlogd to manage log rotation. These changes enable proper logging and process management for runit-based deployments.
data/export/runit · high confidence
Add systemd service and target templates for process management
The system now generates systemd unit files to manage application processes. A new master.target.erb template creates a target that depends on all application services, while process.service.erb defines the individual service units. These units configure environment variables, set the process name, enable automatic restarts, and use a mixed KillMode to handle daemonization correctly. This provides a more robust way to start, stop, and monitor processes using systemd.
data/export/systemd · high confidence
Added Upstart daemon configuration templates
New Upstart job templates (master.conf.erb, process.conf.erb, process\_master.conf.erb) have been added to the data/export/daemon directory. These templates configure the system to manage the export daemon processes using start-stop-daemon, handling environment variables, logging, and process lifecycle events.
data/export/daemon · high confidence
Added example profile.d script
An example script named foo.sh has been added to the .profile.d directory, which sets the environment variable FOO to bar. This serves as a template for users to add their own initialization scripts to the profile.d directory.
data/example/.profile.d · high confidence
Added example scripts and configuration for process management
The data/example directory now includes a set of executable scripts and configuration files to demonstrate process management capabilities. This includes a Procfile defining process types (ticker, error, utf8, spawner) and their corresponding Ruby and shell scripts (ticker, utf8, spawner, spawnee, error) that handle signals and output. Additionally, a legacy Procfile.without\_colon format is provided as a reference for older syntax, and log files demonstrate expected output behavior.
data/example · high confidence
Added gem build and release tasks
A new Rakefile (dist/gem.rake) was added to the distribution layer, introducing Rake tasks for building the Foreman gem, cleaning up build artifacts, and pushing the gem to a repository. This provides a standardized mechanism for packaging and releasing the gem.
dist · high confidence
Introduce foreman-runner script for process execution
A new executable script, bin/foreman-runner, has been added to handle running commands. This script supports an optional -p flag to source the .profile file before executing the target command, and allows changing the working directory with the -d flag. It uses /bin/sh for execution and ensures the command is run via exec.
bin · high confidence
New Rake tasks for release, distribution, and testing
Added new Rake tasks to automate the release process, including generating changelogs, updating GitHub pages, and building manuals. The distribution task now handles vendoring gems and assembling the package, while a new rspec task allows running all specs. These changes streamline the workflow for creating and publishing new versions of the software.
tasks · high confidence
Behavioural changes
Enhanced CLI output with color support and graceful shutdown
The Foreman CLI now supports colored output for process names, with the ability to force colors on or off via a new option. Timestamps can be suppressed, and the CLI handles blank lines and output flushing more reliably. Additionally, the application now terminates gracefully if the standard output stream is closed (e.g., pipe break), preventing unhandled errors.
lib/foreman/engine · medium confidence
Refactor Foreman module with version and platform helpers
The Foreman library now includes a dedicated version file and adds helper methods to detect Ruby 1.8 and Windows environments, while removing the hardcoded version constant in favor of the external version file.
lib · high confidence
Refactored Foreman architecture with new CLI and engine classes
Foreman has been refactored to use a new \Foreman::Engine::CLI\ class and a \Foreman::Helpers\ module, providing a more modular and testable structure. The CLI now supports additional options such as \--env\ for specifying environment files, \--port\ for port assignment, and \--formation\ for process scaling. The \Foreman::Env\ class now handles environment variable loading with support for single and double-quoted values. The \Foreman::Procfile\ class has been updated to support reading and writing Procfiles, and the \Foreman::Process\ class now supports custom working directories and environment variables. The \Foreman::Export\ module has been updated to support dynamic loading of export formatters.
lib/foreman · high confidence
Refactored export engine with shared base class and template-based generation
The export system has been refactored to use a shared \Foreman::Export::Base\ class, allowing all exporters (Upstart, systemd, launchd, etc.) to inherit common functionality like file writing, directory creation, and template rendering. This change introduces template-based generation for all export formats, enabling users to provide custom templates via the \--template\ flag or by placing files in \\~/.foreman/templates\. The refactoring also standardizes how environment variables and process configurations are handled across different init systems.
lib/foreman/export · high confidence
Removal of example helper scripts
The example directory has been cleaned up by removing the Procfile and the associated Ruby helper scripts (die\_alot, never\_die) that were previously used for development concurrency testing. These scripts, which simulated various process behaviors, are no longer part of the example setup.
example · high confidence
Supervisord export now quotes environment variables
When exporting configuration for supervisord, environment variable values are now wrapped in double quotes. This change prevents issues with non-numeric values and special characters (like '=' or '&') in environment variables, ensuring the generated supervisord configuration is valid and robust.
data/export/supervisord · high confidence
Upstart export templates updated for native Upstart features
The Upstart export templates have been refactored to use native Upstart features. The process template now explicitly sets environment variables (including PORT) and uses 'start on' / 'stop on' directives with runlevels, while the master and process templates define start/stop conditions based on application states. Environment variables are escaped and quoted to prevent injection issues, and the working directory is set via 'chdir' after switching to the target user.
data/export/upstart · medium confidence
Test coverage
Added Bluepill export test fixtures for multi-process and concurrency scenarios; Added Runit service and log scripts for app-alpha and app-bravo instances; Added Upstart configuration specs for app services; Added comprehensive test coverage for all export format specifiers; Added daemon configuration files for app-alpha and app-bravo services; Added systemd service and target files for app-alpha, app-bravo, and app; Added test fixtures for launchd export; Added test helper scripts for environment and encoding scenarios; Added test infrastructure and specs for Foreman; Added unit tests for Foreman core components; Updated supervisord export test fixtures.
Dependencies
Initialize Ruby gemspec and Gemfile for Foreman
Added the initial gemspec and Gemfile to manage the project's dependencies. The gemspec defines the 'foreman' gem with a runtime dependency on 'thor' (version 1.4). The Gemfile explicitly lists test dependencies including 'rspec' (version 3.5), 'fakefs', 'simplecov', and 'timecop', as well as development tools like 'yard' and 'aws-s3'.
(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
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 41 → 59 (+18.5)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 98 (-2.2)
- Architecture 69 → 69 (+0.0)
- Maturity 39 → 47 (+8.3)
- Readiness 25 → 64 (+38.2)
- Security 63 → 80 (+17.3)
Resolved (12)
- Coverage not measured — test suite did not build
- Dimension evaluation failed
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- No tests found
- Test reliability not included
New (15)
- Ambiguous overlap between 'processes' (property) and 'process_names' (method). It is unclear if 'processes' returns Process objects or names, and 'process_names' returns strings. Additionally, 'each_process' suggests iteration over objects, creating a triad of unclear distinction.
- Documentation: no contributor guidance (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no project overview (README.md)
- Documentation: no usage examples (README.md)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Inconsistent naming for signal handler management. 'register_signal_handlers' is an action, while 'restore_default_signal_handlers' is a restoration action. The counterpart to 'register' might be expected to be 'unregister' or 'clear_signal_handlers', not 'restore_default'.
- No dependency advisory monitoring
- Off-boarding risk: anonymized user #1
- Orphaned files with no living knowledge
- Semantically ambiguous distinction between 'kill_children' and 'killall'. In process management, 'killall' often implies killing all processes including the parent or all matching processes, while 'kill_children' is specific. Without documentation, it's unclear if 'killall' is a superset or a different scope.
- TooManyMethods: Engine (lib/foreman/engine.rb)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ddollar/foreman 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 26 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 f65ddba83932bd4670e014389d6e27ea1e20b469 — 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-d0929f7ac71f.