fix: stop writing generated_at to apm.lock.yaml (#2572) - #2577
Draft
Aryan Singh K. (aryansk) wants to merge 1 commit into
Draft
fix: stop writing generated_at to apm.lock.yaml (#2572)#2577Aryan Singh K. (aryansk) wants to merge 1 commit into
Aryan Singh K. (aryansk) wants to merge 1 commit into
Conversation
The per-run timestamp is a constant source of merge conflicts: unrelated branches that regenerate the lockfile collide only on this line. Stop emitting it while keeping the parse path so existing lockfiles still load and `apm lock export` keeps its timestamp fallback.
|
Aryan Singh K. (@aryansk) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
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.
Closes #2572
Summary
generated_atinapm.lock.yamlis a constant source of merge conflicts — two unrelated PRs that regenerate the lockfile collide only on this one line (reported in #2297 and again in #2572). This PR stops writing the key entirely, which is exactly what the triage suggested ("Open a PR that removes thegenerated_atfield fromapm-lock.ymlgeneration").Changes
src/apm_cli/deps/lockfile.py: removegenerated_atfromLockFile.to_dict()output (theto_yamlwrite path). The field is still parsed from legacy lockfiles so existing projects load unchanged andapm lock exportkeeps its timestamp fallback.src/apm_cli/integration/mcp_integrator.py: drop the now-deadlockfile.generated_at = datetime.now(...)stamp before save; remove the unused import.tests/unit/install/test_mcp_lockfile_determinism.py: the determinism tests now assertgenerated_atis absent from the written YAML (the actual regression for [BUG]generated_atkey inapm-lock.ymlis constant source of merge conflicts. #2572) instead of asserting it round-trips.Validation
pytest tests/unit→ 19,802 passed, 2 skipped, 21 xfailedruff check+ruff format --checkclean on all touched filesCompatibility
Legacy lockfiles that already contain
generated_atkeep parsing and the SBOM export fallback keeps working (it reads whatever the lockfile has). Newly written lockfiles simply omit the key.