Skip to content

Parallel PRs serially conflict in CHANGELOG.md + artifacts/requirements.yaml (every REQ/changelog addition collides) #422

@avrabe

Description

@avrabe

Friction hit repeatedly this session while landing several one-REQ-per-PR changes (the dogfooding workflow). Every PR that adds a CHANGELOG entry and a REQ artifact conflicts with every other such PR, forcing a manual rebase+resolve each time — I resolved this on #419 and #421 in the same hour.

Why

  1. CHANGELOG.md — every PR inserts its entry at the top of ## [Unreleased], so any two PRs touch the same lines → guaranteed conflict. Structural and unavoidable with normal merge.
  2. artifacts/requirements.yaml — REQs added mid-file (e.g. "after REQ-160") collide when two PRs target the same anchor. rivet add itself appends at EOF (mutate::append_artifact_to_file), which is better, but two EOF-appends still conflict on the final lines, and hand-authored inserts (Edit) are worse.

Suggested fixes

  • CHANGELOG.md → merge=union via .gitattributes (git's built-in union driver keeps both sides' added lines — exactly right for an append-only changelog). Near-zero risk; eliminates the most frequent conflict. (Implementing this now — small PR.)
  • artifacts/requirements.yaml — either (a) also merge=union (safe as long as additions are append-only blocks; risk is duplicated lines if two PRs edit the same existing artifact — acceptable for an additive log), or (b) document "append new REQs at EOF / always use rivet add, never insert mid-file". Recommend (b) as guidance + consider (a).
  • Longer-term: rivet add could write each artifact to a per-id or per-sprint file (sharded sources) so parallel adds never touch the same file — the cleanest structural fix, but a bigger change.

Found while running the hourly dogfooding loop (the loop itself is the heaviest generator of these conflicts).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions