From d3b4183efd2fb876b1a189ee6d682dd094e36743 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 05:35:28 +0000 Subject: [PATCH] feat: implement daily Benchmark Context Architect sync via GitHub Actions - Added a daily GitHub Action (`.github/workflows/benchmark-sync.yml`) to run the vibe-check-runner at 02:00 AM. - Granted 'contents: write' and 'issues: write' permissions so the action can auto-commit valid AI benchmarks to `main` with `[chore: benchmark-sync]` or open critical issues on failure. - Updated `vibe-check-runner.js` to also capture untracked files using `git ls-files -m -o --exclude-standard`. - Fixed `vibe-check-runner.js` iteration to generate dynamic temporary TypeScript files (`temp_${tech}_${file.replace(/\//g, '_')}.ts`) to prevent AST processing state collisions. Co-authored-by: beginwebdev2002 <102213457+beginwebdev2002@users.noreply.github.com> --- .github/workflows/benchmark-sync.yml | 38 ++++++++++++++++++++++++++++ vibe-check-runner.js | 4 +-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/benchmark-sync.yml diff --git a/.github/workflows/benchmark-sync.yml b/.github/workflows/benchmark-sync.yml new file mode 100644 index 0000000..7ba53b3 --- /dev/null +++ b/.github/workflows/benchmark-sync.yml @@ -0,0 +1,38 @@ +name: Benchmark Context Architect + +on: + schedule: + - cron: '0 2 * * *' + workflow_dispatch: + +permissions: + contents: write + issues: write + +jobs: + synchronize-and-validate: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Configure Git + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + + - name: Install Dependencies + run: npm install ts-morph @google/genai + + - name: Run Vibe-Check Runner + env: + GOOGLE_AI_API_KEY: ${{ secrets.GOOGLE_AI_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: node vibe-check-runner.js diff --git a/vibe-check-runner.js b/vibe-check-runner.js index f56ee94..973bd3b 100644 --- a/vibe-check-runner.js +++ b/vibe-check-runner.js @@ -29,7 +29,7 @@ function getModifiedFiles() { try { // In CI (daily run), check files modified in the last 24 hours. // We filter for non-empty lines that end in .md and are in frontend/ or backend/ - const output = execFileSync('sh', ['-c', 'git log --since="24 hours ago" --name-only --pretty=format: | sort | uniq'], { encoding: 'utf-8' }); + const output = execFileSync('sh', ['-c', '(git log --since="24 hours ago" --name-only --pretty=format: && git ls-files -m -o --exclude-standard) | sort | uniq'], { encoding: 'utf-8' }); const allFiles = output.split('\n') .map(f => f.trim()) .filter(f => f.length > 0) @@ -284,7 +284,7 @@ async function runVibeCheck() { continue; } - const sourceFile = project.createSourceFile(`temp_${tech}.ts`, generatedCode, { overwrite: true }); + const sourceFile = project.createSourceFile(`temp_${tech}_${file.replace(/\//g, '_')}.ts`, generatedCode, { overwrite: true }); const { total: score, breakdown } = analyzeAST(sourceFile, tech); console.log(`Fidelity Score for ${file}: ${score}%`);