Skip to content

feat(cli): prophet spine validate gate command#52

Merged
mdheller merged 1 commit into
mainfrom
feat/spine-gate-cmd
Jun 11, 2026
Merged

feat(cli): prophet spine validate gate command#52
mdheller merged 1 commit into
mainfrom
feat/spine-gate-cmd

Conversation

@mdheller

Copy link
Copy Markdown
Member

Summary

  • Adds 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 status
  • Adds prophet spine gate <repo> — runs a single repo's gate in isolation
  • Adds prophet spine list — lists all registered gates and their steps
  • Registers newSpineCmd() in root.go
  • Extends Makefile validate target to smoke-test spine list and spine gate --help at build time

The implementation follows the existing delegateOrFallback / runDelegate patterns in fabric_fallback.go. Each gate resolves the repo directory via localRepoRoot() (respects PROPHET_DEV_ROOT env var), runs make validate (and make test where applicable), and captures stdout/stderr + elapsed ms per step.

Gate configuration

Repo Steps
prophet-mesh make validate, make test
agent-registry make validate, make test
model-router make validate, make test
agentplane make validate, make test
memory-mesh make validate-prophet-mesh-scope-mirror

Test plan

  • go build succeeds (confirmed locally — go vet clean)
  • bin/prophet spine list emits JSON gate list
  • bin/prophet spine gate prophet-mesh runs make validate + make test in ~/dev/prophet-mesh
  • bin/prophet spine validate runs all five gates in sequence
  • bin/prophet spine validate --repo agent-registry runs single-gate shorthand
  • make validate passes build-time smoke checks

Note: internal/cmd test 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

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.
@mdheller mdheller merged commit c4fe333 into main Jun 11, 2026
11 checks passed
@mdheller mdheller deleted the feat/spine-gate-cmd branch June 11, 2026 20:28

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread internal/cmd/spine.go
Comment on lines +120 to +124
return emit(map[string]any{
"command": "prophet spine validate",
"status": status,
"gates": results,
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread internal/cmd/spine.go
if g.Repo == repo {
result := runGate(g)
result["command"] = "prophet spine gate " + repo
return emit(result)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant