ReviewOS

also looking at this

pantry-pm/pantry

fix(install): keep .env-inferred services out of pantry.lock

#254
Merged glennmichael123 wants to merge fix/253-env-deps-lockfile into main
4 files +286 -70
docs/features/service-management.mdmodified+5-2
Changes to docs/features/service-management.md
@@ -136,8 +136,11 @@ package, so a fresh checkout does not install cleanly and then fail to start:
136136- pantry prints each package it adds and the key that caused it, e.g.
137137 `+ postgresql.org (from DB_CONNECTION=pgsql in .env; PANTRY_ENV_DEPS=0 to skip)`.
138138 Only those keys are read, and no other `.env` value is printed.
139- Under `--frozen-lockfile` a package is inferred only if `pantry.lock`
140 already records it, so CI never drifts from the committed lock.
139- **An inference never reaches `pantry.lock`** — not the service, not what it
140 pulls in, and not as a constraint on the workspace either. The lock records
141 what the workspace declares, so it reads the same on every machine, whatever
142 each developer's `.env` says. `--frozen-lockfile` therefore needs no special
143 case: an inference cannot move the lock, so it cannot drift from it.
141144- Set `PANTRY_ENV_DEPS=0` to turn inference off.
142145
143146### Service Groups