fix(process): rebase resolves a conflict only in docs/reviews/INDEX.md by rebuilding the index

A pipeline doc commit carries the review document and the rebuilt
INDEX.md; while the task waits, dev receives other tasks' documents with
their own INDEX.md, and the rebase of the branch conflicts in the index
every time. 24.09 this bounced green #617, #618, #629, #642 to S6.

scripts/rebase-generated.mjs: shared rebase helper. At every stop, if ALL
conflicting paths are docs/reviews/INDEX.md (or paths the caller
resolves itself), the index is rebuilt from the directory in the stop
tree, staged, and the rebase continues; any other path aborts and
returns the full list. CLI exit 3 = refusal with paths on stdout.

Wired into process.yml «Привести ветку к dev» (helper taken from dev via
git archive; conflict/conflicts outputs, lease, ref wait and
--commit-if-stale kept), merge-candidate rebaseOnto (claude[bot]
identity, --commit-if-stale kept) and rebase-on-dev.mjs (index next to
GENERATED_ROOTS; bundle still dev copy + rebuild).

Issue: #643
User-Visible: no
This commit is contained in:
Claude
2026-09-24 09:35:58 +03:00
parent ee4bbf8f1f
commit 92b83d9525
10 changed files with 718 additions and 32 deletions
+8 -3
View File
@@ -359,9 +359,14 @@ S1-new → S2-analysis → S3-spec → S4-spec-review ⟲ → S5-ready →
Файл генерируется `node scripts/reviews-index.mjs` и пересобирается конвейером
тем же коммитом, что публикует документ, а также после каждого его ребейза
(приведение к dev перед ревью, слияние кандидата — `--commit-if-stale`, коммит
класса C); руками не правится. Шаг Validate «индекс ревью совпадает с
каталогом» красит push в `dev`, где `INDEX.md` расходится с каталогом (на
issue-ветках не судится: их переписывает конвейер). Правка `docs/reviews/`
класса C); руками не правится. Конфликт ребейза, в котором **все** пути —
`INDEX.md`, отказом не считается (#643): `scripts/rebase-generated.mjs`
пересобирает индекс по каталогу на остановке и продолжает ребейз — так делают
приведение к dev, слияние кандидата и авторский `rebase-on-dev.mjs`; индекс
вместе с любым другим путём — прежний отказ с перечнем файлов. Шаг Validate
«индекс ревью совпадает с каталогом» красит push в `dev`, где `INDEX.md`
расходится с каталогом (на issue-ветках не судится: их переписывает конвейер).
Правка `docs/reviews/`
руками — перенос в `legacy/`, удаление — сопровождается
`node scripts/reviews-index.mjs` в том же коммите. Прежде чем брать
задачу по подсистеме, стоит прочитать её строки в индексе: что находили и чем