fix(ci): scope operational workflows to intended trigger windows (#504, #419)
All checks were successful
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 12s
CI / Detect changes (pull_request) Successful in 40s
CI / Platform (Go) (pull_request) Successful in 6s
CI / Canvas (Next.js) (pull_request) Successful in 7s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 6s
CI / Python Lint & Test (pull_request) Successful in 8s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
sop-tier-check / tier-check (pull_request) Bypass approved
Secret scan / Scan diff for credential-shaped strings (pull_request) Bypass approved
Handlers Postgres Integration / detect-changes (pull_request) Bypass approved
Runtime PR-Built Compatibility / detect-changes (pull_request) Bypass approved
E2E API Smoke Test / detect-changes (pull_request) Bypass approved
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Bypass approved

Issue #504: e2e-staging-saas.yml had BOTH push:[main] + pull_request:[main].
This caused the full 25-35 min staging provision+teardown cycle to fire on
every PR push to main (in addition to the push trigger). The pull_request
trigger is removed — branch protection ensures only merged code reaches
main, so push:[main] is sufficient. Pre-merge E2E for provisioning paths
is better served by local harness-replays.yml (which stays push+pull_request).

Issue #419: gate-check-v3.yml had workflow_dispatch.inputs which Gitea
1.22.6 parser rejects with "unknown on type" (it mis-treats the inputs
sub-keys as top-level on: event types). The entire workflow was silently
ignored. Dropping the inputs block restores parsing. Manual dispatch from
the Gitea UI works without the schema (github.event.inputs.X returns
empty; the script iterates all open PRs when PR_NUMBER is empty).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Molecule AI · core-devops 2026-05-11 16:48:58 +00:00
parent fc1b15b46a
commit 5c97580133
2 changed files with 16 additions and 26 deletions

View File

@ -24,17 +24,19 @@ name: E2E Staging SaaS (full lifecycle)
# PRs don't need to read.
#
# Triggers:
# - Push to main (regression guard)
# - Push to main (regression guard — fires on merges to main, not on PR updates)
# - workflow_dispatch (manual re-run from UI)
# - Nightly cron (catches drift even when no pushes land)
# - Changes to any provisioning-critical file under PR review (opt-in
# via the same paths watcher that e2e-api.yml uses)
#
# NOTE: `pull_request` trigger intentionally omitted. This workflow runs a
# full 25-35 min staging provision + teardown cycle. Firing it on every
# PR push to main (in addition to the push trigger) causes duplicate runs
# and wastes runner minutes. Branch protection ensures only merged code
# reaches main, so the push trigger is sufficient. Pre-merge E2E validation
# for provisioning-critical paths is better served by local `harness-replays.yml`.
on:
# Trunk-based (Phase 3 of internal#81): main is the only branch.
# Previously this fired on staging push too because staging was a
# superset of main and ran the gate ahead of auto-promote; with no
# staging branch, main is where E2E gates the deploy.
push:
branches: [main]
paths:
@ -45,16 +47,7 @@ on:
- 'workspace-server/internal/provisioner/**'
- 'tests/e2e/test_staging_full_saas.sh'
- '.gitea/workflows/e2e-staging-saas.yml'
pull_request:
branches: [main]
paths:
- 'workspace-server/internal/handlers/registry.go'
- 'workspace-server/internal/handlers/workspace_provision.go'
- 'workspace-server/internal/handlers/a2a_proxy.go'
- 'workspace-server/internal/middleware/**'
- 'workspace-server/internal/provisioner/**'
- 'tests/e2e/test_staging_full_saas.sh'
- '.gitea/workflows/e2e-staging-saas.yml'
workflow_dispatch:
schedule:
# 07:00 UTC every day — catches AMI drift, WorkOS cert rotation,
# Cloudflare API regressions, etc. even on quiet days.

View File

@ -23,17 +23,14 @@ on:
schedule:
# Hourly: refresh all open PRs
- cron: '8 * * * *'
# NOTE: `workflow_dispatch.inputs` block intentionally omitted.
# Gitea 1.22.6 parser rejects `workflow_dispatch.inputs.X` with
# "unknown on type" — it mis-treats the inputs sub-keys as top-level
# `on:` event types. Dropping the inputs block restores parsing.
# Manual dispatch from the Gitea UI works without the inputs schema
# (github.event.inputs.X returns empty); the script falls back to
# iterating all open PRs when PR_NUMBER is empty.
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to check (omit for all open PRs)'
required: false
type: string
post_comment:
description: 'Post comment on PR'
required: false
type: string
default: 'true'
env:
GITHUB_SERVER_URL: https://git.moleculesai.app