fix: point install one-liner at HEAD instead of main - #2
Open
Bradenream wants to merge 2 commits into
Open
Conversation
The published install commands fetched raw.githubusercontent.com/voiceflow/cli/main/scripts/install.sh, but this repository's default branch is master. That URL returns 404, so both the bash and PowerShell quick-install paths were broken for every user. main -> 404 master -> 200 Corrects all six occurrences: the comment headers in scripts/install.sh and scripts/install.ps1, and the two commands actually published in README.md. The README occurrences sat inside a Speakeasy-managed block. Speakeasy hardcodes the branch as `main` -- it is not inferred from the repository's default branch, and no gen.yaml or workflow.yaml key overrides it -- so editing in place would be reverted by the next `yarn codegen`. The section is therefore taken out of generator management using Speakeasy's documented `No ... [tag]` marker, which replaces the `Start` marker and drops the `End` marker. README.md is not in gen.lock's trackedFiles, so persistentEdits would not have protected it. The installer body already resolves binaries through the releases API, so the branch affects only the bootstrap fetch of the installer itself. Pinning that to a mutable branch remains fragile; migrating it to a release asset is tracked separately.
There was a problem hiding this comment.
Pull request overview
Fixes broken “quick install” commands by updating the raw GitHub URLs to point at this repo’s default master branch, and prevents Speakeasy regeneration from silently reverting the README install section back to main.
Changes:
- Update the published install one-liners (README + script headers) from
.../main/...to.../master/.... - Replace Speakeasy
Start/Endmarkers for the README install section with theNo ...marker and add an explanatory comment so the fix survivesyarn codegen.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/install.sh | Updates usage header URLs to master so copy/paste install instructions don’t 404. |
| scripts/install.ps1 | Updates usage header URLs to master so PowerShell install instructions don’t 404. |
| README.md | Updates the published quick-install commands to master and removes the section from Speakeasy management to avoid reversion. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Addresses two findings from adversarial review of this PR. Use `HEAD` rather than `master` in the install URLs. The original defect was a hardcoded branch name; fixing it with a different hardcoded branch name leaves the same bug latent, and it would fire the day anyone renames master to main -- raw.githubusercontent.com does not redirect renamed branches. `HEAD` resolves to whatever the default branch currently is. Verified: HEAD returns 200 with content byte-identical to master, and also resolves on a repository whose default is `main`, so it is branch-name agnostic. Move `<!-- No CLI Installation [installation] -->` from the `Start` slot to the `End` slot, which is what Speakeasy documents: remove the `Start` comment and change the matching `End` comment to `No`. Evidence from generated repositories in the wild shows the marker behaves as a file-level suppression flag whose position does not matter -- Kong/terraform-provider-konnect carries bare untagged `No` markers with no associated content at all, and open-policy-agent/opa-java places its marker 70 lines below the content it suppresses. Since position appears not to matter and the documented form costs nothing, use the documented form. Also record in the README comment that hand-owning this section means the dormant `cli.distribution` channels in .speakeasy/gen.yaml (homebrew, nfpm, winget) will not contribute install instructions here if they are enabled later.
effervescentia
approved these changes
Aug 12, 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 published install commands fetch
raw.githubusercontent.com/voiceflow/cli/main/scripts/install.sh. This repository's default branch ismaster, so that URL 404s and both quick-install paths are broken for every user.Six occurrences across three files: comment headers in
scripts/install.sh(2) andscripts/install.ps1(2), plus the two commands actually published inREADME.md.Why
HEADand notmasterThe defect is a hardcoded branch name. Fixing it with a different hardcoded branch name leaves the same bug latent — it fires the day anyone renames
mastertomain, becauseraw.githubusercontent.comdoes not redirect renamed branches.HEADresolves to whatever the default branch currently is. Confirmed branch-name agnostic by resolving it against a repository whose default ismain.This does not make the URL immutable — see the follow-up below. It removes one failure mode, not the class.
Why the README needed more than a find-and-replace
The README occurrences sat inside
<!-- Start CLI Installation [installation] -->…<!-- End … -->, which Speakeasy owns. Editing in place would be reverted by the nextyarn codegen.main. Not derived from the repo's default branch — this repo is the proof, since it ismasteryet emitsmain. Nogen.yamlorworkflow.yamlkey overrides it, and the published docs template prints the branch as a literal while substituting only org and repo.persistentEditswould not have saved it.README.mddoes not appear in.speakeasy/gen.lock'strackedFiles, so it gets no three-way merge. (scripts/install.shandinstall.ps1are tracked, so their edits do merge — a different survival mechanism, also untested here.)Nomarker, applied in Speakeasy's documented position: theStartcomment is removed and the matchingEndcomment becomes<!-- No CLI Installation [installation] -->.What the evidence actually shows
An earlier revision of this PR claimed three production repos all place the marker in the
Startslot with content following. That was wrong, and only one of the three matched. Corrected:launchdarkly/mcp-serverStartslot, content follows, noEnd— survived 3 regen commitsopen-policy-agent/opa-javaKong/terraform-provider-konnectNomarkers, no associated content, zeroStartmarkers in the fileThe right conclusion is stronger than the original claim: the marker is a file-level suppression flag whose position does not matter. Since position appears not to matter and the documented form costs nothing, this PR uses the documented form.
Caveat worth weighing: no Speakeasy
cli-target repo on GitHub uses aNomarker at all — every datapoint above is from a different generator (typescript/mcp, java, terraform). The mechanism is unvalidated on this generator.Verification
Both published URLs return 200; the fetched installer passes
bash -n. Markers balance at 11Start/ 11End/ 1No, with[installation]absent from everyStart/Endpair. The## CLI Installationheading and its#cli-installationTOC anchor are byte-identical tomaster.Speakeasy's generated TOC is heading-derived, not managed-section-derived, so an unmanaged section keeps its TOC entry — verified on
launchdarkly/mcp-serverandopa-java, both of which have aNo-marked section still listed in their generated TOC.Non-comment changed lines under
scripts/is zero — every changed line there starts with#.Merge gate
yarn codegenwas never run.speakeasyis not installed,openapi.stable.jsonis gitignored and absent, andworkflow.yaml'sregistry:line is a publish target rather than an input — so a reviewer is as blocked as the author. Someone with Speakeasy auth should run it on this branch and confirm the section survives withHEADintact and no duplicate section re-inserted at<!-- Placeholder for Future Speakeasy SDK Sections -->.Worst case if it does not survive is today's status quo: the URLs revert to
mainand 404, exactly as they do now.Expect codegen to also add ~18
docs/vf_test*.mdfiles. That is pre-existing staleness — thetestcommand tree exists ininternal/cli/test/but was never doc-generated — not caused by this PR.Follow-ups worth filing
HEADis still mutable: a bad commit on the default branch reaches users immediately. The durable target ishttps://github.com/voiceflow/cli/releases/latest/download/install.sh, immutable per release and free to maintain viarelease.extra_filesin goreleaser. It cannot ship here because that URL 404s until a release carries the asset — sequence: goreleaser change, cut a release, flip the URLs. This PR is the prerequisite either way, since README ownership is what lets any non-Speakeasy URL survive codegen.test/holds 20 vitest files that automation never runs. A user-facing 404 shipped across 123 releases with nothing to catch it. A liveness check on the two published URLs would have.main. It would make Speakeasy's hardcoded output correct at the source. Blast radius looks near-zero (the release workflow triggers on tags, and no branch references exist in.github/, goreleaser, ordocs/). Rejected here because it does not get us to release-pinning andHEADalready removes the rename fragility — but if follow-up 1 is never going to land, the rename is the better durable fix.Worth knowing: the installer body already resolves binaries through the releases API, so the branch affects only the bootstrap fetch of the installer itself.