Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Restructure documentation around reader tasks

348a43c364fbb04be834af44a7cd43a0931fa280 · Keenan Nemetz · 20d ago · parent b7383c19

Restructure documentation around reader tasks

Group the site by getting started, collaboration, CI, publishing, and administration. Rewrite the guides as executable procedures and move issue formats, merge semantics, configuration defaults, customization, and access-control mechanics into dedicated references.

Verify the quickstart and review flow against a throwaway instance, execute the service recipe, inspect the rendered site, and run the complete verify workflow.

Closes: 01M7B6X6RDYBAP3JVA5SYSA1K8

docs/reference/change-requests.md +176

@@ -0,0 +1,176 @@
1 # Change-request semantics
2
3 A change request connects a base branch, a proposed head, review records, and CI
4 results. This reference defines branch following, approval validity, combined
5 results, and stored files. For the normal review procedure, see
6 [Change requests](../change-requests.md).
7
8 ## Storage layout
9
10 ```text
11 changes/<ulid>/change.md
12 changes/<ulid>/comments/<ulid>.md
13 changes/<ulid>/approvals/<account-name>.md
14 ```
15
16 `change.md` records the title, state, author, base, head, followed head ref, and
17 `closes:` issue ids. Discussion and approvals use the same metadata branch and
18 pre-receive validation as issues.
19
20 The author or a maintainer can correct the title and description without changing
21 the base or head. Those edits do not invalidate approvals, including on a closed
22 or merged record.
23
24 ## Branch following and pinning
25
26 A request opened from a branch stores that branch in `head_ref:` and its current
27 remote tip in `head:`. After every accepted push to the followed branch, Vole
28 moves `head:` to the new tip. A normal push therefore needs no `change update`.
29
30 Vole resolves the branch on the remote. If the local clone is behind, the command
31 records the remote tip and reports that difference on stderr. A branch that exists
32 only locally can be recorded with a warning that it is not yet on the remote. Vole
33 refuses a head that is already the base or an ancestor of it.
34
35 A request opened from a bare commit has no followed branch and stays pinned to
36 that commit. For an open request:
37
38 - `vole change update <id> --head <branch>` follows a branch;
39 - `--head <commit>` pins one commit;
40 - `--base <branch>` changes the review's target and diff.
41
42 Deleting a followed branch leaves its last observed commit in `head:`, and the
43 request page reports that the branch is gone.
44
45 Contributors can propose only branches below
46 `refs/heads/contrib/<account>/`. Maintainers and admins can propose ordinary
47 shared branches. The browser and pre-receive hook apply the same restriction.
48
49 ## Linked issues
50
51 `change.md` stores full issue ULIDs in `closes:`. `--closes` accepts an issue
52 number or ULID, resolves it when the request is written, and rejects a number
53 that names another change request. The issue must already exist.
54
55 Landing a merged request closes its linked issues in the same metadata commit.
56 Linking alone does not close an issue, and closing a request without landing it
57 leaves linked issues open. Only an open request can be relinked because a merged
58 request's list records what its merge did.
59
60 When `require-issues` is enabled, the browser and push gate reject new requests
61 with an empty list. Existing requests remain valid.
62
63 ## Approval validity
64
65 An approval names the base branch and proposed head commit. Only the account
66 named by `approvals/<account-name>.md` can create, change, or remove that file.
67 The request's `author` blocks self-approval. An admin repair is recorded in the
68 audit log.
69
70 An approval counts only while:
71
72 - its account is active;
73 - the account currently has `maintain` or `admin` on the repository;
74 - its head is still the request's head;
75 - its base is still the request's base.
76
77 Retiring an approver or reducing its role therefore stops the approval counting
78 without deleting its file. The page marks it **no longer counts**. Moving the
79 head or base invalidates the approval; moving only the base branch's current tip
80 does not, because the approval names the base branch rather than its old commit.
81
82 Browser approvals carry the base and head displayed by the form. Vole refuses an
83 approval submitted after either target moved, preventing an approver from
84 approving a diff they did not see.
85
86 ## Approvals and combined results
87
88 A protected branch accepts the reviewed head directly when no other commit has
89 landed. If the base moved and cannot fast-forward, Vole builds the merge of the
90 current base and reviewed head, tests that combined tree, and lands the commit it
91 tested.
92
93 The combined result:
94
95 - uses workflow files from the merge tree, including changes from the base;
96 - runs when the head is pushed and again when the base moves for a request under
97 review or waiting to merge;
98 - does not deploy the repository's site;
99 - uses the contributor's cache namespace and CI allow decision when derived from
100 a contributor branch.
101
102 The base move does not invalidate the head approval, but the combined result must
103 pass. Once that same merge commit lands, ordinary branch jobs do not repeat work
104 that the combined run already performed. Site deployment still runs on the branch
105 because the combined result never publishes it.
106
107 A hand-created merge push is accepted only when its tree equals a clean merge of
108 the base tip and reviewed head and its combined checks passed. Extra content and
109 manual conflict resolutions are rejected because they were not reviewed under
110 that approval. Use `vole change merge` or the browser's merge action instead.
111
112 **Merge when ready** survives base movement. It stops when the head changes, the
113 request closes, the actor loses merge permission, or the branches conflict. Every
114 landing rechecks approval, permission, and combined-result state at the moment the
115 branch moves.
116
117 The request page reports these combined states:
118
119 - **Passed with the latest main** — the merge can land.
120 - **Testing the merge with the latest main** — merge can wait for the run.
121 - **The combined result failed** — inspect the named run and push a fix.
122 - **Conflicts with the latest main** — resolve the conflict on the head branch.
123
124 Vole also checks mergeability with Git without modifying a working copy. If the
125 needed commits or base are unavailable, it reports that the answer is unknown
126 rather than guessing.
127
128 A merged request retains `merged_base`, the base tip before landing, so its Files
129 tab can still show the diff after the head becomes part of the base.
130
131 ## Queue statuses
132
133 The change list derives one status from the current head, approvals, checks, and
134 mergeability:
135
136 | Status | Meaning |
137 |---|---|
138 | **Waiting on CI approval** | A maintainer has not allowed this contributor tip to run. |
139 | **Waiting on CI jobs** | Checks are queued or running. |
140 | **CI failed** | A check ran and failed against this commit. |
141 | **CI could not run** | The runner could not start the job; rerun after fixing the machine. |
142 | **Waiting for review** | Fewer valid approvals exist than the base requires. |
143 | **Merge conflict** | The head no longer merges cleanly into the base. |
144 | **Ready to merge** | Required approvals and checks are satisfied. |
145 | **Merged** / **Closed** | The request landed or was closed without landing. |
146
147 The list sorts by the newest metadata commit in each request directory, including
148 edits, comments, and approvals.
149
150 ## Review comments
151
152 A general comment belongs to the request discussion. A line comment also records
153 its path, line, old or new side, and source blob. The web interface shows it in
154 both Conversation and Files and marks it outdated when the file changes.
155
156 Conversation comments use `#c-<ulid>` anchors; line comments in Files use
157 `#inline-c-<ulid>`. A conversation excerpt reads the exact blob named by the
158 comment, so later edits do not change the reviewed context.
159
160 Comments support `reply_to`, one-level display nesting, editing, and deletion.
161 Only the author can edit or delete a comment; an admin override is audited.
162 Deletion leaves a tombstone for replies and does not erase Git history.
163
164 The CLI needs the relevant commits locally to create a line comment. Run
165 `git fetch` when it reports that they are missing.
166
167 ## Protected branches
168
169 Protected-branch patterns are exact refs such as `refs/heads/main` or prefixes
170 ending in one `*`, such as `refs/heads/release/*`. Invalid patterns are rejected
171 rather than stored without effect.
172
173 `set-approvals` controls the number of valid approvals; `0` means admin-only.
174 `checks enable` additionally requires passing trusted CI results. Admins can push
175 protected branches directly. Merges through review and privileged overrides are
176 recorded in `data/audit.log`.