Inspect App#116
Conversation
| from videoipath_automation_tool.apps.inspect.domain import * | ||
| from videoipath_automation_tool.apps.inspect.errors import * | ||
| from videoipath_automation_tool.apps.inspect.inspect_app import InspectApp as InspectApp | ||
| from videoipath_automation_tool.apps.inspect.model import * |
| @@ -1,4 +1,5 @@ | |||
| from videoipath_automation_tool.apps.inventory import * | |||
| from videoipath_automation_tool.apps.inspect import * | |||
| @property | ||
| def label(self) -> str | None: | ||
| return self._record().label | ||
|
|
There was a problem hiding this comment.
description should be included here as well
| return meta.isVirtual if meta is not None else None | ||
|
|
||
| @property | ||
| def icon_type(self) -> str | None: |
There was a problem hiding this comment.
Is there a way to expose the possible icon types via IntelliSense? That would improve the developer experience.
| from videoipath_automation_tool.apps.inspect.domain.edge import InspectEdge | ||
|
|
||
|
|
||
| class InspectPort(InspectFrozenModel): |
There was a problem hiding this comment.
The app layer currently exposes too little information about ports. We need access to the full port/vertex data from Inspect, including the vertex kind and direction (Generic bidirectional, IP bidirectional, IP input, IP output, Codec/Video input, Codec/Video output), as well as the corresponding properties shown in the UI.
sWe also need a way to retrieve the original factory label, even if a manual label override has been set.
| return self.snapshot.fetched_at(self.id) | ||
|
|
||
| @property | ||
| def ports(self) -> list[InspectPort]: |
There was a problem hiding this comment.
Adding filter helpers for ports/vertices could improve the developer experience. Examples could be filtering vertices by slot/module, type, or properties such as Active, use_as_endpoint or control_level = Full.
This PR adds
app.inspect, a new read/write interface to VideoIPath's Inspect surface (verified against 2025.4+). It is purely additive,app.topologyandapp.inventoryare unchanged.Inspect lets you:
add_devices_to_topology,sync_devices,get_sync_info)Key design choices
nGraphElements/edgesByDevice(ADR-0008)rebase()to retry (ADR-0009)The snapshot is an internal implementation detail. Users interact only through
app.inspect, not a snapshot object.What's included
Application code
src/videoipath_automation_tool/apps/inspect/InspectApp(read / write / actions mixins)InspectAPI+ typed Pydantic modelsInspectSnapshotwith lazy hydration and in-memory indexesInspectTransactionwith conflict detection (deepdiff)InspectDevice,InspectPort,InspectEdge,InspectServiceVideoIPathAppas a lazyapp.inspectproperty (also exposed as_inspect_apiinDEVmode)Tests
tests/inspect/): Offline, fixture-driven coverage for snapshot loading, queries, transactions, conflict handling, and API parsing (anonymized 2025.4.9 fixtures)tests/e2e/inspect/): Developer-run locally only against a real instance; each test builds and tears down its own mini-topologypoetry run test-unit,poetry run test-e2e,poetry run testtest-unit(e2e excluded by default via pytest marker)Documentation
docs/getting-started-guide/05_Inspect.mddocs/inspect-app/(concepts, models, endpoints, 10 ADRs, implementation plan)docs/future/domain-architecture.mdTooling / housekeeping
.env.templatereplaces.env.example(e2e connection vars documented there)AGENTS.mdand path-scoped Python agent rules (.claude/rules/,.cursor/rules/symlinks)