#!/usr/bin/env python3 # Copyright (c) 2025 GenOrca. All Rights Reserved. """ Validates that the dispatcher action catalog is in sync with the plugin's ue_* function signatures. The catalog (dispatchers/_catalog.py) is auto-generated by generate_catalog.py. This script re-runs the generator in --check mode: if the committed catalog differs from what the current signatures would produce, it fails. This catches the bug class where catalog param names drift from the real ue_* signatures (the dispatcher passes params straight through as ue_func(**params), so a name mismatch = runtime failure). Usage: python validate_tools.py """ import subprocess import sys from pathlib import Path GENERATOR = Path(__file__).parent / "generate_catalog.py" def main(): result = subprocess.run( [sys.executable, str(GENERATOR), "--check"], capture_output=True, text=True, ) sys.stdout.write(result.stdout) sys.stderr.write(result.stderr) sys.exit(result.returncode) if __name__ == "__main__": main()