Skip to content

ci: open a PR when a new EQL patch release lands - #76

Open
coderdan wants to merge 1 commit into
mainfrom
docs/auto-eql-pin-workflow
Open

ci: open a PR when a new EQL patch release lands#76
coderdan wants to merge 1 commit into
mainfrom
docs/auto-eql-pin-workflow

Conversation

@coderdan

Copy link
Copy Markdown
Contributor

The scheduled half of #75. Daily, it checks whether the pinned EQL release has a newer patch in the same minor and, if so: applies the bump, runs the drift check against the new manifest, and opens a PR whose body states whether the bump is clean or which symbols no longer resolve.

So a new EQL release shows up as a PR you review, rather than something to remember. See #75 for why it proposes rather than follows the pin, and for the 3.0.0 → 3.0.1 evidence that patch releases still carry breaking API changes.

Why this one targets main

GitHub only runs scheduled workflows from the default branch, so the file has to be on main even though the docs live on v2. It therefore checks out v2, bumps there, and opens its PR into v2. Both are driven by DOCS_BRANCH at the top of the file — one line to change if that ever flips.

Worth flagging while you are here: main is 98 commits behind v2 and its package.json still has the old three-step prebuild. If v2 is the line that matters now, making it the default branch would remove this split entirely.

Behaviour

  • No bump available → the job no-ops.
  • Bump available → branch chore/eql-pin-<tag>, one commit touching only the pin. Generated artifacts stay uncommitted; prebuild rebuilds them.
  • Re-runs update the existing PR rather than opening duplicates (fixed branch name per tag, --force-with-lease).
  • Drift failing does not fail the job — that verdict is the signal being collected, and it goes in the PR body.
  • A newer minor/major is surfaced as a note in the PR body, never proposed.

Verified

The workflow itself cannot run until #75 merges, so what I checked here: YAML parses and resolves to 7 steps; the PR-body step's script passes bash -n; the heredoc terminator lands at column 0 after YAML block-scalar dedent (a real trap — an indented terminator would have failed at runtime); and the body was rendered end-to-end with representative values, including the failing-drift and newer-minor branches.

bun.lock and tsx are both present on v2, so bun install --frozen-lockfile and bun run check-eql-pin resolve there.

Important

Merge #75 first — this runs scripts/check-eql-pin.ts from the v2 checkout.

https://claude.ai/code/session_01NkuQNMvw9BpB4BWWeKtfV8

Adds a daily workflow that checks whether the pinned EQL release has a newer
patch in the same minor and, if so, applies the bump, runs the drift check
against the new manifest, and opens a PR whose body says whether the bump is
clean or which symbols no longer resolve.

The pin is not auto-followed. The drift check fails the build on any
schema-qualified symbol the pinned manifest does not ship, so a floating pin
would redden an unrelated PR with no commit of its author's to explain it.
This removes the need to remember, not the review.

Lives on `main` because GitHub only runs scheduled workflows from the default
branch, but checks out and targets `v2`, where the docs actually live. Both are
set via DOCS_BRANCH at the top of the file; change it if that flips.

Requires scripts/check-eql-pin.ts on v2 (#75), since the
workflow runs it from the v2 checkout — merge that one first.

Claude-Session: https://claude.ai/code/session_01NkuQNMvw9BpB4BWWeKtfV8
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
public-docs Error Error Jul 28, 2026 4:27am

Request Review

coderdan added a commit that referenced this pull request Sep 1, 2026
The published CLI reached 1.1.1 on 2026-08-20. Production has been serving
a reference generated from 1.0.0 ever since. It is in every build log:

  ⚠ Could not run stash@1.1.1; using cached fixture.
  ✓ Generated 14 CLI reference page(s) for stash v1.0.0

`npm view stash version` resolved 1.1.1 correctly; the next step, `npx --yes
stash@1.1.1 manifest --json`, does not work in the Vercel build sandbox, and
the generator fell back to the committed fixture and carried on. Eleven days
of a version-old reference, and nothing failed, because a fallback that
always works cannot fail.

Two commands' worth of drift: 1.1.1 removed `db validate` and added `eql
preflight` and `eql verify`, both of which carry substantial prose about
managed-Postgres behaviour.

The build no longer touches the network. `generate-docs:cli` reads the
committed fixture and renders it — what deploys is exactly what is in the
repo, and it is reviewable in the diff. Refreshing the fixture is now a
separate, explicit step (`--refresh`, exposed as `generate-docs:cli:refresh`)
that resolves the latest published CLI, runs it, and rewrites the fixture. It
has no fallback: if it cannot run the CLI it fails, and it inherits stderr
rather than discarding it, so the reason is visible.

.github/workflows/cli-manifest.yml runs that refresh daily, and opens a PR
when the published version has moved past the cached one — the same shape as
the EQL pin workflow in #76. The refresh is not auto-merged: a release can
remove commands as well as add them, and each removal is a section that
disappears and an anchor that stops resolving, so the diff gets read.

Also names the generic headings on the group pages, which #101 left alone
because they come from a second render path. `eql.mdx` carried five identical
`#### Examples` and eight identical `#### Flags` — eight duplicate anchors on
one page, and eight chunks a retriever cannot tell apart. They now read
`#### stash eql verify flags`, matching what #101 did for the single-command
pages.

Verified: `generate-docs:cli` with no network access reproduces the committed
pages exactly; validate-links unchanged at its 9-failure baseline (all
pre-existing, in generated integration api-reference dirs); types:check and
biome clean.
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