Validate a bounded UI snapshot
Validate a complete snapshot for an intentionally tiny **local catalog**, not the entire A2UI standard catalog. Allowed exact properties are Text {id,component,text}, Column {id,component,children}, and Button {id,component,child,action} with action approve or reject. Require unique nonempty string IDs, root, valid property types, all references present, no cycles, and all declarations reachable from root. Reject unknown properties and excess nodes with ValueError. Return IDs in depth-first postorder. Progressive protocol updates may temporarily contain missing references; this exercise deliberately validates complete checkpoints.
Your task
- Complete the starter function using the contract above.
- Use the examples and visible tests to check normal inputs, boundaries, and rejected inputs.
- Run tests to record your result, then compare with the explained reference solution.
Examples
Inputroot Column -> x Text
Output['x', 'root']
Inputroot references root
OutputValueError
Implement the function, then run the tests.
Ctrl / ⌘ + Enter to test · Shift + Tab leaves editor