Update zwik client to handle obsolete and unsafe packages#8
Merged
jdmarques merged 12 commits intoMar 26, 2026
Merged
Conversation
abloemert
reviewed
Mar 17, 2026
…d and only when legacy is encountered will calculate a new hash the old way
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Zwik client’s handling of packages coming from obsolete/unsafe labeled channels, shifting from persisting per-package labels in the lockfile to re-discovering labeled packages at install time and enforcing/suggesting YAML “CAUTION” comments. It also introduces a new YAML hashing strategy with a backward-compatible legacy-hash fallback when validating older lockfiles.
Changes:
- Update YAML hashing: new normalized hash for channels/dependencies plus a legacy-hash fallback for lockfiles created by versions
<= 5.16. - Remove writing/reading
labelsmetadata in lockfiles; detect obsolete/unsafe packages via channel lookups and enforce unsafe-package comments. - Update tests to reflect the new behavior (warnings/errors driven by YAML comments rather than lockfile labels).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
scripts/zwik_client.py |
Implements new YAML hashing + legacy fallback, removes lockfile labels, and changes obsolete/unsafe resolution/enforcement behavior in lockfile creation and env creation. |
tests/test_labels.py |
Adjusts tests for new obsolete/unsafe behavior, including comment-based unsafe override and warning expectations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…d correct yaml_hash is generated
…n replaces the CAUTION comments for unsafe packages. Update relevant tests.
abloemert
reviewed
Mar 19, 2026
abloemert
reviewed
Mar 19, 2026
abloemert
reviewed
Mar 20, 2026
…ise CondaError if env_data does not exists when yaml_hash is calculated.
jdmarques
reviewed
Mar 25, 2026
jdmarques
reviewed
Mar 25, 2026
jdmarques
requested changes
Mar 25, 2026
jdmarques
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.