| 1 | --- |
| 2 | type: idea |
| 3 | id: ida-93e4f91 |
| 4 | status: adopted |
| 5 | title: "Give a proposed change an identity that survives branch movement" |
| 6 | created: 2026-07-14 |
| 7 | source: brainstorm during the S1 week |
| 8 | --- |
| 9 | |
| 10 | # Give a proposed change an identity that survives branch movement |
| 11 | |
| 12 | The object being reviewed is a change targeting a version stream: its delta, provenance, and |
| 13 | evidence about the resulting tree. A branch is one way to transport that object. |
| 14 | |
| 15 | A stable change identity would connect review, revisions, retries, and integration even as the |
| 16 | branch moves or the change is rebased. It would also make repeated automated attempts recognizable |
| 17 | as work on the same intended change. |
| 18 | |
| 19 | ## Base changes and evidence |
| 20 | |
| 21 | Applying a delta to a new base may produce a different tree even when there is no textual conflict. |
| 22 | Evidence about the original tree does not automatically establish the new result. |
| 23 | |
| 24 | [[dcr-439b771]](../decisions/dcr-439b771-integration-occ-over-content-addressed-evidence.md) defines |
| 25 | when individual check results can transfer. Stable change identity preserves the relationship |
| 26 | between attempts; it does not remove the need to validate evidence after the base changes. |
| 27 | |
| 28 | ## Dependencies between changes |
| 29 | |
| 30 | Changes that commute can be applied in either order. Changes with dependencies or conflicts need an |
| 31 | ordering. |
| 32 | |
| 33 | This suggests representing pending work as a partial order rather than treating every branch as |
| 34 | competing for one unchanged base. The relationship resembles the outcome dependencies in |
| 35 | [[ida-eac723e]](ida-eac723e-outcome-dag.md), with code changes connected to the intent they serve. |
| 36 | |
| 37 | Textually separate edits can still have semantic dependencies. The change model and evidence rules |
| 38 | must account for that distinction. |
| 39 | |
| 40 | ## Candidate representations |
| 41 | |
| 42 | An integration request already carries much of a change object. A dedicated ref namespace such as |
| 43 | `refs/the-valley/changes/*` could hold revisions, with tools such as `git range-diff` helping |
| 44 | compare them. |
| 45 | |
| 46 | Useful prior art includes jj change IDs, Gerrit's change and patchset model, the kernel's patch |
| 47 | workflow, and the patch theories used by Darcs and Pijul. |
| 48 | |
| 49 | An agent could consume an outcome and emit a change. A paused run could preserve its unfinished |
| 50 | change, trajectory, and pause state for later continuation. |
| 51 | [[ida-594df79]](ida-594df79-klaus-s3-requirements-oracle.md) describes the Klaus requirements. |
| 52 | |
| 53 | ## Open questions |
| 54 | |
| 55 | - What defines the identity of a change across rebases and regeneration? |
| 56 | - What counts as a new revision of the same change? |
| 57 | - Which conflicts or dependencies impose an order? |
| 58 | - How are approval, attribution, and the newly resulting tree linked after reapplication? |
| 59 | |
| 60 | [contribute.md](../../design/contribute.md) describes the current request-based transport. |