gunk-dev/the-valley

bd-7b7d58f-same-tree-re-attestation-cannot-be-published.md

source71e69b2e4721main's published tip history
3.7 KiB · Rendered
1---
2type: bug
3id: bd-7b7d58f
4status: open
5title: Evidence that expired cannot be replaced at the head it was made over
6created: 2026-08-26
7source: teaching [a]sk to resubmit a stale request, 2026-08-26
8---
9
10# A re-attestation over the same tree cannot be published
11
12An attestation ref is keyed by the tree it is about and the key that signed it, and the namespace is
13create-only. So a signer gets one attestation per tree, and re-attesting a tree that signer has
14already attested has nowhere to go.
15
16That is a hole exactly where [integration.md](../../design/integration.md)'s rule 6 says to
17re-attest. An effectful check transfers only while its observation is younger than the validity
18window the policy declares for it. When the window closes the tree is still the right tree, and the
19answer the design gives is a fresh observation over the same head. But a fresh observation is a
20different statement: the effectful predicate records the instant it was observed, so the note
21differs, so the ref keyed by that tree and that key would have to move. It cannot. The ref is a tree
22object rather than a commit, so git refuses the update as needing force before any hook sees it, and
23the pre-receive hook refuses it again as an update to a create-only ref.
24
25The two rules are each right on their own. Evidence with a validity window is what makes an
26effectful check mean anything ([[dcr-f41f718]],
27[decisions/dcr-f41f718-declared-verification-policy.md](../decisions/dcr-f41f718-declared-verification-policy.md)).
28A record that can be rewritten or dropped is not a record, which is why the namespace admits
29creations only ([[dcr-0de694f]],
30[decisions/dcr-0de694f-phase2-attestation-shape.md](../decisions/dcr-0de694f-phase2-attestation-shape.md)).
31What is missing is a place for the second observation of one tree to live.
32
33Only effectful checks are affected. A pure check's statement is a function of its inputs and nothing
34else, so re-running it over an unchanged tree produces the identical ref and the push is idempotent
35by construction.
36
37## Why it is not yet biting
38
39No policy in the valley declares a validity window, and rule 4 re-demands a check whose window
40nobody wrote down. So no evidence has expired yet, and the path that would wedge is a path nothing
41takes. The first declared window makes it live.
42
43The neighbouring case is already handled and is worth separating from this one. Where the target
44moved through a required check's input closure, the cure is a new head rebased onto the moved
45target, and a new head means a new tree, a new digest, and a ref nothing holds yet. `valley`'s [a]sk
46replaces the request ref under a lease and publishes the new evidence beside the old, which works.
47The wedge here is only the same-head case.
48
49## Directions, not decisions
50
51- **Key the ref by the statement as well as the tree and the signer.** A second observation is a
52 second statement about the same tree, and giving it its own ref keeps every record standing and
53 keeps the namespace create-only. It costs the integrator a choice: several admissible statements
54 for one check and one signer, where today the ref layout makes that unrepresentable.
55- **Say that re-attestation is a new subject.** An observation instant is arguably part of what is
56 being attested to, not metadata about it, and a subject that includes it is a different subject
57 with a different digest. This is the smallest change to the refs and the largest to what a subject
58 digest means.
59- **Let the window be re-opened rather than re-observed.** A statement that a prior observation
60 still holds is itself a signed act, and it is about a different thing than the check was, so it is
61 a different subject and does not collide. This is the direction that leaves both existing rules
62 untouched.