Repository navigation
Conversation
The commit link and the "more commits" list on the build results page were driven by a two-entry if/else (fmt, beman_iterator_interface); everything else linked to github.com/notsupported/notsupported. Add LibraryRepos, which reads infra's libraries.yaml and resolves a library id to its upstream repo, inheriting repo/type down the nested groups and expanding the small jinja2 subset the repo values actually use. 179 of the 200 C++ libraries CE lists now resolve; the rest are tarball entries with no repo in the yaml, and those render the hash as plain text rather than a dead link. Resolution is version-aware, because a library's versions can come from different repos: proxy builds <= 4.0.1 from microsoft/proxy and the rest from ngcpp/proxy. The map is refreshed on startup and on /reinitialize, both non-fatally - a missing repo map only costs us a link - and the fetch is bounded by a timeout so a hung connection cannot hold the listen socket back. While in here: - gh-commits.js takes the repo from data-* attributes on .more-commits instead of the window globals a generated script used to set, which also gets the library name and version out of an unescaped script body. - The GitHub-only part of the page (jQuery, the module, the commit list) is only emitted for GitHub-hosted libraries. - /downloadpkg's five-argument form sent `404` as a 200 body; send the status. - Document the download, build failure/log and service endpoints in docs/api.md. - Ignore the local buildslogs.db. Co-Authored-By: Claude Opus 5 (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.
The commit link and the "more commits" list on
/cpp_library_build_resultswere driven by a two-entry if/else (fmt,beman_iterator_interface); every other library linked togithub.com/notsupported/notsupported.What this does
library-repos.jsreads infra'slibraries.yamland resolves a library id to its upstream repo, inheritingrepo/typedown the nested groups (beman,nightly) and expanding the small jinja2 subset therepo:values actually use today (context[-1], optionally throughreplace).Checked against the 200 C++ libraries CE currently lists: 179 resolve. The 21 that don't (boost, qt, zlib, openssl, llvm, …) are
tarballsentries with norepo:in the yaml, so there is nothing to link to — those render the commit hash as plain text instead of a dead link, and the "more commits" section is left out entirely.Resolution is version-aware, because one library's versions can come from different repos:
proxybuilds <= 4.0.1 frommicrosoft/proxyand 4.0.2+ and trunk fromngcpp/proxy. Verified correct at all 11 of its versions.The map is refreshed on startup and on
/reinitialize, both non-fatally — a missing repo map only costs us a link — and the fetch is bounded by a 10s timeout so a hung connection to raw.githubusercontent can't hold the listen socket back.Also in here
gh-commits.jsreads the repo fromdata-*attributes on.more-commitsinstead of thewindowglobals a generated inline script used to set. That also gets the library name and version, both route parameters, out of an unescaped<script>body./downloadpkg's five-argument form didres.send(404), i.e. HTTP 200 with a body of404; it now sends the status.docs/api.mdgains the download, build-failure/log and service endpoints, plus the/libraries/<lang>and bulk/annotationsroutes.buildslogs.dbis gitignored.Testing
No test harness in this repo, so:
npx eslint index.js library-repos.jsis clean, a liverefresh()against infra parses (196 C++ ids) and a blackholed host rejects after 10.0s rather than hanging, and the full id→repo mapping was diffed againstgodbolt.org/api/libraries/c++.🤖 Generated with Claude Code