gunk-dev/the-valley
the-valley:ida-9232186idearaw

Changes that conflict are ordered into a stack before review, not after an approval is refused

State
question or idea
Created
2026-11-16 by contributor

Body

Today two changes built in parallel against the same files meet only at landing: the first lands, the second is refused at restack, a client resolves it, and it is reviewed and approved again. The reviewer pays for the collision.

The shape proposed by the operator: once changes are known to conflict, the orchestrator gives them a stack order and each is based on the one below it before review. The reviewer then sees a stack, bottom first, and one approval of the top lands every layer.

What it needs:

- An overlap signal while changes are still drafts, not only between ready changes. Candidates: the paths each draft's pushed head touches; a trial merge of draft heads on main's tip, as `valley pending` runs for ready changes.
- Somewhere the order is decided. The host can detect and report; choosing which change goes underneath is a judgement (which is closer to done, which is smaller, which the other depends on) and fits the split where the host does mechanics and clients judge. With orchestration moving to the host, the order may become a host-side policy decision with a client override.
- A cheap way to turn a conflicting pair into a stack: rebase the upper change onto the lower head, resolve, record it as a layer. Stacks, `valley rebase` and layered review exist; the step from "two changes" to "one stack" is manual.
- A rule for when the lower layer changes after the upper was based on it (a fix round below restacks the layers above).

Belongs with the target-model question (qn-94c8817): it is orchestration the host would own. Related: approvals carrying across a rebase that leaves the delta unchanged (oc-d28b43a) removes the re-approval cost for restacks that do not conflict; this idea covers the ones that do. The listing's missed comparison is bd-7f73771.

Comments

No comments.