Skip to content

ci: auto-merge daily quickstart refresh PR#29

Open
samestrin wants to merge 1 commit into
mainfrom
ci/quickstart-auto-merge
Open

ci: auto-merge daily quickstart refresh PR#29
samestrin wants to merge 1 commit into
mainfrom
ci/quickstart-auto-merge

Conversation

@samestrin

Copy link
Copy Markdown
Owner

Why

The daily update-quickstart.yml workflow has been running successfully every day and opening an automated/quickstart-refresh PR with fresh JSON — but the PR was never merged, so quickstart-alibaba.json and quickstart-synthetic.json stayed frozen on main (last merged refresh 2026-04-30). The backlog PR (#20) had been open and re-amended daily for ~10 weeks.

What

Add a final step that squash-merges the refresh PR via gh pr merge --squash --delete-branch, gated on create-pull-request actually producing a PR (pull-request-number != ''). The refresh is already self-validated earlier in the same run:

  1. python -m pytest scripts/tests/ — scraper unit tests
  2. python -m scripts.update_quickstart — runs the v2 schema gate (validate_payload) before atomically writing each JSON

so merging without waiting for the separate Test Suite CI on the PR branch is safe for a JSON-only diff. No repo allow_auto_merge setting or branch protection required (the native auto-merge path would have required both, and required-checks branch protection would gate all merges on the self-hosted runners being online).

Backlog already cleared

PR #20 was squash-merged separately (commit fdaa5ed) so main now carries the fresh catalogs (alibaba 5 models, synthetic 6 models, both 2026-07-12). The orphan feature/powershell-port branch (151 commits, no PR, idle since 2025-09-04) was also deleted.

Known tradeoff

Merges performed by GITHUB_TOKEN do not emit push events, so the Test Suite workflow will not re-run on main for these auto-merged JSON refreshes. Acceptable for JSON-only diffs that are self-validated earlier in the same run; flag if you want a PAT-based merge to fire push CI instead.

Heads-up on the synthetic diff

The refresh that just landed dropped synthetic from 14 to 6 models. That is most likely real catalog churn at synthetic.new, but the scraper's classifier silently drops any model it can't family+version, and the in-run pytest runs against fixtures (not the live endpoint) — so a scraper regression would not be caught by CI. Worth a one-off sanity check against the live /openai/v1/models endpoint before fully trusting unattended merges.

Daily refresh PRs were opening correctly but never merged, leaving
quickstart-{alibaba,synthetic}.json stale on main (last merge
2026-04-30 while fresh data sat in an unmerged PR for ~10 weeks).

Add a final `gh pr merge --squash --delete-branch` step that runs
when create-pull-request produces a PR, gated on the in-run pytest
+ v2 schema gate that already precede PR creation. No branch
protection or repo auto-merge setting required.

Note: GITHUB_TOKEN merges suppress push events, so the Test Suite
workflow will not re-run on main for auto-merged JSON refreshes;
the refresh is self-validated earlier in the same run.
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