From 6f3d303985e44a498216272ac02fd65856b451fc Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Mon, 24 Aug 2026 10:33:12 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=8D=20ci:=20Pin=20the=20Votes=20Ledger?= =?UTF-8?q?=20Results=20JSON=20to=20an=20Absolute=20Path=20(#15166)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First live full-suite vote run (32731087273, 198 passed) wrote e2e/pw-results.json while the ledger step looked in the repo root and took the fail-safe branch: zero trials logged. A relative PLAYWRIGHT_JSON_OUTPUT_NAME resolves against the config directory, not cwd — reproduced synthetically with the config in a subdirectory. Absolute workspace path on both the reporter env and the ledger read. --- .github/workflows/codegraph-e2e-votes.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codegraph-e2e-votes.yml b/.github/workflows/codegraph-e2e-votes.yml index 35637a3041..b3783e2658 100644 --- a/.github/workflows/codegraph-e2e-votes.yml +++ b/.github/workflows/codegraph-e2e-votes.yml @@ -174,7 +174,11 @@ jobs: - name: Vote — run the full mock suite (cannot fail the branch) continue-on-error: true env: - PLAYWRIGHT_JSON_OUTPUT_NAME: pw-results.json + # Absolute on purpose: Playwright resolves a relative PLAYWRIGHT_JSON_OUTPUT_NAME + # against the CONFIG directory (e2e/), not the working directory — the first live run + # wrote e2e/pw-results.json while the ledger looked in the repo root and logged zero + # trials (fail-safe, but a silent no-op). + PLAYWRIGHT_JSON_OUTPUT_NAME: ${{ github.workspace }}/pw-results.json run: npx playwright test --config=e2e/playwright.config.mock.ts --reporter=line,json - name: Ledger — log the specs that actually executed @@ -187,8 +191,8 @@ jobs: # under this job's default env — counting them as covered would mint phantom trials, # the exact bug this workflow revision exists to kill (Codex P1 on #15162). A spec is # covered iff at least one of its tests reached a non-skipped outcome. - if jq -e '.suites' pw-results.json >/dev/null 2>&1; then - jq -r '[.suites[] | recurse(.suites[]?) | .specs[]? | select([.tests[]?.status] | any(. != "skipped")) | .file] | unique | .[]' pw-results.json \ + if jq -e '.suites' "$GITHUB_WORKSPACE/pw-results.json" >/dev/null 2>&1; then + jq -r '[.suites[] | recurse(.suites[]?) | .specs[]? | select([.tests[]?.status] | any(. != "skipped")) | .file] | unique | .[]' "$GITHUB_WORKSPACE/pw-results.json" \ | sed 's|^|specs/mock/|' > covered.txt N=$(wc -l < covered.txt | tr -d ' ') echo "codegraph-votes: running $N specs (executed, full suite)"