Expand description
TDD-first installer framework TDD-First Installer Framework (v2.0.0)
This module provides a declarative installer framework that generates pure Rust installers with:
- TDD by default - Tests exist before implementation
- Checkpointed - Resume from any failure point
- Observable - Visual progress, structured logging, tracing
- Deterministic - Same inputs always produce same outputs
- Falsifiable - Every claim can be empirically tested
- Cryptographically Verified - Ed25519 signatures on all artifacts
- Hermetically Reproducible - Bit-for-bit identical builds across machines
- Container-Native - First-class multi-distro testing in isolation
§Philosophy
Apply Toyota Production System (TPS) principles and Karl Popper’s falsificationism to installer engineering.
§Usage
bashrs installer init my-app-installer
bashrs installer validate ./my-installer
bashrs installer run ./my-installer --dry-run --diffStructs§
- Aggregated
Metrics - Aggregated metrics for trend analysis
- Artifact
- Artifact definition
- Artifact
Spec - Artifact specification with signature info
- Audit
Context - Audit context for performing audits
- Audit
Finding - An individual audit finding
- Audit
Metadata - Audit metadata
- Audit
Report - Complete audit report
- Cache
Stats - Cache statistics
- Category
Summary - Summary for a category
- Checkpoint
Entry - Checkpoint for a single step
- Checkpoint
Store - Checkpoint storage manager
- Comparison
Metadata - Metadata about the comparison
- Container
Config - Configuration for container tests
- Container
Test Matrix - Container test matrix runner
- Conversion
Result - Result of converting a bash script to installer format
- Conversion
Stats - Statistics about the conversion process
- Diff
Preview - Complete diff preview
- Distributed
Config - Distributed execution configuration
- DryRun
Context - Dry-run execution context that captures all simulated changes
- DryRun
Summary - Summary of dry-run changes
- Environment
- Environment variable definition with parsing
- Environment
Info - Environment information
- Evidence
- Evidence collected during test
- Execution
Plan - Execution plan summary
- Execution
Wave - Execution wave (steps that can run in parallel)
- Executor
Config - Step executor configuration
- Falsification
Config - Configuration for test generation
- Falsification
Generator - Generator for falsification tests
- Falsification
Hypothesis - A falsifiable hypothesis about installer behavior
- Falsification
Installer Info - Minimal installer info for test generation
- Falsification
Report - Summary report of falsification testing
- Falsification
Result - Result of running a falsification test
- Falsification
Step Info - Minimal step info for test generation
- Falsification
Test - A generated test case for falsification
- File
Change - A simulated change to a file
- Golden
Trace - A captured golden trace
- Golden
Trace Config - Golden trace configuration
- Golden
Trace Manager - Manager for golden trace capture and comparison
- Graph
Node - A node in the installer build graph
- Hermetic
Context - Hermetic execution context
- Installation
Summary - Summary of installation run
- Installer
Graph - Build graph for parallel execution planning
- Installer
Metrics - Metrics for an entire installer run
- Installer
Plan - A validated, executable installer plan.
- Installer
Progress - Progress tracker for installer execution
- Installer
Project - Result of initializing an installer project
- Installer
Run - Metadata for an installer run
- Installer
Security - Security configuration
- Installer
Spec - Complete installer specification parsed from installer.toml
- Json
Renderer - JSON renderer for programmatic output
- Kaizen
Report - Kaizen-style improvement report
- Keyring
- Keyring for managing trusted signing keys
- Live
Progress - Live progress display (for terminal)
- Locked
Artifact - A locked artifact with pinned version and hash
- Lockfile
- Lockfile for hermetic builds
- Lockfile
Environment - Captured environment for reproducibility
- LogEntry
- Log entry for structured logging
- Logger
- Structured logger with trace context
- Matrix
Config - Matrix configuration
- Matrix
Summary - Summary of matrix test results
- Metrics
Aggregator - Metrics aggregator for historical analysis
- Metrics
Collector - Metrics collector for real-time tracking
- Optimization
Config - Optimization configuration
- Platform
- A platform to test against
- Platform
Result - Result of testing on a single platform
- Postcondition
- Postconditions for a step
- Postcondition
Result - Result of a postcondition check
- Precondition
- Preconditions for a step
- Remote
Executor - Remote executor configuration
- Requirements
- System requirements
- Resource
Limits - Resource limits for containers
- Rollback
Manager - Rollback manager for an installer run
- Rollback
Plan - A plan for rolling back steps
- Sccache
Client - sccache client for build artifact caching
- Simulated
Trace Collector - Simulated trace collector for testing (without renacer) In production, this would integrate with renacer::Tracer
- Simulation
Entry - A log entry from simulation
- Span
- A trace span representing an operation
- Span
Event - An event within a span
- State
File - Tracked file state for rollback
- State
File Backup - Backup of a state file
- Step
- Installation step
- Step
Aggregate - Aggregated metrics for a single step
- Step
Checkpoint - Checkpoint configuration
- Step
Execution Result - Execution result for a step
- Step
Executor - Step executor handles actual step execution
- Step
Info - Information about a step being tracked
- Step
Metrics - Metrics for a single step execution
- Step
Result - Result of a single step
- Step
Rollback - Step rollback plan
- Step
Test Result - Result of testing a single step
- Step
Timing - Timing configuration
- Terminal
Renderer - Terminal text renderer
- Trace
Comparison - Comparison result between golden trace and current execution
- Trace
Event - A trace event with timestamp and metadata
- Trace
Summary - Summary of a trace
- Tracing
Context - Tracing context for an installer run
- Trusted
Key - A trusted signing key
- Validation
Result - Result of validating an installer
Enums§
- Action
- Action types supported by the installer
- Architecture
- CPU architecture
- Attribute
Value - Attribute value for spans
- Audit
Category - Category of audit finding
- Audit
Severity - Severity level for audit findings
- Container
Runtime - Container runtime type
- Execution
Mode - Execution mode indicator
- File
Change Type - Type of file change
- Hypothesis
Category - Categories of falsifiable claims
- Package
Operation - A package operation
- Progress
Style - Progress display style
- Rollback
Action - Rollback action types
- RunStatus
- Status of an installer run
- Service
Operation - A service operation
- Span
Kind - Span kind
- Span
Status - Span status
- Step
Outcome - Outcome of a step execution
- Step
State - Step execution state
- Step
Status - Status of a step checkpoint
- Test
Action - An action in a test case
- Test
Status - Test status for a platform
- Trace
Event Type - Event type in a trace
- Trace
Exporter - Trace exporter configuration
- Trace
Level - Trace level for filtering
- Trace
Result - Result of a trace event
- Trust
Decision - Trust decision for TOFU mode
- User
Group Operation - A user/group operation
- Verification
- Verification to check after action
- Verification
Result - Result of signature verification
Constants§
- LOCKFILE_
VERSION - Lockfile format version
Traits§
- Progress
Renderer - Progress renderer trait
Functions§
- compute_
sha256 - Compute SHA256 hash of content
- convert_
bash_ to_ installer - Convert a bash script to installer.toml format
- convert_
file_ to_ project - Convert a bash script file to installer project
- create_
test_ signature - Create a test signature (for testing purposes)
- format_
execution_ plan - Format execution plan for display
- format_
metrics_ report - Format metrics as human-readable report
- generate_
summary - Generate summary of completed installation
- init_
project - Initialize a new installer project with TDD-first test harness.
- validate_
installer - Validate an installer specification without executing it.
- verify_
sha256 - Verify a SHA256 hash
- verify_
signature - Verify an Ed25519 signature (simplified - use ed25519-dalek in production)
Type Aliases§
- Public
Key - Ed25519 public key (32 bytes)
- Sha256
Hash - SHA256 hash (32 bytes)
- Signature
- Ed25519 signature (64 bytes)