Repository navigation
feat(registry): resolve packages from fbuild's own registry index (#1829) - #1831
Merged
Merged
Conversation
…t api.registry.platformio.org (#1829) - Shards now carry each archive's PlatformIO system values in asset.provides (from the bucket's _state/manifest.db), and @names-<h> shards map package names to owners for owner-less specs. - RegistryClient and fbuild-library's lib_deps resolver read the index; an unindexed package fails with RegistryError::NotIndexed, an unreachable index with IndexUnavailable. No PlatformIO fallback. - fbuild-core keeps the selection logic (resolve_registry over typed RegistryMetadata); registry_api_url becomes registry_package_path. - Guard test: no runtime .rs file references the registry API host. Closes #1829
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
Closes #1829.
fbuild no longer queries
api.registry.platformio.org. Package specs for platforms, tools, frameworks andlib_depsresolve from the #1815 mirror manifest, which now doubles as a registry index.Data
owner/type/name/version/file, andasset.providesholds the PlatformIOsystemvalues a host-specific archive serves. These come from the bucket's own_state/manifest.db: 1,008 host-specific files across 18,807 packages. Noprovidesmeans any host. The generator fails if any hashed object has no state-DB row, rather than defaulting it to "any host".names-<h>.jsonshards (Index keys@names-<h>, bucketed by the first hex digit of the sha256 of the lowercased name) list every package astype/name/owner, with one of its archives as the asset. That keeps them valid against the strict v1 schema. Owner keys escape@, so these keys can't collide with an owner.manifest-validate.Client
RegistryClient(fbuild-packages-fetch) reads the Index and the owner shard, verified as in Publish fbuild-owned sha256 for every bucket object (sharded manifest); registry paths only, no GitHub mirror, no PlatformIO fallback or metadata calls #1815, and hands typedRegistryMetadatatofbuild_core::platformio_package::resolve_registry. Selection logic is unchanged.RegistryError::NotIndexed, and an unreachable index or a tampered shard fails withIndexUnavailable. Neither falls back to PlatformIO.lib_deps:fbuild-library's resolver keeps its lenient version selection (e.g.2.72) and gets its versions from the index.FastLEDresolves tofastled), and a tie is an error asking forowner/name.dl.registryURL as the primary, so the bucket-first mirror flow and its sha checks apply unchanged.REGISTRY_API,API_BASE, the/v3/searchpaging and the library search fallback.registry_api_urlbecomesregistry_package_path(owner/type/name).Tests
fbuild-packages-fetch,fbuild-library,fbuild-build-engineandfbuild-coreall pass. New coverage:provideshost matching;.rsfile contains the registry API host.-D warningsis clean.FBUILD_CACHE_DIR,FBUILD_DEV_MODE=1, index served fromsite/, and a logging proxy that refusesapi.registry.platformio.org. All cases passed with zero API requests:fbuild installuno withlib_deps = bblanchon/ArduinoJson@^7, FastLEDresolvedbblanchon/[email protected]and the owner-lessfastled/[email protected], both served from the bucket;fbuild builduno withplatform_packages = platformio/[email protected]picked thelinux_x86_64archive from the index'sprovides;fbuild installesp32dev and d1_mini also succeeded.Coverage
Only packages mirrored to fbuild's bucket resolve: 29,299 archives, averaging 1.5 versions per library. Anything else now fails with a clear
NotIndexederror instead of silently reaching PlatformIO's API.🤖 Generated with Claude Code