Compare commits

..

1 Commits

Author SHA1 Message Date
core-devops 25f6bc85ad fix(ci): add per-PR concurrency groups to SOP workflows (mc#1134)
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 11s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 16s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 18s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 25s
CI / Detect changes (pull_request) Successful in 41s
E2E API Smoke Test / detect-changes (pull_request) Successful in 48s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 24s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m14s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m2s
qa-review / approved (pull_request) Failing after 22s
security-review / approved (pull_request) Failing after 29s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 11s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m35s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m47s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 9s
gate-check-v3 / gate-check (pull_request) Successful in 24s
sop-tier-check / tier-check (pull_request) Successful in 15s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 2m22s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 10s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 2m28s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 13s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 2m25s
CI / Python Lint & Test (pull_request) Successful in 7m35s
CI / Platform (Go) (pull_request) Successful in 12m40s
CI / Canvas (Next.js) (pull_request) Successful in 15m8s
CI / all-required (pull_request) Successful in 15m22s
CI / Canvas Deploy Reminder (pull_request) Successful in 3s
sop-checklist / all-items-acked (pull_request) acked: 2/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +2
audit-force-merge / audit (pull_request) Has been skipped
SOP workflows were missing concurrency groups, causing queue storms
when comment bursts fired multiple simultaneous runs on the same PR.

Changes:
- sop-tier-check.yml:       add concurrency group (was missing entirely)
- review-refire-comments.yml: add concurrency group (issue_comment-only)
- sop-checklist.yml:         fix fallback to github.event.issue.number
                              for issue_comment on Issues (not PRs)

Fixes: mc#1134
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 05:51:29 +00:00
6 changed files with 18 additions and 66 deletions
+7 -4
View File
@@ -9,6 +9,13 @@
name: review-refire-comments
# Cancel in-progress runs for the same PR to prevent stale status overwrites.
# mc#1134: issue_comment bursts queued duplicate runs — one concurrency group
# per PR prevents that while still allowing the no-op runs to finish quickly.
concurrency:
group: ${{ github.repository }}-${{ github.event.issue.number }}
cancel-in-progress: true
on:
issue_comment:
types: [created]
@@ -18,10 +25,6 @@ permissions:
pull-requests: read
statuses: write
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.event.issue.number || github.ref }}
cancel-in-progress: true
jobs:
dispatch:
runs-on: ubuntu-latest
+4 -1
View File
@@ -69,8 +69,11 @@ name: sop-checklist
# Cancel any in-progress runs for the same PR to prevent
# stale runs from overwriting newer status contexts.
# mc#1134: use || fallback — github.event.pull_request.number is null for
# issue_comment on Issues (not PRs), but github.event.issue.number is always
# set on issue_comment events.
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number || github.ref }}
group: ${{ github.repository }}-${{ github.event.pull_request.number || github.event.issue.number }}
cancel-in-progress: true
# bp-required: yes ← emits sop-checklist / all-items-acked (pull_request)
+6 -4
View File
@@ -41,6 +41,12 @@
name: sop-tier-check
# Cancel in-progress runs for the same PR to prevent stale status overwrites.
# mc#1134: was missing entirely — comment bursts caused queue storms.
concurrency:
group: ${{ github.repository }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
# SECURITY: triggers MUST use `pull_request_target`, not `pull_request`.
# `pull_request_target` loads the workflow definition from the BASE
# branch (i.e. `main`), not the PR's HEAD. With `pull_request`, anyone
@@ -61,10 +67,6 @@ on:
pull_request_review:
types: [submitted, dismissed, edited]
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tier-check:
runs-on: ubuntu-latest
@@ -63,31 +63,6 @@ func TestSessionSearchReturnsActivityAndMemory(t *testing.T) {
}
}
func TestSessionSearch_DBError(t *testing.T) {
mock := setupTestDB(t)
setupTestRedis(t)
broadcaster := newTestBroadcaster()
handler := NewActivityHandler(broadcaster)
mock.ExpectQuery("WITH session_items AS").
WillReturnError(context.DeadlineExceeded)
w := httptest.NewRecorder()
c, _ := gin.CreateTestContext(w)
c.Request = httptest.NewRequest("GET", "/workspaces/ws-123/session-search?q=test", bytes.NewBufferString(""))
c.Request.Header.Set("Content-Type", "application/json")
c.Params = gin.Params{{Key: "id", Value: "ws-123"}}
handler.SessionSearch(c)
if w.Code != http.StatusInternalServerError {
t.Errorf("expected 500 on DB error, got %d", w.Code)
}
if err := mock.ExpectationsWereMet(); err != nil {
t.Errorf("unmet sqlmock expectations: %v", err)
}
}
// ---------- Activity List source filter ----------
func TestActivityList_SourceCanvas(t *testing.T) {
@@ -543,33 +543,6 @@ func TestDelegationRecord_RejectsInvalidUUID(t *testing.T) {
}
}
func TestDelegationRecord_DBInsertFails(t *testing.T) {
mock := setupTestDB(t)
setupTestRedis(t)
broadcaster := newTestBroadcaster()
wh := NewWorkspaceHandler(broadcaster, nil, "http://localhost:8080", t.TempDir())
h := NewDelegationHandler(wh, broadcaster)
mock.ExpectExec("INSERT INTO activity_logs").
WillReturnError(fmt.Errorf("connection refused"))
w := httptest.NewRecorder()
c, _ := gin.CreateTestContext(w)
c.Params = gin.Params{{Key: "id", Value: "550e8400-e29b-41d4-a716-446655440000"}}
body := `{"target_id":"550e8400-e29b-41d4-a716-446655440001","task":"hello","delegation_id":"del-xyz"}`
c.Request = httptest.NewRequest("POST", "/delegations/record", bytes.NewBufferString(body))
c.Request.Header.Set("Content-Type", "application/json")
h.Record(c)
if w.Code != http.StatusInternalServerError {
t.Errorf("expected 500 on DB insert failure, got %d", w.Code)
}
if err := mock.ExpectationsWereMet(); err != nil {
t.Errorf("unmet expectations: %v", err)
}
}
func TestDelegationUpdateStatus_CompletedInsertsResultRow(t *testing.T) {
mock := setupTestDB(t)
setupTestRedis(t)
@@ -646,12 +646,8 @@ const externalOpenClawTemplate = `# OpenClaw MCP config — outbound tool path.
# external machine today, pair with the Python SDK tab.
# 1. Install openclaw CLI + the workspace runtime wheel:
# The version pin (>=0.1.999) ensures the "molecule-mcp" console
# script is present — it is what keeps the workspace ALIVE on canvas
# (register-on-startup + 20s heartbeat). Older versions only ship
# a2a_mcp_server which does not heartbeat.
npm install -g openclaw@latest
pip install "molecule-ai-workspace-runtime>=0.1.999"
pip install molecule-ai-workspace-runtime
# 2. Onboard openclaw against your model provider (one-time setup).
# --non-interactive needs an explicit --provider + --model so it