|
76 | 76 | "handoff/BOOTSTRAP.md", |
77 | 77 | "handoff/STATE.md", |
78 | 78 | "handoff/board/README.md", |
79 | | - "handoff/board/todo/example-task.json", |
80 | 79 | "handoff/board/doing/.gitkeep", |
81 | 80 | "handoff/board/done/.gitkeep", |
82 | 81 | "docs/CURSOR_PROMPTS.md", |
@@ -108,18 +107,25 @@ jobs: |
108 | 107 | print(f"\n{len(missing)} file(s) missing.", file=sys.stderr) |
109 | 108 | sys.exit(1) |
110 | 109 |
|
111 | | - - name: Validate example task JSON |
| 110 | + - name: Validate GNAP task schema (board new) |
112 | 111 | shell: python |
113 | 112 | run: | |
114 | | - import json, sys |
115 | | - with open("handoff/board/todo/example-task.json", encoding="utf-8") as f: |
116 | | - data = json.load(f) |
117 | | - required = ["id", "title", "status", "assigned_to", "created_at"] |
| 113 | + import json, subprocess, sys |
| 114 | + from pathlib import Path |
| 115 | +
|
| 116 | + subprocess.run( |
| 117 | + [sys.executable, "-m", "graphstack", "board", "new", "schema-check", "CI schema probe"], |
| 118 | + check=True, |
| 119 | + ) |
| 120 | + path = Path("handoff/board/todo/schema-check.json") |
| 121 | + data = json.loads(path.read_text(encoding="utf-8")) |
| 122 | + required = ["id", "title", "status", "created_at"] |
118 | 123 | missing = [k for k in required if k not in data] |
| 124 | + path.unlink(missing_ok=True) |
119 | 125 | if missing: |
120 | | - print(f"Missing keys: {missing}", file=sys.stderr) |
| 126 | + print(f"board new() missing keys: {missing}", file=sys.stderr) |
121 | 127 | sys.exit(1) |
122 | | - print("example-task.json schema OK") |
| 128 | + print("GNAP task schema OK") |
123 | 129 |
|
124 | 130 | - name: Run graphstack pytest suite |
125 | 131 | run: python -m pytest scripts/graphstack/tests -v |
|
0 commit comments