Skip to content

v5.0.1

v5.0.1 is a pure bug fix for bear plan's output and its saved .bear/plan.yml. No environment/allowlist policy, deployment safety, source-fingerprint check, or apply behavior changed. Only what plan prints for review, and what the skip list contains, are different. There is no new flag, no renamed field beyond the one addition below, and no schema version bump — CurrentPlanFileVersion stays 1 because this does not change what bear apply reads or executes, only what a human reviews.

The Bug

v5.0.0 introduced a changed (N): summary section, separate from deploy and skip, meant to list artifacts and libraries that changed but had nothing to deploy — mainly libraries, since they are never deployable.

The bug: changed also caught ordinary, deployable artifacts whose deploy action had been converted to a skip by environment policy (an absent, empty, or non-matching environments: allowlist). Internally, that conversion only flipped the artifact's ActionDeploy entry to ActionSkip; the same artifact's separate, unmodified ActionValidate entry was untouched and still fed the changed section. Net effect:

  • Any policy-disabled artifact was listed twice — once under changed with a generic "new artifact"/"files changed" reason, and again under skip with the real reason (deployment not enabled for environment <env>) — with no indication these were the same artifact.
  • Changed libraries showed a generic reason with no indication they were libraries, so a library's changed (1): - shared (libs/shared): new artifact line was easy to misread as a missed deployment rather than an expected, never-deployable artifact.

Before (v5.0.0, buggy) — captured output

Reverting locally to the tagged v5.0.0 commit and running bear plan int against a scratch fixture with three artifacts — api (deployable in dev and int), backoffice (deployable only in dev, so disabled for int), and shared (a library backoffice depends on) — produces:

Bear Plan
─────────

────────────────────────────────────────
Environment: int
Commit:      68a7fe1

deploy (1):
  - api (services/api): new artifact

changed (2):
  - backoffice (services/backoffice): new artifact
  - shared (libs/shared): new artifact

skip (1):
  - backoffice (services/backoffice): deployment not enabled for environment int

Plan complete: 3 changed, 1 to deploy, 1 skipped

Run 'bear apply' to execute this plan.

backoffice appears twice, under two different, unlinked reasons, and shared is indistinguishable in the output from a service that simply has nothing to deploy yet. The closing sentence's counts do not sum either: 1 (deploy) + 1 (skip) = 2, not the 3 the sentence claims were "changed" — the third, backoffice's changed line, is a duplicate of information already in skip, not a distinct artifact.

The Fix

The separate changed section is removed entirely. Every affected artifact now appears in exactly one place: deploy if it is being deployed, otherwise skip — including changed libraries, which are folded into skip (libraries never had their own deploy/skip action before this fix, since libraries never get an ActionDeploy in the first place).

A library entry in skip is now visibly tagged with a dim lib marker placed before the bold artifact name, so it reads as a library on sight, never as a missed deployment. The tag is only ever shown for libraries; a normal artifact/service skip entry has no prefix, exactly as before.

Fixed in v5.0.2

Folding a library into skip was itself a category error, not just a missing tag: a library is never a deployment candidate, so skip — "could have deployed, didn't" — was still the wrong place for it. Because a library never accumulates lock history, it also looks permanently "new" internally, which meant a repo with any library could never reach "No changes detected. Nothing to plan.", and the closing sentence's invariant below did not actually hold whenever an unaffected artifact shared a plan with a library. v5.0.2 removes the library from skip entirely — a library is now visible only indirectly, through the dependency '<name>' changed reason on whatever depends on it. If you are upgrading from pre-v5.0.2, use its output as the current reference instead of the lib-tagged output described below.

After (this fix) — captured output, same fixture, same commit

Bear Plan
─────────

────────────────────────────────────────
Environment: int
Commit:      68a7fe1

deploy (1):
  - api (services/api): new artifact

skip (2):
  - backoffice (services/backoffice): deployment not enabled for environment int
  - lib shared (libs/shared): new artifact

Plan complete: 3 changed, 1 to deploy, 2 skipped

Run 'bear apply' to execute this plan.

backoffice now appears once, with its real reason. shared is tagged lib so it cannot be mistaken for a stalled service. The closing sentence's counts now correctly sum: 1 (deploy) + 2 (skip) = 3 (changed) — the skipped count went from 1 to 2 because it now includes the library that was previously only counted in "changed" and never shown anywhere resembling skip.

.bear/plan.yml: New is_lib Field

PlanSkipped gained an is_lib field (yaml:"is_lib,omitempty"), so the lib tag is derivable from the persisted plan itself, not only from print-time state:

.bear/plan.yml (after)
skipped:
    - name: backoffice
      path: services/backoffice
      reason: deployment not enabled for environment int
    - name: shared
      path: libs/shared
      reason: new artifact
      is_lib: true
changed: 3
to_deploy: 1
total_skipped: 2

No other schema field changed, and CurrentPlanFileVersion was not bumped: this does not affect what bear apply executes — is_lib is read by nothing that decides whether or how to deploy — it only affects what plan and any tooling built around .bear/plan.yml display for human review. A plan file written by v5.0.0 is still readable by this version; it will simply have no is_lib entries and no duplicate changed bookkeeping (the field was print-time only in v5.0.0, never persisted).

What Did Not Change

  • Environment policy, allowlist evaluation, and the "deployment not enabled for environment <env>" reason are unchanged. Whether an artifact deploys or not is identical before and after this fix.
  • Source safety, fingerprints, locking, and Git publication are unchanged.
  • bear apply's execution model, checkpointing, and step sequencing are unchanged; apply does not read changed or is_lib to decide anything.
  • The closing sentence format is unchanged: Plan complete: N changed, M to deploy, K skipped. Only the relationship between the numbers changed, because K (skipped) now includes libraries that were previously counted in N but never shown in a section resembling skip. M + K now always equals N; it did not before this fix whenever a policy-disabled artifact or a library was involved.

    Correction

    This was wrong as stated: M + K does not always equal N even after this fix — it fails whenever K also holds a genuinely unaffected artifact's "no changes detected", since that artifact was never part of N to begin with. See v5.0.2 for the corrected statement.

Upgrading

There is nothing to change in configuration, CI invocation, or artifact definitions. If you have a script or dashboard that greps plan's log for changed (, remove that pattern: the section is gone, and the information it carried is now in skip, with libraries distinguishable by the lib tag. See bear plan and Plan/Apply Workflow for the current output in full.

Pin the release instead of automatically moving to latest:

git clone --branch v5.0.1 --depth 1 https://github.com/irevolve/bear.git bear-v5
go -C bear-v5 install -ldflags="-X github.com/irevolve/bear/commands.Version=5.0.1" .

Use Go 1.25+ and put the Go install directory on PATH. Platform binaries are listed on the v5.0.1 release. Container versions are ghcr.io/irevolve/bear:5.0.1, :5.0.1-alpine, and :5.0.1-debian. Anyone still on v5.0.0 should upgrade directly; there is no separate v5.0.0 patch.