feat(cli): prophet spine validate gate command#52
Conversation
Adds `prophet spine validate`, `prophet spine gate <repo>`, and `prophet spine list` subcommands that wire the private-preview spine gate checks (prophet-mesh, agent-registry, model-router, agentplane, memory-mesh) directly into the CLI. Makefile validate target now exercises the spine list and gate-help paths as a build-time smoke check.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 29b4db33de
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return emit(map[string]any{ | ||
| "command": "prophet spine validate", | ||
| "status": status, | ||
| "gates": results, | ||
| }) |
There was a problem hiding this comment.
Return a non-zero error when validation fails
When any repo gate fails, allPassed is set to false and the JSON status becomes failed, but this path still returns only emit(...); if the output is written successfully, Cobra sees a nil error and prophet spine validate exits 0. In any CI or release script that uses this validation gate, failed make validate/make test checks would be treated as success, so the command needs to return an error after emitting a failed result.
Useful? React with 👍 / 👎.
| if g.Repo == repo { | ||
| result := runGate(g) | ||
| result["command"] = "prophet spine gate " + repo | ||
| return emit(result) |
There was a problem hiding this comment.
Fail the single-repo gate on failed steps
For a known repo, runGate can return status: "failed" when one of its make steps fails, but runSpineGate still returns nil here as long as the JSON output succeeds. That means prophet spine gate prophet-mesh exits 0 despite a failed gate, which defeats callers that rely on this command to block on a single repo's validation result.
Useful? React with 👍 / 👎.
Summary
prophet spine validate— runs all five private-preview spine gate checks sequentially (prophet-mesh, agent-registry, model-router, agentplane, memory-mesh) and reports a structured JSON result with per-step statusprophet spine gate <repo>— runs a single repo's gate in isolationprophet spine list— lists all registered gates and their stepsnewSpineCmd()inroot.goMakefilevalidatetarget to smoke-testspine listandspine gate --helpat build timeThe implementation follows the existing
delegateOrFallback/runDelegatepatterns infabric_fallback.go. Each gate resolves the repo directory vialocalRepoRoot()(respectsPROPHET_DEV_ROOTenv var), runsmake validate(andmake testwhere applicable), and captures stdout/stderr + elapsed ms per step.Gate configuration
prophet-meshmake validate,make testagent-registrymake validate,make testmodel-routermake validate,make testagentplanemake validate,make testmemory-meshmake validate-prophet-mesh-scope-mirrorTest plan
go buildsucceeds (confirmed locally —go vetclean)bin/prophet spine listemits JSON gate listbin/prophet spine gate prophet-meshrunsmake validate+make testin~/dev/prophet-meshbin/prophet spine validateruns all five gates in sequencebin/prophet spine validate --repo agent-registryruns single-gate shorthandmake validatepasses build-time smoke checksNote:
internal/cmdtest binary crash (missing LC_UUID) is pre-existing on main (dyld issue in this macOS environment), not introduced by this PR.🤖 Generated with Claude Code