Pull introspect.py from anyscale/docs at a pinned SHA#1
Merged
Conversation
introspect.py and util.py were duplicated between this repo (scripts/introspect.py + scripts/util.py) and anyscale/docs (scripts/docgen/introspect.py + scripts/docgen/util.py). They diverged once already (the --allow-duplicate-models flag landed here ahead of the docs side), and there was no enforcement to keep them aligned. Delete the local copies. archive_version.sh now fetches both files from anyscale/docs at the SHA stored in .docs-introspect-sha and runs them out of scripts/.docgen/ (gitignored). The docs repo is the single source of truth; we get drift-detection for free because changes there have to be intentionally pulled here. Fetch uses `gh api` rather than raw.githubusercontent.com so the private docs repo is reachable. Locally that needs a `gh auth login` session. The archive workflow exports GH_TOKEN from secrets.DOCS_DISPATCH_TOKEN; that token's contents:read scope on anyscale/docs is the new requirement (if it doesn't already carry that scope, swap to a dedicated secret in the workflow file). Bumping introspect: edit .docs-introspect-sha to the new docs commit and merge. Next archive run picks it up. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fail fast if DOCS_DISPATCH_TOKEN doesn't carry contents:read on anyscale/docs, rather than 404'ing mid-archive against a partial gh api fetch. Surfaces the scope requirement clearly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
introspect.pyandutil.py. Both files lived in two places (scripts/here +scripts/docgen/in anyscale/docs) and have already drifted once. The docs repo is now the single source of truth.scripts/archive_version.shfetches the two files at run time from a pinned SHA stored in.docs-introspect-sha. Files land inscripts/.docgen/(gitignored) so introspect'sfrom util import ...resolves locally.gh apirather thancurl https://raw.githubusercontent.com/...becauseanyscale/docsis a private repo. Locally that means agh auth loginsession. In CI,GH_TOKENis exported fromsecrets.DOCS_DISPATCH_TOKEN..docs-introspect-shato the new docs commit SHA. The next archive run picks it up.Heads-up on the token
secrets.DOCS_DISPATCH_TOKENpreviously only neededactions:writefor therepository_dispatchstep. The new archive step needscontents:readonanyscale/docstoo. If the existing token doesn't already carry that scope, swap the workflow'sGH_TOKENreference to a dedicated secret. The line is in.github/workflows/archive.ymlunder the "Archive each missing version" step.Test plan
ghis available on the workflow runner (it's pre-installed onubuntu-latest, but worth a sanity check on the next archive run).workflow_dispatch) and confirm at least one missing version archives cleanly, with the introspect/util pull visible in the logs.scripts/.docgen/does not appear in commits (gitignored)../scripts/archive_version.sh <some-version>and confirm it pulls + runs without manual setup beyond an authenticatedgh.🤖 Generated with Claude Code