fix(buck2): ship static_checks in the consumer rules product - #1352
Merged
schickling merged 4 commits intoSep 23, 2026
Merged
schickling merged 4 commits into
schickling merged 4 commits into
Conversation
The TypeScript package projection (schema 12) loads @rules//buck2:static_checks.bzl in every consumer BUCK file, but the rules product inventory never shipped the file, so standalone consumer roots (private-shared products) cannot resolve the load. The //.buck2/capabilities substitutions in the packager are also dead since the toolchains sources switched to @capabilities natively, and --replace-fail now breaks the buck2-rules build outright. agent-identity: dev3.direct.omp.2qbt6gyt agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.2.6 agent-runtime: OMP 18.2.6 agent-model: openai-codex/gpt-5.6-sol tooling-profile: dotfiles@f45f5d9
schickling-assistant
marked this pull request as ready for review
September 23, 2026 10:30
The TypeScript package projection emits workspace_dist and workspace_dependency_views maps on every package_tree call, but the wrapper neither declared the parameters nor forwarded them, so every consumer package_tree evaluation fails with 'Argument workspace_dependency_views occurs more than once'. Mirror package_view: declare both parameters with empty defaults and fold workspace_dist into workspace_files. agent-identity: dev3.direct.omp.2qbt6gyt agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.2.6 agent-runtime: OMP 18.2.6 agent-model: openai-codex/gpt-5.6-sol tooling-profile: dotfiles@f45f5d9
The toolchains, javascript, package_tools, and static_checks rules reference labels under packages/@overeng/buck2-tools (typescript-runner, package_command_runtime, javascript_action_runtime, src/static-check-runner, src/repository-policy-runner), but the consumer rules product neither shipped those source files nor created the package, so every consumer target evaluation fails with 'package does not exist'. Ship the three missing runner sources and generate the package BUCK mirroring the repository's own runtime targets. agent-identity: dev3.direct.omp.2qbt6gyt agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.2.6 agent-runtime: OMP 18.2.6 agent-model: openai-codex/gpt-5.6-sol tooling-profile: dotfiles@f45f5d9
With the nested package BUCK present, the root filegroups can no longer
source files from inside it ('Source file does not exist as a member of
package rules//'). Alias the root runtime labels onto the package
targets instead.
agent-identity: dev3.direct.omp.2qbt6gyt
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.2.6
agent-runtime: OMP 18.2.6
agent-model: openai-codex/gpt-5.6-sol
tooling-profile: dotfiles@f45f5d9
schickling
deleted the
schickling-assistant/2026-09-23-rules-inventory-static-checks
branch
September 23, 2026 12:35
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
The standalone consumer rules product is broken from current
mainin four independent ways, all reproduced by building the first downstream consumer against the locked provider:load("@rules//buck2:static_checks.bzl", ...)in every consumer BUCK file, but the rules product inventory never shippedbuck2/static_checks.bzl:nix build .#buck2-rulesfails outright since feat(buck2): add standalone root and aggregate gates #1301/feat(buck2): move bounded Weaver checks #1302 switched the toolchains sources to@capabilitiesnatively — the packager's--replace-failsubstitutions find nothing:workspace_dist/workspace_dependency_viewson everypackage_tree(...)call, but thepackage_treewrapper neither declared nor forwarded them:packages/@overeng/buck2-tools(typescript-runner.ts,package_command_runtime,javascript_action_runtime,src/static-check-runner.ts,src/repository-policy-runner.ts), but the product shipped neither the runner sources nor the package, so every consumer target evaluation fails withpackage rules//packages/@overeng/buck2-tools does not exist.All four reproduced on pristine
main— pre-existing, not consumer-specific.Goal
buck2-rulesbuilds frommainagain, ships every file and label consumer projections reference, and the downstream standalone consumer builds both of its products end to end.Decisions
substituteInPlacecalls instead of weakening to--replace: the sources now emit@capabilitiesrefs directly.package_view's parameter shape in thepackage_treewrapper (declare, default empty, foldworkspace_distintoworkspace_files).packages/@overeng/buck2-tools/BUCKin the packager mirroring the repository's own runtime targets, and alias the root runtime labels onto the package targets (root filegroups cannot source files from inside a nested package).Verification
devenv tasks run genie:runregeneratesinventory.jsonwith exactly the added entries;genie:checkfresh;lint:check:formatpasses;genie:buck2:test87 pass / 0 fail (includes the updated inventory expectation).nix build .#buck2-rulessucceeds; the output shipsbuck2/static_checks.bzl, all five runner sources, and the nested package BUCK. Before this change the same build fails with the substitution error above.nix build .#geist-design-system .#meterssucceeds and emits both tarball artifacts. Each of the four fixes was individually forced by this loop (the failure advanced one gap per fix).Pre-flip deviations
check:allnot run locally: the shared builder is saturated by concurrent deploys and heavy builds. CI owns those lanes.Complexity
No new abstractions — inventory entries, two dead lines removed, one wrapper parameterized to match its sibling, one mirrored package BUCK.
Concerns
repository_static_checksloads; if those reach consumer BUCK files the inventory may need further entries — flagged for coordination.Friction & bottlenecks
nix build --impurequeued 28+ min).References
Posted on behalf of @schickling
agent_identitysessionagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimeagent_modelworktreetooling_profile