fix(personas): migrate gh CLI → tea (Gitea CLI) + curl-via-API across 58 personas (#45) #3
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/persona-gh-to-tea-migration"
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?
What
Mega-PR: persona files
ghCLI →tea(Gitea CLI) +curl-via-API migration. Per orchestrator's Q1=A decision (mega-PR, not per-persona).163 files / 401 substitutions across 58 persona dirs in
molecule-ai-org-template-molecule-dev.This closes internal#45 — the parent. Gating on internal#44 (workspace-bootstrap GITEA_TOKEN injection) for runtime auth; doc PR ships independently.
Substitution counts
gh pr <subcommand>tea pr <subcommand>(1:1)gh issue <subcommand>tea issue <subcommand>(1:1)gh repo <subcommand>tea repo <subcommand>+tea repos ls --org molecule-aifor list-orggh run <subcommand>tea action <subcommand>(limited Actions support; verify per-call)gh api <path>curl -H "Authorization: token ${GITEA_TOKEN}" https://git.moleculesai.app/api/v1/<path>gh search issues/prs --owner Molecule-AI(5 occurrences)curl-via-APIagainst/repos/issues/search?owner=molecule-ai&...gh discussions(1 narrative)--repo Molecule-AI/<x>--repo molecule-ai/<x>(Gitea slug case-sensitive)SHARED_RULES.md additions
A new "Post-2026-05-06 migration in progress" callout block at the top:
Per Q2=B decision (per-job install vs pre-bake into runner image; runners are mid-stabilization). Pre-bake is parked for image-v2 work.
Two known limitations named explicitly:
GITEA_TOKENenv-var dep on internal#44 (auth gating)Pointer for missed cases: any
gh ...reference not caught → file under internal#45Phase 2 design
SSOT: each persona file is its own SSOT for the commands it embeds. No central registry.
Alternatives considered:
gh()shell-function shim ❌ rejected — runtime layer; has to handle every flag combo; debug surface.ghwith customGH_HOST❌ rejected —ghdoesn't talk to Gitea natively (different API shape).Security check:
teainstall is via wget fromgitea.com(the canonical Gitea binary release host). Trust model is identical to wget'ing any other release.teaauthenticates withGITEA_TOKEN(per-persona scoped per saved memoryfeedback_per_agent_gitea_identity_defaultlong-term plan). Currently shared token viaGITEA_TOKENenv until per-persona injection lands.GH_TOKENenv similarly).On the record.
Versioning + back-compat:
gh ...commands will hitcommand not found: gh(gh isn't installed in the runner image). Forces migration; no half-state.Phase 4 verify (post-merge)
Pick one simple persona (e.g.
triage-operator) + boot a workspace with the migrated CLAUDE.md + GITEA_TOKEN injected (gating on #44). Run one of the migratedtea pr ls --owner molecule-ai --state opencommands E2E. Capture transcript. Cross-link to this PR description.Until #44 lands, Phase 4 verify can only confirm the install snippet works (tea downloads + executes) — auth-requiring commands will fail with auth errors which is the expected pre-#44 state.
DoD
Pure-docs PR (changes 158 .md files in a template repo). No tests / observation / migration / version bump.
Back-compat: forced migration. Old commands stop working at boot (gh isn't installed). New commands work once #44 lands.
Hostile self-review (3 weakest spots)
gh run→tea actionmay not be 1:1. Gitea Actions API differs from GitHub Actions. Somegh runflags may have notea actionequivalent. Mitigation: only 9 occurrences; per-call verify is bounded. SHARED_RULES.md callout names #45 for additions. Accepted because: alternative (write a tea→curl shim per command class) is bigger than the migration scope.tea loginsnippet relies on the env var being set. If #44 lands with a different env name (GITEA_PAT, GITEA_API_TOKEN), this PR breaks. Mitigation: SHARED_RULES.md callout flags the dep explicitly; one-line follow-up if the env name lands different. Accepted: alternative (over-specify the env interface here) couples the two PRs more tightly than needed.Refs
feedback_per_agent_gitea_identity_default(per-persona Gitea identity long-term plan)gh-CLI → tea/curl mega-sweep. 158 files mechanical substitution + SHARED_RULES callout. Same shape as marketing-bulk-sed pattern (#50). Independent review.