fix: madtea's runtime GitHub calls speak the Gitea API - retool before the first GitHub release #421
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
sixfold-space/madtea#421
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Problem
The madtea.lol migration (#420) repointed distribution config to the GitHub edge, which is correct and gate-green. But madtea itself is a Gitea/Forgejo API-v1 client, and several RUNTIME paths still speak the Gitea API against GitHub targets, which GitHub does not serve. GoReleaser publishes to GitHub natively, and that works; madtea's own code cannot. None of these paths fire until a release is cut, so the config merge is safe - but the first GitHub release is blocked until this lands. I found this reviewing the migration.
Broken paths
madtea update/--check/--verifyuse the Gitea client, which buildshttps://github.com/api/v1/repos/sixfold-space/madtea/releases/latest. GitHub's REST API isapi.github.comwith no/api/v1and a different schema, so it 404s.internal/cmd/update/update.go,client_release_ext.go,integrity.go. The gate misses it because the update tests mock the Gitea shape on a local server. This is the ADR 0012 headline feature - it cannot ship broken.release.shpreflights and exportsGITEA_TOKEN, but.goreleaser.yamlnow uses thegithubprovider (GITHUB_TOKEN). A missingGITHUB_TOKENis not caught until after the tag is pushed - a half-published state.scripts/release.sh(~149-180).check-satellite-readiness.shrunsmadtea api /repos/sixfold-space/homebrew-tap --jq .empty, which resolves against the cheshirecube origin, not GitHub;.emptyis a Gitea field GitHub does not return. Likely aborts every release.scripts/check-satellite-readiness.sh:46,release.sh:200-208.forge_release_exists()runsmadtea release get <tag> --repo sixfold-space/madteaagainst cheshirecube; releases publish to GitHub, so it always 404s - re-runs goreleaser on resume and misreports failure.scripts/release.sh:314-322,356,374.assemble-plugin-artifact.shrunsmadtea clone/finish(a Forgejo PR flow) against cheshirecube, but claude-plugins is a GitHub distribution repo, so the marketplace bump never lands.scripts/assemble-plugin-artifact.sh:364,403.Open question I need to settle before building
Root cause: madtea is a standard Gitea API-v1 client (ADR 0017 - no per-platform branching). Reaching GitHub means madtea grows a GitHub REST path, in tension with ADR 0017. The options:
gh/curl for GitHub state. Keeps the core forge client Gitea-only; the self-updater and release publishing are distribution concerns, arguably outside ADR 0017's scope.The second half of the same question: where is claude-plugins operatively homed for release-time commits - GitHub direct-commit with the release PAT (which matches the committed
docs/contributing/release-credentials.md), or cheshirecube plus a sync? That determines how the vendor script is retooled.Release gate
The first GitHub release must not be cut until (1) is fixed (a broken self-updater cannot ship, ADR 0012) and (2)-(5) are resolved. This issue blocks that release. Part of #420.
My lean on the design fork is (a): a bounded GitHub REST helper for release metadata, plus a plain-HTTPS asset download in the self-updater, with the release scripts using
gh/curl for GitHub state. It keeps the core forge client Gitea-only, so ADR 0017 stays intact, and it treats self-update and release publishing as the distribution concerns they are. For the claude-plugins home my lean is GitHub direct-commit with the release PAT, matching the committed release-credentials doc.The tradeoff I am accepting with (a) is a second HTTP shape inside madtea, which is exactly what ADR 0017 was written to avoid. (b) avoids that at the cost of publishing every release twice; (c) avoids it entirely but leaves the update path behind the firewall that started this whole migration.
Still open, and I want it settled before the retool starts, because it blocks the first GitHub release and touches all five broken paths at once.