Skip to content
Merged
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
119 changes: 119 additions & 0 deletions .github/workflows/check-data-health.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Check Current Data Health

on:
schedule:
- cron: '0 3 * * 1'
workflow_dispatch:

concurrency:
group: check-current-data-health
cancel-in-progress: false

permissions:
contents: read
issues: write

jobs:
check-data-health:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Check current data health
id: data-health
continue-on-error: true
run: |
npx tsx scripts/validate/data-health.ts \
--as-of="$(TZ=Asia/Shanghai date +%F)" \
--fail-on=error \
--fail-on-code=stale-verification,future-verification-date \
2>&1 | tee data-health-current.log

- name: Report stale or invalid data
if: steps.data-health.outcome == 'failure'
uses: actions/github-script@v8
with:
script: |
const fs = require('node:fs');
const title = 'Current manifest data requires review';
const output = fs.readFileSync('data-health-current.log', 'utf8').slice(-6000);
const body = `## Current Data Health Check Failed

The scheduled check evaluates freshness against today's date in Asia/Shanghai without
rewriting the committed snapshot.

**Check run:** [View details](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})

\`\`\`text
${output}
\`\`\``;

const issues = await github.paginate(github.rest.issues.listForRepo, {
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'automated',
per_page: 100
});
const existingIssue = issues.find(issue => issue.title === title);

if (!existingIssue) {
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title,
body,
labels: ['automated', 'maintenance']
});
} else {
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: existingIssue.number,
body
});
}

- name: Close resolved data-health issues
if: steps.data-health.outcome == 'success'
uses: actions/github-script@v8
with:
script: |
const issues = await github.paginate(github.rest.issues.listForRepo, {
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'automated',
per_page: 100
});

for (const issue of issues.filter(issue => issue.title === 'Current manifest data requires review')) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
body: `Current-date data health passed in ${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}.`
});
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
state: 'closed',
state_reason: 'completed'
});
}

- name: Fail after reporting
if: steps.data-health.outcome == 'failure'
run: exit 1
5 changes: 0 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ jobs:
- name: Check data health
run: npm run data-health:check

- name: Check manifest changelog
run: npm run changelog:check
env:
CHANGELOG_BASE: ${{ github.event.pull_request.base.sha || github.event.before }}

spell-check:
name: Spell Check
runs-on: ubuntu-latest
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/monitor-model-sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Monitor Model Pricing and Lifecycle Sources

on:
schedule:
- cron: '0 4 * * 1'
workflow_dispatch:

concurrency:
group: monitor-model-sources
cancel-in-progress: false

permissions:
contents: write
pull-requests: write

jobs:
monitor-model-sources:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Check monitored official sources
run: npm run fetch:model-sources

- name: Validate monitoring metadata
run: |
npm run test:validate
npm run format:check
npm run biome:check
git diff --check

- name: Check for changes
id: git-check
run: |
git diff --exit-code manifests/models || echo "changes=true" >> "$GITHUB_OUTPUT"

- name: Create review pull request
if: steps.git-check.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore(data): flag changed model sources'
title: 'chore(data): review changed model sources'
body: |
## Review required
One or more monitored official pricing or lifecycle pages changed.

This automation updates only normalized source-content digests and observation dates.
It deliberately does **not** change token prices, model availability, lifecycle status,
or any other model fact. Review the cited official pages before changing those fields.
branch: auto-review-model-sources
delete-branch: true
labels: |
automated
73 changes: 73 additions & 0 deletions .github/workflows/update-benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Update Benchmarks

on:
schedule:
- cron: '30 2 * * 1'
workflow_dispatch:

concurrency:
group: update-benchmarks
cancel-in-progress: false

permissions:
contents: write
pull-requests: write

jobs:
update-benchmarks:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Refresh exact benchmark mappings
run: npm run fetch:benchmarks

- name: Regenerate manifest modules
run: npm run generate:manifests

- name: Validate updated data
run: |
npm run test:validate
npm run data-health:check
npm run format:check
npm run biome:check
git diff --check

- name: Check for changes
id: git-check
run: |
git diff --exit-code manifests src/lib/generated || echo "changes=true" >> "$GITHUB_OUTPUT"

- name: Create pull request
if: steps.git-check.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore(data): refresh benchmark scores'
title: 'chore(data): refresh benchmark scores'
body: |
## Summary
Automated refresh from exact entries in the official SWE-bench leaderboard data.

Each model manifest declares the upstream result ID and exact displayed label. The
refresh fails rather than applying fuzzy model-name matching.

## Validation
- Manifest schemas
- Generated manifest modules
- Data health
branch: auto-update-benchmarks
delete-branch: true
labels: |
automated
76 changes: 76 additions & 0 deletions .github/workflows/update-product-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Update Product Versions

on:
schedule:
- cron: '0 2 * * 1'
workflow_dispatch:

concurrency:
group: update-product-versions
cancel-in-progress: false

permissions:
contents: write
pull-requests: write

jobs:
update-product-versions:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Refresh tracked product versions
run: npm run fetch:product-versions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Regenerate manifest modules
run: npm run generate:manifests

- name: Validate updated data
run: |
npm run test:validate
npm run validate:i18n
npm run data-health:check
npm run format:check
npm run biome:check
git diff --check

- name: Check for changes
id: git-check
run: |
git diff --exit-code manifests src/lib/generated || echo "changes=true" >> "$GITHUB_OUTPUT"

- name: Create pull request
if: steps.git-check.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore(data): refresh product versions'
title: 'chore(data): refresh product versions'
body: |
## Summary
Automated refresh of product versions from the registry sources declared in each manifest.

## Validation
- Manifest schemas
- Generated manifest modules
- Internationalization structure
- Data health

The workflow preserves existing values when any configured source cannot be verified.
branch: auto-update-product-versions
delete-branch: true
labels: |
automated
Loading
Loading