2009bec0
Correct the sync claim in the revision-refs design
a73x 2026-08-09 18:18
Commit message
docs/superpowers/specs/2026-08-09-patch-revision-refs-design.md
| Old | New | ||
|---|---|---|---|
| @@ -36,9 +36,19 @@ The `events` rename is forced: git will not let `<id>` be both a ref and a | |||
| 36 | directory. | 36 | directory. |
| 37 | 37 | ||
| 38 | `sync` already pushes and fetches `refs/collab/patches/*` (`sync.rs:230-233`, | 38 | `sync` already pushes and fetches `refs/collab/patches/*` (`sync.rs:230-233`, |
| 39 | `sync.rs:344-347`), so revision refs are carried by the existing refspecs with no | 39 | `sync.rs:344-347`). `*` crosses `/` in both git refspecs and git2's |
| 40 | change. A contributor's whole workflow becomes `git-collab sync`, where it is | 40 | `references_glob`, so push, fetch and enumeration genuinely need no change — this |
| 41 | currently `git push origin <branch>` followed by `git-collab sync`. | 41 | was verified against the implementation, not assumed. A contributor's whole |
| 42 | workflow becomes `git-collab sync`, where it is currently `git push origin | ||
| 43 | <branch>` followed by `git-collab sync`. | ||
| 44 | |||
| 45 | **`reconcile_refs` is the exception, and it is not optional.** It treats every | ||
| 46 | fetched ref under the prefix as an event DAG. Revision refs point at *source* | ||
| 47 | commits, which carry no event signature, so it would run `signing::verify_ref` | ||
| 48 | over them and reject every patch on sync. Reconciliation must classify by ref | ||
| 49 | shape: `<id>/events` reconciles as a DAG, `<id>/r/<n>` is adopted write-once | ||
| 50 | without verification. Stating that the refspecs are unchanged is true and | ||
| 51 | insufficient; the code behind them is not. | ||
| 42 | 52 | ||
| 43 | Revision refs are write-once. A revision is never rewritten; a changed patch adds | 53 | Revision refs are write-once. A revision is never rewritten; a changed patch adds |
| 44 | `r/<n+1>`. This makes the objects behind every revision permanently reachable — | 54 | `r/<n+1>`. This makes the objects behind every revision permanently reachable — |