Skip to content

Commit c7fefa9

Browse files
committed
🔧 fix(ops): make migration key recipes container-safe
Update migration/master-key just recipes to run via uv across repo and container contexts without direct python invocation, and codify approval requirements for justfile and python command patterns in AI-first docs.
1 parent f93744d commit c7fefa9

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ an index. Detailed rules live in `docs/`.
4444
4. Read `bot/tests/README.md` before adding/changing tests.
4545
5. Router tests must use `mock_telegram`.
4646
6. Do not weaken tests, linters, or CI checks to make a change pass.
47+
7. Do not add or modify `justfile` commands without explicit user approval.
48+
8. Do not introduce `python ...` or `uv run python ...` command patterns in
49+
recipes/docs/workflows without explicit user approval.
4750

4851
## Task Intake Protocol
4952
1. First state which files/directories need changes.

AI_FIRST.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ domain ← application ← infrastructure
252252
* Менять CI-пайплайн или конфигурацию деплоя.
253253
* Удалять или понижать существующее тестовое покрытие.
254254
* Принимать архитектурные решения, не описанные в `docs/golden-principles.md`, без создания нового ADR.
255+
* Добавлять/менять команды в `justfile` без явного согласования с человеком.
256+
* Продвигать паттерн команд `python ...` или `uv run python ...` в рецептах/доках/workflow без явного согласования с человеком.
255257

256258
---
257259

justfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ bench-kdf:
7474
uv run --with argon2-cffi python bot/scripts/argon2_benchmark.py
7575

7676
migrate-wallet-crypto-v2 args="--dry-run":
77-
cd bot && uv run --package mmwb-bot python scripts/migrate_wallet_crypto_v2.py {{args}}
77+
if [ -f bot/scripts/migrate_wallet_crypto_v2.py ]; then cd bot && uv run --package mmwb-bot scripts/migrate_wallet_crypto_v2.py {{args}}; elif [ -f scripts/migrate_wallet_crypto_v2.py ] && [ -f ../pyproject.toml ]; then cd .. && cd bot && uv run --package mmwb-bot scripts/migrate_wallet_crypto_v2.py {{args}}; else uv run --no-project scripts/migrate_wallet_crypto_v2.py {{args}}; fi
78+
79+
manage-master-key args="--help":
80+
if [ -f bot/scripts/manage_keys.py ]; then cd bot && uv run --package mmwb-bot scripts/manage_keys.py {{args}}; elif [ -f scripts/manage_keys.py ] && [ -f ../pyproject.toml ]; then cd .. && cd bot && uv run --package mmwb-bot scripts/manage_keys.py {{args}}; else uv run --no-project scripts/manage_keys.py {{args}}; fi
7881

7982
start-task task_id title="":
8083
uv run python .linters/create_exec_plan.py {{task_id}} --title "{{title}}"

0 commit comments

Comments
 (0)