Skip to content

fix(ci): publish scheduled benchmark via unprotected data branch#8

Merged
IgnazioDS merged 1 commit into
mainfrom
fix/nightly-telemetry-branch
Jun 16, 2026
Merged

fix(ci): publish scheduled benchmark via unprotected data branch#8
IgnazioDS merged 1 commit into
mainfrom
fix/nightly-telemetry-branch

Conversation

@IgnazioDS

Copy link
Copy Markdown
Owner

Same autonomous fix as data-quality-watchtower#8 / revenue-signal-copilot#8. The weekly benchmark's git push to main failed (exit 128 / GH013) because the default GITHUB_TOKEN cannot push to the ruleset-protected branch.

Fix (no secret, no protection change): the workflow publishes its artifacts (api JSON + examples/benchmark report & archive) to an unprotected telemetry branch (worktree push, history seeded from there); api/stats.py + api/benchmark-latest.py fetch the freshest artifact from that branch at request time (Vercel-runtime-guarded) with the committed file as fallback. Report/run URLs point at telemetry; the static fixture stays on main.

Verification: 25 Python tests pass; runner smoke-tested; workflow dispatched on this branch. Reversible by revert; main protection untouched.

The default GITHUB_TOKEN cannot push to the ruleset-protected main, so the
weekly benchmark now publishes its artifacts (api JSON + examples/benchmark
report & archive) to an unprotected `telemetry` branch. The live stdlib
endpoints (stats + benchmark-latest) fetch the freshest artifact from that
branch at request time (Vercel runtime only) and fall back to the copy
committed on main. Report/run URLs point at the telemetry branch; the static
fixture stays on main. No secret, no change to main's branch protection.
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evalops-workbench Ready Ready Preview, Comment Jun 16, 2026 2:11pm

@IgnazioDS IgnazioDS merged commit 2ca3cbe into main Jun 16, 2026
5 checks passed
@IgnazioDS IgnazioDS deleted the fix/nightly-telemetry-branch branch June 16, 2026 14:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c97f55e51a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

git commit -m "chore(benchmark): scheduled run [skip ci]"
git push
git -C .telemetry commit -m "telemetry: scheduled benchmark $(date -u +%Y-%m-%d)"
git -C .telemetry push origin telemetry

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict telemetry publishing to main

The workflow still allows workflow_dispatch, and the checkout step has no ref, so a manual run on a feature branch benchmarks that branch (actions/checkout defaults to the triggering ref/SHA) but this new push publishes the result to the shared telemetry branch that /api/stats and /api/benchmark-latest read in production. In that scenario unmerged fixture or runner changes can replace production telemetry; guard the publish job/step to refs/heads/main or explicitly checkout main before publishing.

Useful? React with 👍 / 👎.

Comment on lines +87 to +88
rm -rf .telemetry/examples/benchmark
cp -R "$stage/examples/benchmark" .telemetry/examples/ 2>/dev/null || true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve existing telemetry archives

On every run after the first, telemetry contains archive files that are not present in the protected main checkout. This deletes the telemetry branch's whole benchmark directory and then replaces it with $stage/examples/benchmark, which was copied from main plus only the current run, so previous telemetry-only archive/*.json files disappear and older run URLs stop resolving. Copy the existing archive forward or replace only the latest report/current run file.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant