LibreChat/.github
Danny Avila 38c96a5e3a
🚦 ci: Throttle Codegraph E2E Votes to One Run per Window (#17380)
* 🚦 ci: Throttle Codegraph E2E Votes to One Run per Window

A vote runs the whole mock suite on ten runners, about 154 job-minutes, and
every merge to dev started one: 2,227 job-minutes on 2026-10-22, queued beside
PR CI for the same runners.

With repo variable CODEGRAPH_E2E_VOTE_MIN_HOURS set to N > 0, the votes
workflow skips its push runs (in a concurrency group of their own) and the new
Codegraph E2E Vote Gate decides instead: a merge starts a vote on dev
(workflow_dispatch) once the newest started vote is N hours old, and an hourly
catch-up votes the newest merge no vote covers once the window opens. A merge
votes as before while the catch-up has not run for three hours or the history
cannot be read. Unset, empty or 0 keeps today's push-triggered votes and skips
the gate; CODEGRAPH_E2E_VOTES=off still stops both.

The decision is a pure function in .github/scripts/vote-gate.mjs, tested in
vote-gate.test.mjs and run beside the shard tests in playwright-mock.yml.

* 🚦 fix: Keep an Unfinished Handoff Run from Covering Its Merge

With the throttle on, a merge creates the votes workflow's push run, whose
vote job will be skipped, and the gate's push run at about the same time.
Until that handoff run completed, the gate read it as a queued trial: it
matched the merge on head_sha, so the merge started no vote and waited for a
later catch-up tick, and it also held the window as a started vote.

While throttled, a push run that has not completed is now read as a handoff:
it neither covers a merge nor holds the window. A finished push run that
voted still counts as before.
2026-10-24 08:50:20 +02:00
..
ISSUE_TEMPLATE 🚚 chore: Point Repository and Image References at LibreChat-AI (#16005) 2026-09-23 23:08:36 -04:00
scripts 🚦 ci: Throttle Codegraph E2E Votes to One Run per Window (#17380) 2026-10-24 08:50:20 +02:00
workflows 🚦 ci: Throttle Codegraph E2E Votes to One Run per Window (#17380) 2026-10-24 08:50:20 +02:00
CODE_OF_CONDUCT.md 🔗 chore: Add Stable Discord and Homepage Links (#1835) 2024-02-19 09:42:57 -05:00
CODEOWNERS 🏰 ci: Gate Main Promotions on Approved Dev Commits (#16570) 2026-09-30 15:01:32 -04:00
configuration-release.json 📜 ci: AutomateCHANGELOG.md (#5838) 2025-02-18 08:35:43 -05:00
configuration-unreleased.json 📜 ci: AutomateCHANGELOG.md (#5838) 2025-02-18 08:35:43 -05:00
CONTRIBUTING.md 💉 chore: Upgrade Node.js to Security Release 24.22.1 (#17332) 2026-10-22 09:34:02 +02:00
FUNDING.yml
MAIN_PROMOTION.md 🏰 ci: Gate Main Promotions on Approved Dev Commits (#16570) 2026-09-30 15:01:32 -04:00
playwright.yml 💉 chore: Upgrade Node.js to Security Release 24.22.1 (#17332) 2026-10-22 09:34:02 +02:00
pull_request_template.md 🚚 chore: Point Repository and Image References at LibreChat-AI (#16005) 2026-09-23 23:08:36 -04:00
SECURITY.md 🚚 chore: Point Repository and Image References at LibreChat-AI (#16005) 2026-09-23 23:08:36 -04:00