Skip to content

Commit e4bc386

Browse files
committed
Update to v1.1.0
1 parent 9ce60a2 commit e4bc386

15 files changed

Lines changed: 220 additions & 523 deletions

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,38 @@ Initial release. RAG-powered OSPF knowledge base assistant for multi-vendor netw
145145
- **UT-009** (MCP Server) — updated to assert 8 tools; `"traceroute"` added to expected names set.
146146
- **UT-001** (Input Models) — `TestTracerouteInput` class added (5 tests: minimal, full, VRF injection, JSON parsing, missing destination).
147147
- **UT-015** (Security Controls) — `TracerouteInput` VRF injection tests added (18 injection patterns blocked, 6 valid VRF names accepted).
148+
149+
---
150+
151+
## v1.1.0 — 2026-03-29
152+
153+
### Ansible QA Framework
154+
155+
- **Network QA playbooks** — new Ansible-based health check framework in `ansible/`. Entry point `playbooks/network_qa.yml` discovers test cases from `ansible/test_cases/*.yml`, runs each via `_run_check.yml`, and writes results to `ansible/results/results_<timestamp>.json`.
156+
- **NETCONF transport** — test checks query device state over NETCONF using the `ietf-routing` YANG model (`urn:ietf:params:xml:ns:yang:ietf-routing`) for VRF routing table reads. Credentials sourced from HashiCorp Vault via `community.hashi_vault` Ansible collection.
157+
- **Read-only test design** — replaced 3 fault-injection test cases (config push, convergence wait, teardown) with a single read-only routing table assertion. No configuration is pushed to devices.
158+
- **`route_exists` filter** (`ansible/filter_plugins/ospf_filters.py`) — Jinja2 filter that parses NETCONF XML and checks for a destination prefix in the routing table.
159+
- **Test case format** — declarative YAML defining device, VRF, assertion, and RFC reference. Example: `route_to_a2a.yml` verifies E1C has a route to A2A's loopback (192.168.42.1) in VRF1.
160+
- **ncclient device handler fix** — added `vars:` binding for `ansible_netconf_ncclient_device_handler` in the netcommon NETCONF plugin so inventory variables are read correctly (forces `iosxe` handler instead of `default`).
161+
162+
### `/qa` Skill
163+
164+
- **Generic investigation skill** (`.claude/skills/qa/SKILL.md`) — rewritten to be device- and test-agnostic. Loads latest results JSON, triages pass/fail, presents numbered failure list, user picks a failure to investigate, agent runs full diagnostic workflow (intent → live state → skill decision trees → KB search), reports findings, then re-presents remaining failures for the next pick.
165+
- **Shared root cause detection** — after investigating a failure, if its root cause likely explains other failures on the list, the agent says so — user can skip those.
166+
167+
### Documentation
168+
169+
- **`WORKFLOW.md`** — complete rewrite covering both operational modes: interactive troubleshooting (user asks questions) and automated QA (Ansible health checks + `/qa` skill). Includes tool table, SSH pipeline diagram, RAG pipeline explanation, step-by-step walkthroughs for both modes, concrete examples, and ASCII architecture diagram.
170+
- **`README.md`** — added QA & Ansible section with prerequisites, running instructions, and `/qa` skill usage. Updated project structure to reflect `ansible/` directory layout.
171+
172+
### Test Cleanup
173+
174+
- **269 → 169 tests** (37% reduction) — removed tests that verify Pydantic builtins, duplicate error paths, or Python language features rather than project logic.
175+
- Gutted `test_input_models.py` to 2 tests (JSON string parsing only — the custom `@model_validator`).
176+
- Trimmed `test_security.py` to OspfQuery variants only (same VRF regex shared across all models).
177+
- Removed trivial tests from `test_status.py` (Path.exists, enum string checks), `test_tools.py` (2-line dict builder, duplicate unknown_device), `test_transport.py` (duplicate SSH error), `test_list_devices.py` (duplicate filter), `test_ingest.py` (duplicate RFC), `test_mcp_server.py` (count implied by name check), `test_inventory.py` (fixture-testing, not production code).
178+
179+
### Housekeeping
180+
181+
- **`.gitignore`** — added `ansible/collections/ansible_collections/` and `ansible/results/` to prevent installed collections and ephemeral result files from being committed.
182+
- Old fault-injection test cases moved to `core/legacy/`.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ✨ YANA • Yet Another Network Agent
22

3-
[![Version](https://img.shields.io/badge/version-1.0-1a1a2e)](https://github.com/pdudotdev/YANA/releases/tag/1.0.0)
3+
[![Version](https://img.shields.io/badge/version-1.1-1a1a2e)](https://github.com/pdudotdev/YANA/releases/tag/v1.1.0)
44
![License](https://img.shields.io/badge/license-GPLv3-1a1a2e)
55
[![Last Commit](https://img.shields.io/github/last-commit/pdudotdev/YANA?color=1a1a2e)](https://github.com/pdudotdev/YANA/commits/main/)
66

@@ -210,14 +210,14 @@ YANA/
210210
├── skills/
211211
│ ├── ospf/ # OSPF skill file for specific troubleshooting
212212
│ └── routing/ # Routing skill file for path selection issues
213-
├── ansible/ # OSPF QA test framework (NETCONF + Ansible)
214-
│ ├── playbooks/ # ospf_qa.yml executor + scenario runner
215-
│ ├── test_cases/ # YAML test scenarios (baseline, auth, timers, etc.)
213+
├── ansible/ # Network QA health checks (NETCONF + Ansible)
214+
│ ├── playbooks/ # network_qa.yml entry point + _run_check.yml
215+
│ ├── test_cases/ # YAML test definitions (route checks, health checks)
216216
│ ├── results/ # JSON test results (used by /qa skill)
217217
│ ├── inventory/ # Lab device inventory (E1C, C1J)
218218
│ └── collections/ # Ansible collections (netcommon, community.general)
219219
├── testing/
220-
│ ├── automated/ # Unit + integration tests (165 test functions)
220+
│ ├── automated/ # Unit + integration tests (169 test functions)
221221
│ ├── live/ # Live lab tests (65 parametrized runs) + results report
222222
│ └── run_tests.sh # Test runner (--live for lab tests)
223223
├── ingest.py # RAG ingestion pipeline
@@ -231,7 +231,7 @@ YANA/
231231

232232
## 🧪 QA & Ansible
233233

234-
Automated OSPF QA tests run via Ansible playbooks that push NETCONF config changes, assert protocol behavior against RFC expectations, then tear down and verify recovery.
234+
Network QA health checks run via Ansible playbooks that query device state over NETCONF and assert expected conditions (route presence, protocol state) against design intent.
235235

236236
**Prerequisites:**
237237
- `ansible-core` and `ncclient` installed in the venv (both included in `requirements.txt`)
@@ -246,8 +246,8 @@ Automated OSPF QA tests run via Ansible playbooks that push NETCONF config chang
246246
**Running tests:**
247247
```bash
248248
cd ansible
249-
ansible-playbook playbooks/ospf_qa.yml # all scenarios
250-
ansible-playbook playbooks/ospf_qa.yml -e scenario_filter=auth_mismatch # single scenario
249+
ansible-playbook playbooks/network_qa.yml # all checks
250+
ansible-playbook playbooks/network_qa.yml -e scenario_filter=route_to_a2a # single check
251251
```
252252

253253
Results are written to `ansible/results/results_<timestamp>.json`.

ansible/playbooks/_run_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
# _run_scenario.yml — executes one test case file.
3-
# Called in a loop from ospf_qa.yml with test_case_path as the loop var.
2+
# _run_check.yml — executes one test case file.
3+
# Called in a loop from network_qa.yml with test_case_path as the loop var.
44

55
- name: "Load scenario: {{ test_case_path | basename }}"
66
ansible.builtin.include_vars:

0 commit comments

Comments
 (0)