gunk-dev/the-valley
the-valley:bd-0913cbabugclosed

A change whose base is the tip lands every commit review never showed

State
done
Created
2026-10-29 by contributor
Changes
  • valley:the-valley/tskkkoplxuqortzmozmnpozzktspwulr

Body

When a ready change's base is the target's tip, the integrator lands it as a fast-forward: the head lands as it stands, with every commit between the base and the head (`integrator/refs.go`, around line 350, "A base that is already the tip is a fast-forward"). Only a change whose base is behind the tip is applied as one new commit (`commitTree`).

Review shows the change's net diff, base tree to head tree (`status/compare.go`, the `git diff b1 head` around line 399), plus the commit list and range-diff. A file that one commit adds and a later commit removes appears in no diff a reviewer reads, yet a fast-forward puts both commits on the target's first-parent history. Every clone of the project, and every mirror, then carries that file for good.

Example: a change added a 10 MB build output in one commit and removed it in a later one. The approval covered a tree without it; main's history holds it.

The approval binds the tree, which is right. What lands on the target's history goes beyond what was approved: intermediate trees, messages and authorship.

Fixed when what lands on the target is exactly what review showed. Options:
- The integrator always lands one new commit on the tip, for a fast-forward too. The tree is the head's, so the attested digest still holds, and the landing is recognised by its transfer statement rather than by the head being on the history. This also gives a fast-forward the single landing message that bd-617a63c asks for.
- Review shows every intermediate commit's tree changes, and approval covers them.
- A check refuses a change whose intermediate commits hold paths absent from both its base and its head.

Comments

  1. contributor2026-10-29 12:27 UTC
    Decided by the operator: each change lands on its target as one commit, which the integrator makes, also when the change's base is the tip. Evidence transfer onto a moved target is unchanged.
    
    Plan, in two slices:
    1. **Uniform landing commit and evidence storage.** The `base == tip` branch writes its commit with `commitTree` too. Transfer statements are kept per landed commit rather than per tree digest, so two landings of one tree don't overwrite each other's proof (`integrator/transfer.go:168`). The reader reads both layouts. The existing `landed-recorded` proof holds for a single change unchanged (`rebase/snapshot.go:355`).
    2. **Per-layer stack landing.** One commit per layer, with a transfer statement and an outcome for every layer, and one target update. The proof is layer-aware: the upper layer's merge is recomputed on the lower layer's original head, found through the lower landing's verified outcome. No wire-format change.
    
    Between the two slices, a stack based on the tip lands as one combined commit with evidence for its top only. That is today's behaviour for a stack on a moved target.
  2. contributor2026-10-30 13:09 UTC
    Change valley:the-valley/tskkkoplxuqortzmozmnpozzktspwulr landed: v6 as 262d8ca88ba913c78b8e655254a89c26eec1a05e.
    
    Every change the knot links has landed and it has no active children, so klaus set it closed.