chore(deploy): rebuild + redeploy for moko-platform→mokocli manifest-schema rename (runner/mount preservation) #752
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracking issue for the forge-rebrand gate of the org-wide
moko-platform/mokoplatform→mokoclinormalization. The docs/wiki/workflow-path layers are already done org-wide; this issue covers the parts that require building a new MokoGitea image and redeploying (to be done in a dedicated deploy session).1. Manifest schema + Go parser rebuild
The forge parses the repo manifest with a pinned element name:
services/repository/manifest_sync.go:17→XMLName xml.Name \xml:"mokoplatform"``models/repo/repo_manifest.go→ comments ("mokoplatform metadata", "mokoplatform CLI") +standards_versionfield comment.Repos ship
.mokogitea/manifest.xml/.mokogitea/.moko-platformwith root<moko-platform xmlns="https://standards.mokoconsulting.tech/moko-platform/1.0">(and<mokoplatform>in the marker file). Renaming the element is a breaking schema change — parser and all manifests must flip together.Recommended approach (backward-compatible): make the parser accept both
mokoplatformandmokocliroot elements (customUnmarshalXMLor a tolerant wrapper) rather than a hard swap, so existing manifests keep parsing during the migration and there's no hard cutover window. Decide whether to also emitmokoclion write or keep emitting the legacy name.Tasks
manifest_sync.goparser to acceptmokocli(ideally + legacymokoplatform).repo_manifest.gocomments/labels; migrations/locale strings referencing "mokoplatform"/"MokoPlatform".mokogiteaimage from this commit (CI →git.mokoconsulting.tech/mokoconsulting/mokogitea:<tag>)./opt/mokogitea/docker-compose.ymlanddocker compose up -d(recreate gitea only)..mokogitea/manifest.xml+.moko-platform(<moko-platform>/<mokoplatform>+ xmlns → mokocli) — atomic with / after the parser is live.2. Workflow clone-URL cutover (deferred, needs verification)
Shared/platform workflows clone the CLI from
.gitURLs that were intentionally left asmoko-platform.gitduring the docs pass because the external-mirror naming is unverified:github.com/MokoConsulting/moko-platform.git(mirror backup) — confirm whether the GitHub mirror was renamed tomokocli.${MOKO_CLONE_HOST}/moko-platform.git— confirm the host/repo it resolves to.Tasks
MOKO_CLONE_HOSTrepo naming.moko-platform.git→mokocli.gitin the shared workflows at Template-Generic (auto-syncs). (Note:/opt/moko-platform→/opt/mokocliandINGROUP/REPOheader tags are already normalized at the Template-Generic source;/opt/moko-platformremains a symlink to/opt/mokocliso old copies keep working.)3. Runner + mount preservation (during the redeploy)
Recreating the gitea container must not disturb the CI runners or their live mounts. Checklist for the deploy:
act_runnercontainers (moko-act-runner,-02,-03,-release→ gitea runnersmoko-beelink-01/02/03/release) stay registered and return healthy after recreate./opt/mokogitea-private/docker/act-runner/data-*are not deleted/re-created.docker_host: "-"preserved in act_runner config (non-negotiable).kernel.apparmor_restrict_unprivileged_userns=0preserved.network_mode: host(rootless image) unchanged.4. Backup + rollback (before touching the running forge)
/var/lib/mysql-keyring/) + gitea data +app.ini.stable-122-gafe46361c7) for instant rollback (docker composewith the prior tag).rm -rf /var/lib/gitea/.Context
Part of the 2026-07 brand normalization (Gitea→MokoGitea, moko-platform→mokocli, MokoWaaS→MokoSuite, MokoStandards→org wiki). Everything except this gate and the live
client-waas-*→client-mokosuite-*repo renames is already landed./opt/moko-platform&/opt/mokoplatformare symlinks to/opt/mokocli;.mokogitea/.mokogitea-privateare the canonical org wikis.Branch created:
feature/752-chore-deploy-rebuild-redeploy-for-moko-pBug found: bare
/<owner>/<repo>/updates.xmlserves an INCORRECT generated feedWhile wiring the renamed ClarksvilleFurs client to auto-update, found that the bare repo-root update feed and the repo file disagree:
…/ClarksvilleFurs/client-mokosuite-clarksvillefurs/raw/branch/main/updates.xml→ correct:<element>file_mokoonyx_clarksvillefurs</element>,<type>file</type>(matches the repo file on every branch).…/ClarksvilleFurs/client-mokosuite-clarksvillefurs/updates.xml(bare path — this is what JoomlatemplateDetails.xml<updateservers>uses) → HTTP 200 but a generated feed emitting<name>Template - client-clarksvillefurs</name>,<element>tpl_clarksvillefurs</element>,<type>template</type>.So the fork appears to generate a dynamic feed at the bare
/updates.xmlroute, and for this repo it derives the wrong element/type (atpl_template rather than the actualfileextensionfile_mokoonyx_clarksvillefurs). Joomla matches updates by (type, element), so the installedfile/file_mokoonyx_clarksvillefursextension never matches the generatedtemplate/tpl_clarksvillefursfeed → no client site auto-updates, silently.Impact: likely affects all client sites whose
templateDetails.xmlpoints at the bare/updates.xmlform (the standard client packaging). Worth auditing the fork's update-feed generation route (how it deriveselement/type/name— probably mis-mapping the.mokogitea/manifest.xmlplatform=client/ package-type to a template).Interim client-side fix applied to ClarksvilleFurs live DB: repointed the update site to the
/raw/branch/main/updates.xmlfeed and corrected the installed extension element tofile_mokoonyx_clarksvillefurs. The durable fix is here (correct the generated feed) so the bare-path form works as intended.Correction to the above — not a fork code bug. The bare
/updates.xmlfeed is generated correctly from the repo's first-class manifest metadata. Clarksville's metadata was simply stale:element_name=tpl_clarksvillefurs,extension_type=template(leftover from an earlier template-style setup). Corrected viaPUT /repos/ClarksvilleFurs/client-mokosuite-clarksvillefurs/manifest→element_name=file_mokoonyx_clarksvillefurs,extension_type=file— and the bare feed immediately regenerated correctly (<type>file</type>,<element>file_mokoonyx_clarksvillefurs</element>, v01.12.00). Reverted the client update-site back to the canonical bare URL (dropped the/rawinterim); installed extension element already corrected; site will auto-update 01.11.00 → 01.12.00.Systemic follow-up: other client/extension repos may carry the same stale
element_name/extension_typemetadata (silent no-update). Recommend auditing each repo's manifest metadata against its actual Joomla extension<type>/<element>. (.mokogitea/manifest.xmlis deprecated — the first-class fields are authoritative.) MCP tooling gap to set these fields directly tracked in mcp-mokogitea-api#33.Part 2 (workflow clone-URL cutover) — verified DONE ✅
Checked both prerequisites this session:
GitHub mirror naming:
mokoconsulting-tech/MokoCLIexists (not archived); the oldmoko-platform/mokoplatformnames resolve to it via GitHub's rename redirect. So the mirror rename →MokoCLIis complete.Workflow clone URLs: grep of the fork's synced
.mokogitea/workflows/finds zeromoko-platform.gitreferences — every CLI clone already usesMokoCLI.git:auto-bump.yml→git.mokoconsulting.tech/MokoConsulting/MokoCLI.gitauto-release.yml/pre-release.yml→${MOKO_CLONE_HOST}/MokoCLI.git(MOKO_CLONE_HOST=git.mokoconsulting.tech/MokoConsulting, a workflow-level env, not an org var)ci-issue-reporter.yml,workflow-sync-trigger.yml→.../MokoConsulting/MokoCLI.gitThis matches the earlier Template-Generic
MokoCLI.gitfix (which syncs these workflows). No cutover work remains for Part 2. Any residualgithub.com/.../moko-platform.gitin an external backup workflow still resolves via the redirect, but the canonical name is nowMokoCLI.Status of #752 gate
/manifestalias removal,mokoplatform→mokocli) — ✅ merged todev(PR #754)stable-122-gafe46361c7) — ⏸️ remains; to be run in the deliberatedev → rc → mainrelease (the code now rides with #733)Related MCP work: tool rename
gitea_*→mokogitea_*+ metadata brand fix in mcp-mokogitea-api#33 (in progress).✅ Complete — closing
All parts of the forge-rebrand gate are done and live in production (verified 2026-07-06).
Part 1 — manifest schema + rebuild/redeploy: Rather than teach the XML parser the
mokocliname, the deprecated.mokogitea/manifest.xmlparser was removed (PR #754) along with the/manifestAPI alias;mokoplatform→mokocli. Shipped to prod via the #733 release — prod is nowstable-289-gbc3bb0f778(migration 368). Verified live:/metadata→ 200,/manifest→ 404.Part 2 — workflow clone-URL cutover: Verified already done — workflows use
MokoCLI.git, GitHub mirror isMokoCLI(see earlier comment).Part 3 — runner + mount preservation: The prod redeploy preserved all 4
act_runnercontainers and their live mounts; runners healthy throughout.Part 4 — backup + rollback: Fresh backup taken pre-release (
/opt/gitea-dev/db-backups/pre-733-20260706-035650/— DB + MySQL keyring + app.ini + rollback tagstable-122-gafe46361c7).Deploy-workflow hardening (bonus): the auto-deploy (
deploy-mokogitea.yml) failed on a container-name conflict + would have clobbered dev/rc compose tags via a blanketsed; completed manually and fixed the workflow (PR #758) + restored the compose.Tracked separately: platform auto-detects
nodejsnotgo(#753); client-repo metadata audit (comment above); MCPgitea_*→mokogitea_*rename (mcp-mokogitea-api #34, merged).https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT