Skip to content

v4.0.0

v4.0.0 makes deployment environments explicit and tightens source, configuration, and state-publication checks. Existing monorepos must follow the v4 migration guide before enabling automated apply.

Breaking Changes

  • bear plan <environment> [artifacts...] requires dev, int, or prd first, including validation-only plans. ENVIRONMENT is injected into steps, not accepted as an alternative policy input.
  • Each artifact must opt into deployment with environments. Missing/empty lists deny deployment; replace disabled_environments with an explicit allowlist. Pins and force do not bypass it.
  • History and pins are scoped per environment. Legacy artifacts history is preserved but ignored, with no automatic migration. The first plan can redeploy eligible artifacts as new; review it before apply.
  • Recreate old saved plans. New deployment plans bind the selected environment, permissions, relative paths, commit, and source fingerprint. Normal deployment plans require clean source before validation.
  • Local YAML rejects unknown fields and extra documents. Use local steps/vars, explicit language steps, and nonempty target steps. Ambiguous language detection requires a configured language override.
  • Discovery excludes common generated/dependency directories and supports additive ignore_dirs. Check the discovered inventory after upgrading.
  • Building/installing Bear from source requires Go 1.25+. bear init is noninteractive and imports only explicitly requested presets.

Significant Fixes

  • Change detection handles staged/unstaged/untracked files, both rename endpoints, repository-relative paths for nested projects, and root artifacts. Bear state does not trigger source changes. Missing deployment commits fail rather than silently manufacturing a baseline.
  • Transitive dependency changes are compared against each consumer's deployment baseline, not the dependency's own deployment history. The full graph is checked for duplicate names, missing dependencies, unknown targets, and cycles before artifact filtering.
  • Pinned validation and deployment use private worktrees at the resolved commit rather than relabeling the caller's source. Pinned apply reruns saved setup/validation and verifies the approved fingerprint.
  • Apply preflights saved permissions, variables, paths, and source before pending deployments. Plans/lock files use atomic file replacement, and each successful deployment gets a durable history update followed by a completion checkpoint.
  • Workspace and common-Git-directory locks serialize cooperating Bear writers, including linked worktrees. Completed retries verify lock history and skip already-checkpointed deployments.
  • Git publication uses a private index to avoid committing unrelated staged changes, preserves normal hooks, validates the resulting commit, and pushes only the verified commit to an existing synchronized branch. Git failures return nonzero and retain recovery state. Failed pushes after a local commit require manual push recovery.
  • Jenkins detached checkouts support explicit --git-remote/--git-branch and conservative branch hints. CI examples provide identity, scoped authentication, trusted-branch guards, and lock-only skip checks instead of unsafe path-only CI skipping.
  • Presets use immutable SHA selections, supported index version 1, validated revision-specific offline caches, and remote-schema normalization. At dd1dc2dc7854e95be9cb8bbbfbf888225ac2088a, maintained Python/Java corrections stop masking installation, validation, test, and build failures; other revisions and local commands are not rewritten.
  • Step variable resolution is deterministic, detects cycles, bounds expansion, and preserves literal substituted values. Source-routing Git variables are excluded from inherited step environments and rejected in configured variables.
  • Non-TTY progress reports step/elapsed updates. Verbose mode streams output; failure capture is bounded. Cancellation propagates to execution, with process-group cleanup on Unix.
  • Release automation validates SemVer refs, separates prerelease image tags from stable aliases, and gates publication on verification. Docs builds run in strict mode.

Install and Upgrade

Pin the release instead of automatically moving to latest:

git clone --branch v4.0.0 --depth 1 https://github.com/irevolve/bear.git bear-v4
go -C bear-v4 install -ldflags="-X github.com/irevolve/bear/commands.Version=4.0.0" .

Use Go 1.25+ and put the Go install directory on PATH. Platform binaries are listed on the v4.0.0 release. Container versions are ghcr.io/irevolve/bear:4.0.0, :4.0.0-alpine, and :4.0.0-debian; see agent requirements before using them as CI images. Pin project presets separately as described in the migration guide.

Operational Limits

Source fingerprints exclude ignored untracked dependencies/outputs and Bear state; they are not reproducible-build attestations or atomic filesystem snapshots. Normal apply does not rebuild outputs. Private worktrees do not make deployment commands sandboxed, and rollback does not reverse external side effects.

Deployment, local checkpoints, and Git publication are not one transaction. A crash or checkpoint failure may require manual reconciliation. Keep plans and recovery state private, coordinate separate runners, and use trusted commands and credentials. See source safety and retries and Git publication for the precise guarantees.