Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI

Check warning on line 1 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

1:1 [document-start] missing document start "---"

on:
workflow_dispatch:
Expand All @@ -13,6 +13,10 @@
- "engine/**"
- ".github/workflows/ci.yml"

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
# It runs when Copilot is assigned to work on issues in this repository.
# See: https://gh.io/copilot-coding-agent-tips

name: Copilot Setup Steps

Check warning on line 6 in .github/workflows/copilot-setup-steps.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

6:1 [document-start] missing document start "---"

on: workflow_dispatch

concurrency:
group: copilot-setup-steps-${{ github.ref }}

env:
PYTHON_VERSION: "3.13"

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-autopr-engine.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy CodeFlow Engine

Check warning on line 1 in .github/workflows/deploy-autopr-engine.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

1:1 [document-start] missing document start "---"

on:
push:
Expand All @@ -20,6 +20,9 @@
- "scripts/setup-azure-auth-for-pipeline.ps1"
workflow_dispatch:

concurrency:
group: deploy-autopr-engine-${{ github.event.pull_request.number || github.ref }}

env:
IMAGE_REPOSITORY: codeflow-engine

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Website to Azure

Check warning on line 1 in .github/workflows/deploy-website.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

1:1 [document-start] missing document start "---"

on:
push:
Expand All @@ -13,6 +13,9 @@
- ".github/workflows/deploy-website.yml"
workflow_dispatch:

concurrency:
group: deploy-website-${{ github.event.pull_request.number || github.ref }}

permissions:
contents: read
pull-requests: write
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/destroy-infra.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Destroy Infrastructure

Check warning on line 1 in .github/workflows/destroy-infra.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

1:1 [document-start] missing document start "---"

on:
workflow_dispatch:

concurrency:
group: destroy-infra-${{ github.ref }}
Comment on lines +6 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- workflow ---'
cat -n .github/workflows/destroy-infra.yml
printf '%s\n' '--- related workflow references ---'
rg -n --glob '.github/workflows/**' 'concurrency:|group:|cancel-in-progress:|environment:|terraform (destroy|apply)|destroy' .github/workflows
printf '%s\n' '--- repository guidance ---'
rg -n 'queue: max|concurrency|destroy-infra|production' .github README.md 2>/dev/null || true

Repository: phoenixvc/codeflow-engine

Length of output: 6353


🌐 Web query:

site:docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions concurrency one running one pending queued job new queued cancels pending

💡 Result:

In the context of GitHub Actions, the behavior you described is the default configuration for concurrency groups [1]. When a concurrency group has a job already running and a new job is triggered, the new job enters a pending state [1]. By default, if another job is already in the pending state within that same group, that existing pending job is canceled and replaced by the new incoming job [1]. This default behavior is defined by the queue property being set to single, which ensures at most one job or workflow run can be pending in the concurrency group at any time [1]. To change this behavior to allow more jobs to queue instead of being canceled, you can set the queue property to max, which allows up to 100 jobs to wait in the queue before additional jobs are canceled [1]. Additionally, you can control whether the currently running job is canceled by setting the cancel-in-progress property to true [1].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
url='https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions'
python3 - <<'PY'
import urllib.request
url = "https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions"
data = urllib.request.urlopen(url, timeout=20).read().decode("utf-8", "replace")
for needle in ("queue:", "queue", "cancel-in-progress", "pending"):
    print(f"--- {needle} ---")
    start = 0
    found = False
    while True:
        pos = data.lower().find(needle.lower(), start)
        if pos < 0:
            break
        found = True
        print(data[max(0, pos-180):pos+320].replace("\n", " ")[:500])
        start = pos + len(needle)
    if not found:
        print("not found")
PY

Repository: phoenixvc/codeflow-engine

Length of output: 2449


🌐 Web query:

GitHub Actions concurrency queue key queue: max official documentation

💡 Result:

