feat(scm): prophet scm — GitHub↔Gitea drift validation + dual-write (Go) - #63
Merged
Conversation
… (Go, the real CLI) Adds the SCM sovereignty surface to the ACTUAL Go prophet-cli (an earlier Python attempt, #61, was built on a stale local snapshot and was closed — it would have regressed the architecture). prophet scm drift compare GitHub vs Gitea HEAD — honest: emits verdict in_sync/drifted/ gitea_missing/unknown, and exits non-zero on drifted/unknown (Gitea unreadable = NOT clean, never treated as fine) prophet scm sync dual-write: push the current branch to GitHub AND Gitea so they never diverge prophet scm status drift summary Cobra command in internal/cmd/scm.go, registered in root. Env: GITEA_URL/GITEA_TOKEN/ORG (CI-minted, never hardcoded). Changes no remotes. go build + go vet clean; go test ok; verified: 'prophet scm drift' emits {github:110cfba, gitea:unauth, verdict:unknown} against the live repo. Pairs with the reconcile heal (sociosphere#626, merged) and #624 detect.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the SCM sovereignty surface to the real Go prophet-cli. (An earlier Python attempt, #61, was built on a stale local snapshot and would have regressed the architecture — closed.)
prophet scm drift— compare GitHub vs GiteamainHEAD. Honest: emitsverdict=in_sync/drifted/gitea_missing/unknown, and exits non-zero ondrifted/unknown(Gitea unreadable = not clean, never treated as fine).prophet scm sync— dual-write: push the current branch to GitHub and Gitea so they never diverge.prophet scm status— drift summary.Cobra command in
internal/cmd/scm.go, registered inroot.go. Config via envGITEA_URL/GITEA_TOKEN/ORG(CI-minted, never hardcoded). Changes no remotes.Verified
go build ./...+go vetclean;go test ./internal/cmd/ok (no regressions). Ran it:prophet scm drift→{github: 110cfba, gitea: "", gitea_status: unauth, verdict: unknown}against the live repo — exactly right (Gitea needs a token).Fits the cutover
Pairs with the reconcile heal (sociosphere#626, merged) and the detect (#624):
prophet scm driftis how you validate parity before flippingPROPHET_SCM=gitea.🤖 Generated with Claude Code