mirror of
https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering.git
synced 2026-09-14 20:36:54 +08:00
175 lines
7.1 KiB
YAML
175 lines
7.1 KiB
YAML
name: Validate Researcher Operating System
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
# Stacked pull requests use proposal branches as their base. Validate every
|
|
# pull request so dependent layers receive the same gates as the base layer.
|
|
pull_request: {}
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Repository secret scan
|
|
uses: gitleaks/gitleaks-action@e0c47f4f8be36e29cdc102c57e68cb5cbf0e8d1e # v3.0.0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITLEAKS_ENABLE_COMMENTS: "false"
|
|
GITLEAKS_VERSION: "8.30.1"
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
|
|
with:
|
|
node-version: "22"
|
|
cache: npm
|
|
cache-dependency-path: |
|
|
researcher/benchmarks/sdk-runner/package-lock.json
|
|
researcher/schemas/typescript/package-lock.json
|
|
|
|
- name: Install validation dependencies
|
|
run: pip install --require-hashes -r requirements-dev.txt
|
|
|
|
- name: Compile researcher scripts
|
|
run: |
|
|
python -m py_compile \
|
|
researcher/scripts/skill_frontmatter.py \
|
|
researcher/scripts/governance_policy.py \
|
|
researcher/scripts/build_inventory.py \
|
|
researcher/scripts/validate_spec_lifecycle.py \
|
|
researcher/scripts/export_policy.py \
|
|
researcher/scripts/schema_contract.py \
|
|
researcher/scripts/artifact_store.py \
|
|
researcher/scripts/migrate_legacy.py \
|
|
researcher/scripts/tests/test_skill_frontmatter.py \
|
|
researcher/scripts/tests/test_build_inventory.py \
|
|
researcher/scripts/tests/test_spec_lifecycle.py \
|
|
researcher/scripts/tests/test_export_policy.py \
|
|
researcher/scripts/tests/test_governance_policy.py \
|
|
researcher/scripts/tests/test_schema_contract.py \
|
|
researcher/scripts/tests/test_artifact_store.py \
|
|
researcher/scripts/tests/test_public_repo.py \
|
|
researcher/scripts/validate_governance.py \
|
|
researcher/scripts/validate_export.py \
|
|
researcher/scripts/validate_public_repo.py \
|
|
researcher/scripts/validate_schemas.py \
|
|
researcher/scripts/validate_platform_compat.py \
|
|
researcher/scripts/validate_repo.py \
|
|
researcher/scripts/validate_run.py \
|
|
researcher/scripts/research_loop.py \
|
|
researcher/scripts/novelty_check.py \
|
|
researcher/scripts/compare_skill_revisions.py \
|
|
researcher/scripts/check_activation_cases.py \
|
|
researcher/scripts/run_benchmarks.py \
|
|
researcher/scripts/skill_health.py \
|
|
researcher/scripts/loop_common.py \
|
|
researcher/scripts/loop_discover.py \
|
|
researcher/scripts/loop_step.py \
|
|
researcher/scripts/loop_daily.py \
|
|
researcher/scripts/loop_status.py \
|
|
examples/long-horizon-prompt-lab/scripts/build_lab.py \
|
|
examples/long-horizon-prompt-lab/scripts/validate_site.py
|
|
|
|
- name: Researcher unit tests
|
|
run: python -m unittest discover -s researcher/scripts/tests -p 'test_*.py'
|
|
|
|
- name: Public repository boundary
|
|
run: python researcher/scripts/validate_public_repo.py
|
|
|
|
- name: Governance policy
|
|
run: python researcher/scripts/validate_governance.py --check
|
|
|
|
- name: Generated repository inventory
|
|
run: python researcher/scripts/build_inventory.py --check
|
|
|
|
- name: Specification lifecycle against protected base
|
|
env:
|
|
EVENT_NAME: ${{ github.event_name }}
|
|
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
PUSH_BEFORE_SHA: ${{ github.event.before }}
|
|
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
|
run: |
|
|
if [ "$EVENT_NAME" = "pull_request" ]; then
|
|
BASE_SHA="$PR_BASE_SHA"
|
|
elif [ "$EVENT_NAME" = "push" ]; then
|
|
if [ -z "$PUSH_BEFORE_SHA" ] || [ "$PUSH_BEFORE_SHA" = "0000000000000000000000000000000000000000" ]; then
|
|
echo "Lifecycle validation requires a nonzero push-before SHA" >&2
|
|
exit 2
|
|
fi
|
|
BASE_SHA="$PUSH_BEFORE_SHA"
|
|
elif [ "$EVENT_NAME" = "workflow_dispatch" ]; then
|
|
BASE_SHA="$(git merge-base HEAD "origin/$DEFAULT_BRANCH")"
|
|
else
|
|
echo "Unsupported lifecycle-validation event: $EVENT_NAME" >&2
|
|
exit 2
|
|
fi
|
|
python researcher/scripts/validate_spec_lifecycle.py --base-ref "$BASE_SHA"
|
|
|
|
- name: Public export boundary
|
|
run: >-
|
|
python researcher/scripts/validate_export.py check
|
|
--staging-dir researcher/exports/examples/restricted-citation-v1
|
|
|
|
- name: Python schema and artifact contract
|
|
run: |
|
|
python researcher/scripts/validate_schemas.py --check
|
|
python researcher/scripts/migrate_legacy.py --dry-run
|
|
|
|
- name: TypeScript schema conformance
|
|
working-directory: researcher/schemas/typescript
|
|
run: |
|
|
npm ci --ignore-scripts
|
|
npm run typecheck
|
|
npm test
|
|
|
|
- name: Benchmark runner contract
|
|
working-directory: researcher/benchmarks/sdk-runner
|
|
run: |
|
|
npm ci --ignore-scripts
|
|
npm run typecheck
|
|
npm run router:dry-run -- --models gpt-5.5 --reps 1 --max-runs 112 --max-budget-usd 2
|
|
npm run effectiveness:dry-run -- --models gpt-5.5 --reps 1 --max-runs 12 --max-budget-usd 2
|
|
|
|
- name: Build and validate long-horizon prompting site
|
|
run: |
|
|
python examples/long-horizon-prompt-lab/scripts/build_lab.py
|
|
python examples/long-horizon-prompt-lab/scripts/validate_site.py
|
|
git diff --exit-code -- \
|
|
examples/long-horizon-prompt-lab/data/prompt-pairs.json \
|
|
examples/long-horizon-prompt-lab/ui/data.js \
|
|
examples/long-horizon-prompt-lab/ui/prompts/
|
|
test -z "$(git status --porcelain --untracked-files=all -- \
|
|
examples/long-horizon-prompt-lab/data/prompt-pairs.json \
|
|
examples/long-horizon-prompt-lab/ui/data.js \
|
|
examples/long-horizon-prompt-lab/ui/prompts/)"
|
|
|
|
- name: Platform compatibility (Agent Skills reference)
|
|
run: python researcher/scripts/validate_platform_compat.py --require-reference-validator
|
|
|
|
- name: Validate repository (strict)
|
|
run: python researcher/scripts/validate_repo.py --strict
|
|
|
|
- name: Skill health (strict)
|
|
run: python researcher/scripts/skill_health.py --strict --no-history
|
|
|
|
- name: Activation regression tests
|
|
run: python researcher/scripts/check_activation_cases.py
|
|
|
|
- name: Adversarial benchmark harness
|
|
run: python researcher/scripts/run_benchmarks.py
|