Use the newer committed or artifact data in staging - #886
Merged
Conversation
Contributor
|
👍 All image files/references (if any) are in webp format, in line with our policy. |
Contributor
✅ Spell Check PassedNo spelling issues found when checking 4 changed file(s)! 🎉 |
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.
Staging can lose newer committed data when an older data artifact is extracted over the aggregated PR checkout. For example, a build triggered by another PR replaced #880’s discipline leads and refreshed resources with stale JSON, even though #880 was included in the aggregate. Workflow edits in #880 only governed runs triggered with that workflow version.
Compare freshness for every artifact file before overlaying it. Data Processing now records content hashes and per-file timestamps: unchanged Git files retain their last non-merge commit time; regenerated files use their generation mtime. Staging selects the newer content, keeps committed content on ties, preserves newer committed deletions, and logs every differing-file decision. Artifact download/upload times and synthetic staging merge times do not determine data freshness.
Legacy artifacts without the manifest retain committed versions on conflicts and emit a warning; artifact-only files are still added. Hash mismatches fail before any files are copied. The same selection applies after an artifact-download retry.
Validation: 12 regression tests passed, including both freshness directions, ties, synthetic merges, legacy artifacts, deletions, integrity checks, and local-edit protection. Generated a manifest successfully for all 2,820 artifact-scope files in the real repository; both workflows parse without duplicate YAML keys.
This workflow fix needs to land on
mainindependently of #880 so staging runs triggered by other PRs and manual/scheduled runs inherit it. No production deployment selection behavior is changed.