feat(web): authorize corrective smooth reader

This commit is contained in:
mes123456
2026-09-02 18:35:58 +08:00
parent 244e058999
commit 0d61c64150
51 changed files with 127040 additions and 67 deletions

View File

@@ -0,0 +1,39 @@
#!/usr/bin/env python3
"""Validate the bounded context and queue contracts used by Blender Web."""
from __future__ import annotations
import argparse
import subprocess
from wbv2_runtime import ROOT, queue_pointer
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--quiet", action="store_true")
args = parser.parse_args()
commands = [
["node", "tools/web/print-task-context.mjs"],
["node", "tools/web/check-task-context.mjs"],
["node", "tools/web/check-context-governance.mjs"],
["node", "tools/web/check-execution-control-plane.mjs"],
]
failures = []
for command in commands:
result = subprocess.run(command, cwd=ROOT, text=True, capture_output=True, check=False)
if not args.quiet:
output = (result.stdout or result.stderr).strip()
if output:
print(output)
if result.returncode != 0:
failures.append(f"{' '.join(command)} exit={result.returncode}")
if failures:
print("WBV2 CONTEXT VALIDATION FAILED: " + "; ".join(failures))
return 1
print(f"WBV2 CONTEXT VALIDATION PASSED: task={queue_pointer().get('task') or 'NONE'}")
return 0
if __name__ == "__main__":
raise SystemExit(main())