Module installer

Module installer 

Source
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 --diff

Structs§

AggregatedMetrics
Aggregated metrics for trend analysis
Artifact
Artifact definition
ArtifactSpec
Artifact specification with signature info
AuditContext
Audit context for performing audits
AuditFinding
An individual audit finding
AuditMetadata
Audit metadata
AuditReport
Complete audit report
CacheStats
Cache statistics
CategorySummary
Summary for a category
CheckpointEntry
Checkpoint for a single step
CheckpointStore
Checkpoint storage manager
ComparisonMetadata
Metadata about the comparison
ContainerConfig
Configuration for container tests
ContainerTestMatrix
Container test matrix runner
ConversionResult
Result of converting a bash script to installer format
ConversionStats
Statistics about the conversion process
DiffPreview
Complete diff preview
DistributedConfig
Distributed execution configuration
DryRunContext
Dry-run execution context that captures all simulated changes
DryRunSummary
Summary of dry-run changes
Environment
Environment variable definition with parsing
EnvironmentInfo
Environment information
Evidence
Evidence collected during test
ExecutionPlan
Execution plan summary
ExecutionWave
Execution wave (steps that can run in parallel)
ExecutorConfig
Step executor configuration
FalsificationConfig
Configuration for test generation
FalsificationGenerator
Generator for falsification tests
FalsificationHypothesis
A falsifiable hypothesis about installer behavior
FalsificationInstallerInfo
Minimal installer info for test generation
FalsificationReport
Summary report of falsification testing
FalsificationResult
Result of running a falsification test
FalsificationStepInfo
Minimal step info for test generation
FalsificationTest
A generated test case for falsification
FileChange
A simulated change to a file
GoldenTrace
A captured golden trace
GoldenTraceConfig
Golden trace configuration
GoldenTraceManager
Manager for golden trace capture and comparison
GraphNode
A node in the installer build graph
HermeticContext
Hermetic execution context
InstallationSummary
Summary of installation run
InstallerGraph
Build graph for parallel execution planning
InstallerMetrics
Metrics for an entire installer run
InstallerPlan
A validated, executable installer plan.
InstallerProgress
Progress tracker for installer execution
InstallerProject
Result of initializing an installer project
InstallerRun
Metadata for an installer run
InstallerSecurity
Security configuration
InstallerSpec
Complete installer specification parsed from installer.toml
JsonRenderer
JSON renderer for programmatic output
KaizenReport
Kaizen-style improvement report
Keyring
Keyring for managing trusted signing keys
LiveProgress
Live progress display (for terminal)
LockedArtifact
A locked artifact with pinned version and hash
Lockfile
Lockfile for hermetic builds
LockfileEnvironment
Captured environment for reproducibility
LogEntry
Log entry for structured logging
Logger
Structured logger with trace context
MatrixConfig
Matrix configuration
MatrixSummary
Summary of matrix test results
MetricsAggregator
Metrics aggregator for historical analysis
MetricsCollector
Metrics collector for real-time tracking
OptimizationConfig
Optimization configuration
Platform
A platform to test against
PlatformResult
Result of testing on a single platform
Postcondition
Postconditions for a step
PostconditionResult
Result of a postcondition check
Precondition
Preconditions for a step
RemoteExecutor
Remote executor configuration
Requirements
System requirements
ResourceLimits
Resource limits for containers
RollbackManager
Rollback manager for an installer run
RollbackPlan
A plan for rolling back steps
SccacheClient
sccache client for build artifact caching
SimulatedTraceCollector
Simulated trace collector for testing (without renacer) In production, this would integrate with renacer::Tracer
SimulationEntry
A log entry from simulation
Span
A trace span representing an operation
SpanEvent
An event within a span
StateFile
Tracked file state for rollback
StateFileBackup
Backup of a state file
Step
Installation step
StepAggregate
Aggregated metrics for a single step
StepCheckpoint
Checkpoint configuration
StepExecutionResult
Execution result for a step
StepExecutor
Step executor handles actual step execution
StepInfo
Information about a step being tracked
StepMetrics
Metrics for a single step execution
StepResult
Result of a single step
StepRollback
Step rollback plan
StepTestResult
Result of testing a single step
StepTiming
Timing configuration
TerminalRenderer
Terminal text renderer
TraceComparison
Comparison result between golden trace and current execution
TraceEvent
A trace event with timestamp and metadata
TraceSummary
Summary of a trace
TracingContext
Tracing context for an installer run
TrustedKey
A trusted signing key
ValidationResult
Result of validating an installer

Enums§

Action
Action types supported by the installer
Architecture
CPU architecture
AttributeValue
Attribute value for spans
AuditCategory
Category of audit finding
AuditSeverity
Severity level for audit findings
ContainerRuntime
Container runtime type
ExecutionMode
Execution mode indicator
FileChangeType
Type of file change
HypothesisCategory
Categories of falsifiable claims
PackageOperation
A package operation
ProgressStyle
Progress display style
RollbackAction
Rollback action types
RunStatus
Status of an installer run
ServiceOperation
A service operation
SpanKind
Span kind
SpanStatus
Span status
StepOutcome
Outcome of a step execution
StepState
Step execution state
StepStatus
Status of a step checkpoint
TestAction
An action in a test case
TestStatus
Test status for a platform
TraceEventType
Event type in a trace
TraceExporter
Trace exporter configuration
TraceLevel
Trace level for filtering
TraceResult
Result of a trace event
TrustDecision
Trust decision for TOFU mode
UserGroupOperation
A user/group operation
Verification
Verification to check after action
VerificationResult
Result of signature verification

Constants§

LOCKFILE_VERSION
Lockfile format version

Traits§

ProgressRenderer
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§

PublicKey
Ed25519 public key (32 bytes)
Sha256Hash
SHA256 hash (32 bytes)
Signature
Ed25519 signature (64 bytes)