Dependency lockfiles record a set of dependency choices so a later installation can use that record instead of resolving everything again. They make changes visible and repeatable within their supported conditions. They do not decide whether the chosen packages are trustworthy, and their presence alone does not prove that a build actually used them.
Recent releases make the distinction worth revisiting
The November 2, 2026 pip 26.3 announcement expanded ways to install extras and dependency groups from pylock.toml. It explicitly says installation from these files remains experimental. A file-format specification, a tool’s implementation and the maturity of a particular command are separate facts; do not describe all Python locking workflows as interchangeable.
GitHub also announced general availability of Actions workflow lockfiles on October 28, 2026. Those lock action dependencies to recorded commits while allowing readable references in workflows. They cover a different layer from application package dependencies. An Actions lockfile does not replace the package lock used by the application being built.
Dependency lockfiles record resolution, not just intent
A project manifest describes what the project asks for. A lockfile records choices made when resolving those requirements, including indirect dependencies where the format supports them. If a permitted version range has several valid answers, a later fresh resolution may choose differently even though the manifest has not changed.
The npm 11 package-lock documentation describes a recorded dependency tree intended for source control and subsequent installations. Reviewing that record alongside the manifest makes indirect changes visible. Treat a large generated diff as a set of changed software inputs, not as disposable formatting that never needs explanation.
| Artifact | Question it helps answer | What it does not establish |
|---|---|---|
| Project manifest | What dependencies are requested? | The complete resolved installation |
| Dependency lockfile | Which resolution was recorded? | Whether the selected code is safe |
| Installation evidence | What did this run actually install? | That every future environment will match |
For a fictional report generator, adding one parser can update several indirect packages. The review should explain why the graph changed, not merely confirm that the requested parser appears. A lockfile gives the team something concrete to review and compare when a later runtime behavior changes.
For a library, distinguish its own development environment from the environment of a project that consumes it. The npm 11 documentation says a package lock is used at the root project and is not published as a package lock for consumers. A library’s successful locked test environment therefore does not establish that every consuming application will resolve the same tree. Test the compatibility the library promises instead of assuming the development lock controls downstream projects.
Make CI enforce the record it claims to use
Select the package manager’s supported frozen or locked installation behavior and document its prerequisites. For example, npm 11 documents npm ci as requiring an existing package lock or shrinkwrap file and failing when it does not match the manifest. It also removes an existing node_modules tree and does not update the manifest or lockfile. Understand those effects before using it in a working environment.
The same documentation notes that options affecting dependency-tree shape must agree with those used to create the lock. Preserve relevant project configuration and the package-manager version with the workflow. If a locked install fails, investigate the mismatch rather than automatically deleting the lockfile and resolving a new graph just to make CI pass.
Keep intentional update work separate from qualification of an existing revision. A job that quietly rewrites dependency choices during every test run makes the reviewed commit an incomplete description of its inputs. Record the installation command and relevant configuration so a reviewer can tell whether the dependency record was consumed or regenerated.
State the platform and tool boundaries
The current pip lock documentation marks the command experimental and guarantees a generated lock only for the current Python version and platform. That is a specific implementation boundary, not a claim that every lockfile format is single-platform. Check the tool and mode that produced your file.
The Python pylock.toml specification includes environment markers and checks for supported metadata and Python requirements. A file can describe conditions and artifacts that an installer must interpret. It is not enough for two systems to share the filename if their tools or target environments do not support the same information.
In the fictional report generator, a developer uses one operating system while CI deploys on another. Record the intended runtime versions and platforms, then test the supported targets in clean environments. If platform-specific artifacts or optional dependencies differ, explain that expected difference. Do not promise byte-identical builds merely because top-level package versions match.
Integrity is a different question from trust
A hash can help verify that downloaded bytes match the artifact selected by the lock. It cannot establish that those selected bytes are benign. If an unwanted dependency is deliberately recorded in an accepted lockfile, reproducing it faithfully reproduces the unwanted choice. Protecting review of lockfile changes therefore matters as much as storing the file.
The pip 26.3 release announcement also cautions that wheels should come from trusted sources and that installation cannot be guaranteed never to execute third-party code. Keep dependency installation isolated from unnecessary credentials and privileges. Locking a version is not permission to give its installer broad access to a production environment.
GitHub’s workflow-lockfile announcement makes a similar limit explicit: locking protects against unexpected dependency changes, while dependency safety still requires review. Apply that distinction at each layer. A resolved package graph, an inventory of installed components and evidence of who built an artifact answer related questions, but none should silently stand in for the others.
Review updates as changes to the software
- Generate an update deliberately with the documented tool and configuration. Include the manifest and corresponding lock changes in the same review when both change.
- Explain the direct and indirect version changes, new sources and unexpected removals. Investigate a large unrelated rewrite before accepting it.
- Check relevant advisories and the project’s compatibility requirements, then run tests that exercise the dependency’s actual role. A successful install is only one part of qualification.
- Preserve an identified baseline and a supported rollback path. Record what changed and the evidence used to accept the new resolution.
Do not leave an old resolution untouched indefinitely merely because it is reproducible. A deliberate update process is how fixes enter the application. Schedule review according to the project’s needs and respond to relevant security information; the lockfile provides control over change, not a reason to avoid it.
Verify the workflow with a small project
Use a disposable copy of a known project and record its starting commit, tool versions and target platform. Perform the supported locked install and inspect whether tracked dependency files changed. Then introduce a harmless manifest/lock mismatch and confirm that the intended check detects it. These are suggested tests, not results produced for this article.
Compare the installed dependencies with the expected record and test the application behavior that motivated the update. Include the production target in that qualification rather than relying solely on a developer’s cached environment. If a registry or artifact becomes unavailable, preserve the failure evidence; silently selecting another source or version changes the experiment.
A useful lockfile workflow makes resolution explicit, enforcement visible and updates reviewable. Keep those three properties together, with the tool’s environment limits documented. That provides repeatable dependency inputs while leaving claims about security and complete build reproducibility to the additional evidence they require.



