Skip to content

Commit 6308d2a

Browse files
authored
chore(ci): add channel CodeQL PR quality guard
Adds the channel runtime quality shard to the PR CodeQL guard and keeps non-security quality analysis path-sharded by surface.
1 parent 2d53b1d commit 6308d2a

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/codeql-critical-quality.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
type: choice
1111
options:
1212
- all
13+
- channel-runtime-boundary
1314
- gateway-runtime-boundary
1415
- plugin-boundary
1516
- plugin-sdk-package-contract
@@ -23,6 +24,7 @@ on:
2324
- ".github/workflows/codeql-critical-quality.yml"
2425
- "packages/plugin-package-contract/**"
2526
- "packages/plugin-sdk/**"
27+
- "src/channels/**"
2628
- "src/gateway/method-scopes.ts"
2729
- "src/gateway/protocol/**"
2830
- "src/gateway/server-methods/**"
@@ -53,6 +55,7 @@ jobs:
5355
runs-on: blacksmith-4vcpu-ubuntu-2404
5456
timeout-minutes: 5
5557
outputs:
58+
channel: ${{ steps.detect.outputs.channel }}
5659
gateway: ${{ steps.detect.outputs.gateway }}
5760
plugin: ${{ steps.detect.outputs.plugin }}
5861
plugin_sdk_package: ${{ steps.detect.outputs.plugin_sdk_package }}
@@ -68,12 +71,14 @@ jobs:
6871
run: |
6972
set -euo pipefail
7073
74+
channel=false
7175
gateway=false
7276
plugin=false
7377
plugin_sdk_package=false
7478
provider=false
7579
7680
if [[ "${EVENT_NAME}" != "pull_request" ]]; then
81+
channel=true
7782
gateway=true
7883
plugin=true
7984
plugin_sdk_package=true
@@ -82,11 +87,15 @@ jobs:
8287
while IFS= read -r file; do
8388
case "${file}" in
8489
.github/codeql/*|.github/workflows/codeql-critical-quality.yml)
90+
channel=true
8591
gateway=true
8692
plugin=true
8793
plugin_sdk_package=true
8894
provider=true
8995
;;
96+
src/channels/*)
97+
channel=true
98+
;;
9099
src/gateway/method-scopes.ts|src/gateway/protocol/*|src/gateway/server-methods/*|src/gateway/server-methods.ts|src/gateway/server-methods-list.ts)
91100
gateway=true
92101
;;
@@ -112,6 +121,7 @@ jobs:
112121
fi
113122
114123
{
124+
echo "channel=${channel}"
115125
echo "gateway=${gateway}"
116126
echo "plugin=${plugin}"
117127
echo "plugin_sdk_package=${plugin_sdk_package}"
@@ -187,7 +197,8 @@ jobs:
187197

188198
channel-runtime-boundary:
189199
name: Critical Quality (channel-runtime-boundary)
190-
if: ${{ github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.profile == 'all') }}
200+
needs: quality-shards
201+
if: ${{ needs.quality-shards.outputs.channel == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft) && (github.event_name == 'pull_request' || github.event_name != 'workflow_dispatch' || inputs.profile == 'all' || inputs.profile == 'channel-runtime-boundary') }}
191202
runs-on: blacksmith-4vcpu-ubuntu-2404
192203
timeout-minutes: 25
193204
steps:

docs/ci.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,13 @@ The `CodeQL Critical Quality` workflow is the matching non-security shard. It
299299
runs only error-severity, non-security JavaScript/TypeScript quality queries
300300
over narrow high-value surfaces on the smaller Blacksmith Linux runner. Its
301301
pull request guard is intentionally smaller than the scheduled profile: non-draft
302-
PRs only run the matching `gateway-runtime-boundary`, `provider-runtime-boundary`,
303-
`plugin-boundary`, and `plugin-sdk-package-contract` shards for gateway
302+
PRs only run the matching `channel-runtime-boundary`,
303+
`gateway-runtime-boundary`, `provider-runtime-boundary`, `plugin-boundary`, and
304+
`plugin-sdk-package-contract` shards for channel runtime, gateway
304305
protocol/server-method, provider runtime/model catalog, plugin loader, Plugin
305306
SDK, or package-contract changes. CodeQL config and quality workflow changes run
306-
all four PR quality shards. Its manual dispatch accepts
307-
`profile=all|gateway-runtime-boundary|plugin-boundary|plugin-sdk-package-contract|plugin-sdk-reply-runtime|provider-runtime-boundary|session-diagnostics-boundary`;
307+
all five PR quality shards. Its manual dispatch accepts
308+
`profile=all|channel-runtime-boundary|gateway-runtime-boundary|plugin-boundary|plugin-sdk-package-contract|plugin-sdk-reply-runtime|provider-runtime-boundary|session-diagnostics-boundary`;
308309
the narrow profiles are teaching/iteration hooks for running one quality shard
309310
in isolation without dispatching the rest of the workflow.
310311
Its

0 commit comments

Comments
 (0)