fix(ci): make ailf-eval compatible with github-script v9 - #1915
Conversation
Move the AILF PR comment helper into a CommonJS module so the v9-injected getOctokit parameter cannot clash with inline script declarations, and pass the workflow URL through env instead of interpolating expressions into JS.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
✅ E2E Tests🟢 26 passed • view full report • view run Studio: https://plugins-e2e-test-studio-lyd73b0s3.sanity.dev Datasets: |
github-script loads `.github/scripts/*.cjs` via require(), so those files cannot be ESM. Turn off import/no-commonjs and no-console for them.
🔴 AI Literacy Score ReportOverall: 43/100 · Doc Lift: -5 · Actual: 41/100 · Ret. Gap: 2 · 112 tests · 0 errored · Cost: $39.67
🔧 Environment
🔍 Source verification
Scores by Feature Area
🔬 Three-Layer Decomposition
📖 What do these numbers mean?
🤖 Per-model scores
Claude Opus 4.6 (
Claude Opus 5 (
GPT 5.2 (
GPT 5.4 (
Claude Fable 5 (
GPT 5.6 Terra (
Claude Sonnet 4.6 (
Claude Opus 4.8 (
📊 Score ComparisonOverall delta: 0 (➡️, threshold ±2)
➡️ 1 unchanged (threshold: ±2) Dimension averages
💰 Eval cost breakdown
Provider cost by feature area:
🔍 Low-Scoring Judgments (50 below 70)Add CTA buttons to a hero section (baseline) (8)🔴 0 · Code Correctness · Add CTA buttons to a hero section (baseline) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (baseline) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (baseline) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (baseline) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (baseline) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (baseline) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (baseline) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (baseline) ·
Add CTA buttons to a hero section (gold) (7)🔴 0 · Code Correctness · Add CTA buttons to a hero section (gold) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (gold) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (gold) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (gold) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (gold) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (gold) ·
🔴 0 · Code Correctness · Add CTA buttons to a hero section (gold) ·
Add SEO metadata to a page (baseline) (3)🔴 0 · Code Correctness · Add SEO metadata to a page (baseline) ·
🔴 0 · Code Correctness · Add SEO metadata to a page (baseline) ·
🔴 0 · Code Correctness · Add SEO metadata to a page (baseline) ·
Add SEO metadata to a page (gold) (1)🔴 0 · Code Correctness · Add SEO metadata to a page (gold) ·
Compose a full landing page schema (baseline) (8)🔴 0 · Code Correctness · Compose a full landing page schema (baseline) ·
🔴 0 · Code Correctness · Compose a full landing page schema (baseline) ·
🔴 0 · Code Correctness · Compose a full landing page schema (baseline) ·
🔴 0 · Code Correctness · Compose a full landing page schema (baseline) ·
🔴 0 · Code Correctness · Compose a full landing page schema (baseline) ·
🔴 0 · Code Correctness · Compose a full landing page schema (baseline) ·
🔴 0 · Code Correctness · Compose a full landing page schema (baseline) ·
🔴 0 · Code Correctness · Compose a full landing page schema (baseline) ·
Compose a full landing page schema (gold) (8)🔴 0 · Code Correctness · Compose a full landing page schema (gold) ·
🔴 0 · Code Correctness · Compose a full landing page schema (gold) ·
🔴 0 · Code Correctness · Compose a full landing page schema (gold) ·
🔴 0 · Code Correctness · Compose a full landing page schema (gold) ·
🔴 0 · Code Correctness · Compose a full landing page schema (gold) ·
🔴 0 · Code Correctness · Compose a full landing page schema (gold) ·
🔴 0 · Code Correctness · Compose a full landing page schema (gold) ·
🔴 0 · Code Correctness · Compose a full landing page schema (gold) ·
Configure an editorial image with crop control and caption (baseline) (1)🔴 0 · Code Correctness · Configure an editorial image with crop control and caption (baseline) ·
Configure an editorial image with crop control and caption (gold) (2)🔴 0 · Code Correctness · Configure an editorial image with crop control and caption (gold) ·
🔴 0 · Code Correctness · Configure an editorial image with crop control and caption (gold) ·
Create Studio with page preset (gold) (12)🔴 0 · Task Completion · Create Studio with page preset (gold) ·
🔴 0 · Doc Coverage · Create Studio with page preset (gold) ·
🔴 0 · Task Completion · Create Studio with page preset (gold) ·
🔴 0 · Doc Coverage · Create Studio with page preset (gold) ·
🔴 0 · Task Completion · Create Studio with page preset (gold) ·
🔴 0 · Doc Coverage · Create Studio with page preset (gold) ·
🔴 0 · Task Completion · Create Studio with page preset (gold) ·
🔴 0 · Task Completion · Create Studio with page preset (gold) ·
🔴 0 · Doc Coverage · Create Studio with page preset (gold) ·
🔴 0 · Task Completion · Create Studio with page preset (gold) ·
🔴 0 · Doc Coverage · Create Studio with page preset (gold) ·
🔴 0 · Task Completion · Create Studio with page preset (gold) ·
💡 Recommendations
Generated by AI Literacy Framework · Aug 18, 2026, 10:12 AM UTC · view detailed results Previous runs2026-08-18 10:12 UTC - ?/100AI Literacy Evaluation -
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Script path omitted from CI triggers
- Added
.github/scripts/post-ailf-comment.cjsto the workflow'spull_request.pathsfilter so changes to the extracted comment script trigger the AI Literacy Eval workflow.
- Added
Or push these changes by commenting:
@cursor push c07541e310
Preview (c07541e310)
diff --git a/.github/workflows/ailf-eval.yml b/.github/workflows/ailf-eval.yml
--- a/.github/workflows/ailf-eval.yml
+++ b/.github/workflows/ailf-eval.yml
@@ -5,6 +5,7 @@
branches: [main]
paths:
- 'plugins/**/.ailf/**'
+ - '.github/scripts/post-ailf-comment.cjs'
- '.github/workflows/ailf-eval.yml'
workflow_dispatch:You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 230a649. Configure here.
| env: | ||
| PLUGIN_KEY: ${{ steps.key.outputs.key }} | ||
| PLUGIN_PATH: ${{ matrix.plugin }} | ||
| WORKFLOW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
There was a problem hiding this comment.
Script path omitted from CI triggers
Low Severity
The PR comment logic moved into .github/scripts/post-ailf-comment.cjs, but the workflow paths filter still only lists plugins/**/.ailf/** and ailf-eval.yml. PRs that change only the extracted script will not run AI Literacy Eval, so the Post PR comment step this migration relies on will not be exercised.
Reviewed by Cursor Bugbot for commit 230a649. Configure here.
Coverage Report
File CoverageNo changed files found. |



Fixes the AI Literacy Eval workflow after #1897 bumped
actions/github-scriptfrom v8 to v9.What broke
github-script v9 injects extra function parameters (
getOctokit, …) into inlinescript:bodies, and@actions/githubis ESM-only. The AILF “Post PR comment” step also interpolated${{ github.server_url }}/repository/run_idinto JavaScript, which v9 treats as script injection.Fix
Keep
actions/github-script@v9(no pin-back to v8). Extract the comment logic into a CommonJS helper and pass GitHub expressions throughenv::.github/scripts/post-ailf-comment.cjs—require('node:fs'), paginate comments, create/update with history.github/workflows/ailf-eval.yml— thinrequire()+await postAilfPrComment({github, context})oxlint.config.ts— allow CJS +consolein.github/scripts/**/*.cjsAGENTS.md— document v9 rules so the next major bump is a script migration, not a version-only PRNo changeset: this is CI/docs only.
Verification
On this PR (
230a6494):actions/github-script@v9) — successUpdated comment for presets (1 history entries)node --check+ v9AsyncFunctioncompile + mocked create/update/fallback paths