Commit d7c63a5
committed
feat(mcp): scan-stage tool — Go port of the stage-scan validator
The corezoid-stage-scan skill shipped a 270-line Python validator as a
user-machine runtime dependency outside the Go-only CI. It is now the
scan-stage MCP tool inside convctl (single-runtime plugin): same five
defect classes ([1] inactive, [1b] empty shells, [2a] broken node
links, [2b] broken/inactive conv refs, [2c] api_get_task node missing
in the target), same folder-location annotations, quiet and json
modes; a parity run on a fixture covering every class produced
identical findings to the Python original. Non-object JSON files are
skipped silently, exactly like Python's isinstance guard.
Deliberate divergences, all safety-positive: zip extraction refuses
zip-slip entries and re-roots absolute names (Python's extractall had
no guard); the export path is confined to the working directory like
every other file tool here; files with duplicate or missing obj_id
are each scanned and listed (the Python dict silently dropped
duplicates and crashed on several missing-obj_id shapes). The CLI
exit code reflects tool errors only — the skill's CI recipe gates on
the 'No blockers found.' verdict line instead.
The skill drives the tool; the Python script is deleted and the
checks run as ordinary go tests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent adc026f commit d7c63a5
8 files changed
Lines changed: 895 additions & 283 deletions
File tree
- plugins/corezoid
- mcp-server
- skills/corezoid-stage-scan
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| |||
0 commit comments