Files
oci-deal-accelerator/tools/diagram_spec_validator.py
root 68d1753a74 Spec validator: padding on all 4 edges + connector-over-label check
Closes the gap between what the validator catches and what Diego
flagged on the MySQL HeatWave HA example (2026-04-25 round 4):

- CONTAINER_PADDING_VIOLATION now checks all four edges (top / bottom /
  left / right). Previously only bottom — DB Subnet's left/right edges
  touching the AD borders went unflagged.

- CONNECTOR_OVER_LABEL now runs at SPEC level (was post-render drawio
  only). Catches "Network Load Balancer label sits below the arrows so
  the arrows cross it" before either renderer emits anything; covers
  the PPTX path too.

  Implemented via Liang-Barsky line-rect clipping on every connector
  segment vs every free-floating label bbox.

Renderer policies persist for every new diagram (bent connectors,
icon-group preference, mysql aliases). Spec-level rules are now
enforced earlier and on both render paths, so a spec authored against
the procedure will pass before any artifact is produced.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 22:11:02 -03:00

16 KiB