chore(manifest): remove deprecated .mokogitea/manifest.xml parser; mokoplatform→mokocli #754

Merged
jmiller merged 2 commits from feature/752-chore-deploy-rebuild-redeploy-for-moko-p into dev 2026-07-06 02:38:22 +00:00
Owner

Part of #752 (forge-rebrand gate). .mokogitea/manifest.xml is deprecated — the first-class RepoMetadata DB fields are the authoritative repository metadata (see #752 comment). So rather than teach the XML parser the renamed mokocli root element, remove the dead XML auto-sync path and rebrand the remaining mokoplatform references.

Changes

  • 🗑️ Delete services/repository/manifest_sync.go (the manifestXML parser + SyncMetadataFromCommit)
  • Remove the SyncMetadataFromCommit call on default-branch push (push.go)
  • 🏷️ Rebrand mokoplatformmokocli in repo_manifest.go comments, v347.go comment, and the manifest_desc locale string
  • gofmt-normalized repo_manifest.go struct-tag alignment (pre-existing)

Safety verification (metadata ability + update server)

The XML sync was one of three write paths to the first-class fields; the other two remain, and every reader uses the DB — not the XML:

Write paths preserved (coordinating metadata ability):

  • API — routers/api/v1/repo/manifest.goCreateOrUpdateRepoMetadata (PUT /repos/{o}/{r}/manifest + /metadata)
  • Web UI — routers/web/repo/setting/metadata.goCreateOrUpdateRepoMetadata (Settings → Metadata)

Update server / feeds are DB-sourced (unaffected):

  • services/updateserver/joomla.go:190, routers/api/v1/licensing/updates.go:167, routers/web/repo/changelog_xml.go:68, routers/api/v1/repo/license_key.go:27 all read GetRepoMetadata (DB). The Joomla feed sets defaults first and guards if manifest != nil, so it degrades gracefully with no metadata. None read manifest.xml.

Existing repos keep their last-synced DB metadata; going forward metadata changes come via API/UI (the deprecation). Repos' now-dead .mokogitea/manifest.xml files can be cleaned up separately (non-blocking).

Build

go build ./services/repository/... ./models/... → clean; all changed files gofmt-clean.

Not in this PR (remain on #752)

  • The image rebuild + production forge redeploy (gated: backup incl. MySQL keyring, runner/mount preservation, rollback tag) — to be run deliberately.
  • Part 2 workflow clone-URL cutover (needs mirror-name verification).

Refs #752

https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT

Part of #752 (forge-rebrand gate). `.mokogitea/manifest.xml` is **deprecated** — the first-class `RepoMetadata` DB fields are the authoritative repository metadata (see #752 comment). So rather than teach the XML parser the renamed `mokocli` root element, **remove the dead XML auto-sync path** and rebrand the remaining `mokoplatform` references. ## Changes - 🗑️ **Delete** `services/repository/manifest_sync.go` (the `manifestXML` parser + `SyncMetadataFromCommit`) - ➖ **Remove** the `SyncMetadataFromCommit` call on default-branch push (`push.go`) - 🏷️ **Rebrand** `mokoplatform`→`mokocli` in `repo_manifest.go` comments, `v347.go` comment, and the `manifest_desc` locale string - `gofmt`-normalized `repo_manifest.go` struct-tag alignment (pre-existing) ## Safety verification (metadata ability + update server) The XML sync was **one of three** write paths to the first-class fields; the other two remain, and every reader uses the DB — not the XML: **Write paths preserved (coordinating metadata ability):** - API — `routers/api/v1/repo/manifest.go` → `CreateOrUpdateRepoMetadata` (`PUT /repos/{o}/{r}/manifest` + `/metadata`) - Web UI — `routers/web/repo/setting/metadata.go` → `CreateOrUpdateRepoMetadata` (Settings → Metadata) **Update server / feeds are DB-sourced (unaffected):** - `services/updateserver/joomla.go:190`, `routers/api/v1/licensing/updates.go:167`, `routers/web/repo/changelog_xml.go:68`, `routers/api/v1/repo/license_key.go:27` all read `GetRepoMetadata` (DB). The Joomla feed sets defaults first and guards `if manifest != nil`, so it degrades gracefully with no metadata. **None read `manifest.xml`.** Existing repos keep their last-synced DB metadata; going forward metadata changes come via API/UI (the deprecation). Repos' now-dead `.mokogitea/manifest.xml` files can be cleaned up separately (non-blocking). ## Build `go build ./services/repository/... ./models/... ` → clean; all changed files gofmt-clean. ## Not in this PR (remain on #752) - The image rebuild + **production forge redeploy** (gated: backup incl. MySQL keyring, runner/mount preservation, rollback tag) — to be run deliberately. - Part 2 workflow clone-URL cutover (needs mirror-name verification). Refs #752 https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT
jmiller added 1 commit 2026-07-06 02:02:49 +00:00
chore(manifest): remove deprecated .mokogitea/manifest.xml parser; mokoplatform->mokocli
Universal: Auto Version Bump / Version Bump (push) Successful in 14s
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
PR RC Release / Build RC Release (pull_request) Successful in 3s
Universal: PR Check / Validate PR (pull_request) Successful in 13s
Generic: Project CI / Lint & Validate (pull_request) Successful in 44s
Universal: PR Check / Secret Scan (pull_request) Successful in 1m38s
Generic: Project CI / Tests (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
358606e235
The .mokogitea/manifest.xml file is deprecated - the first-class RepoMetadata DB
fields (set via the /manifest API) are the authoritative repository metadata (see
issue #752). Remove the legacy XML auto-sync path rather than teaching it the
renamed mokocli root element:

- delete services/repository/manifest_sync.go (manifestXML parser)
- drop the SyncMetadataFromCommit call on default-branch push (push.go)
- rebrand remaining mokoplatform->mokocli refs (repo_manifest.go, v347.go comment,
  locale manifest_desc)

The RepoMetadata model, /manifest API, settings UI, and update-feed generation
(first-class fields) are unchanged. gofmt-normalized repo_manifest.go struct tags.

Refs #752

Claude-Session: https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT
jmiller added 1 commit 2026-07-06 02:07:12 +00:00
chore(api): remove /manifest backward-compat alias route (use /metadata)
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 2s
PR RC Release / Build RC Release (pull_request) Successful in 3s
Universal: PR Check / Validate PR (pull_request) Successful in 14s
Universal: Auto Version Bump / Version Bump (push) Successful in 25s
Generic: Project CI / Lint & Validate (pull_request) Successful in 51s
Universal: PR Check / Secret Scan (pull_request) Successful in 1m21s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 3s
Generic: Project CI / Tests (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
fcf33d35df
The /manifest GET+PUT routes were backward-compat aliases for the canonical
/metadata routes. Completing the manifest->metadata migration (#752): drop the
alias so /metadata is the single path. Handlers (GetRepoMetadata/UpdateRepoMetadata)
are unchanged. The MCP already calls /metadata (mcp-mokogitea-api v1.4.2,
gitea_metadata_get/update); the stale gitea_manifest_* tools only exist in older
deployed MCP builds and drop out on redeploy.

Refs #752

Claude-Session: https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT
jmiller merged commit 36a824be1d into dev 2026-07-06 02:38:22 +00:00
jmiller deleted branch feature/752-chore-deploy-rebuild-redeploy-for-moko-p 2026-07-06 02:38:25 +00:00
Sign in to join this conversation.