test: project_create e2e findings + improvements needed for claude.ai project initiation #11
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?
Context
On 2026-05-14,
project_createwas tested end-to-end from a claude.ai sessionusing the gitea-mcp connector directly (orchestrating the four steps manually,
since the routing pod
project_createtool is not yet exposed as a claude.ai connector).Test args:
Test results — four artifacts
gitea.d-ma.be/mathias/test-throwaway-001github.com/mathiasb/test-throwaway-001k3s/staging/test-throwaway-001/namespace.yaml3 of 4 artifacts succeeded. GitHub mirror is the only blocker.
Finding 1 — GitHub PAT not configured in routing pod (BLOCKER)
repo_mirror_pushacceptsremote_passwordfor GitHub auth, but the routing podconfig does not inject
GITHUB_PATinto the mirror call. The mirror is registeredon Gitea but cannot authenticate to GitHub, so no push ever happens.
Fix: Set
GITHUB_PATin routing pod env (k8s secret on koala). Theproject.Configalready has a
GitHubPATfield — wire it into therepo_mirror_push_addcall asremote_password.Required GitHub PAT scopes:
repo(create repos via mirror, push code).Where:
internal/skills/project/project.go→ mirror step → passcfg.GitHubPATas
remote_passwordin the gitea-mcprepo_mirror_pushcall.Finding 2 — template-go-agent not marked as template (BLOCKER for go-agent stack)
Calling
create_project_from_templatewithtemplate_name=template-go-agentreturns:template-go-webworks correctly.template-go-agentexists as a repo but hastemplate: falseon Gitea.Fix (two parts):
template-go-agentas a template repo:repo_update(owner=mathias, name=template-go-agent, template=true)template-go-agentwith actual content (currently sparse) — see local-dev #5Until both are done,
go-agentstack falls back togo-websilently, which is wrong.project_createshould return an error if the requested template is not available,not silently use a different one.
Finding 3 — routing pod project_create not reachable from claude.ai
The
project_createtool lives in the routing pod (cmd/routing,internal/skills/project),which runs on koala at
http://koala:30310/mcp. This endpoint is NOT connected asa claude.ai MCP connector — only gitea-mcp (
git-mcp.d-ma.be) and brain-mcp(
brain-mcp.d-ma.be) are.During the test, the four steps were orchestrated manually via gitea-mcp tools.
This works but requires 4 tool calls instead of 1 and has no atomicity or error handling.
Fix: Expose routing pod MCP endpoint publicly via NPM on piguard:
Then add as a claude.ai custom connector. Once connected,
project_createis asingle tool call from any claude.ai session.
Finding 4 — infra namespace path inconsistency
Issue #10 spec said
k8s/staging/<name>/namespace.yamlbut the actual infra repouses
k3s/staging/<name>/namespace.yaml. The test usedk3s/(correct) but therouting pod implementation may use
k8s/(incorrect).Fix: Verify
internal/skills/project/project.gousesk3s/staging/notk8s/staging/.Update spec in PROJECT.md and issue #10 if needed.
Finding 5 — no cleanup/delete flow for throwaway projects
After testing,
test-throwaway-001exists on Gitea and in infra. There is noproject_deletetool or cleanup flow. Deleting requires:repo_deleteon Gitea (gitea-mcp #11 — not yet implemented)k3s/staging/test-throwaway-001/from infra repo manuallyFix (v2): Add
project_deletetool that reverses the four steps. Mark as HIGH risk,require ntfy approval. For now: document manual cleanup steps.
Manual cleanup for test-throwaway-001:
Improvements needed before project initiation is production-ready
P0 — must fix before using for real projects
GITHUB_PATin routing pod k8s secret, wire into mirror calltemplate-go-agentas template + populate content (local-dev #5)P1 — important but not blocking first real use
k3s/staging/notk8s/staging/in project.goproject_createshould error (not silently fallback) if template unavailableproject_deletecleanup tool (v2)repo_delete— needed for cleanup flowP2 — quality of life improvements
project_createshould trigger immediate mirror sync after adding push mirror,not wait for next
sync_on_commitevent — Gitea API:POST /push_mirrors-sync{"mirror_synced": true/false, "mirror_lag_seconds": N}project_createto a visible claude.ai connector so it appears in/toolsnameparam matches Gitea naming rules before making any API calls(current regex
^[a-z][a-z0-9-]{1,38}[a-z0-9]$is good — verify it's enforced)Related
Resolved across this session:
GITHUB_PATadded to SOPS-encryptedrouting-secrets, routing pod restarted, log confirmsgithub_pat_set=true.template-go-agentflipped viarepo_update(template=true). Both templates now generate.routing-mcp.d-ma.belive via NPM on piguard → koala:30310.MCP_RESOURCE_URLadvertised by/.well-known/oauth-protected-resource. claude.ai connector connected and tools callable.k3s/staging/<name>/namespace.yamlininternal/skills/project/handlers.go.templateFormapsgo-agent→template-go-agentonly; no silent fallback. Stack validation rejects anything outsidego-agent/go-web.repo_deletealready in gitea-mcp since v0.2.4.Plus this session shipped a 5th orchestration step (
create_github_repo) since gitea push-mirror cannot push to a non-existent remote — seeinternal/githubclient/+internal/skills/project/handlers.gostepstepCreateGitHub. 422 already-exists treated as idempotent success.Deferred to v2: F6
project_deletecleanup tool.P2 wishlist items remain open as follow-up nice-to-haves but don't block project initiation use.
Validation complete — 2026-05-18
All four artifacts verified after manual fix:
✅ Gitea repo:
gitea.d-ma.be/mathias/test-throwaway-001✅ GitHub repo:
github.com/mathiasb/test-throwaway-001(mirror synced, last_error: "")✅ Infra namespace:
k3s/staging/test-throwaway-001/namespace.yamlon main✅ Issue #1: experiment brief on Gitea
Critical architecture finding — add to P0 list
F1 revised:
project_createneeds an explicit GitHub repo creation step BEFORE configuring the push mirror. Gitea push-mirror can only push to an existing remote — it cannot create repos on GitHub.Correct flow:
This requires
githubclientininternal/skills/project/project.goto callPOST /user/reposwith{"name": <name>, "private": <private>}before themirror step. The
githubclient.Clientis already wired incmd/routing/main.gowhen
GITHUB_PATis set — it just needs to be used for repo creation.Cleanup needed
test-throwaway-001 should be deleted after this issue is resolved:
✅ RESOLVED — 2026-05-18
Full e2e test passed after fixing auth (issue #13):
All five artifacts verified. project_create is production-ready from claude.ai.
One finding to note
Infra namespace is committed to a
staging/<name>branch, not directly to main.This requires a manual merge before Flux deploys. For TBD compliance, project_create
should commit directly to main — or we accept the branch as an intentional review gate
before staging is activated. Document this decision in PROJECT.md.
Cleanup done