Repository navigation
feat(wizard-ci): let a PR comment pin the context-mill ref - #1153
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 wizard_ref. A change that spans both repos could not run before merge. Add an optional `context-mill:<ref>` suffix to /wizard-ci and to /wizard-ci-snapshots. The trigger checks the ref against a git ref allowlist. It then adds context_mill_ref to the dispatch payload. Without the suffix the trigger omits the key. The workbench then keeps its own default of `main`. Also check the positional wizard ref that /wizard-ci-snapshots already accepted. 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 Context Mill branch:
Add Results will be posted here when complete. |
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
edwinyjlim
approved these changes
Aug 27, 2026
edwinyjlim
left a comment
Member
There was a problem hiding this comment.
made some upstream fixes to address veria comments
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 onlywizard_ref, and the context-mill trigger sends onlycontext_mill_ref. So a change that spans both repos cannot be exercised before merge.That is not hypothetical. #1146 changes the credential-prompt cap in the runtime, and PostHog/context-mill#360 changes the skill text that has to match it. They are one contract in two repos, and today a reviewer cannot run them together.
Changes
/wizard-ci <app>and/wizard-ci-snapshots <app> [ref]accept an optionalcontext-mill:<ref>suffix. The trigger validates the ref, then addscontext_mill_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. One nicety: a lone pin such as
/wizard-ci context-mill:foowould otherwise read as an app name, so it now falls back toall.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./wizard-ci-snapshotsalready accepted a positionalwizard_refthat was never validated, feeding the same interpolation. Since this touches that parser, it now gets the same check. That is the one place an existing input changes behaviour, and only for refs that could never have checked out anyway.Residual risk is unchanged from what
wizard_refalready allowed: a commenter can point CI at a branch that exists and burn CI minutes. No token scope is widened.Test plan
actionlint: 4 shellcheck findings, byte-identical to the pre-change baseline, all in an untouched bash step. No new findings.script:blocks were extracted from the YAML and executed in Node against stubbed GitHub APIs, capturing the dispatch payload for 27 command forms. All four legacy forms produce identical payloads with nocontext_mill_refkey. All pin forms attach the key. Eleven hostile refs — quote breakout,../../etc/passwd,--upload-pack=,$(id), backticks, backslash, over-length, absolute, trailing slash — all fail with no dispatch.Companion PR: PostHog/context-mill mirrors this with a
wizard:<ref>suffix.