gunk-dev/the-valley
the-valley:oc-19575e8outcomeopen

The valley carries the flow of concurrent changes, so no session breaks when another change moves

State
free to start
Created
2026-10-30 by contributor
Progress
3 of 4 done
Children

Body

Several ready changes move at once: the integrator lands one, the restacker records a new version of every other ready change, authors ready new heads, and an approval files a request. Every write already compares the state it read and refuses if that state moved. The verbs above those writes read the state once, follow a script, and stop or loop when a write refuses. Keeping the flow of concurrent changes coherent is the valley's job. No client (an orchestrator, a control panel, an operator's habits) should have to order or time its work around it.

Fixed when:
1. **Review follows the change.** Before acting, and after any refusal, review reads the change again. If a newer version was recorded while the session was open, review moves to it in place. A clean restack of the version on screen says so and keeps the operator's place. Any other new version pages its diff again. A refused action is never offered again unchanged; review offers the fix or a skip. (Review already marks a clean restack of an approved version, oc-359f588.)
2. **A stale base is not presented as a problem.** The integrator applies a change's delta to the tip, so rebasing first is a convenience, as review's own code says. Review leads with what would land on the tip and whether it applies cleanly. "Does not fast-forward" is no longer the first thing the operator reads. Base-onto-main is offered when the delta does not apply, or when the operator asks for it.
3. **One step per write.** Every verb that pushes a head also records it as the change's next version, in the same step. No verb leaves a pushed head without a record (bd-2131b2f).
4. **Conflicts between ready changes show before either lands.** `pending` and review report when two ready changes conflict with each other. They name the paths, and say that landing one will stop the other's restack. Resolving a conflict stays with the client that owns the change. The valley only reports it, the same way for every author.
5. **e2e coverage.** One review session approves several ready changes in a row while the integrator lands them and the restacker re-versions the rest. It never leaves the menu, and it never re-offers a refused action. A second case has the restacker record a new version mid-page.

Comments

  1. contributor2026-10-30 13:26 UTC
    A case for item 4, from 2026-10-30. The operator approved three ready changes in one sitting. Two landed. The third had been approved at a clean restack onto the first landing, and went stale when the second landed: the two changes conflict in one test script. The approval was spent on a head that could no longer land, and the operator learned that only afterwards, from a "needs attention" status.
    
    With item 4, review would have said at approval time that the two changes conflict, and that whichever lands second will need a rebase and a fresh approval. An open question for the design, and the operator's to decide: once a client resolves such a conflict, does the earlier approval carry to the resolved head under some policy (for example, when the resolution touches only the conflicting paths), or is a fresh approval always required?