feat: add patch panel runtime sync

This commit is contained in:
HWLAB Code Queue
2026-05-21 18:36:39 +00:00
parent eba24b72c0
commit b1f4e6e52d
14 changed files with 1583 additions and 45 deletions
@@ -0,0 +1,16 @@
# Patch Panel Runtime Fixture
`two-box-sync.json` is a local runtime smoke fixture for `hwlab-patch-panel`.
It starts two `hwlab-box-simu` services and applies one active wiring config to
the patch panel.
The smoke proves that patch-panel-owned propagation can synchronize:
```text
res_boxsimu_runtime_1:DO1 -> res_boxsimu_runtime_2:DI1
res_boxsimu_runtime_1:AO1 -> res_boxsimu_runtime_2:AI1
res_boxsimu_runtime_1:FREQ_OUT1 -> res_boxsimu_runtime_2:FREQ_IN1
```
The local smoke does not deploy DEV/PROD services, connect to real hardware, or
write audit rows.
@@ -0,0 +1,105 @@
{
"fixtureId": "fixture_patch_panel_runtime_two_box_sync",
"environment": "dev",
"description": "Local two-box patch-panel runtime smoke fixture.",
"boxes": [
{
"boxId": "boxsimu_runtime_1",
"resourceId": "res_boxsimu_runtime_1"
},
{
"boxId": "boxsimu_runtime_2",
"resourceId": "res_boxsimu_runtime_2"
}
],
"runtimeConfig": {
"wiringConfig": {
"wiringConfigId": "wir_patch_panel_runtime_two_box",
"projectId": "prj_patch_panel_runtime",
"gatewaySessionId": "gws_patch_panel_runtime",
"name": "Patch panel runtime two-box smoke wiring",
"status": "active",
"connections": [
{
"from": {
"resourceId": "res_boxsimu_runtime_1",
"port": "DO1"
},
"to": {
"resourceId": "res_boxsimu_runtime_2",
"port": "DI1"
},
"mode": "exclusive"
},
{
"from": {
"resourceId": "res_boxsimu_runtime_1",
"port": "AO1"
},
"to": {
"resourceId": "res_boxsimu_runtime_2",
"port": "AI1"
},
"mode": "exclusive"
},
{
"from": {
"resourceId": "res_boxsimu_runtime_1",
"port": "FREQ_OUT1"
},
"to": {
"resourceId": "res_boxsimu_runtime_2",
"port": "FREQ_IN1"
},
"mode": "exclusive"
}
],
"constraints": {
"propagation": "patch-panel-only",
"localLoopbackSubstituteAllowed": false
},
"createdAt": "2026-05-21T00:00:00.000Z",
"updatedAt": "2026-05-21T00:00:00.000Z"
},
"endpointMap": {
"res_boxsimu_runtime_1": "http://127.0.0.1:0",
"res_boxsimu_runtime_2": "http://127.0.0.1:0"
}
},
"signals": [
{
"fromResourceId": "res_boxsimu_runtime_1",
"fromPort": "DO1",
"value": true
},
{
"fromResourceId": "res_boxsimu_runtime_1",
"fromPort": "AO1",
"value": 1.25
},
{
"fromResourceId": "res_boxsimu_runtime_1",
"fromPort": "FREQ_OUT1",
"value": 1000
}
],
"expected": {
"targetResourceId": "res_boxsimu_runtime_2",
"ports": {
"DI1": true,
"AI1": 1.25,
"FREQ_IN1": 1000
}
},
"invalidWiringProbe": {
"from": {
"resourceId": "res_boxsimu_runtime_1",
"port": "DI1"
},
"to": {
"resourceId": "res_boxsimu_runtime_2",
"port": "DO1"
},
"mode": "exclusive"
}
}