Skip to content

feat(scm): prophet scm — GitHub↔Gitea drift validation + dual-write (Go) - #63

Merged
mdheller merged 1 commit into
mainfrom
feat/scm-go
Aug 5, 2026
Merged

feat(scm): prophet scm — GitHub↔Gitea drift validation + dual-write (Go)#63
mdheller merged 1 commit into
mainfrom
feat/scm-go

Conversation

@mdheller

@mdheller mdheller commented Aug 5, 2026

Copy link
Copy Markdown
Member

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 Gitea main 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.go. Config via env GITEA_URL/GITEA_TOKEN/ORG (CI-minted, never hardcoded). Changes no remotes.

Verified

go build ./... + go vet clean; 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 drift is how you validate parity before flipping PROPHET_SCM=gitea.

Note: the CodeQL Analyze (go)/Analyze (actions) checks fail pre-existing on this repo (misconfigured — unrelated to this change); main is unprotected.

🤖 Generated with Claude Code

… (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.
@mdheller
mdheller merged commit 47a4183 into main Aug 5, 2026
12 checks passed
@mdheller
mdheller deleted the feat/scm-go branch August 5, 2026 00:19
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