Skip to content

Pull introspect.py from anyscale/docs at a pinned SHA#1

Merged
ronny-anyscale merged 2 commits into
mainfrom
rr-260520-pin-introspect-from-docs
May 20, 2026
Merged

Pull introspect.py from anyscale/docs at a pinned SHA#1
ronny-anyscale merged 2 commits into
mainfrom
rr-260520-pin-introspect-from-docs

Conversation

@ronny-anyscale
Copy link
Copy Markdown
Collaborator

Summary

  • Delete the schemas-repo copies of introspect.py and util.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.sh fetches the two files at run time from a pinned SHA stored in .docs-introspect-sha. Files land in scripts/.docgen/ (gitignored) so introspect's from util import ... resolves locally.
  • Fetch uses gh api rather than curl https://raw.githubusercontent.com/... because anyscale/docs is a private repo. Locally that means a gh auth login session. In CI, GH_TOKEN is exported from secrets.DOCS_DISPATCH_TOKEN.
  • To bump the introspector: edit .docs-introspect-sha to the new docs commit SHA. The next archive run picks it up.

Heads-up on the token

secrets.DOCS_DISPATCH_TOKEN previously only needed actions:write for the repository_dispatch step. The new archive step needs contents:read on anyscale/docs too. If the existing token doesn't already carry that scope, swap the workflow's GH_TOKEN reference to a dedicated secret. The line is in .github/workflows/archive.yml under the "Archive each missing version" step.

Test plan

  • Verify gh is available on the workflow runner (it's pre-installed on ubuntu-latest, but worth a sanity check on the next archive run).
  • Trigger the workflow manually (workflow_dispatch) and confirm at least one missing version archives cleanly, with the introspect/util pull visible in the logs.
  • Confirm scripts/.docgen/ does not appear in commits (gitignored).
  • Local dev: run ./scripts/archive_version.sh <some-version> and confirm it pulls + runs without manual setup beyond an authenticated gh.

🤖 Generated with Claude Code

ronny-anyscale and others added 2 commits May 20, 2026 14:03
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>
@ronny-anyscale ronny-anyscale merged commit 3184ecc into main May 20, 2026
1 check passed
@ronny-anyscale ronny-anyscale deleted the rr-260520-pin-introspect-from-docs branch May 20, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant