Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/agents/axis-review-verify.agent.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# Axis Review Verify

**Purpose:**
- Automated review and verification agent for Axis code changes.
- Runs all quality gates (tests, lint, type checks) and reports findings.
- Ensures PRs meet repository standards before merge.

**Workflow:**
1. Run all checks: `uv run ruff check .`, `uv run ruff format --check .`, `uv run mypy axis`, `uv run pytest`.
2. Summarize failures and actionable findings.
3. If all checks pass, confirm PR is ready for review/merge.

**Special Handling:**
- If coverage drops below 95%, block merge and report affected files.
- If pre-existing failures are unrelated to the PR, note them separately.
- If commit hooks modify files, re-stage and re-run checks.

**Scope:**
- Use only for PR verification, not for architectural or design review.
- For code review, use the `Axis Review` agent.

**See also:** `.github/copilot-instructions.md`, `CONTRIBUTING.md`.
---
description: "Use when reviewing Axis changes and you want findings plus command-backed validation. Keywords: review with tests, verify PR, run targeted checks, regression verification, lint/type/test confirmation."
name: "Axis Review Verify"
Expand Down
28 changes: 27 additions & 1 deletion .github/agents/axis-review.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,33 @@ name: "Axis Review"
tools: [read, search]
user-invocable: true
---
You are a specialized reviewer for the Axis Python repository. Your job is to find behavioral regressions, correctness risks, and missing test coverage before changes are merged.
## Axis Review

**Purpose:**
- Automated code review agent for Axis repository.
- Reviews PRs for correctness, safety, and adherence to project conventions.
- Identifies regressions, missing tests, and risky changes.

**Workflow:**
1. Review code changes for:
- Handler boundary discipline (models/interfaces separation)
- Enum normalization and `_missing_` fallbacks
- XML/event parsing safety (namespace-aware, root-shape guards)
- Test coverage and fixture usage
- Minimal, targeted changes
2. Summarize findings and actionable suggestions.
3. If risky or non-conventional changes are found, block merge and explain why.

**Special Handling:**
- If tests, typing, or linting fail for unrelated reasons, note but do not block merge.
- If coverage drops below 95%, block merge and report affected files.
- If commit hooks modify files, re-stage and re-run checks.

**Scope:**
- Use for code review and regression analysis.
- For full PR verification, use the `Axis Review Verify` agent.

**See also:** `.github/copilot-instructions.md`, `CONTRIBUTING.md`.

## Scope
- Review code changes and nearby context for defects and unintended behavior changes.
Expand Down
38 changes: 0 additions & 38 deletions .github/aiohttp-performance-matrix.md

This file was deleted.

48 changes: 48 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,54 @@

## Git Workflow

- Never create commits on the `master` branch.
- Never push commits directly to the `master` branch.
- Before any commit or push, check the current branch and confirm it is not `master`.
- If work is currently on `master`, create or switch to a feature branch before committing.
- If asked to commit or push from `master`, explain that the change must go through a feature branch and pull request.
- For any requested git operation, verify branch state first and summarize what will happen before committing or pushing.
# Project Guidelines

## Build And Test

- Use the project environment managed by `uv` (see `README.md`).
- Preferred bootstrap: `./setup.sh`.
- Python requirement is `>=3.14.0` (see `pyproject.toml`).
- Standard full checks:
- `uv run ruff check .`
- `uv run ruff format --check .`
- `uv run mypy axis`
- `uv run pytest`
- After code changes, run targeted tests for touched files first; run broader validation when shared behavior is affected.

## Architecture

- Keep boundaries clear:
- `axis/interfaces/` contains API handlers and transport-facing logic.
- `axis/models/` contains request/response models, enums, and parsing helpers.
- `axis/device.py` and `axis/interfaces/vapix.py` orchestrate device and handler lifecycle.
- Follow the phase-based handler initialization model documented in `README.md` (`API_DISCOVERY`, `PARAM_CGI_FALLBACK`, `APPLICATION`).
- Prefer boundary normalization for incoming values (for example, enum coercion and defaults in model constructors/post-init).

## Conventions

- Prefer minimal, targeted changes that preserve existing behavior unless the task explicitly requires a behavior change.
- Do not modify unrelated code, formatting, or tests.
- Never revert user changes unless explicitly asked.
- Before changing patterns or APIs, inspect nearby code and follow existing local style.
- Prefer root-cause fixes over workarounds.
- For enums and external inputs, preserve existing defensive normalization patterns (for example `_missing_` fallbacks and constructor normalization).
- For event/XML handling, preserve namespace-aware parsing and root-shape guards instead of assuming a fixed payload shape.

## Testing Conventions

- Add or update focused tests in the nearest relevant `tests/` module when behavior changes.
- Reuse existing async fixtures and HTTP mocking patterns from `tests/conftest.py`.
- If tests, typing, or linting fail for unrelated pre-existing reasons, report that clearly instead of fixing unrelated code.
- Expect commit hooks to run Ruff, Ruff format, and mypy; if hooks modify files, re-stage and re-run checks.

## Git Workflow

- Never create commits on the `master` branch.
- Never push commits directly to the `master` branch.
- Before any commit or push, check the current branch and confirm it is not `master`.
Expand Down
78 changes: 0 additions & 78 deletions .github/final-architecture-signoff.md

This file was deleted.

108 changes: 0 additions & 108 deletions .github/httpx-removal-implementation-plan.md

This file was deleted.

Loading