utopia-ia/elffuss-braid public
Changesets · Branches · Tags · Compare
| Changeset | 63aabb8fc30469df2254d05bd388ddfe28a53399d8698a600a062987c9ff1efb |
|---|---|
| Author | KikoCis <KikoCis@users.noreply.github.com> · 2026-10-21 12:16 +02:00 |
| Committer | KikoCis <KikoCis@users.noreply.github.com> · 2026-10-21 12:16 +02:00 |
| Parents | 20a66f74c39e |
4 files changed
modified AGENTS.md +3 −2
| @@ -269,8 +269,9 @@ | ||
| 269 | 269 | has not landed. |
| 270 | 270 | - Every command takes `--json`. Exit status 2 is a conflict, and 1 a |
| 271 | 271 | failure, which braid prints as text on standard error, with nothing on |
| 272 | - standard output, even with `--json`; only `git sync` and `fsck` print | |
| 273 | - their report as well when they exit with 1. | |
| 272 | + standard output, even with `--json`; only `git sync`, `fsck` and | |
| 273 | + `verify`, once its tests have started, print their report as well when | |
| 274 | + they exit with 1. `verify` exits with 4 when the branch it checks is red. | |
| 274 | 275 | - Changesets are signed by `BRAID_AUTHOR` (`"Name <email>"`), or else by |
| 275 | 276 | the `name` and `email` in `.braid/config`. With neither, `commit`, |
| 276 | 277 | `land` and `update` fail with "no author", and `braid status` lists it |
modified README.md +34 −15
| @@ -348,22 +348,41 @@ | ||
| 348 | 348 | |
| 349 | 349 | - The command runs as given, with no shell, in a fresh copy of the |
| 350 | 350 | changeset's files in the system's temporary directory: outside the |
| 351 | - repository, so every run builds from scratch. `BRAID_TOKEN` and the other | |
| 352 | - `BRAID_HUB` variables are taken out of its environment, and | |
| 353 | - `BRAID_VERIFY_CHANGESET` and `BRAID_VERIFY_BRANCH` say what it tests. | |
| 354 | - After `--timeout` (10 minutes by default) it is killed with every process | |
| 355 | - it started. | |
| 356 | -- A failing run is run again (`--reruns`, once by default) before it counts; | |
| 357 | - one that then passes is `flaky`. With no green ref yet, verify tests only | |
| 358 | - the head, unless `--from` names a changeset to bisect from. | |
| 359 | -- It never reverts a merge, nor a revert it made itself, which it keeps in | |
| 360 | - `.braid/verify/<branch>.json`, and it lands at most three reverts an hour | |
| 361 | - (`--max-reverts-per-hour`). The green ref does not move after a revert: | |
| 362 | - the next pass tests the new head. `--dry-run` reports and changes nothing. | |
| 363 | -- Bisecting tests each changeset as it is: an earlier revert in the range is | |
| 364 | - not undone first, so a culprit found among reverted work needs a look. | |
| 351 | + repository, so every run builds from scratch, and the copy is removed | |
| 352 | + after the run. `BRAID_VERIFY_CHANGESET` and `BRAID_VERIFY_BRANCH` say what | |
| 353 | + it tests. `BRAID_TOKEN`, every variable whose name starts with | |
| 354 | + `BRAID_HUB`, and `OLDPWD` are taken out of its environment, and `PWD` | |
| 355 | + names the copy. | |
| 356 | +- That is not a sandbox. The command runs as you, with your access to your | |
| 357 | + files, the network, the `braid` command and any hub login saved in | |
| 358 | + braid's configuration directory. To test code you do not trust, run | |
| 359 | + verify in a container, a sandbox or as a user of its own. | |
| 360 | +- It runs in a process group of its own. When it exits, or runs past | |
| 361 | + `--timeout` (10 minutes by default), the group is killed, with whatever | |
| 362 | + it started that is still in it; a process that left the group, as a | |
| 363 | + daemon does, is not. If braid itself is stopped, a watchdog process | |
| 364 | + kills the group and removes the copy. | |
| 365 | +- A failing run is run again (`--reruns`, once by default) before it counts. | |
| 366 | + One that then passes is `flaky`, and leaves the green ref where it was | |
| 367 | + unless `--flaky-moves-green`. | |
| 368 | +- The green ref is local to the repository: it is never exported or sent | |
| 369 | + to a hub, and a fresh clone, as CI has, has none. With no green ref, | |
| 370 | + verify tests only the head, unless `--from` names a changeset to bisect | |
| 371 | + from. | |
| 372 | +- It never reverts a merge, nor a revert it made, which it tells by the | |
| 373 | + revert's `reverts` field and its agent, `braid-verify`, and it lands at | |
| 374 | + most three reverts an hour (`--max-reverts-per-hour`), counted on the | |
| 375 | + branch by committer time. A clone without its local record in | |
| 376 | + `.braid/verify/` keeps both rules. The green ref does not move after a | |
| 377 | + revert: the next pass tests the new head. `--dry-run` reports, changes | |
| 378 | + nothing and does not fetch from a hub. | |
| 379 | +- Bisecting tests each changeset as it is. When the first that fails was | |
| 380 | + reverted later in the range, verify tests the revert and, if it passes, | |
| 381 | + bisects again after it. A changeset whose files cannot be written on this | |
| 382 | + system is skipped, and listed in `skipped`. | |
| 365 | 383 | - Exit status 0 means green (`pass` or `flaky`), 4 red (`red`, `reverted`, |
| 366 | - `refused` or `no_culprit`), 2 a revert that conflicts, and 1 an error. | |
| 384 | + `refused` or `no_culprit`), 2 a revert that conflicts, and 1 an error; | |
| 385 | + once the tests have started, an error prints the report too. | |
| 367 | 386 | `braid status --json` shows the green changeset as `green`, and |
| 368 | 387 | `braid verify --help` describes every JSON field. |
| 369 | 388 |
modified docs/design.md +8 −3
| @@ -178,9 +178,14 @@ | ||
| 178 | 178 | past `C`, it is rebased path by path with `C` as the base, the head as ours |
| 179 | 179 | and `C`'s parent as theirs: later work on other lines stays, and later work |
| 180 | 180 | on the same lines is a conflict. `braid verify` lands the reverts it makes |
| 181 | -the same way; which reverts it made, it keeps in a file of its own rather | |
| 182 | -than trusting the `reverts` field, which anyone can write. Its green ref, | |
| 183 | -`braid/green/<branch>`, lives in braid's own namespace and is never exported. | |
| 181 | +the same way, with the agent `braid-verify`. Its limits are read from the | |
| 182 | +branch, so that a fresh clone keeps them: it refuses to revert a changeset | |
| 183 | +that has a `reverts` field and that agent, and counts the reverts of the | |
| 184 | +last hour by committer time. Anyone can write that field and that label, | |
| 185 | +but they are only ever reasons to refuse, never to act; a local record in | |
| 186 | +`.braid/verify/` is a second source. Its green ref, `braid/green/<branch>`, | |
| 187 | +lives in braid's own namespace: it is local to the repository and never | |
| 188 | +exported or sent to a hub. | |
| 184 | 189 | |
| 185 | 190 | **Invariants.** A branch only moves forward. A branch never contains a |
| 186 | 191 | conflict. No value is overwritten except by a change whose base already |
modified site/agents.md +3 −2
| @@ -269,8 +269,9 @@ | ||
| 269 | 269 | has not landed. |
| 270 | 270 | - Every command takes `--json`. Exit status 2 is a conflict, and 1 a |
| 271 | 271 | failure, which braid prints as text on standard error, with nothing on |
| 272 | - standard output, even with `--json`; only `git sync` and `fsck` print | |
| 273 | - their report as well when they exit with 1. | |
| 272 | + standard output, even with `--json`; only `git sync`, `fsck` and | |
| 273 | + `verify`, once its tests have started, print their report as well when | |
| 274 | + they exit with 1. `verify` exits with 4 when the branch it checks is red. | |
| 274 | 275 | - Changesets are signed by `BRAID_AUTHOR` (`"Name <email>"`), or else by |
| 275 | 276 | the `name` and `email` in `.braid/config`. With neither, `commit`, |
| 276 | 277 | `land` and `update` fail with "no author", and `braid status` lists it |