Skip to content

fix(proxy): recover stale responses bridge sessions #21

fix(proxy): recover stale responses bridge sessions

fix(proxy): recover stale responses bridge sessions #21

name: Simplicity budgets
# Enforces .github/simplicity-budgets.toml via
# .github/scripts/check_simplicity_budgets.py.
#
# This is deliberately a SEPARATE workflow from ci.yml, with different
# pull_request trigger types: `labeled`/`unlabeled` re-evaluate the
# simplicity-budget-approved override the moment a maintainer toggles it.
# Adding those types to ci.yml instead would re-run the full CI matrix on
# every label churn from codex-review-labels.yml (15-minute cron +
# workflow_run syncs of the codex labels), which is why they live here on a
# seconds-long job.
#
# The override label is fetched live from the API (not read from the event
# payload): fork PR payloads and re-runs of old runs would otherwise see a
# stale or empty label set.
#
# No `paths:` filter: the job is cheap, and a required check behind a paths
# filter would leave non-matching PRs pending forever.
on:
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]
push:
branches: ["main"]
merge_group:
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
budgets:
name: Simplicity budgets
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Resolve current PR labels
# Query the live label set instead of trusting the event payload:
# fork PR payloads and re-runs of old runs can carry stale/empty
# labels. push and merge_group runs have no PR — the override never
# applies there; main must always satisfy the budgets in-file.
if: github.event_name == 'pull_request'
# Explicit bash so the step runs with -o pipefail: a failed label
# lookup must fail the step loudly, not silently yield empty labels.
shell: bash
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
# per_page=100 covers the full set: GitHub caps labels per issue at 100.
labels="$(python3 .github/scripts/fetch_pr_labels.py)"
echo "PR_LABELS=${labels}" >> "$GITHUB_ENV"
- name: Check simplicity budgets
run: python3 .github/scripts/check_simplicity_budgets.py