[roads] QA F-04: a dangling owner or group member drops only itself, not every plan

Deleting a person from directory.json without editing devices.json left a
dangling owner, a snapshot error, and so no plans for anybody. A well-formed
owner or member id that is not a person is now reported on its own codes
(devices.owner-unknown, directory.member-unknown) and removed: the device is
ownerless, the member leaves the group. Malformed ids, duplicates and bad JSON
still stop every plan. Two new structural fixtures keep devices.owner and
directory.member covered.
This commit is contained in:
2026-11-25 08:44:09 +01:00
parent b6cf29b9a0
commit acb98a6a1c
11 changed files with 141 additions and 32 deletions
+8 -2
View File
@@ -36,7 +36,10 @@ impl Store {
"missing",
)),
Some(b) => match Directory::parse(b) {
Ok(d) => store.directory = Some(d),
Ok((d, dangling)) => {
store.directory = Some(d);
store.problems.extend(dangling);
}
Err(p) => store.problems.extend(p),
},
}
@@ -48,7 +51,10 @@ impl Store {
"missing",
)),
Some(b) => match Devices::parse(b, store.directory.as_ref()) {
Ok(d) => store.devices = Some(d),
Ok((d, dangling)) => {
store.devices = Some(d);
store.problems.extend(dangling);
}
Err(p) => store.problems.extend(p),
},
}