Repository navigation
Dispatch add-auth evals after stable Clerk CLI releases - #539
SarahSoutoul wants to merge 3 commits into
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
One detail worth calling out against DOCS-12297: the ticket says to dispatch once the release is available as |
|
@SarahSoutoul agreed. Stable publishes don't pass |
| ARTIFACTS_DIR: ${{ github.workspace }}/dist/artifacts | ||
| GH_TOKEN: ${{ github.token }} | ||
|
|
||
| dispatch-add-auth-eval: |
There was a problem hiding this comment.
This job sends clerk_cli_released, which is already a generic event. The job and script names describe what clerk-evals does with it today, not what this workflow does.
clerk/skills has the same kind of sender, and it's named after its event: dispatch-skills-updated.yml and dispatch-skills-update.mjs. It sends one event to clerk, dashboard, and clerk-evals, so adding a receiver is a one-line change.
Could we match that here? dispatch-cli-released for the job and scripts/dispatch-cli-released.ts for the script, with the step name and the docs/releasing.md paragraph to match.
Same idea for the secret while it doesn't exist yet: CLERK_CLI_DISPATCH_TOKEN would follow the CLERK_SKILLS_DISPATCH_TOKEN naming. Your call on that one.
That way none of it is tied to evals, and anything interested in CLI releases can use this.
| needs.versioning.outputs.release_created == 'true' && | ||
| contains(needs.*.result, 'failure') | ||
| needs: [versioning, build, sign-macos, smoke-test, publish-npm, publish-github, homebrew] | ||
| needs: [versioning, build, sign-macos, smoke-test, publish-npm, publish-github, homebrew, dispatch-add-auth-eval] |
There was a problem hiding this comment.
If publishing succeeds and the dispatch fails, this posts "Stable release failed" while notify-stable-success still announces the release. An expired token is enough to trigger it.
Maybe give the dispatch its own failure alert instead, like the notify-failure job in the skills sender? Adding the dispatch to notify-stable-success's needs would also fix the mismatch, but then an expired token would hold back the release announcement.
| if (import.meta.main) { | ||
| const version = process.env.CLERK_CLI_VERSION ?? ""; | ||
| const token = process.env.CLERK_EVALS_DISPATCH_TOKEN ?? ""; | ||
| if (!token) throw new Error("CLERK_EVALS_DISPATCH_TOKEN is not configured"); |
There was a problem hiding this comment.
sendCliReleaseDispatch already checks this, and the test covers it there.
| if (!token) throw new Error("CLERK_EVALS_DISPATCH_TOKEN is not configured"); |
What does this solve? What changed?
DOCS-12297 needs a stable-release sender for the add-auth eval receiver in
clerk/clerk-evals.This is the CLI-release follow-up to DOCS-12112 and clerk-evals#73, which added evals for
clerk/skillsupdates but did not add the stable CLI-release trigger.clerk_cli_releasedwith the exact version without waiting for npm'slatesttag. The paired eval receiver checksclerk@latestbefore evaluating.CLERK_EVALS_DISPATCH_TOKEN; keep the defaultGITHUB_TOKENread-only.latest, the eval receiver reports that separately.Deadline
No fixed deadline. Merge clerk/clerk-evals#78 first, then this sender. A release dispatch sent before the receiver is live would not be replayed.
Other resources
Pre-merge checklist
clerk/clerk-evals, then add it toclerk/clias the Actions secretCLERK_EVALS_DISPATCH_TOKEN. Confirm it can send repository dispatches; do not share its value in the PR.Post-merge checklist