Problem
PR #155 CI failed because src/tgbot/handlers/stats/wrapped.py wasn't formatted with ruff. This file was modified by agent commits on production (stats performance fixes 9eec311, 6ddfc95, etc.) that skipped ruff format.
Root cause: Agent workflows (CTO, Release Engineer) don't enforce just lint before committing.
Expected behavior
Every commit from agents should pass ruff check src/ tests/ and ruff format --check src/ tests/ before pushing.
Proposed fix
Options (pick one or combine):
- Add
just lint to agent AGENTS.md instructions — CTO and Release Engineer instructions should include "always run just lint before committing"
- Add a pre-commit hook —
.pre-commit-config.yaml with ruff check + format, so it's impossible to commit unformatted code
- Add lint step to deploy.sh — run lint check before allowing push
Option 2 (pre-commit hook) is the most robust since it can't be skipped accidentally.
Files to check
agents/cto/AGENTS.md — add lint instruction
agents/release-engineer/AGENTS.md — add lint instruction
- Consider:
.pre-commit-config.yaml for automated enforcement
Problem
PR #155 CI failed because
src/tgbot/handlers/stats/wrapped.pywasn't formatted with ruff. This file was modified by agent commits on production (stats performance fixes9eec311,6ddfc95, etc.) that skippedruff format.Root cause: Agent workflows (CTO, Release Engineer) don't enforce
just lintbefore committing.Expected behavior
Every commit from agents should pass
ruff check src/ tests/andruff format --check src/ tests/before pushing.Proposed fix
Options (pick one or combine):
just lintto agent AGENTS.md instructions — CTO and Release Engineer instructions should include "always runjust lintbefore committing".pre-commit-config.yamlwith ruff check + format, so it's impossible to commit unformatted codeOption 2 (pre-commit hook) is the most robust since it can't be skipped accidentally.
Files to check
agents/cto/AGENTS.md— add lint instructionagents/release-engineer/AGENTS.md— add lint instruction.pre-commit-config.yamlfor automated enforcement