Skip to content

feat(harness): 離線集群 RSI 并行轮协调器 #4669

feat(harness): 離線集群 RSI 并行轮协调器

feat(harness): 離線集群 RSI 并行轮协调器 #4669

name: CI — knowledge declaration policy

Check warning on line 1 in .github/workflows/knowledge-model-policy.yml

View workflow run for this annotation

GitHub Actions / CI — knowledge declaration policy

Workflow execution policy warning (evaluate mode)

On December 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
on:
pull_request_target:
types: [opened, synchronize, reopened, edited, ready_for_review, closed]
issue_comment:
types: [created, edited, deleted]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pull-requests: read
issues: read
statuses: write
jobs:
declarations:
# Keep eligibility identical here and in the group: skipped comments must not
# replace a pending writer, regardless of GitHub's evaluation order.
if: >-
${{ github.event_name != 'issue_comment' || !github.event.issue ||
!github.event.comment || !github.event.action ||
(github.event.issue.pull_request && (github.event.action != 'created' ||
!github.event.comment.body ||
contains(github.event.comment.body, 'knowledge-policy-approval'))) }}
concurrency:
group: >-
${{ (github.event_name != 'issue_comment' || !github.event.issue ||
!github.event.comment || !github.event.action ||
(github.event.issue.pull_request && (github.event.action != 'created' ||
!github.event.comment.body ||
contains(github.event.comment.body, 'knowledge-policy-approval')))) &&
'knowledge-policy-status-writer' ||
format('knowledge-policy-skipped-{0}-{1}', github.run_id, github.run_attempt) }}
# Preserve the serialized writer without replacing the sole pending merge event.
# GitHub bounds this queue at 100; overflow can still cancel pending work.
queue: max
cancel-in-progress: false
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
ref: main
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: "3.11"
# Push jobs report reconciliation execution, not admission success for every PR.
# Capacity findings remain explicit in the final summary and per-head statuses.
- name: Reconcile declarations with trusted main code
env:
GITHUB_TOKEN: ${{ github.token }}
run: bash tools/run_knowledge_model_policy.sh