Skip to content

Commit 38f5d24

Browse files
RSafargalinclaude
andauthored
docs: изменения ландятся через ветку и PR, включая мейнтейнерские (#24)
Правило записано там, где было нарушено: за одну сессию пять коммитов ушли прямо в main, последний — на двадцать один файл, на основании единожды сказанного «коммитом в main» про однострочный релизный chore. Зелёный локальный make ci — предиктор, CI на пул-реквесте — гейт, и изменение без обозримой единицы не ревьюится в принципе. Ветка main защищена: прямых пушей не принимает, требует зелёный build-test и линейную историю. Защита распространяется на администраторов — иначе она охраняла бы от всех, кроме того аккаунта, который сюда и пушит. Попутно: в AGENTS.md было «131 tests», сейчас 330. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent b5d0616 commit 38f5d24

3 files changed

Lines changed: 47 additions & 1 deletion

File tree

‎AGENTS.md‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,36 @@ breaking something invisible.
88
## Build and verify
99

1010
```bash
11-
swift build && swift test # 131 tests
11+
swift build && swift test # 330 tests
1212
make ci # build + test + self-lint — run this before committing
1313
swift test --filter "<suite name>" # one suite
1414
```
1515

1616
`make lint` runs sextant on its own sources with `sextant-rules.json`. The tool is dogfooded:
1717
if a change makes `lint` noisy on this repository, that is a finding about the change.
1818

19+
## How a change lands
20+
21+
Every change goes through a branch and a pull request — maintainer changes included. `main` is
22+
protected: it takes no direct pushes, and a pull request merges only once CI is green on it.
23+
24+
```bash
25+
git switch -c fix/what-it-fixes
26+
# … work, `make ci` …
27+
git push -u origin HEAD && gh pr create
28+
```
29+
30+
The rule is written here because it was broken here. Five commits were pushed straight to `main`
31+
in one session, the last of them a change across twenty-one files, on the strength of a "commit
32+
straight to main" that had been said once about a one-line release chore. Nothing broke, and that
33+
is not the point: a green local `make ci` is a predictor, while CI on a pull request is a gate, and
34+
a twenty-one-file change with no reviewable unit is not reviewable in principle.
35+
36+
The protection is what makes this a rule rather than a resolution. It applies to administrators
37+
too — otherwise it would guard against everyone except the account that actually pushes here. An
38+
emergency turns it off in the repository settings, deliberately and visibly, which is the whole
39+
difference from bypassing it by habit.
40+
1941
## Layout
2042

2143
- `Sources/SextantCore` — all logic, testable. Anything worth a test lives here.

‎CONTRIBUTING.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ The semantic layer additionally needs `libIndexStore.dylib`, which sextant locat
2121
what to do about it. The syntactic commands (`map`, `api`, `search`, `lint`, `changed`) work
2222
without any of it.
2323

24+
## Every change goes through a pull request
25+
26+
Including the maintainer's. `main` is protected: it accepts no direct pushes, and a pull request
27+
merges only once CI is green on it. Administrators are not exempt — a gate that the account doing
28+
the pushing can walk around is a note, not a gate.
29+
30+
```bash
31+
git switch -c fix/what-it-fixes
32+
# … work …
33+
git push -u origin HEAD && gh pr create
34+
```
35+
2436
## Before you open a pull request
2537

2638
```bash

‎CONTRIBUTING.ru.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ swift build && swift test
2121
и что с этим делать. Синтаксические команды (`map`, `api`, `search`, `lint`, `changed`)
2222
работают и без всего этого.
2323

24+
## Любое изменение приходит через пул-реквест
25+
26+
В том числе мейнтейнерское. Ветка `main` защищена: прямых пушей не принимает, а пул-реквест
27+
вливается только с зелёным CI на нём. Администраторы не исключение — гейт, который аккаунт,
28+
делающий пуши, может обойти, это не гейт, а памятка.
29+
30+
```bash
31+
git switch -c fix/what-it-fixes
32+
# … работа …
33+
git push -u origin HEAD && gh pr create
34+
```
35+
2436
## Перед пул-реквестом
2537

2638
```bash

0 commit comments

Comments
 (0)