In GitHub Actions, the queue: max property within the concurrency configuration allows up to 100 jobs or workflow runs to be placed in a pending state per concurrency group [1][2]. Key details regarding queue: max: - Functionality: By default, only one run can be in a pending state for a concurrency group, with new runs canceling the previous one [1][3]. Setting queue: max enables a queue of up to 100 pending runs that execute sequentially [1][4]. - Queue Limit: Once the queue reaches the limit of 100 pending runs, any additional jobs or workflow runs added to that concurrency group will be canceled [1][2]. - Restriction: You cannot use queue: max in combination with cancel-in-progress: true [1][3]. Attempting to do so will result in a workflow validation error because they represent conflicting behaviors for handling in-progress runs [1][4]. Example configuration: concurrency: group: production-deploy queue: max [1][3]

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
python3 - <<'PY'
import urllib.request
url = "https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions"
data = urllib.request.urlopen(url, timeout=20).read().decode("utf-8", "replace")
for needle in ("queue:", "queue", "cancel-in-progress", "pending"):
    print(f"--- {needle} ---")
    start = 0
    found = False
    while True:
        pos = data.lower().find(needle.lower(), start)
        if pos < 0:
            break
        found = True
        print(data[max(0, pos-180):pos+320].replace("\n", " ")[:500])
        start = pos + len(needle)
    if not found:
        print("not found")
PY

Repository: phoenixvc/codeflow-engine

Length of output: 2449


Serialize all production destroys and preserve pending requests.

  • Use a ref-independent group such as destroy-infra-production; github.ref allows destroys from different refs to run concurrently.
  • If every teardown request must execute, add queue: max; otherwise, a new pending run replaces the existing pending run in the same group.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/destroy-infra.yml around lines 6 - 7, Update the workflow
concurrency configuration to use a ref-independent group such as
destroy-infra-production so production teardown runs serialize across all refs.
Configure the concurrency queue to preserve every pending destroy request by
adding queue: max.


jobs:
destroy-infra:
name: Destroy Infrastructure
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint

Check warning on line 1 in .github/workflows/lint.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

1:1 [document-start] missing document start "---"

on:
push:
Expand All @@ -12,6 +12,10 @@
- "engine/**"
- ".github/workflows/lint.yml"

concurrency:
group: lint-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
ruff:
name: Ruff Linting
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/monorepo-ci.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
name: Monorepo CI

on:
workflow_dispatch:

Check failure on line 4 in .github/workflows/monorepo-ci.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

4:5 [indentation] wrong indentation: expected 2 but found 4
push:
branches: [master]

Check failure on line 6 in .github/workflows/monorepo-ci.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

6:9 [indentation] wrong indentation: expected 6 but found 8
paths:
- "engine/**"

Check failure on line 8 in .github/workflows/monorepo-ci.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

8:13 [indentation] wrong indentation: expected 10 but found 12
- "desktop/**"
- "website/**"
- "orchestration/**"
- "vscode-extension/**"
- ".github/workflows/monorepo-ci.yml"
pull_request:
branches: [master]

Check failure on line 15 in .github/workflows/monorepo-ci.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

15:9 [indentation] wrong indentation: expected 6 but found 8
paths:
- "engine/**"

Check failure on line 17 in .github/workflows/monorepo-ci.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

17:13 [indentation] wrong indentation: expected 10 but found 12
- "desktop/**"
- "website/**"
- "orchestration/**"
- "vscode-extension/**"
- ".github/workflows/monorepo-ci.yml"

concurrency:
group: monorepo-ci-${{ github.event.pull_request.number || github.ref }}

Check failure on line 25 in .github/workflows/monorepo-ci.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

25:5 [indentation] wrong indentation: expected 2 but found 4
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Comment on lines +24 to +26

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the concurrency block indentation.

The YAML validator flags Line 25 because the child keys use four spaces. Reindent the block to the expected two-space level.

Proposed fix
 concurrency:
-    group: monorepo-ci-${{ github.event.pull_request.number || github.ref }}
-    cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+  group: monorepo-ci-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
concurrency:
group: monorepo-ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
concurrency:
group: monorepo-ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
🧰 Tools
🪛 GitHub Check: Validate YAML Files

[failure] 25-25:
25:5 [indentation] wrong indentation: expected 2 but found 4

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/monorepo-ci.yml around lines 24 - 26, Fix the indentation
of the child keys in the workflow’s concurrency block: align group and
cancel-in-progress two spaces beneath concurrency, preserving their existing
values.

