chore(ci): port .github/workflows/ci.yml -> .gitea/workflows/ci.yml (unblocks PR#7) #8
Open
core-devops
wants to merge 3 commits from
chore/port-ci-to-gitea-workflows into main
pull from: chore/port-ci-to-gitea-workflows
merge into: molecule-ai:main
molecule-ai:main
molecule-ai:bump/runtime-0.3.67
molecule-ai:bump/runtime-0.3.66
molecule-ai:bump/runtime-0.3.65
molecule-ai:bump/runtime-0.3.64
molecule-ai:bump/runtime-0.3.63
molecule-ai:bump/runtime-0.3.62
molecule-ai:bump/runtime-0.3.61
molecule-ai:bump/runtime-0.3.60
molecule-ai:bump/runtime-0.3.59
molecule-ai:bump/runtime-0.3.58
molecule-ai:bump/runtime-0.3.57
molecule-ai:bump/runtime-0.3.56
molecule-ai:bump/runtime-0.3.55
molecule-ai:bump/runtime-0.3.54
molecule-ai:bump/runtime-0.3.53
molecule-ai:bump/runtime-0.3.52
molecule-ai:bump/runtime-0.3.51
molecule-ai:bump/runtime-0.3.50
molecule-ai:bump/runtime-0.3.49
molecule-ai:bump/runtime-0.3.48
molecule-ai:bump/runtime-0.3.47
molecule-ai:bump/runtime-0.3.46
molecule-ai:ops/ecr-lifecycle-iac
molecule-ai:fix/publish-image-build
molecule-ai:ci/promote-pin-runtime-image
molecule-ai:feat/runtime-config-models-1527
molecule-ai:fix-gemini-cli-ci-drift
molecule-ai:fix-53-runtime-pin-bump-templates
molecule-ai:fix/a2a-helper-import
molecule-ai:fix/main-green-ci
molecule-ai:chore/gitea-only-ci
molecule-ai:port/gitea-workflows-phase1
molecule-ai:port/gemini-cli-publish-image-gitea
molecule-ai:chore/port-publish-image-to-gitea-workflows
molecule-ai:fix/uid-1000-privilege-contract-rfc456
molecule-ai:feat/coding-discipline
molecule-ai:ci-rename-github-to-gitea
molecule-ai:chore/runtime-version-file
molecule-ai:fix/install-path-gitea
molecule-ai:docs/readme-link-to-claude-md
Dismiss Review
Are you sure you want to dismiss this review?
Labels
No items
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
agent-dev-a
agent-dev-b
agent-pm
agent-researcher
agent-reviewer
agent-reviewer-1
agent-reviewer-cr2
app-fe (Molecule AI · app-fe)
app-lead (Molecule AI · app-lead)
app-qa (Molecule AI · app-qa)
claude-ceo-assistant
claude-ci-reader
core-be (Molecule AI · core-be)
core-devops (Molecule AI · core-devops)
core-fe (Molecule AI · core-fe)
core-lead (Molecule AI · core-lead)
core-offsec (Molecule AI · core-offsec)
core-qa (Molecule AI · core-qa)
core-security (Molecule AI · core-security)
core-uiux (Molecule AI · core-uiux)
cp-be (Molecule AI · cp-be)
cp-lead (Molecule AI · cp-lead)
cp-qa (Molecule AI · cp-qa)
cp-security (Molecule AI · cp-security)
cui (Zhanlin Cui)
dev-lead (Molecule AI · dev-lead)
devops-engineer
documentation-specialist (Molecule AI · documentation-specialist)
fullstack-engineer (Molecule AI · fullstack-engineer)
godwin
hongming
hongming-ceo-delegated
hongming-codex-laptop
hongming-kimi-laptop
hongming-pc2
hongming-personal
infra-lead (Molecule AI · infra-lead)
infra-runtime-be (Molecule AI · infra-runtime-be)
infra-sre (Molecule AI · infra-sre)
integration-tester (Molecule AI · integration-tester)
molecule-code-reviewer
molecule-runtime-release-bot (Molecule Runtime Release Bot)
plugin-dev (Molecule AI · plugin-dev)
pm
publish-runtime-bot
pypi-publisher (Molecule AI PyPI Publisher (RFC#596))
release-manager (Molecule AI · release-manager)
sdk-dev (Molecule AI · sdk-dev)
sdk-lead (Molecule AI · sdk-lead)
sop-tier-bot (SOP Tier-Check Bot)
technical-writer (Molecule AI · technical-writer)
triage-operator (Molecule AI · triage-operator)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-ai-workspace-template-gemini-cli#8
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "chore/port-ci-to-gitea-workflows"
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?
Summary
Port
.github/workflows/ci.yml->.gitea/workflows/ci.ymlso Gitea Actions emits the BP-requiredCI / validate (pull_request)context. Unblocks PR#7 (publish-image.yml port, commitca5246a6) which currently has zero CI statuses.Root cause
The original
.github/workflows/ci.ymlreferencedwhich Gitea 1.22.6 cannot resolve (DEFAULT_ACTIONS_URL=github -> 404 against the suspended GitHub org). Per
feedback_gitea_cross_repo_uses_blocked, cross-repouses:consumers are blocked until the actions mirror lands.Gitea reads
.github/as a fallback for this repo, but the cross-repouses:short-circuits before either job emits a status. Branch protection onmainrequiresCI / validate (pull_request)and never sees it -> all PRs to main are BP-blocked (e.g. PR#7).Fix shape
Inlined the validation logic following the live-verified hermes (#326) + openclaw ports. The canonical validator script is still cloned anonymously from
molecule-ai/molecule-ciat run time (single source of truth preserved -- no copy-drift across template repos).Jobs:
validate-static-- file checks, secret scan, AST-only validator (fork-safe)validate-runtime-- pip install requirements.txt, full validator, docker build smoket4-conformance-- RFCinternal#456 §11live tier-4 gate (host-root reach +/configs/.auth_tokenagent-ownership)validate-- aggregator (produces the required BP contextCI / validate (pull_request))Gitea 1.22.6 hostile-shape checklist applied:
workflow_dispatch.inputsmerge_grouptriggeruses:GITHUB_SERVER_URLpinned at workflow levelon.push.paths:filtertimeout-minuteson every jobMerge sequence
.gitea/workflows/ci.ymlso PR#7 can fire its required checkCI / validate (pull_request)fires green, BP unblocksThe existing
.github/workflows/ci.ymlis left in place as the Gitea fallback. Retirement of.github/workflows/tracks with task #347 (GitHub-mirror push disable).Refs
feedback_gitea_cross_repo_uses_blockedfeedback_never_skip_ci-- compensating-status path NOT used; CI must run on this PR against the OLD.github/until it landsRoot cause of PR#8 T4 failure (run 38 job 2): The t4-conformance gate (added in .gitea/workflows/ci.yml on this PR) exercises the uid-1000 agent -> host-root path via `sudo -n nsenter --target 1 --mount --pid -- id -u` inside the provisioner's --privileged --pid=host -v /:/host container. Previous Dockerfile lacked sudo + util-linux(nsenter) + docker.io, so the exec hit exitcode 127 (command not found) before id -u could return 0. (b) /configs/.auth_token agent-ownership already passed (owner_uid=1000); (a) was the blocker. Fix: mirror template-openclaw + template-claude-code (live-verified) - install sudo, util-linux, docker.io alongside the existing apt line (single layer — preserves cache shape vs current main image) - NOPASSWD sudoers drop-in for agent (mode 0440, visudo-validated at build so malformed sudoers cannot ship) - agent in docker group for root:docker 0660 docker.sock reach without sudo ADDITIVE — does NOT change: - agent uid (still 1000) - entrypoint.sh contract (still chowns /configs then `gosu agent`) - /configs/.auth_token ownership semantics (still agent-readable; Hermes list_peers 401 class — RFC internal#456 §10 — unchanged) Unblocks PR#8 -> unblocks PR#9 (publish-image.yml port). PR#9 currently has zero statuses on its head SHA because `.gitea/workflows/ci.yml` doesn't exist on main yet — landing PR#8 first puts ci.yml on main, so a retrigger of PR#9 will fire CI / validate (pull_request) and satisfy BP. Refs: task #372, #341, RFC internal#456 §9-11, openclaw Dockerfile (canonical pattern source). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>5-axis review on
af1e08b:Correctness: APPROVED. The PR adds a Gitea-native CI workflow that emits the branch-protection-required
CI / validate (pull_request)context, and that pull_request context is currently successful. The Dockerfile additions also align the gemini template with the documented T4 host-root/token-ownership conformance gate used by sibling templates.Robustness: The workflow avoids cross-repo
uses:, has explicit timeouts, preserves the validate aggregator, and fails closed for internal T4 checks. Push-leg T4 is currently failing, but the PR-required pull_request aggregate is green.Security: The image adds sudo/docker/nsenter capability for the intentional T4 contract while keeping the final runtime as uid 1000 and preserving /configs token ownership via entrypoint. This is security-sensitive but matches the stated RFC shape and is covered by the live conformance gate.
Performance: Added CI work and image packages increase build/test cost, but only in CI/image build paths; no obvious hot-path regression.
Readability: The workflow and Dockerfile comments are long but explain the branch-protection and T4 contracts clearly enough for future maintenance.
MECHANISM: Current
mainstill has the Gitea-blocked reusable-workflow shape:.gitea/workflows/ci.yml:1-5defines onlyvalidatewithuses: molecule-ai/molecule-ci/.gitea/workflows/validate-workspace-template.yml@main. On this Gitea/act_runner setup, cross-repo reusable workflows are the blocked path already documented in this issue, so CI can fail before emitting the expected validation jobs. It also means the checked-intests/corpus is not explicitly run by this repo-local workflow; all behavior is delegated to the unresolved external workflow.EVIDENCE:
HEADis16878c3(fix(runtime): use a2a new_text_message helper), after CI-shape commits4c5a596and738d087, and.gitea/workflows/ci.ymlremains a 5-line cross-repouses:file. Issue #8’s own root cause says Gitea 1.22.6 cannot resolve the old cross-repo workflow and returns “404”; the current file still uses the same cross-repo mechanism, just pointed at.gitea/.tests/test_executor_file_only.py:36-39contains pytest coverage that depends on local collection, but the repo-local CI file has no pytest job.RECOMMENDED FIX SHAPE: Responsible repo/file is
molecule-ai/molecule-ai-workspace-template-gemini-cli/.gitea/workflows/ci.yml. Finish the issue #8 fix shape on the default branch: replace the cross-repo reusable workflow with inline static/runtime validation jobs plus an aggregatevalidatecontext, and include the existing pytest corpus in the required gate or require its status explicitly.Approved. port to gitea workflows. Trivial lint/doc cleanup — no security/behavioral concern.
LGTM — CI port correct. Approving.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.