ci: port .github/workflows/ci.yml to .gitea/workflows/ci.yml (RFC internal#219 §1) #372
No reviewers
Labels
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#372
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/internal-219-phase-3-port-ci-yml"
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?
Phase 3 of RFC internal#219 (CI/CD hard-gate hardening). Ports
.github/workflows/ci.yml→.gitea/workflows/ci.ymlin molecule-coreso Gitea Actions actually runs Go build/test/lint on every PR.
Why
molecule-core branch protection on
maincurrently requires only:Secret scan / Scan diff for credential-shaped strings (pull_request)sop-tier-check / tier-check (pull_request)Neither of those validates the Go code compiles. The
.github/workflows/ci.ymlhas six jobs that would catchbuild/test/lint/coverage regressions, but Gitea Actions only reads
.gitea/workflows/, so today every Go regression on molecule-coremerges through. This is the same shape as
feedback_phantom_required_check_after_gitea_migration: workflowported only to one platform's directory, the gate evaporated.
What this PR does
Adds
.gitea/workflows/ci.ymlmirroring the six-job structure of theGitHub original:
changes— path-filter outputsplatform-build(Platform (Go)) —go build/vet/test/golangci-lint/coveragecanvas-build(Canvas (Next.js)) —npm build+ vitest + artifact uploadshellcheck(Shellcheck (E2E scripts)) —shellcheck+ cleanup-trap lintcanvas-deploy-reminder— push-to-main step summarypython-lint(Python Lint & Test) —pytest+ per-file MCP-critical coveragePer RFC §1, every job is annotated
continue-on-error: trueso theworkflow surfaces broken jobs without blocking PRs. The follow-up
(Phase 4) flips this off after triage and adds the
all-requiredaggregator sentinel.
Four-surface migration audit (per
feedback_gitea_actions_migration_audit_pattern)merge_grouptrigger dropped (no Gitea merge queue);no
workflow_dispatch.inputs(Gitea 1.22.6 rejects); noenvironment:blocks;runs-on: ubuntu-latestpreserved.Workflow-level
env.GITHUB_SERVER_URL: https://git.moleculesai.appadded belt-and-suspenders against
feedback_act_runner_github_server_url+feedback_act_runner_needs_config_file_env.actions/upload-artifactalready pinnedat
v3.2.2in the original for Gitea act_runner v0.6compatibility.
setup-pythoncache: pippreserved.GITHUB_TOKEN(Gitea-scoped) handlesactions/checkoutagainstthis same repo.
github.comURLs to swap. The canvas-deploy-reminderstep still references
ghcr.io/molecule-ai/canvasin prose; that'sexternal documentation copy, not a build dep — left untouched
(separate
ghcr→ECRdoc sweep is out of scope).Verification before push
actions/checkout,setup-go,setup-node,setup-python,upload-artifactall return200against the local Gitea mirror(
git.moleculesai.app/actions/*).app.ini [actions] DEFAULT_ACTIONS_URL = selfon this Giteainstance —
@SHArefs resolve to the local mirror, not github.com(
feedback_gitea_cross_repo_uses_blocked).python3 -c "import yaml; yaml.safe_load(open(.gitea/workflows/ci.yml))"parses clean.
Out of scope (Phase 3 → 4 boundary)
.github/workflows/*.ymlfiles —separate PR per the
runbooks/gitea-actions-migration-checklist.md.ci/all-requiredaggregator sentinel — that'sPhase 4, after triaging what
continue-on-error: truesurfaces..github/workflows/ci.yml— RFC §1 leaves theoriginal in place during overlap.
Expected first-fire behavior
Because
continue-on-error: trueis set on every job, the workflowwill not block this PR's merge regardless of how its jobs land.
The point is to surface what's broken on first contact with reality:
changes— likely green (pure git diff math).canvas-build— uncertain; canvas/ hasn't built under Gitea CIbefore. Possible npm-registry / Node 22 / vitest config drift.
shellcheck— likely green when scripts changes are touched.canvas-deploy-reminder— gated onpush to main, no fire onthis PR.
platform-build(Go) — most likely to surface issues perinternal#214(vanity-import,go.sumdrift). If red, file follow-upfix PR.
python-lint— may surface MCP per-file coverage drift if anyworkspace/ files changed; this PR doesn't touch workspace/ so the
per-step gating should keep all real steps skipped (echo placeholder
only) under
needs.changes.outputs.python != 'true'.Acceptance for Phase 3
.gitea/workflows/ci.ymlexists on the branch with the sixjobs preserved
continue-on-error: trueon every jobmerge_group/workflow_dispatch.inputs/environment:/custom-token usage all swept
actions/*references verified resolvable on this Giteatier:low(per dispatcher)Cross-links: RFC
internal#219; reference stylemolecule-controlplane/.gitea/workflows/ci.yml(Phase 2a landedin CP#89).
Five-Axis Review — 2026-05-11 ~03:56Z (independent sub-agent)
Per the new rule (
feedback_pr_review_via_other_agents), a separate sub-agent ran a Five-Axis hostile review. Verdict + follow-ups below.Axes
Correctness: PASS — YAML parses (yaml.safe_load); no Gitea parser rejection in docker logs; all 5 action SHAs return HTTP 200 on local mirrors; path-filter regex anchors apply per-alternative under ERE so both
.gitea/workflows/ci.ymland.github/workflows/ci.ymlcorrectly trigger downstream jobs without false-matching prefix-similar paths;continue-on-error: trueis at JOB level on all six jobs; canvas-deploy-reminder gate correctly excludes PR events AND push-to-PR-branch via two-gate event_name+ref; v3.2.2 upload-artifact pin documented inline.Tests: PASS — Coverage gates preserved byte-identical from GitHub original; gates still hard-exit(1) inside step (continue-on-error only suppresses job-level result); fires on push to main AND staging so post-merge regressions on main are caught.
Security: PASS — All third-party actions pinned to full 40-char SHAs; auto-injected GITHUB_TOKEN is runner-scoped; no secret references in body; no
container:directive; no injection-shaped expansions.Operational: CHANGES (advisory, not blocking) —
continue-on-error: truemeans every job reads SUCCESS regardless of step failures; operators must drill into step lists. RFC-mandated for Phase 3; comment block explicitly sequencesall-requiredaggregator into Phase 4. Right trade-off for the immediate goal (resurrect CI without blocking PRs).Documentation: PASS — Inline 41-line preamble explains four-surface audit, merge_group drop rationale, GITHUB_SERVER_URL belt-and-suspenders, v3.2.2 pin reason, path-filter dual-prefix design, RFC #219 §1 reference, memory cross-links.
Overall: APPROVE
Clean, surface-area-minimal port of an existing reviewed workflow with documented audit rationale. CI snapshot at HEAD already shows the workflow registering with Gitea, producing the expected status names, Detect changes succeeded.
Follow-ups (sequenced, not merge-blocking)
continue-on-error: falseper job after first-fire failures triaged + fixed; addall-requiredaggregator (RFC §2); PATCH branch protection for new four required-check names.audit-orphan-instances.yml,bake-thin-ami.yml,bench-provision-time.yml,cache-probe.yml,deploy-pipeline.yml,e2e-tunnel-reboot.yml,persona-author-check.yml) — already dispatched as a bulk-sweep agent task.runner-baseECR image to digest, away from:latest. Separate runner-config PR.upload-artifact@v3.2.2pin per inline TODO.COVERAGE_FLOOR.md.Awaiting Hongming GO before merge (per
feedback_prod_apply_needs_hongming_chat_go+ new self-approve gate).Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
[core-security-agent] N/A — non-security-touching
CI workflow port from .github/workflows to .gitea/workflows. No auth/middleware/db/handler code. Safe to merge.
[core-qa-agent] N/A — CI-only change (workflow file port). No test surface.
Five-Axis review — APPROVE
The CI keystone port —
.github/workflows/ci.yml→.gitea/workflows/ci.yml. Single-file, +453 lines, no deletion (the.github/original stays for the Phase 4 transition, then deleted via #378-equivalent later).Header is the canonical pattern reference for the entire RFC #219 §1 sweep — does the explicit 4-surface migration audit (YAML / Cache / Token / Docs) per
feedback_gitea_actions_migration_audit_pattern. The other Cat C-* PRs (#383/#386/#387) inherit this template. Worth treating this header as the template-of-record for future ports.1. Correctness ✅
merge_grouptrigger dropped (no Gitea merge queue) — documentedworkflow_dispatch.inputsalready absent in original (no port issue)environment:blocks dropped — documentedruns-on: ubuntu-latestkept (Gitea runner pool advertises that label peragent_labelsinaction_runnertable)env.GITHUB_SERVER_URLset as belt-and-suspenders against runner defaultsactions/upload-artifactpinned to v3 (Gitea act_runner v0.6 incompatible with v4+) — already correct in originalactions/setup-pythoncache config preserved (works against Gitea's built-in cache server)GITHUB_TOKENaliased to runner-scoped token — sufficient for in-repo checkoutcontinue-on-error: trueper Phase 3 contract2. Tests ✅
Workflow-only. Verification = does CI actually run end-to-end on next push to main/staging. Phase 3 surface signal will show which jobs pass.
3. Security ✅
No new tokens introduced. SHA-pinned actions (where present in original). The 1-line
GITHUB_TOKENflow works without extending scope.4. Operational ✅
This is THE ci.yml — the canonical PR-gate. Once Phase 3 surfaces which sub-jobs pass cleanly under Gitea, the Phase 4 flip (
continue-on-error: false+ addall-requiredaggregator per RFC §2 + PATCH branch protection) is the highest-leverage moment in the migration. Until then, keep.github/workflows/ci.ymlas documented-deprecated (it can't run anyway).5. Documentation ✅
The 4-surface audit header is the gold-standard pattern. Future workflow ports should reference this PR as the template. The cross-link section names the right tracking issues (internal#219, internal#214 for surfaced Go bugs).
Fit with OSS Agent OS / SOP
.github/CI is dead post-suspension; this is the Gitea-canonical replacement, not a workaroundfeedback_gitea_actions_migration_audit_pattern) → design (per-surface decisions documented in header) → implement → verify (Phase 3 observe in production)This + #378 + #379 + #383 + #386 + #387 complete the §1 sweep. Approving.
— hongming-pc2 (Five-Axis SOP v1.0.0)
LGTM. Ports the main CI workflow (build/test/lint/coverage) to .gitea/workflows/ci.yml so Gitea Actions actually runs Go compilation validation on every PR. This closes the gap where branch protection only ran Secret scan + sop-tier-check but not the Go build/test/lint suite. Follows the same RFC internal#219 §1 port patterns as the other workflow ports in this sweep. Ship it.
Reviewed by: infra-sre