Source: Linters/SAST tools


jobs:
changes:

Check failure on line 29 in .github/workflows/monorepo-ci.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

29:5 [indentation] wrong indentation: expected 2 but found 4
runs-on: ubuntu-latest

Check failure on line 30 in .github/workflows/monorepo-ci.yml

View workflow job for this annotation

GitHub Actions / Validate YAML Files

30:9 [indentation] wrong indentation: expected 6 but found 8
outputs:
engine: ${{ steps.filter.outputs.engine }}
desktop: ${{ steps.filter.outputs.desktop }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr-comment-handler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
issue_comment:
types: [created]

concurrency:
group: pr-comment-handler-${{ github.event.issue.number }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve every queued PR comment event

When three comments arrive on the same PR while the first handler is still running, the second run becomes pending and the third replaces it, so the second comment is never analyzed or applied. Omitting cancel-in-progress does not create an unbounded serialized queue: GitHub concurrency permits at most one running and one pending run and cancels an existing pending run when another is queued. Since each issue_comment run contains a distinct payload, this grouping can silently discard user commands; use a group unique to the comment or another serialization mechanism that retains every event.

Useful? React with 👍 / 👎.

Comment on lines +7 to +8

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu
for f in \
  .github/workflows/pr-comment-handler.yml \
  .github/workflows/copilot-setup-steps.yml \
  .github/workflows/destroy-infra.yml \
  .github/workflows/release-desktop.yml
do
  printf '\n===== %s =====\n' "$f"
  sed -n '1,45p' "$f"
done
printf '\n===== concurrency and queue keys =====\n'
rg -n -C 3 'concurrency:|cancel-in-progress|queue:' .github/workflows

Repository: phoenixvc/codeflow-engine

Length of output: 12590


🌐 Web query:

GitHub Actions workflow syntax concurrency pending runs queue max replace pending run cancel-in-progress official documentation

💡 Result:

In GitHub Actions, the concurrency keyword controls how multiple runs of a workflow or job within the same concurrency group behave [1][2]. Default Behavior By default, a concurrency group allows at most one running job or workflow and one pending job or workflow [3][2]. If a new job or workflow is queued while another is already pending in the same group, the existing pending run is automatically canceled and replaced by the new one [3][2]. Queueing with queue: max To support sequential processing of multiple runs, you can use the queue property [1][4]. Setting queue: max allows up to 100 jobs or workflow runs to be queued in a single concurrency group [5][6]. Once this limit is reached, any additional runs entering the group will be rejected [6]. This setting is intended for workflows that must execute in order, such as deployments to a shared environment [4]. Cancellation Control with cancel-in-progress The cancel-in-progress property determines whether an active, running job is terminated when a new job enters the concurrency group [3][2]. - When cancel-in-progress: true, any currently running job or workflow in the group will be canceled when a new one starts [3][2]. - When cancel-in-progress: false (the default) or omitted, active jobs are allowed to finish, and the new job will wait in the queue [2][7]. Combining these settings allows you to customize whether you prefer to stop old runs to save resources or queue them to ensure all tasks execute sequentially [8][4]. Concurrency group names must be unique if you intend to isolate workflows; if multiple workflows share the same group name, they will compete for that single concurrency slot [5].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re

files = [
    ".github/workflows/pr-comment-handler.yml",
    ".github/workflows/copilot-setup-steps.yml",
    ".github/workflows/destroy-infra.yml",
    ".github/workflows/release-desktop.yml",
]
for name in files:
    text = Path(name).read_text(encoding="utf-8-sig")
    concurrency = text.split("concurrency:", 1)[1].split("\njobs:", 1)[0]
    group = re.search(r"group:\s*(.+)", concurrency)
    cancel = re.search(r"cancel-in-progress:\s*(.+)", concurrency)
    queue = re.search(r"queue:\s*(.+)", concurrency)
    print(name)
    print("  group:", group.group(1).strip() if group else "<missing>")
    print("  cancel-in-progress:", cancel.group(1).strip() if cancel else "<omitted>")
    print("  queue:", queue.group(1).strip() if queue else "<omitted>")
    print("  trigger:", text.split("on:", 1)[1].split("concurrency:", 1)[0].strip().replace("\n", " "))
PY

printf '\n===== official documentation references =====\n'
curl -L --fail --silent --show-error \
  https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax \
  | rg -n -i -C 3 'queue: max|pending|concurrency group|cancel-in-progress' | head -120

Repository: phoenixvc/codeflow-engine

Length of output: 20500


🌐 Web query:

site:docs.github.com/en/actions "queue: max" concurrency GitHub Actions

💡 Result:

In GitHub Actions, the queue: max setting is used within the concurrency configuration to allow multiple jobs or workflow runs to wait in a pending state within the same concurrency group [1][2]. Key details regarding queue: max: - Capacity: When queue: max is specified, up to 100 jobs or workflow runs can be in a pending (queued) state simultaneously for that specific concurrency group [3][1]. - Queue Full Behavior: If the concurrency group's queue reaches this limit of 100 pending runs, any additional jobs or workflow runs triggered for that group will be canceled [1][2]. - Comparison to Default: By default, GitHub Actions uses a single queue setting, which permits only one pending job or workflow run at a time; when a new run is triggered, it cancels any existing pending run in that group [1][2]. - Purpose: This setting is useful when you need multiple runs to execute sequentially without them automatically canceling each other, ensuring they all eventually run in the order they were triggered [4]. Note that this queue limit is specific to the concurrency feature and is distinct from other limitations, such as matrix strategy parallelism (max-parallel) or total runner concurrency limits, which are managed at the account or organization level [3][5].

Citations:


Preserve required pending runs with queue: max. GitHub Actions cancels an existing pending run when a new run enters the same group. Add queue: max when every invocation must execute.

  • pr-comment-handler.yml: required to avoid dropping commands for the same pull request.
  • copilot-setup-steps.yml: add it if every setup invocation for the same ref must execute.
  • destroy-infra.yml: add it if every teardown request for the same ref must execute.
  • release-desktop.yml: add it only if repeated runs for the same tag ref must execute. Different tag refs use different groups.

queue: max retains up to 100 pending runs. Additional runs are canceled.

📍 Affects 4 files
  • .github/workflows/pr-comment-handler.yml#L7-L8 (this comment)
  • .github/workflows/copilot-setup-steps.yml#L10-L11
  • .github/workflows/destroy-infra.yml#L6-L7
  • .github/workflows/release-desktop.yml#L8-L9
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-comment-handler.yml around lines 7 - 8, Update the
concurrency configuration in .github/workflows/pr-comment-handler.yml at lines
7-8 to add queue: max so pending commands for the same pull request are
retained. Review .github/workflows/copilot-setup-steps.yml lines 10-11,
.github/workflows/destroy-infra.yml lines 6-7, and
.github/workflows/release-desktop.yml lines 8-9; add queue: max there only if
every invocation for the same ref or tag must execute, otherwise make no change.


permissions:
contents: write

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- "desktop-v*"

concurrency:
group: release-desktop-${{ github.ref }}

jobs:
release:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-orchestration-utils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- "orchestration-utils-v*"

concurrency:
group: release-orchestration-utils-${{ github.ref }}

jobs:
release:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-vscode-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- "vscode-extension-v*"

concurrency:
group: release-vscode-extension-${{ github.ref }}

jobs:
release:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- "website-v*"

concurrency:
group: release-website-${{ github.ref }}

jobs:
release:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- "engine-v*"

concurrency:
group: release-${{ github.ref }}

jobs:
release:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
schedule:
- cron: "0 0 * * 1" # Weekly on Monday

concurrency:
group: security-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read
security-events: write
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/validate-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
- "engine/install.ps1"
- ".github/workflows/*.yml"

concurrency:
group: validate-templates-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
validate-yaml:
name: Validate YAML Files
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/validate-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
- "vscode-extension/package.json"
- "orchestration/packages/@codeflow/utils/package.json"

concurrency:
group: validate-version-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
validate-version:
runs-on: ubuntu-latest
Expand Down
Loading