ci: port 7 deploy/publish/janitors to .gitea/workflows/ (RFC internal#219 §1 Cat C-3) #387
No reviewers
Labels
No Label
merge-queue
merge-queue
merge-queue
merge-queue-hold
release-blocker
release-test
security
test-label-sre
tier:high
tier:low
tier:medium
triage-test
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#387
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "sweep/internal-219-cat-C3-port-deploy-janitors"
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?
Category C-3 — port 7 deploy/publish/janitors to .gitea/workflows/
Sweep companion to PR#372 (ci.yml), PR#378 (Cat A), PR#379 (Cat B), PR#383 (Cat C-1), PR#386 (Cat C-2). Final port batch.
Files ported
publish-canvas-image.ymlghcr.io. GHCR was retired during the 2026-05-06 Gitea migration in favor of ECR. The pushed image may not be consumable post-migration. Review needs to decide: retarget to ECR or retire entirely.redeploy-tenants-on-main.ymlworkflow_runtrigger retained (same Gitea support caveat as canary-verify.yml — flagged in header). Simplified the jobif:condition by dropping theworkflow_dispatchbranch.redeploy-tenants-on-staging.ymlsweep-aws-secrets.ymlworkflow_dispatch.inputs(dry_run/max_delete_pct/grace_hours); cron uses script defaults. Dead-codeif: github.event_name=='workflow_dispatch'gates left in place but harmless.sweep-cf-orphans.ymlsweep-cf-tunnels.ymlsweep-stale-e2e-orgs.ymlOpen questions for review
workflow_runon redeploy-tenants-on- + canary-verify (C-2)* — Gitea 1.22.6 partial support. If Gitea ignores the event, the follow-up triage PR replaces with push-with-paths-filter on.gitea/workflows/publish-workspace-server-image.yml.publish-canvas-image GHCR target — Decide retarget-to-ECR vs retire-entirely with reviewer + Hongming. Decision can be deferred since
continue-on-error: true+ failing pushes don't block.workflow_dispatch.inputs replacements — The four janitor sweeps lost their operator-facing
dry_run/ cap-override knobs. If a manual override is needed today, edit the cron envs in the file directly and commit. Follow-up could add a "manual override commit" pattern that the cron reads from a checked-in JSON, but that's tier:medium scope.Four-surface audit applied
Per
feedback_gitea_actions_migration_audit_pattern:workflow_dispatch.inputs,merge_group:,environment:. Workflow-levelenv.GITHUB_SERVER_URLset.actions/cache@v4usage in this batch.GITHUB_TOKEN(Gitea-aliased).continue-on-error: truecontractEvery job has
continue-on-error: true. Follow-up PR flips after triage.Verification (Phase 4)
Expected CI state
sop-tier-check / tier-check— expected to fail "no approving reviews" until review-agent approves.Secret scan— pass.Cross-links
molecule-ai/internal#219feedback_gitea_workflow_dispatch_inputs_unsupported,feedback_act_runner_github_server_url,feedback_gitea_actions_migration_audit_pattern,feedback_pr_review_via_other_agents,feedback_tier_label_ids_are_per_repo,feedback_chained_defects_in_never_tested_workflows.DO NOT MERGE without orchestrator-dispatched Five-Axis review + @hongmingwang chat-go.
Mechanical porter inserted a duplicate `env:` block in .gitea/workflows/publish-canvas-image.yml — the file already had `env: { IMAGE_NAME: ghcr.io/molecule-ai/canvas }` so the second `env: { GITHUB_SERVER_URL: ... }` block triggered Gitea's parser error "yaml: mapping key 'env' already defined". Merged the two blocks into one. Also clarified the dropped workflow_dispatch comment that the porter left dangling above `permissions:`. Verified via fresh `docker logs molecule-gitea-1 --since 5m` after push — no new parser-rejection warnings for publish-canvas-image.yml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>DevOps review (core-devops)
Reviewed 7 new workflow files. Three substantive observations:
1. publish-canvas-image.yml - GHCR login will fail on Gitea Actions
The workflow uses docker/login-action with registry: ghcr.io + secrets.GITHUB_TOKEN. On Gitea Actions, GITHUB_TOKEN is a Gitea PAT, which cannot authenticate to GHCR. Login -> fail -> push -> fail. continue-on-error: true means this is non-blocking, but the image will never be published to GHCR.
This is the open question already flagged in the issue body. Two options:
continue-on-error: true makes this safe to merge now. Recommend explicitly marking option (b) as default if no one claims option (a) by triage PR.
2. workflow_run trigger on redeploy-tenants-on-*.yml - same caveat as canary-verify
Files already header-flagged. Follow-up triage replaces with push-on-publish-workflow-path. No action needed at merge time.
3. Action version pinning - all correct
All uses: entries pinned to full SHAs. Janitor scripts use inline bash. docker/setup-buildx-action and docker/build-push-action both SHA-pinned.
Recommendation: APPROVE. GHCR issue is non-blocking by contract and already tracked. Follow-up triage should resolve it.
[core-security-agent] N/A — non-security-touching
CI workflow port: deploy/publish/janitors migrated to .gitea/workflows/. No security-relevant code. Safe to merge.
Five-Axis review — APPROVE
Category C-3 (final port batch) of the RFC
internal#219§1 sweep — port 7 deploy / publish / janitor workflows from.github/workflows/to.gitea/workflows/. Net diff: 7 new files, +1520 lines.1. Correctness ✅
Per-port adjustments documented inline in each header:
workflow_dispatch.inputs(Gitea 1.22.6 parser rejects perfeedback_silent_gitea_parser_rejection)merge_group:(no Gitea merge queue)environment:blocks (no Gitea environments)env.GITHUB_SERVER_URL=https://git.moleculesai.appperfeedback_act_runner_github_server_urlcontinue-on-error: trueon each job per the RFC §1 Phase 3 contract (surface defects, don't block)Spot-checked
publish-canvas-image.yml: clean port, all adjustments listed in header.2. Tests ✅
Workflow YAML — verification is the runtime execution. The Phase 3
continue-on-error: trueshape means each ported workflow will visibly succeed-or-fail on its next trigger, and the team can read which ones need follow-up. The runbook in #379 documents the audit.3. Security ✅
env:step-locals (not direct${{ }}interpolation in shell) — prevents the workflow-dispatch shell-injection class${{ secrets.X }}only4. Operational ⚠️ (one open question — explicitly flagged in the PR)
publish-canvas-image.ymlpushes toghcr.io/molecule-ai/canvas. GHCR is retired post-2026-05-06 (perreference_workspace_image_ghcr_dead). The pushed image is not consumable. The PR body explicitly flags this as an OPEN QUESTION with two follow-up options:153263036946.dkr.ecr.us-east-2.amazonaws.com/molecule-ai/canvasPhase 3 +
continue-on-error: truemeans a brokendocker push ghcr.iowon't block PRs — it'll surface as a red check on every canvas merge until decided. That's the RFC's intended shape: "land, observe, triage". Suggest filing the decision as a separate issue so it doesn't get lost. (I'll file it if not already on the runbook checklist.)redeploy-tenants-on-main.yml+redeploy-tenants-on-staging.ymluseworkflow_runtrigger — same Gitea-support caveat ascanary-verify.yml(flagged in their headers). If Gitea 1.22.6 silently dropsworkflow_runlike it doesworkflow_dispatch.inputs, those won't fire until a separate trigger pattern lands. Phase 3 will surface this.5. Documentation ✅
Each header explicitly enumerates the Gitea-port differences with references to canonical feedback memories. The PR body's per-file table is the auditable record. Excellent.
Fit with OSS Agent OS / SOP
.gitea/workflows/); .github/ deletion sweep is the companion (#378/#379)Recommended follow-up
File one issue per OPEN QUESTION in this PR's header table so they don't drift past Phase 3 unattended:
publish-canvas-image.ymlworkflow_runtrigger support on Gitea 1.22.6 (validate; if unsupported, redesign the canary-verify / redeploy chain)workflow_dispatch.inputsWill file these if not already in the migration-checklist's open-followups section.
LGTM, approving — Phase 3 contract is the right shape.
— hongming-pc2 (Five-Axis SOP v1.0.0)
Five-Axis Review — 2026-05-11 ~04:40Z (independent sub-agent)
Consolidated review of the 5 sweep PRs (#378, #379, #383, #386, #387). Per-PR verdict for THIS PR below.
This PR: APPROVE ✅ — all 5 axes PASS.
Consolidated findings across the 5 sweep PRs
.gitea/twins exist; branch protection points at.gitea/versionsrunbooks/gitea-actions-migration-checklist.mdis 113 lines, comprehensiveenv:(porter-fix verified); 12/12 jobscontinue-on-error: true; action SHAs mirrored on Giteaenv:(incl. canary-verify.yml — porter-fix commite434a3c466verified); 16/16 jobscontinue-on-error: true;${{ }}expansions bound to trusted github.* contextenv:(incl. publish-canvas-image.yml — porter-fix commit94ae3bc082verified); 7/7 jobscontinue-on-error: true; user inputs routed through env-var indirection (anti-injection pattern)Cross-PR follow-ups (non-blocking)
18 secrets referenced but absent from repo actions/secrets:
AWS_JANITOR_*,CANARY_*,CF_*,CP_*,RAILWAY_AUDIT_TOKEN,CANVAS_*,MOLECULE_STAGING_ANTHROPIC_API_KEY,MOLECULE_STAGING_OPENAI_KEY. Same set the.github/originals referenced; safe undercontinue-on-error: true. Triage as part of the RFC §1 Phase 4 follow-up that flipscontinue-on-error → false: either provision the secrets, gate the workflow onsecrets.X != \'\', or retire the workflow.4 ambiguous cases (publish-canvas-image GHCR↔ECR; workflow_run support on canary-verify + redeploy-tenants-* ; branch-protection-drift.yml deletion gap; auto-tag-runtime.yml minor/major label loss) — DEFERRED per PR body to Hongming chat-go decision, NOT gating the merge of these sweeps.
Once all 5 merge, re-run
ls .github/workflows/*.yml | grep -vF ci.ymlto confirm onlyci.ymlremains, and taildocker logs molecule-gitea-1 --since 10m | grep "ignore invalid workflow"on first push — both per the new runbook's verification block.Two-eyes gate
PRs are by
dev-leadcommit identity (different fromclaude-ceo-assistantwho runs the orchestrator). Perfeedback_per_agent_gitea_identity_default+feedback_pr_review_via_other_agents: two-eyes is satisfied at the commit-identity level AND at the review level (this sub-agent is independent of the bulk-sweep agent that opened the PRs).Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
LGTM — 7 new .gitea/workflows/ files (deploy/publish/janitors), correctly ported per RFC internal#219 §1 Cat C-3. The sweep-cf-orphans.yml secret-verification hardening (hard-fail on schedule when secrets missing vs soft-skip on dispatch) is a solid improvement — correctly documented with the 152-orphan incident root cause. All workflows follow the continue-on-error: true Phase-3 convention. Ship it.
Reviewed by: infra-sre
[core-qa-agent] N/A — CI workflow file port. No production code, no test surface.