Fix/release intent lockfile gh - #119
Merged
Merged
Conversation
The release-intent bot moved the release version in desktop/package.json but never touched desktop/package-lock.json, so the lockfile's root version (top-level and packages[""]) stayed behind after every automated release and disagreed with package.json. Apply now rewrites both lockfile copies in place in the same single commit as the other version files, and fails rather than commit if the edit would change anything else. Reading a file through the contents API now also fails loudly when GitHub omits the body, which it does above 1 MB; the lockfile is already about half that. VERSIONING.md points manual minor or major bumps at npm version so the lockfile moves with them too. Signed-off-by: Terve <ntervalon@nvidia.com>
Automated release bumps left the lockfile's root version at 0.1.1 while package.json reached 0.1.5. Set both lockfile copies to match. Signed-off-by: Terve <ntervalon@nvidia.com>
ckelseynv
approved these changes
Sep 23, 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.
Description
The release-intent bot bumps the release version in
desktop/package.jsonbut never updateddesktop/package-lock.json, so after each automated release the lockfile's root version (top-levelversionandpackages[""].version) fell behind. Ondevelopit reads 0.1.1 whilepackage.jsonreads 0.1.5, and tooling that checks the two against each other rejects the tree.The bot now writes both lockfile copies in the same single commit as the other version files, and this PR resyncs the lockfile to 0.1.5.
Release intent
Changelog title
n/a
Changelog body
n/a
Bumps
Scope
scripts/release-intent/lib.py: newrender_package_lock()replaces the two root versions in place, likerender_package_json(), and refuses to render if the result differs from the parsed edit in any other field.scripts/release-intent/apply_pr.py: reads, renders, and commits the lockfile alongside the other three files, in both apply and--dry-run.read_file_at()now fails loudly when the contents API omits a body, which it does above 1 MB; the lockfile is about 508 KB today.desktop/package-lock.json: two-line resync to 0.1.5.services/VERSIONING.mdpoints manual minor/major bumps atnpm version <version> --no-git-tag-version.developstays consistent at 0.1.5.Validation
python3 scripts/release-intent/test_lib.py: 33 tests pass, including new ones for both root versions, a drifted lockfile, unexpected layouts, and the repository's real lockfile (exactly two lines change).apply_pr.py --dry-runwith a sample patch release on a scratch copy:package.jsonand both lockfile versions moved 0.1.5 → 0.1.6 and the lockfile still parsed.validate_pr.py --skip-owned-files-checkagainst this description passes.Risk
Only the release automation and lockfile metadata change. If npm ever writes a lockfile layout the in-place edit does not recognise, apply fails instead of committing, and the versions stop bumping until the script is updated.
Checklist
git commit -s), certifying the Developer Certificate of Origin.services/versions.jsonis written by automation — do not edit it by hand.