Skip to content

Store source/target causals on contribution itself, so they stay frozen once merged#69

Merged
ChrisPenner merged 12 commits into
mainfrom
cp/freeze-contribution-causals
May 14, 2025
Merged

Store source/target causals on contribution itself, so they stay frozen once merged#69
ChrisPenner merged 12 commits into
mainfrom
cp/freeze-contribution-causals

Conversation

@ChrisPenner

@ChrisPenner ChrisPenner commented May 9, 2025

Copy link
Copy Markdown
Member

Overview

Now that contribution diffs depend on the target causal and not just the BCA we need to track that on the contribution itself so we can freeze it once merged.

Implementation notes

  • Store the current source_causal_id and target_causal_id on the contribution itself and update them when necessary
    Use these causals when computing diffs rather than the current state of the referenced branches.
  • Carefully avoid updating these columns on contributions when the contribution is merged or is in the process of being merged.
  • Replace contribution_diff_queue with a generic causal_diff_queue so we ensure no diff calculations get accidentally rolled together, and also so we can use it for generic namespace diffs

Test coverage

  • Updated transcripts

Comment thread src/Share/BackgroundJobs/Diffs/ContributionDiffs.hs Outdated
@ChrisPenner ChrisPenner force-pushed the cp/freeze-contribution-causals branch from f8ff7da to a476f11 Compare May 12, 2025 19:17
@ChrisPenner ChrisPenner force-pushed the cp/freeze-contribution-causals branch from 3b42512 to c43252a Compare May 12, 2025 19:32
@ChrisPenner ChrisPenner force-pushed the cp/freeze-contribution-causals branch from ad323ad to 844ced5 Compare May 13, 2025 18:15
@ChrisPenner ChrisPenner marked this pull request as ready for review May 13, 2025 18:15
@ChrisPenner ChrisPenner merged commit 934a977 into main May 14, 2025
8 checks passed
@ChrisPenner ChrisPenner deleted the cp/freeze-contribution-causals branch May 14, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants