Repository navigation
feat(wizard-ci): let a PR comment pin the wizard ref - #366
Merged
Merged
Conversation
The workbench wizard-ci workflow already accepts wizard_ref and context_mill_ref on the same dispatch channel. This trigger sent only context_mill_ref. A change that spans both repos could not run before merge. Add an optional `wizard:<ref>` suffix to /wizard-ci. The trigger checks the ref against a git ref allowlist. It then adds wizard_ref to the dispatch payload. Without the suffix the trigger omits the key. The workbench then keeps its own default of `main`. Show the new syntax in the welcome comment.
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a wizard branch:
Add Results will be posted here when complete. |
edwinyjlim
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The workbench
wizard-ciworkflow already acceptswizard_refandcontext_mill_refon the same dispatch channel. This trigger sent onlycontext_mill_ref, and the wizard trigger sends onlywizard_ref. So a change that spans both repos cannot be exercised before merge.That is not hypothetical. #360 changes the warehouse skill's credential-batching instruction, and PostHog/wizard#1146 changes the runtime cap it has to match. They are one contract in two repos, and today a reviewer cannot run them together.
Changes
/wizard-ci <app>accepts an optionalwizard:<ref>suffix. The trigger validates the ref, then addswizard_refto the dispatch payload. Without the suffix the key is omitted entirely, so the workbench applies its ownmaindefault and existing behaviour is byte-identical.The app regex is untouched. A lone pin such as
/wizard-ci wizard:foofalls back toallrather than reading the pin as an app name.Ref validation matters here. The workbench interpolates the ref straight into a JS string literal inside
github-script, in a job that holds the App token. The allowlist is[A-Za-z0-9._/-], max 200 characters, no.., no leading-, no leading or trailing/. That excludes every quote, backtick, backslash,$and;, so the literal cannot be broken out of. It also blocks path traversal and git option injection such as--upload-pack=. An invalid ref callscore.setFailedand dispatches nothing, rather than silently falling back tomain.Residual risk is unchanged from what
context_mill_refalready allowed: a commenter can point CI at a branch that exists and burn CI minutes. No token scope is widened.Test plan
actionlint: findings byte-identical to the pre-change baseline, all in untouched steps.script:block was extracted from the YAML and executed in Node against stubbed GitHub APIs, capturing the dispatch payload across every command form. Legacy forms produce identical payloads with nowizard_refkey; pin forms attach it; hostile refs fail with no dispatch.Companion PR: PostHog/wizard#1153 mirrors this with a
context-mill:<ref>suffix.