utopia-ia/elffuss-braid public
Changesets · Branches · Tags · Compare
| Changeset | e89500778d9538448f5c6eff70b29dca4af404ff87c6030ef5c7d575e8c1c6f4 |
|---|---|
| Author | KikoCis <KikoCis@users.noreply.github.com> · 2026-10-21 15:55 +02:00 |
| Committer | KikoCis <KikoCis@users.noreply.github.com> · 2026-10-21 15:55 +02:00 |
| Parents | f094e2b508ee |
2 files changed
modified README.md +20 −10
| @@ -357,11 +357,19 @@ | ||
| 357 | 357 | files, the network, the `braid` command and any hub login saved in |
| 358 | 358 | braid's configuration directory. To test code you do not trust, run |
| 359 | 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. | |
| 360 | +- On Unix it runs in a process group of its own. When it exits, or runs | |
| 361 | + past `--timeout` (10 minutes by default), the group is killed, with | |
| 362 | + whatever it started that is still in it; a process that left the group, | |
| 363 | + as a daemon does, is not. A watchdog process, started before the | |
| 364 | + command, kills the group and removes the copy if braid is killed or | |
| 365 | + exits while the tests run, and when the watchdog cannot start, or stops, | |
| 366 | + the run fails rather than go on unwatched. On other systems (Windows is | |
| 367 | + not verified) only the command itself is killed, and nothing watches | |
| 368 | + braid. | |
| 369 | +- In a container, run braid under an init such as | |
| 370 | + [tini](https://github.com/krallin/tini) (`docker run --init`), not as | |
| 371 | + PID 1: PID 1 gets no default handling of signals, and has to reap the | |
| 372 | + processes others leave behind, which braid does not. | |
| 365 | 373 | - A failing run is run again (`--reruns`, once by default) before it counts. |
| 366 | 374 | One that then passes is `flaky`, and leaves the green ref where it was |
| 367 | 375 | unless `--flaky-moves-green`. |
| @@ -371,11 +379,13 @@ | ||
| 371 | 379 | from. |
| 372 | 380 | - It never reverts a merge, nor a revert it made, which it tells by the |
| 373 | 381 | 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. | |
| 382 | + most three reverts an hour (`--max-reverts-per-hour`), counted by each | |
| 383 | + revert's committer time among the last 200 changesets of the branch (or | |
| 384 | + fewer, down to one made more than a day before). A clone without its | |
| 385 | + local record in `.braid/verify/` keeps both rules, and braid warns | |
| 386 | + anyone else who acts as `braid-verify`. The green ref does not move | |
| 387 | + after a revert: the next pass tests the new head. `--dry-run` reports, | |
| 388 | + changes nothing and does not fetch from a hub. | |
| 379 | 389 | - Bisecting tests each changeset as it is. When the first that fails was |
| 380 | 390 | reverted later in the range, verify tests the revert and, if it passes, |
| 381 | 391 | bisects again after it. A changeset whose files cannot be written on this |
modified docs/design.md +10 −5
| @@ -181,11 +181,16 @@ | ||
| 181 | 181 | the same way, with the agent `braid-verify`. Its limits are read from the |
| 182 | 182 | branch, so that a fresh clone keeps them: it refuses to revert a changeset |
| 183 | 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 | +last hour by each one's own committer time, looking a fixed depth down | |
| 185 | +the branch. Anyone can write that field and that label: the label is only | |
| 186 | +ever a reason to refuse. The field also tells bisecting where a culprit | |
| 187 | +was reverted later in the range, but verify only acts on that by testing | |
| 188 | +the changeset it names, and bisects on after it only if the tests pass | |
| 189 | +there: a false field can make verify run one more test, never blame a | |
| 190 | +changeset that passes, or one whose parent fails. A local record in | |
| 191 | +`.braid/verify/` is a second source for both limits. Its green ref, | |
| 192 | +`braid/green/<branch>`, lives in braid's own namespace: it is local to the | |
| 193 | +repository and never exported or sent to a hub. | |
| 189 | 194 | |
| 190 | 195 | **Invariants.** A branch only moves forward. A branch never contains a |
| 191 | 196 | conflict. No value is overwritten except by a change whose base already |