Skip to content

Commit f13cbd5

Browse files
committed
Require AI harness lint before commits
1 parent f81ac0e commit f13cbd5

3 files changed

Lines changed: 25 additions & 4 deletions

File tree

docs/engineering/skills/github-prs.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,17 @@ For migration work, identify:
2424
- what is newly prepared for FastAPI, SQLAlchemy/Alembic, Supabase, Cloud Run,
2525
or Modal migration;
2626
- which user-visible API contract changes are intentionally introduced.
27+
28+
## Commit Hygiene
29+
30+
AI agents must run formatting and lint checks before committing their own code
31+
changes:
32+
33+
```bash
34+
make format
35+
ruff check <changed Python files>
36+
```
37+
38+
Commit only after formatting succeeds and changed Python files pass lint. If a
39+
broader repo-wide lint command fails on unrelated pre-existing issues, include
40+
that result in the handoff instead of hiding it.

docs/engineering/skills/testing.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,13 @@ fixture; smoke tests must not create or update households:
7070
API_BASE_URL=https://candidate-url python -m pytest tests/integration/test_cloud_run_candidate.py -v
7171
```
7272

73-
Run `ruff format --check` and `ruff check` on changed Python files before
74-
handoff.
73+
Before committing AI-authored code changes, run repository formatting and lint:
74+
75+
```bash
76+
make format
77+
ruff check <changed Python files>
78+
```
79+
80+
Commit only after formatting succeeds and changed Python files pass lint. If a
81+
broader repo-wide lint command fails on unrelated pre-existing issues, include
82+
that result in the handoff instead of hiding it.

tests/unit/test_cloud_run_deploy_scripts.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ def test_push_workflow_uses_dedicated_cloud_run_runtime_service_account():
269269
"${{ secrets.GCP_CLOUD_RUN_RUNTIME_SERVICE_ACCOUNT }}"
270270
)
271271
deploy_account_secret = (
272-
"CLOUD_RUN_RUNTIME_SERVICE_ACCOUNT: "
273-
"${{ secrets.GCP_DEPLOY_SERVICE_ACCOUNT }}"
272+
"CLOUD_RUN_RUNTIME_SERVICE_ACCOUNT: ${{ secrets.GCP_DEPLOY_SERVICE_ACCOUNT }}"
274273
)
275274

276275
assert runtime_account_secret in cloud_run_staging

0 commit comments

Comments
 (0)