Files
molecule-ai-workspace-templ…/.gitea/workflows/mcp-plugin-delivery-contract-drift.yml
T
hongming 55906797f4
CI / Template validation (static) (push) Skipped
CI / Template validation (runtime) (push) Skipped
CI / T4 tier-4 conformance (live) (push) Skipped
CI / validate (push) Skipped
CI / Adapter unit tests (push) Skipped
CI / Adapter conformance (ADR-004 socket) (push) Skipped
mcp-plugin-delivery-contract-drift / Compare MCP plugin delivery contract against SDK canonical (push) Skipped
meta-ci-advisory / meta (advisory) (push) Skipped
publish-image / Resolve runtime version (push) Skipped
publish-image / Classify change (decouple publish from promote) (push) Skipped
publish-image / Build & push workspace-template-claude-code image (push) Skipped
publish-image / Promote runtime_image_pins (CP admin) (staging-api.moleculesai.app, staging) (push) Skipped
publish-image / Verify runtime_image_pins moved (fail-loud) (staging-api.moleculesai.app, staging) (push) Skipped
Secret scan / Scan diff for credential-shaped strings (push) Skipped
sync-providers-yaml / Compare synced providers.yaml against controlplane canonical (push) Skipped
verify-providers-projection / Regenerate projection, fail on drift, assert registry ⊆ template (push) Skipped
mcp-plugin-delivery-contract-drift / Compare MCP plugin delivery contract against SDK canonical (pull_request) Successful in 2s
CI / Template validation (static) (pull_request) Successful in 6s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 3s
meta-ci-advisory / meta (advisory) (pull_request) Successful in 4s
sync-providers-yaml / Compare synced providers.yaml against controlplane canonical (pull_request) Successful in 3s
CI / Adapter unit tests (pull_request) Successful in 6s
verify-providers-projection / Regenerate projection, fail on drift, assert registry ⊆ template (pull_request) Successful in 15s
CI / Adapter conformance (ADR-004 socket) (pull_request) Successful in 28s
CI / Template validation (runtime) (pull_request) Successful in 1m43s
CI / T4 tier-4 conformance (live) (pull_request) Successful in 1m47s
CI / validate (pull_request) Successful in 1s
Merge branch 'main' into ci/no-cron-per-pr-gating
2026-10-09 16:05:28 +00:00

62 lines
2.5 KiB
YAML

name: mcp-plugin-delivery-contract-drift
# Cross-repo drift gate for the MCP-plugin delivery contract (core#3080).
#
# molecule-ai-sdk is the public SSOT for this contract. This template keeps a
# local copy because it must render the MCP settings surface during workspace
# bootstrap. This workflow fetches the SDK copy and byte-compares it against the
# template's local copy. RED if they differ — the template and SDK must agree so
# runtime bootstrap and platform-side gates read the same contract.
#
# ENFORCEMENT GATING: standalone workflow, NOT a job in ci.yml and NOT in
# branch protection (soak-then-promote; mirrors molecule-core's
# mcp-plugin-delivery-contract-drift.yml).
#
# AUTH: uses AUTO_SYNC_TOKEN (the existing cross-repo read token). If the
# secret is absent on a trusted context the job fails closed; on untrusted
# fork PRs it soft-skips.
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'contracts/mcp-plugin-delivery.contract.json'
- '.gitea/workflows/mcp-plugin-delivery-contract-drift.yml'
push:
branches: [main]
paths:
- 'contracts/mcp-plugin-delivery.contract.json'
- '.gitea/workflows/mcp-plugin-delivery-contract-drift.yml'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: mcp-plugin-delivery-contract-drift-${{ github.ref }}
cancel-in-progress: true
jobs:
# bp-required: pending #3080 — soak-then-promote; standalone drift gate, not in branch protection yet.
compare:
name: Compare MCP plugin delivery contract against SDK canonical
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Fetch SDK contract and byte-compare
env:
SDK_CONTRACT_URL: https://git.moleculesai.app/molecule-ai/molecule-ai-sdk/raw/branch/main/contracts/mcp/mcp-plugin-delivery.contract.json
run: |
set -euo pipefail
curl -fsS -A curl/8.4.0 "$SDK_CONTRACT_URL" -o /tmp/canonical-mcp-plugin-delivery.contract.json
LOCAL=contracts/mcp-plugin-delivery.contract.json
if diff -u /tmp/canonical-mcp-plugin-delivery.contract.json "$LOCAL"; then
echo "OK — template's contract is byte-identical to the SDK canonical."
else
echo "::error::template's mcp-plugin-delivery.contract.json DRIFTED from the SDK canonical."
echo "Re-sync: copy molecule-ai-sdk contracts/mcp/mcp-plugin-delivery.contract.json verbatim over $LOCAL."
exit 1
fi