refactor: MokoGitea -> MokoGit migration + workflow-sync repairs (#350 #351 #352 #354 #11 #4) #356

Merged
jmiller merged 15 commits from fix/mokogit-migration into dev 2026-07-16 22:08:39 +00:00
Owner

Summary

MokoGitea → MokoGit migration + workflow-sync repairs. Resolves #350, #351, #352, #354, and #11 (manifest retirement) and the org-wide giteamokogit rename (#4). #353 landed separately in Template-Generic.

Changes (11 commits)

  • #350 — fix silent sync failure (.mokogitea/.mokogit/ path), add --phase health (drift detection + ntfy/issue/exit-code alerts) + --repo-filter; fix stale PLATFORM_TEMPLATES (MCP→Template-NPM, drop dead Template-Dolibarr, add dot→Template-Dot + name detection); harden missing-template fallback (skip+warn, no destructive Generic strip).
  • #352 — repoint stale .mokogitea/workflows scaffolding (repo_wizard, release, bulk_workflow_push, UnifiedValidation) — the root cause of .mokogit/.mokogit nesting.
  • #351/#354 — emit Joomla schema markers on auto-bump (comment-only, admin-relative, idempotent; unit-tested).
  • #11 — retire .mokogitea/manifest.xml: remove 4 creation/push tools + create_repo step, add PlatformDetector (file-based, vocab-mapped so stamping still fires), repoint version/release/deploy readers to README.md + metadata API.
  • #4giteamokogit across 265 files + path/class/config renames (MokoGiteaAdapterMokoGitAdapter, .mokogitea/.mokogit/, GITEA_*MOKOGIT_*).

Verification

  • All changed PHP lints clean (1 pre-existing, unrelated stub failure).
  • Adapter smoke test: MokoGitAdapter resolves, platform=mokogit, workflow dir=.mokogit/workflows.
  • Schema-marker + PlatformDetector vocab mapping unit-tested.
  • Live: 41 repos de-nested (0 remaining), 3 repos restored (main+dev), 16 leaked triggers removed.

⚠️ Requires coordinated ops changes before/at merge

  • Rename CI secrets/vars: GITEA_TOKENMOKOGIT_TOKEN, GITEA_URLMOKOGIT_URL, GITEA_ORGMOKOGIT_ORG.
  • Publish @mokoconsulting/mcp-mokogit (the .mcp.json server was flipped).

https://claude.ai/code/session_014Fjb4NvgviMoNU6NrGa4VE

## Summary MokoGitea → MokoGit migration + workflow-sync repairs. Resolves #350, #351, #352, #354, and #11 (manifest retirement) and the org-wide `gitea`→`mokogit` rename (#4). #353 landed separately in Template-Generic. ## Changes (11 commits) - **#350** — fix silent sync failure (`.mokogitea/`→`.mokogit/` path), add `--phase health` (drift detection + ntfy/issue/exit-code alerts) + `--repo-filter`; fix stale `PLATFORM_TEMPLATES` (MCP→Template-NPM, drop dead Template-Dolibarr, add `dot`→Template-Dot + name detection); harden missing-template fallback (skip+warn, no destructive Generic strip). - **#352** — repoint stale `.mokogitea/workflows` scaffolding (repo_wizard, release, bulk_workflow_push, UnifiedValidation) — the root cause of `.mokogit/.mokogit` nesting. - **#351/#354** — emit Joomla schema markers on auto-bump (comment-only, admin-relative, idempotent; unit-tested). - **#11** — retire `.mokogitea/manifest.xml`: remove 4 creation/push tools + create_repo step, add `PlatformDetector` (file-based, vocab-mapped so stamping still fires), repoint version/release/deploy readers to README.md + metadata API. - **#4** — `gitea`→`mokogit` across 265 files + path/class/config renames (`MokoGiteaAdapter`→`MokoGitAdapter`, `.mokogitea/`→`.mokogit/`, `GITEA_*`→`MOKOGIT_*`). ## Verification - All changed PHP lints clean (1 pre-existing, unrelated stub failure). - Adapter smoke test: `MokoGitAdapter` resolves, `platform=mokogit`, `workflow dir=.mokogit/workflows`. - Schema-marker + PlatformDetector vocab mapping unit-tested. - Live: 41 repos de-nested (0 remaining), 3 repos restored (main+dev), 16 leaked triggers removed. ## ⚠️ Requires coordinated ops changes before/at merge - Rename CI secrets/vars: `GITEA_TOKEN`→`MOKOGIT_TOKEN`, `GITEA_URL`→`MOKOGIT_URL`, `GITEA_ORG`→`MOKOGIT_ORG`. - Publish `@mokoconsulting/mcp-mokogit` (the `.mcp.json` server was flipped). https://claude.ai/code/session_014Fjb4NvgviMoNU6NrGa4VE
jmiller added 13 commits 2026-07-16 21:54:29 +00:00
- Delete cli/updates_xml_build.php, cli/updates_xml_sync.php and
  lib/plugins/Joomla/UpdateXmlGenerator.php (MokoGitea now generates
  updates dynamically)
- Add cli/workflow_sync.php and custom self-update-runner workflow
- Trim overgrown .gitignore and drop .mokogitea/branch-protection.yml
- Simplify release/validate CLI scripts and MCP server workflows
- Refresh Joomla templates and PHPStan baseline
- WORKFLOW_DIR .mokogitea/workflows -> .mokogit/workflows (root cause of silent sync failure)
- add --phase health (drift detection + ntfy/issue/exit-code alerts) and --repo-filter
- PLATFORM_TEMPLATES: mcp -> Template-NPM (renamed), drop dead Template-Dolibarr, add dot -> Template-Dot
- name-based dot-repo detection; PLATFORM_EXCLUDES[dot] curates out build/versioning/release/deploy
- harden missing-template path: skip+warn instead of destructive Generic fallback
- register workflow:sync in bin/moko
- fix pre-existing undefined $label in Phase 2 exclude branch
Half-migrated scaffolding wrote/looked-up the OLD .mokogitea/workflows path while
workflow_sync wrote the migrated .mokogit/workflows; a later dir rename collided into
the existing .mokogit and produced .mokogit/.mokogit nesting. Repoints repo_wizard,
release, bulk_workflow_push, and UnifiedValidation to the canonical path.
After stamping the manifest <version>, write a comment-only no-op marker named exactly
<version>.sql at the admin-relative <schemas><schemapath> when one is declared and absent.
Keeps #__schemas in lockstep with the manifest so com_installer stops reporting the
component a schema version behind. Idempotent; reads the stamped version back from each
manifest so the marker never exceeds it.
.mokogitea/manifest.xml is retired; repo metadata now comes from the MokoGit metadata API.
Remove the tools whose sole job was creating/pushing it:
- automation/{enrich_manifest_xml,enrich_mokostandards_xml,push_manifest_xml,push_mokostandards_xml}.php
- create_repo.php manifest-creation step (Step 3)
- bin/moko bulk:{push-manifest,push-mokostandards,enrich-manifest,enrich-mokostandards} entries
Remove the manifest read + backfill from version_read; README.md is now the canonical
version source (Joomla XML / package.json / pyproject.toml remain fallbacks). version_prefix
defaults to empty (comes from the metadata API when needed, not a committed manifest).
Remove the .mokogitea/manifest.xml read/write branches; README.md + platform files are
the version sources/targets. Manifest is retired (never created), so these guarded reads
were dead paths.
New file-based PlatformDetector::detect() (canonical names) + toStampPlatform() mapping
(joomla->waas-component, dolibarr->crm-module) replaces the retired manifest <platform>
read. Unit-verified: joomla/dolibarr/go fixtures map correctly so version stamping still
fires on the right branch.
release_package, release_create, release_validate, version_reset_dev now detect platform
from repo files via PlatformDetector instead of reading the retired .mokogitea/manifest.xml.
version_reset_dev returns stamp vocab to preserve caller behavior.
- version_auto_bump: drop manifest watch-path read (always-bump fallback)
- push_files + repo_cleanup: read platform/standards_version from the metadata API
- deploy_joomla: drop manifest <deploy><source-dir>, use the source-dir resolution chain
manifest_element detects platform from files instead of the retired manifest. Remove the
unused ManifestReader class. manifest_licensing self-skips when the manifest is absent
(correct retirement behavior); manifest_read already uses the API + file auto-detection.
refactor(rename): Gitea/MokoGitea -> MokoGit across the codebase [#4]
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 12s
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Validate PR (pull_request) Failing after 7s
Universal: PR Check / Secret Scan (pull_request) Successful in 10s
Platform: mokocli CI / Gate 1: Code Quality (pull_request) Failing after 1m3s
Platform: mokocli CI / Gate 2: Unit Tests (8.1) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.2) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.3) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 3: Self-Health Check (pull_request) Has been cancelled
Platform: mokocli CI / Gate 4: Governance (pull_request) Has been cancelled
Platform: mokocli CI / Gate 5: Template Integrity (pull_request) Has been cancelled
Platform: mokocli CI / CI Summary (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
7728b6b4ac
MokoGitea instance rebrand to MokoGit. Content sweep over 265 files (ordered to avoid
moko-prefix doubling) plus path renames:
- .mokogitea/ -> .mokogit/ (repo + all mcp/servers/*)
- templates/mokogitea/ -> templates/mokogit/
- lib/Enterprise/MokoGiteaAdapter.php -> MokoGitAdapter.php (class MokoGitAdapter)
- mcp/servers/mokogitea_{skill,api} -> mokogit_{skill,api}; skills/mokogitea -> skills/mokogit
- automation/migrate_to_gitea.php -> migrate_to_mokogit.php
- env/secret names GITEA_* -> MOKOGIT_*

Note: ~/.claude/.mcp.json server flipped to @mokoconsulting/mcp-mokogit (publish pending).
jmiller added 1 commit 2026-07-16 22:00:48 +00:00
fix(rename): collapse duplicate MOKOGIT_TOKEN env reads (rename artifact)
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 15s
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Universal: PR Check / Secret Scan (pull_request) Successful in 8s
Universal: PR Check / Validate PR (pull_request) Failing after 6s
Platform: mokocli CI / Gate 1: Code Quality (pull_request) Failing after 52s
Platform: mokocli CI / Gate 2: Unit Tests (8.1) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.2) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.3) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 3: Self-Health Check (pull_request) Has been cancelled
Platform: mokocli CI / Gate 4: Governance (pull_request) Has been cancelled
Platform: mokocli CI / Gate 5: Template Integrity (pull_request) Has been cancelled
Platform: mokocli CI / CI Summary (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
1dcf77c693
The gitea->mokogit sed merged two distinct token env vars (GITEA_TOKEN + MOKOGITEA_TOKEN)
into duplicate getenv('MOKOGIT_TOKEN') reads in version_reset_dev, release_cascade, and
release_create. Collapse to a single read. Found in PR #356 code review.
jmiller added 1 commit 2026-07-16 22:08:03 +00:00
Merge remote-tracking branch 'origin/dev' into fix/mokogit-migration
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Failing after 8s
Generic: Project CI / Lint & Validate (pull_request) Failing after 23s
Generic: Project CI / Tests (pull_request) Failing after 17s
Universal: PR Check / Require Docs Update (pull_request) Has been skipped
Universal: PR Check / Wiki Update Reminder (pull_request) Has been skipped
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Validate PR (pull_request) Failing after 6s
Universal: PR Check / Secret Scan (pull_request) Successful in 7s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
Platform: mokocli CI / Gate 1: Code Quality (pull_request) Failing after 48s
Platform: mokocli CI / Gate 2: Unit Tests (8.1) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.2) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.3) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 3: Self-Health Check (pull_request) Has been cancelled
Platform: mokocli CI / Gate 4: Governance (pull_request) Has been cancelled
Platform: mokocli CI / Gate 5: Template Integrity (pull_request) Has been cancelled
Platform: mokocli CI / CI Summary (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
dae6aa4df4
# Conflicts:
#	.mokogit/CLAUDE.md
#	.mokogit/branch-protection.yml
#	.mokogit/bulk-repo-sync.yml
#	.mokogit/renovate.yml
#	.mokogit/sync-wikis.yml
#	.mokogit/workflows/auto-bump.yml
#	.mokogit/workflows/auto-release.yml
#	.mokogit/workflows/branch-cleanup.yml
#	.mokogit/workflows/cascade-dev.yml
#	.mokogit/workflows/ci-generic.yml
#	.mokogit/workflows/cleanup.yml
#	.mokogit/workflows/custom/ci-platform.yml
#	.mokogit/workflows/custom/sync-feature-versions.yml
#	.mokogit/workflows/deploy-manual.yml
#	.mokogit/workflows/gitleaks.yml
#	.mokogit/workflows/issue-branch.yml
#	.mokogit/workflows/notify.yml
#	.mokogit/workflows/pr-check.yml
#	.mokogit/workflows/pre-release.yml
#	.mokogit/workflows/rc-revert.yml
#	.mokogit/workflows/repo-health.yml
#	.mokogit/workflows/security-audit.yml
#	.mokogit/workflows/workflow-sync-trigger.yml
jmiller merged commit 9279799a3a into dev 2026-07-16 22:08:39 +00:00
jmiller deleted branch fix/mokogit-migration 2026-07-16 22:08:40 +00:00
Sign in to join this conversation.
No Reviewers
No labels
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoCLI#356