Skip to content

Conversation

@bfulton
Copy link
Owner

@bfulton bfulton commented Dec 27, 2025

This release adds comprehensive workflow testing and sandbox policy features:

Workflow Test Mode (localmost test):

  • Run workflows locally before pushing to catch issues faster
  • Intercepts actions/checkout to use local working tree
  • Intercepts actions/cache for local caching
  • Stubs upload/download-artifact actions
  • Matrix support (--full-matrix, --matrix flags)
  • Environment diff reporting (--env flag)

Declarative Sandbox Policy (.localmostrc):

  • Per-repo policy files declaring allowed network/filesystem access
  • Default-deny sandbox enforced at runtime
  • Per-workflow policy overrides
  • Discovery mode (--updaterc) generates policies from observed access
  • Policy validation with localmost policy validate

Secrets Management:

  • Secure storage in macOS Keychain
  • CLI commands: secrets set/get/delete/list/clear
  • Per-repository scoping

Environment Comparison:

  • localmost env shows local tooling versions
  • Compare against GitHub runner environments
  • Suggestions for pinning versions in workflows

Background Runner Integration:

  • Policy cache per repository
  • Requires approval when .localmostrc changes
  • Diff display for policy modifications

New shared modules in src/shared/:

  • workflow-parser.ts: Parse GitHub Actions YAML
  • step-executor.ts: Execute workflow steps with sandbox
  • sandbox-profile.ts: Generate macOS sandbox-exec profiles
  • localmostrc.ts: Parse and validate policy files
  • action-fetcher.ts: Download and cache actions
  • workspace.ts: Create temp workspaces for test runs
  • secrets.ts: Keychain-based secret storage
  • environment.ts: Detect and compare environments

New CLI commands:

  • localmost test: Run workflows locally
  • localmost secrets: Manage workflow secrets
  • localmost policy: Manage .localmostrc policies
  • localmost env: Show environment info

This release adds comprehensive workflow testing and sandbox policy features:

Workflow Test Mode (`localmost test`):
- Run workflows locally before pushing to catch issues faster
- Intercepts actions/checkout to use local working tree
- Intercepts actions/cache for local caching
- Stubs upload/download-artifact actions
- Matrix support (--full-matrix, --matrix flags)
- Environment diff reporting (--env flag)

Declarative Sandbox Policy (.localmostrc):
- Per-repo policy files declaring allowed network/filesystem access
- Default-deny sandbox enforced at runtime
- Per-workflow policy overrides
- Discovery mode (--updaterc) generates policies from observed access
- Policy validation with `localmost policy validate`

Secrets Management:
- Secure storage in macOS Keychain
- CLI commands: secrets set/get/delete/list/clear
- Per-repository scoping

Environment Comparison:
- `localmost env` shows local tooling versions
- Compare against GitHub runner environments
- Suggestions for pinning versions in workflows

Background Runner Integration:
- Policy cache per repository
- Requires approval when .localmostrc changes
- Diff display for policy modifications

New shared modules in src/shared/:
- workflow-parser.ts: Parse GitHub Actions YAML
- step-executor.ts: Execute workflow steps with sandbox
- sandbox-profile.ts: Generate macOS sandbox-exec profiles
- localmostrc.ts: Parse and validate policy files
- action-fetcher.ts: Download and cache actions
- workspace.ts: Create temp workspaces for test runs
- secrets.ts: Keychain-based secret storage
- environment.ts: Detect and compare environments

New CLI commands:
- localmost test: Run workflows locally
- localmost secrets: Manage workflow secrets
- localmost policy: Manage .localmostrc policies
- localmost env: Show environment info
- Remove Keychain-based secrets management (use env vars instead)
- Delete src/cli/secrets.ts and src/shared/secrets.ts
- Update test.ts to resolve secrets from process.env
- Move getRepositoryFromDir to workspace.ts
- Add comprehensive test suites for shared modules:
  - workflow-parser.test.ts (182 tests)
  - localmostrc.test.ts
  - sandbox-profile.test.ts
  - workspace.test.ts
  - environment.test.ts
- Fix localmostrc validation for array inputs
- All 459 tests pass
@bfulton bfulton merged commit 7533df9 into main Dec 29, 2025
4 checks passed
@bfulton bfulton deleted the claude/implement-0.3.0-release-QL4EQ branch December 29, 2025 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants