fix: republish release metadata on every deploy#11
Open
kattapug wants to merge 1 commit into
Open
Conversation
/releases/*.json and /appcast/*.xml are only staged into the deploy when release-input/ is populated, which happens exclusively in the "Publish Release Surfaces" workflow. release-input/ is gitignored, and stageReleasePublishInputs() calls ensureCleanGeneratedReleaseTargets() when it finds nothing, so any other deploy (a content push that triggers a Netlify build) ships a dist with those files removed. The SPA catch-all then answers those URLs with index.html. That is what production is serving today: every metadata URL, and any nonexistent path, returns the same 31735-byte HTML shell with HTTP 200. Shipped desktop apps hit it - OpenStudio's AI Tools setup fetches https://openstudio.org.in/releases/ai-runtime/stable/latest.json, gets HTML, fails juce::JSON::parse and reports "The AI runtime manifest was not valid JSON" (terminal reason runtime_manifest_invalid). The last publish workflow run was 2026-05-19; the last website commit is 2026-06-11, which is when the metadata was overwritten. Make the website self-sufficient: when release-input/ has no metadata, hydrate it from the desktop repo's GitHub release assets before staging. Tries /releases/latest/download/ first, then falls back to scanning releases for the newest one that carries all required assets (GitHub's "latest" can be an ai-runtime-v* release, which does not publish them). Failure only warns, so offline and local builds behave as before, and the publish workflow is untouched because its release-input/ is already populated. Opt out with OPENSTUDIO_FETCH_RELEASE_METADATA=0. Repo override via the existing OPENSTUDIO_DESKTOP_REPO. Also ignore public/releases/stable/*, which the staging step generates but the existing patterns did not cover. Verified: npm run stage-release-publish-inputs on a clean checkout hydrates all seven files from v0.0.40 and npm run validate-release-publish-inputs passes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
👷 Deploy request for openstudiowebsite pending review.Visit the deploys page to approve it
|
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
Every release-metadata URL on
openstudio.org.incurrently returns the SPA HTML shell:(
Server: Netlify,Cache-Status: "Netlify Edge"; hit. The_headersno-storerule for those paths is applied, so the deploy simply has no file there and/* -> /index.html 200answers instead.)Shipped desktop builds break on this. OpenStudio's AI Tools Setup fetches
https://openstudio.org.in/releases/ai-runtime/stable/latest.json, receives HTML,juce::JSON::parsefails, and the user gets:The AI runtime is fully published (
v0.0.40carriesOpenStudio-ai-runtime-stable-latest.json, runtime0.0.11); only the website copy is gone.Root cause
stageReleasePublishInputs()stages/releasesand/appcastonly fromrelease-input/, and callsensureCleanGeneratedReleaseTargets()when it finds nothing.release-input/is gitignored and is populated only by.github/workflows/publish-release-surfaces.yml(repository_dispatch: openstudio_release_published).So the metadata exists only in deploys produced by that workflow. Any ordinary Netlify build from a git push produces a
distwith those files deliberately removed, silently overwriting them in production.Timeline matches: last publish run
2026-05-19(v0.0.40) → last website commit2026-06-11→ metadata gone.Change
Make an ordinary deploy self-sufficient. When
release-input/has no metadata, hydrate it from the desktop repo's release assets, then stage and validate exactly as before:hydrateReleaseMetadataInputs()— downloads the 6 required assets (+ optional Linux appcast) intorelease-input/.https://github.com/<repo>/releases/latest/download/<asset>first; on failure falls back to scanning/releasesfor the newest non-draft, non-prerelease release carrying all required assets. GitHub's "latest" can be anai-runtime-v*release, which does not publish them.console.warns — offline/local builds behave exactly as today.release-input/is already populated, so hydration never runs there.OPENSTUDIO_FETCH_RELEASE_METADATA=0; repo override reuses the existingOPENSTUDIO_DESKTOP_REPO..gitignore: addedpublic/releases/stable/*, generated by staging but not covered by the existing patterns.Verification
npm run stage-release-publish-inputson a clean checkout (norelease-input/) hydrates all seven files fromv0.0.40;npm run validate-release-publish-inputspasses; stagedlatest.jsonreportsappVersion 0.0.40,runtimeVersion 0.0.11, newplatforms.windows.baseshape intact.test/release-metadata-hydration.test.mjs(3 tests, injectedfetch): happy path, fallback-to-release-scan, and no-release-found returning a reason instead of throwing.npm run test:release-metadata— 3/3 pass;test:ai-runtimestill 6/6.npx eslintclean on changed files.Note
This fixes future deploys. To restore production now, re-run the publish workflow for the current release:
🤖 Generated with Claude Code