You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update AGENTS.md with CI/linting guidance and known pitfalls
Add practical CI validation commands, pipeline structure, common failure
patterns, and known type system limitations learned from real PR workflows.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Prefer targeted runs, e.g. `uv run pytest tests/test_cli.py` or a specific `tests/commands/` file.
28
+
### Bootstrap
37
29
38
-
## Coding Guidelines (for AI tools)
30
+
```bash
31
+
uv sync --frozen --group base --group test --group linters
32
+
```
33
+
34
+
### Local commands
35
+
36
+
-**Format**: `uv run poe format` (runs `ruff check --fix` then `ruff format`)
37
+
-**Lint**: `uv run poe lint` (runs `ruff check` then `mypy`)
38
+
-**Test**: `uv run poe test` (runs `pytest -n auto`)
39
+
-**CI-equivalent**: `uv run poe ci` (commit check + pre-commit hooks via `prek` + test with coverage)
40
+
-**Full local check**: `uv run poe all` (format + lint + check-commit + coverage)
41
+
42
+
Always run at least `uv run ruff check --fix . && uv run ruff format .` before pushing. CI will fail if the formatter modifies any files.
43
+
44
+
### CI pipeline
45
+
46
+
- CI runs `poe ci` on a matrix of Python 3.10–3.14 × ubuntu/macos/windows.
47
+
- Pre-commit hooks are defined in `.pre-commit-config.yaml` and run via `prek`.
48
+
- The matrix is **fail-fast**: inspect the earliest failing job that completed; others are cancelled.
49
+
50
+
### Common CI failure patterns
51
+
52
+
-**"Format Python code...Failed"**: Run `uv run poe format` and commit the result.
53
+
-**mypy `[arg-type]` on TypedDict**: Dynamically-constructed dicts (e.g., from `pytest.mark.parametrize`) passed to TypedDict-typed params need `# type: ignore[arg-type]`.
54
+
-**"pathspec 'vX.Y.Z' did not match"**: `.pre-commit-config.yaml` pins a tag of this repo. Rebase onto master to pick up the tag.
55
+
-**`VersionProtocol` + `issubclass`**: This Protocol has non-method members (properties), so `issubclass()` raises `TypeError`. Use `hasattr` checks for runtime validation.
0 commit comments