Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что и зачем
Две механики, которые в
AGENTS.mdсуществовали только как правило, стали отказами:A1. «Прочитай перед правкой» —
AGENTS.md §6требует читать файл до правки, а плагин перехватывал толькоbash+git commit. Теперь.opencode/plugin/edit_gate.mjs(Gate 0 вtool.execute.before):edit/write/patchпо существующему файлу проходит, только если файл читали в этой сессии и sha1 не изменился (ловит и параллельную сессию, и генератор);after-хук обновляет факт — вторая правка не блокируется собственной записью;MSCODEBASE_EDIT_GATE=block|warn|off(default block), состояние поsessionID, файлы >8 МБ — по size+mtime.Логика вынесена в
.mjsбез зависимостей: тесты идутnode --testи не требуют opencode иnpm install.A3. Пины CI —
scripts/check_workflow_pins.py: каждое удалённоеuses:обязано бытьowner/action@<40 hex>с комментарием версии, каждыйcheckout—persist-credentials: false; пустой скан =exit 1(«не доказано»). Все 11uses:закреплены (checkoutfbc6f39= v5.1.0, setup-pythona26af69= v5.6.0), 7 checkouts без токена в.git/config.Что изменено
.opencode/plugin/edit_gate.mjs,edit_gate.test.mjs— новый гейт и 18 тестов;.opencode/plugin/mscodebase_gate.ts— вызов Gate 0 передgit commit-гейтами;scripts/check_workflow_pins.py,tests/test_workflow_pins.py— 10 тестов;.github/workflows/ci.yml— SHA-пины,persist-credentials: false, шагEdit-gate logic (node);AGENTS.md— одна строка в §6 (160/160 строк, гейтcheck_agents_md.pyзелёный);AGENT_DIARY.md— запись.Проверка
Мутации (каждая обязана красить тест):
Границы (не прячу)
bash(heredoc,sed -i,tee) гейт не видит — это записанный риск, а не «проверено».⏳до перезапуска OpenCode); проверены логика и проводка.persist-credentials: falseне влияет на работу job'ов (ни один не пушит), но убирает токен из.git/configдля последующих шагов.