Skip to content
CAI
Software that uses CAICheck a score

facebook/buck2

49.1

Weak · 30 September 2026

683k

lines of production code

Rust

with Java

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Buck2 is a high-performance, distributed build system written in Rust that manages the analysis, configuration, and execution of software builds. It utilizes a persistent daemon architecture and the DICE incremental computation engine to optimize dependency tracking, caching, and remote execution across multiple languages and platforms. The system provides a comprehensive Starlark-based API for defining build rules, supported by extensive diagnostic tools, observability features, and IDE integration for debugging and linting.

How it got here

2022–2023 — Buck2 Rust architecture modernization

233 changes.

This period centered on migrating Buck2 to a modular Rust architecture, consolidating legacy client-server and daemon logic into a DICE-backed core. The work involved restructuring core subsystems into dedicated crates, implementing robust error handling and caching, and enhancing developer tooling and the Starlark interpreter.

2024–2025 — Infrastructure modernization and developer tooling

96 changes.

This period focused on modernizing Buck2's core infrastructure by introducing dedicated crates for critical subsystems such as directory handling, certificate management, and resource control, alongside a new serialization framework for efficient data paging. Significant effort was directed toward enhancing developer experience through comprehensive CLI improvements, including dynamic shell completions, interactive HTML build visualizations, and advanced diagnostic commands for logging and auditing. The work also expanded language support with open-sourced Android toolchains and Rust resource libraries, while strengthening internal stability through rigorous error handling refactoring and extensive test coverage.

2026 — Incremental computation and performance infrastructure

20 changes.

This period focused on establishing the core infrastructure for Buck2's incremental computation engine, introducing the dice\_core library and associated concurrency management. Significant effort was directed toward performance optimization through new crates for fast hashing, memory-efficient vectors, and persistent storage backends. The work also included enhancing build analysis capabilities with set sketching, improving error classification, and introducing tooling for Starlark formatting and memory benchmarking.

Features

Add BUCK build rules for AndroidX libraries in the demo app

The Android demo app now includes generated BUCK build files for a wide range of AndroidX libraries (including Activity, Compose, Foundation, Material, and UI components). These files define how the libraries are fetched from Maven and their dependencies, enabling the app to be built with the BUCK build system.

(repo-wide) · high confidence

Add StrongHash derive macro for structs and enums

The \gazebo/strong\_hash\_derive\ crate now provides a \StrongHash\ derive macro that automatically implements the \strong\_hash::StrongHash\ trait for user-defined structs and enums. This allows types to be hashed using a strong hashing algorithm by simply adding \\#\[derive(StrongHash)\]\ to their definition, with the macro handling both named and unnamed fields for structs and all variant types for enums.

_gazebo/strong\_hash\derive · high confidence

Add \`buck2 log shed select-events\` command to filter event logs

Users can now filter Buck event logs by event type using the new \buck2 log shed select-events\ command. This tool re-encodes an input log to an output file, preserving the original encoding and compression, while allowing users to specify regular expressions to include or exclude specific event names (such as \ActionExecution\ or \Snapshot\). This capability helps users analyze the impact of changes on log sizes by isolating relevant events.

_app/buck2\_cmd\_log\client · high confidence

Add common utilities for audit command target resolution

New helper functions have been added to the audit server's common module to streamline how target patterns are resolved. The \audit\_command\_configured\_target\_labels\ function now parses CLI pattern arguments and resolves them into a list of configured target labels, while \audit\_command\_target\_resolution\_config\ provides the necessary configuration context for this resolution process. These changes centralize the logic required to interpret user-provided target patterns within the audit command workflow.

_app/buck2\_cmd\_audit\server/src/common · high confidence

Add configured graph size performance audit command

A new performance audit command has been added to the Buck2 audit server to measure the size and computation duration of configured graphs for specified targets. This feature allows users to analyze build performance by outputting JSON or text reports containing the configured graph size, the time taken to compute properties, and an optional sketch, helping identify performance bottlenecks in the build graph.

_app/buck2\_cmd\_audit\server/src/perf · high confidence

Add memory benchmark for Starlark parser and evaluator

A new memory benchmark tool has been added to measure memory consumption during the parse, evaluate, and freeze phases of Starlark programs. The benchmark generates large Starlark programs with many function definitions or lambda instantiations to isolate per-instance costs, allowing users to analyze memory usage patterns for the parser and evaluator.

_starlark-rust/benchmark\memory · high confidence

Add rust-project tool and buck\_resources library to integrations

This change introduces the \rust-project\ tool, which reads Buck dependency information to generate \rust-project.json\ files for use with rust-analyzer, enabling IDE support for Rust projects that do not work with autocargo. It also adds the \buck\_resources\ library, which allows Rust code to look up paths generated by Buck's \rust\_binary.resources\ feature. The entry includes the build definitions, source code, and e2e tests for both components, covering features such as workspace resolution, alias handling, semantic target kinds, and mapped source files.

integrations · high confidence

Add sample Android demo app

A new sample Android application has been added to the repository, providing a reference implementation for building Android apps with Buck2 and Jetpack Compose. The app features a social feed UI with a top app bar, a scrollable list of posts, and interactive like/comment actions, demonstrating Material 3 theming and edge-to-edge display. It includes the necessary build configuration (BUCK files), resource definitions, and unit tests using Robolectric to validate the data model.

examples/android/demoapp · high confidence

Add shell completion for flagfile arguments

The \buck2\ command-line tool now supports tab completion for flagfile arguments (e.g., \@flagfile\ or \--flagfile\). This new capability allows users to complete paths to mode files and their contents directly from the shell, filtering out non-flagfile extensions and handling cell-relative paths correctly.

_app/buck2\_cmd\_completion\client/src/complete · high confidence

Add shell completion support for Bash, Fish, PowerShell, and Zsh

The buck2 command-line tool now provides dynamic shell completions for Bash, Fish, PowerShell, and Zsh. This change introduces a new client crate that embeds wrapper scripts for each supported shell, enabling users to get context-aware suggestions for commands and options directly in their terminal.

_app/buck2\_cmd\_completion\client · high confidence

Added buck2 dependency installation helper

A new build helper has been added to simplify setting up development environments for Meta open source projects using buck2. The \build/buck2/install\_deps\ target provides a script that automatically detects the host operating system (supporting Fedora, Ubuntu, and Homebrew) and installs the necessary system-level dependencies required by the project's buck2 targets, streamlining the initial setup process.

build · high confidence

Added serde serialization support for gRPC proto types

The \re\_grpc\_proto\ library now includes built-in serde serialization and deserialization helpers for \prost\_types::Any\ messages. This enables users to easily convert these protocol buffer types to and from JSON or other serde-compatible formats, which is particularly useful for debugging, logging, or integrating with configuration systems that rely on standard serialization formats.

_remote\_execution/oss/re\_grpc\proto · high confidence

Analysis environment now supports plugin dependencies

The analysis phase now resolves and exposes plugin dependencies to Starlark rule implementations. The new \plugins.rs\ module converts plugin lists into Starlark values, correctly applying execution platform configurations to determine the appropriate configuration for each plugin target. This allows rules to access and utilize plugin artifacts during the analysis of a target.

_app/buck2\analysis/src/analysis · high confidence

Artifact metadata serialization and build artifact validation

The \buck2\_artifact\ crate now includes \artifact\_dump.rs\, which provides JSON serialization for artifact metadata (files, directories, and symlinks) including their content digests, enabling tools to inspect artifact details. Additionally, \BuildArtifact::new\ now validates that the action key's owner matches the build artifact path's owner, returning an error if they mismatch to ensure consistency between the action definition and the resulting output path.

_app/buck2\artifact/src/artifact · high confidence

Audit server adds output path parsing and printing commands

The audit server now supports two new subcommands: \parse\ and \output\. The \parse\ command parses a \buck-out\ path and prints its structural attributes (such as target label, configuration hash, and content hash) in either human-readable or JSON format. The \output\ command analyzes a \buck-out\ path to identify the specific build action that produced it, returning the action details or relevant target labels if the path is content-based or configuration-mismatched.

_app/buck2\_cmd\_audit\server/src/output · high confidence

BXL now exposes analysis query and dependency resolution capabilities in configured target contexts

Users can now access dependency analysis results, execute queries, and resolve unkeyed placeholders within the Starlark configuration of configured targets via the new \LazyAttrResolutionContext\. This change introduces a dedicated context implementation that bridges the BXL environment with Buck's analysis engine, allowing Starlark rules to inspect target dependencies and run queries during the configuration phase.

_app/buck2\_bxl/src/bxl/starlark\defs/nodes/configured · high confidence

Bootstrap now supports Windows with dotslash shims for Buck2, Reindeer, and Rust Project

The bootstrap scripts for Buck2, Reindeer, and Rust Project now include Windows support via new \dotslash\ shims. These scripts download and execute the corresponding binaries for Windows (both x86\_64 and aarch64 architectures) alongside existing macOS and Linux platforms, enabling users to run these tools on Windows systems.

bootstrap · high confidence

Buck2 binary now supports a client-only build mode

The Buck2 build definition introduces a new \buck2\_client\_only\_setting\ configuration and a corresponding Starlark transition (\buck2\_client\_transition\_alias\). This allows users to build a lightweight version of the Buck2 binary that excludes server-side components (such as the daemon, test runner, and server commands) and server-specific dependencies. This client-only build is useful for scenarios where only the client-side functionality is needed, reducing binary size and build time.

app/buck2 · high confidence

Buck2 query parser now supports multi-query substitution and the 'None' keyword

Users can now use the \%s\ placeholder in query expressions to run a single query pattern against multiple arguments (e.g., \owner('%s') a.rs b.rs\), with the parser automatically substituting each argument into the query. A new \%Ss\ placeholder is also available to substitute a set of arguments. Additionally, the query language now recognizes \None\ as a valid keyword/identifier, and error messages for missing placeholders provide concrete working examples to help users correct their syntax.

_app/buck2\_query\parser · high confidence

Bundled prelude as an external cell

Buck2 now supports using the prelude as a bundled external cell, allowing the prelude's source files to be materialized directly during builds. This change introduces a new \buck2\_external\_cells\_bundled\ crate that packages the prelude files, ensuring they are available for both Buck and Cargo builds without requiring external fetching.

_app/buck2\_external\_cells\bundled · high confidence

Config value resolution with cycle detection

The legacy configuration parser now supports resolving variable references (e.g., \$(config key)\) within configuration values. A new \ConfigResolver\ component handles this by recursively expanding references and detecting circular dependencies, returning a specific \ReferenceCycle\ error if a loop is found. This ensures that configuration values containing inter-references are resolved safely without causing infinite loops.

_app/buck2\_common/src/legacy\configs/parser · high confidence

DICE: New pagable benchmark and stress-test binaries

The \dice\_examples\ crate now includes several new binaries to help evaluate DICE performance and behavior. \hydration\_bench\ measures the cost of paging values in and out of SQLite storage, emitting JSON metrics for CPU, memory, and I/O. \invalidate\_stress\ tests the cost of walking the dependency graph during invalidation without recomputation, supporting various graph shapes (wide, chain, tree, dense) and shadow copies. \many\_cancel\ explores the costs of cancelling in-progress computations during recomputation in complex dependency graphs. \shapes\_bench\ provides a baseline suite for these performance characteristics. These tools are available for developers to profile and tune DICE's incremental computation behavior.

dice · high confidence

Expanded build report with detailed metrics, sketches, and error controls

The build report now includes comprehensive aggregated metrics and graph sketches for analysis and action graphs, along with memory usage sketches (retained, peak analysis, and peak load) and artifact statistics (count and size sketches with optional cardinality estimates). Action errors in the report can now be categorized for issue tracking, and users can opt to exclude error diagnostics or truncate error content to reduce report size.

_app/buck2\_build\api/src/build · high confidence

Expanded library support and improved memory estimation for allocative

The allocative library now supports tracing memory usage for a wider range of types, including \compact\_str::CompactString\ (replacing the previous \smartstring\ support), \jiff\ timestamps and durations, \serde\_json\ values, \tokio\ synchronization primitives (\Mutex\, \RwLock\), \triomphe\ smart pointers (\Arc\, \ThinArc\), \slab::Slab\, \futures::task::AtomicWaker\, and \either::Either\. Additionally, the \hashbrown\ implementation has been updated to use the new \HashTable\ API, and the underlying memory estimation logic for hash-based collections has been corrected to account for the 7/8 load factor, providing more accurate allocation reports.

allocative/allocative/src/impls · high confidence

Extract core gobuckify logic into reusable library

The core logic of the gobuckify tool has been extracted into a new, publicly visible Go library package named gobuckifylib. This library provides the data structures and functions for querying Go packages via go list, normalizing platform-specific dependencies, and rendering Buck build files. By moving this logic into a dedicated package, the tool's internal processing capabilities are now available for reuse by other components within the codebase.

prelude/go/tools/gobuckify · high confidence

Gazebo library release 0.8.1 and new strong\_hash crate

The Gazebo Rust utility library has reached version 0.8.1, which implements the \Coerce\ trait for \PhantomData\. Additionally, a new \strong\_hash\ crate (version 0.1.0) is introduced, providing a \StrongHash\ trait for cryptographic hashing with support for \CompactString\, \num-bigint\, and \triomphe\ via optional features.

gazebo · high confidence

Implementation of detailed aggregated metrics collection and aggregation

This change introduces the core implementation for collecting and aggregating detailed build metrics. It adds a state tracker that observes analysis and action execution events, and implements parallel computation of aggregated data for top-level targets by traversing the target and action graphs. The implementation handles incomplete action graphs (e.g., when dynamic outputs fail) and aggregates execution metrics, including memory usage, per action and target.

_app/buck2\_build\_api/src/build/detailed\_aggregated\metrics/implementation · high confidence

Initial OSS buck2 shim release

This change introduces the initial open-source buck2 shim, providing the foundational build configuration and toolchain definitions required to build the project with Buck2. It defines system toolchains for C++, Go, Haskell, OCaml, Python, and Rust (defaulting to edition 2024), along with configuration aliases for various operating systems (Linux, macOS, Windows, Android) and CPU architectures. The shim also includes stubs for various build rules (cpp\_binary, java\_binary, etc.), utility Starlark modules for path and set manipulation, and constraint settings for Linux distributions and OSS-specific broken macros.

shim · high confidence

Introduce AI agent context tracking and daemon restart logic

The client now supports an \--agent-context\ flag and reads the \CODING\_AGENT\_METADATA\ environment variable to identify AI agent invocations (e.g., Codex, Gemini) for analytics. Additionally, a new \Restarter\ mechanism monitors execution for corrupted daemon or materializer states, allowing the client to automatically reject and restart daemons to ensure build reliability.

_app/buck2\_client\ctx/src · high confidence

Introduce ActionKey for identifying actions within a deferred holder

The \app/buck2\_artifact/src/actions\ module now includes a new \key.rs\ file that defines \ActionKey\ and \ActionIndex\. \ActionKey\ serves as a unique identifier for specific actions associated with a parent \DeferredHolderKey\, enabling lookups in \ActionAnalysisResult\. It combines the parent holder key with a unique \ActionIndex\ (a u32) to distinguish between multiple actions sharing the same parent. The implementation includes serialization support via \ToProtoMessage\ for \buck2\_data::ActionKey\ and derives necessary traits like \Hash\, \Eq\, \PartialEq\, and \Pagable\ for integration with the deferred framework and Starlark.

_app/buck2\artifact/src/actions · high confidence

Introduce BXL API types and Starlark integration in buck2\_build\_api

This change establishes the core BXL (Buck eXtension Language) API surface within the \buck2\_build\_api\ crate. It introduces the \BxlResult\ struct to capture build outputs, errors, and streaming data, alongside \BxlBuildResult\ to represent the outcome of BXL-invoked targets. The diff adds \BxlFunctionLabel\ to identify BXL modules and implements key Starlark value types: \StarlarkSelectDict\ and \StarlarkSelectConcat\ for handling \select()\ logic, and \StarlarkCoercedAttr\ to expose unconfigured target attributes to Starlark scripts. It also defines the \BxlCalculationDyn\ trait and \LateBinding\ injection points to allow downstream crates to provide the actual BXL evaluation logic.

_app/buck2\_build\api/src/bxl · high confidence

Introduce BXL Actions API and dynamic output evaluation

BXL functions now have access to a new \ctx.bxl\_actions()\ API that allows creating and managing build actions, including support for execution platform resolution, exec dependencies, and toolchains. Additionally, BXL can now be used to define dynamic outputs for rules, enabling the evaluation of BXL code during the deferred execution phase to generate action inputs and outputs based on materialized artifacts.

_app/buck2\_bxl/src/bxl/starlark\defs/context · high confidence

Introduce Buck2 Explain interactive HTML visualization

Adds a new Buck2 Explain feature that generates a self-contained HTML file for visualizing build targets, dependencies, and actions. The Rust backend encodes build graph data into FlatBuffers, while the new JavaScript frontend (using React and Bulma) renders an interactive interface with a dependency graph, search functionality, and detailed target views. A Python build script handles the frontend bundling and inlines assets into the final HTML output.

_app/buck2\explain · high confidence

Introduce Buck2 Health Check client and reporting infrastructure

This change adds the \buck2\_health\_check\ crate, which provides the client-side infrastructure for monitoring Buck2 build health. It defines a trait-based interface for health checks (covering types like memory pressure, low disk space, VPN status, stable revision, and slow builds) and implements a client that forwards events to either an in-process service (for OSS) or an out-of-process gRPC server (for internal builds). The module includes converters for gRPC/proto types, a reporting system that generates user-facing display reports and Scuba tags, and the necessary build rules to compile the new Rust library.

_app/buck2\_health\check · high confidence

Introduce Buck2 action metadata protobuf definitions

A new crate has been added to define and build protobuf structures for Buck2 action metadata. This includes the \action\_metadata.proto\ schema, which specifies messages for tracking dependency file inputs (including digests of untagged and tagged inputs) and remote dependency file validation (covering command-line, output paths, and untagged inputs digests). The build configuration uses a custom build script to compile these definitions, making the resulting Rust types available for use in other parts of the build system.

_app/buck2\_action\_metadata\proto · high confidence

Introduce Buck2 subscription protocol for active command monitoring

A new \buck2\_subscription\_proto\ module has been added to define the protobuf schema and Rust bindings for the Buck2 subscription feature. This change introduces the \buck.subscription\ protocol, allowing clients to subscribe to active commands and receive snapshots of their execution status, including open, closed, and pending spans. The module includes the \subscription.proto\ definition, a Rust library (\buck2\_subscription\_proto\) generated via \tonic\ and \derive\_more\, and a Python gRPC library for the subscription service, establishing the foundational interface for the subscribe command.

_app/buck2\_subscription\proto · high confidence

Introduce Buck2 worker protocol definitions and build rules

This change adds the \buck2\_worker\_proto\ module, which defines the gRPC service contracts for Buck2 persistent workers. It introduces the \Worker\ service with \Execute\ and \Exec\ RPCs (supporting streaming events) and a separate \WorkerStreaming\ service for bidirectional streaming, along with the associated Protobuf messages like \ExecuteCommand\ and \ExecuteResponse\. The module includes the necessary Bazel/Buck build rules (\BUCK\, \build.rs\) to generate Rust and Python code from \worker.proto\, enabling clients to interact with workers via gRPC.

_app/buck2\_worker\proto · high confidence

Introduce BxlFilePath type and content-based path hashing

Users can now load \.bxl\ files via a new \BxlFilePath\ type that validates the file extension and integrates with the cell path system. Additionally, the build system now supports content-based path hashing, allowing outputs and paths to be identified by a 16-character hex hash derived from their content, which improves cache efficiency and enables \aquery\ support for content-based path hashing.

_app/buck2\core/src · high confidence

Introduce LockFreeVec concurrent data structure

Added a new \LockFreeVec\ type in the \shed/lock\_free\_vec\ crate, providing a vector-like data structure optimized for concurrent access. The implementation supports wait-free, lock-free \get\ operations and single-threaded \push\ operations, both with O(1) complexity. The data is stored in non-contiguous buckets to facilitate this concurrency model, and the structure implements \Send\ and \Sync\ for safe cross-thread usage.

_shed/lock\_free\vec · high confidence

Introduce Pagable derive macros and typetag attribute support

This change introduces the \pagable\_derive\ crate, providing \\#\[derive(Pagable)\]\, \\#\[derive(PagablePanic)\]\, \\#\[derive(PagableSerialize)\]\, and \\#\[derive(PagableDeserialize)\]\ macros to automatically generate serialization and deserialization implementations for structs and enums. It also adds \\#\[pagable\_tagged\]\ and \\#\[pagable\_typetag\]\ attribute macros that enable trait-object serialization with automatic type registration via the \inventory\ crate, allowing concrete types to be serialized and deserialized through dynamic trait interfaces.

_pagable\derive · high confidence

Introduce Pagable serialization framework with content-addressed Arc deduplication

The pagable crate provides a new serialization framework that supports content-addressed deduplication of Arc references and runtime polymorphism via typetag. It introduces PagableSerialize and PagableDeserialize traits, type-erased Arc handling (ArcErase/ArcEraseDyn), and storage backends (InMemoryPagableStorage, SqliteBackedPagableStorage) for paging data. The framework includes implementations for standard collections (HashMap, BTreeMap, IndexMap, BTreeSet, SmallVec, SequenceTrie, SortedVectorMap), primitives, regex types, BigInt, serde\_json::Value, and triomphe::Arc. It uses postcard as the binary format with custom flavors for position tracking and seeking, and integrates with static\_interner for identity-preserved interned values.

pagable · high confidence

Introduce SetSketch library for set cardinality and overlap estimation

The \shed/setsketch\ crate is now available, providing the \SetSketch\ type which implements the setsketch1 algorithm. This library allows users to create sketches of sets to efficiently estimate cardinality, compute absolute overlap (intersection size), and determine the proportion of elements not included in another set. The implementation supports locality-sensitive weighted sketches and includes utilities for serialization and parameter configuration, adapted from the \probminhash\ project.

shed/setsketch · high confidence

Introduce Starlark pagable support and debugger integration

The Starlark interpreter now supports pagable memory management for Starlark values, enabling more efficient memory usage for large build graphs by allowing the runtime to page out unused data. Additionally, a debugger handle has been added to the per-transaction state, allowing external tools to attach and inspect Starlark evaluations during analysis and loading phases.

_app/buck2\interpreter · high confidence

Introduce StrongHash trait for deterministic hashing

The \gazebo/strong\_hash\ crate now provides the \StrongHash\ trait, which ensures that equal values always produce the same hash output, unlike the standard \Hash\ trait which may vary by platform or session. This enables reliable equality checks when using cryptographic hashers. The implementation covers standard types (primitives, strings, vectors, options, tuples, boxes, arcs, BTreeMaps) and adds support for \CompactString\, \BigInt\, and \triomphe::Arc\ via optional features. Notably, \HashMap\ is intentionally excluded to prevent nondeterministic hash collisions. A \UseStrongHashing\ wrapper is also provided to allow types implementing \StrongHash\ to satisfy the standard \Hash\ trait deterministically.

_gazebo/strong\hash · high confidence

Introduce buck2.py utility script and update development environment configuration

Developers can now use the new buck2.py script to build and run Buck2 locally from source, supporting multi-platform execution (Windows, x86\_64, arm64, riscv64) and optional isolation directory handling. The development environment has been updated to use the Rust 2024 edition, with rustfmt.toml and .buckconfig reflecting this change. The Nix flake configuration now uses mold for linking on Linux and sets specific environment variables for protobuf. Additionally, the .envrc file now sources nix-direnv 3.0.5 and watches rust-toolchain.toml. The clippy configuration bans panicking datetime APIs from jiff and chrono to prevent runtime panics on out-of-range values. The buck2\_bundle rule now explicitly sets has\_content\_based\_path = False for symlinked files. The README and CONTRIBUTING guides have been updated to reflect the current state of the project, including the lack of a stable release and the process for contributing.

(repo-wide) · high confidence

Introduce buck2\_build\_signals Rust library

A new Rust library named buck2\_build\_signals has been added to the Buck2 application layer. This library, owned by the build\_infra oncall team, provides core functionality for handling build signals and depends on key Buck2 subsystems including dice, buck2\_fs, buck2\_hash, and buck2\_data, alongside standard Rust crates like tokio and derive\_more.

_app/buck2\_build\signals · high confidence

Introduce buck2\_cli\_proto and buck2\_proto\_serde for structured daemon serialization

This change introduces the \buck2\_cli\_proto\ crate, which defines the \daemon.proto\ schema and build rules for the Buck2 client-server interface, and the \buck2\_proto\_serde\ crate, which provides custom serialization helpers. For users, this establishes the foundation for structured JSON serialization of daemon responses, specifically ensuring that timestamps and durations are serialized as numeric values (microseconds) rather than complex objects, which improves compatibility and readability of API outputs.

_app/buck2\_cli\proto · high confidence

Introduce buck2\_critical\_path crate for parallel critical path analysis

A new Rust library, buck2\_critical\_path, has been added to the build system to support computing critical path potentials and detecting cycles in topological sorts. The crate is configured to run under the 'build\_infra' oncall team and leverages parallel computation via the crossbeam library, while integrating with internal infrastructure such as buck2\_hash for map operations and buck2\_error for error handling. It also depends on standard random number generation libraries (rand, rand\_chacha, rand\_distr) and derive\_more for type derivation.

_app/buck2\_critical\_path, app/buck2\_critical\path/src · high confidence

Introduce buck2\_daemon crate with lifecycle documentation

This change introduces the \buck2\_daemon\ crate, establishing the build structure and dependencies for the persistent daemon process. The new \BUCK\ file configures the Rust library with optional memory fragmentation profiling support and lists core dependencies including \clap\, \tokio\, and internal Buck2 modules. Accompanying documentation details the daemon's lifecycle, explaining how the client and server communicate via gRPC, how the daemon manages its PID and port files, and the mechanisms for startup, shutdown, and version compatibility checks.

_app/buck2\daemon · high confidence

Introduce buck2\_data crate with action key ownership, agent context keys, and daemon shutdown formatting

The new \buck2\_data\ crate centralizes shared data structures and utilities for the Buck2 daemon. It defines \BaseDeferredKeyProto\ to map deferred action keys (target labels, BXL keys, anonymous targets) to various owner types across critical path and materialization entries. It introduces \AgentContextEntry\ constants to manage well-known agent context keys (ID, invocation ID, direct call marker, and advice acknowledgments) that bypass schema validation. Additionally, it provides a \get\_action\_digest\ helper to extract action digests from command executions, implements \ToProtoMessage\ for easier event emission, and updates the \DaemonShutdown\ display logic to truncate caller stack traces to 200 characters for better readability in logs.

_app/buck2\data/src · high confidence

Introduce buck2\_directory crate for directory handling

A new Rust library crate named buck2\_directory has been added to the codebase. This crate provides the implementation for directory-related logic, depending on core infrastructure such as buck2\_core, buck2\_fs, and buck2\_hash, as well as utility crates like dashmap, derive\_more, and pagable.

_app/buck2\directory · high confidence

Introduce buck2\_directory crate with directory management infrastructure

The new buck2\_directory crate provides the core infrastructure for managing directory structures within Buck2. It exposes a comprehensive set of modules including builders (with lazy construction support), directory data structures, hashing and fingerprinting mechanisms, iterators, and various directory types (immutable, exclusive, shared). The crate also includes utilities for directory selection, path accumulation, and walking directory trees, forming the foundation for directory-related operations in the build system.

_app/buck2\directory/src · high confidence

Introduce buck2\_error crate for centralized error handling

Adds the new \buck2\_error\ Rust library, establishing a centralized error-handling foundation for Buck2. This crate aggregates dependencies such as \anyhow\, \thiserror\, \derive\_more\, and \tonic\, and integrates with internal infrastructure like \allocative\, \dupe\, and \starlark\_syntax\ to provide structured error types and conversions for the application.

_app/buck2\error · high confidence

Introduce buck2\_error\_derive proc-macro crate for structured error handling

The new \buck2\_error\_derive\ crate provides a \\#\[derive(Error)\]\ macro that enables structured error definitions for Buck2. It enforces a mandatory \\#\[buck2(tag = ...)\]\ attribute (supporting values like \Input\, \Tier0\, and \Environment\) to categorize errors, and supports \\#\[error(transparent)\]\ and \\#\[source\]\ fields for wrapping underlying errors. The macro automatically implements \std::error::Error\, \From\, and \Display\, ensuring that all derived error types carry explicit tags and source location metadata.

_app/buck2\_error\derive/src · high confidence

Introduce buck2\_events Rust library with platform-specific dependencies

The buck2\_events module is now defined as a Rust library, consolidating its build configuration to include core dependencies for event handling and error management (such as buck2\_error and serde). The build definition explicitly adds platform-specific dependencies to support system information retrieval on Linux and macOS (sys-info) and OS version detection on Windows (winver), ensuring the library can correctly report environment details like Rosetta emulation status across different operating systems.

_app/buck2\events · high confidence

Introduce buck2\_fs crate for project-agnostic filesystem utilities

Buck2 now includes a new \buck2\_fs\ crate that extracts project-agnostic filesystem types and utilities from \buck2\_core\. This new location provides core path types (\AbsPath\, \RelativePath\, \ForwardRelativePath\), filesystem operations (\fs\_util\, \async\_fs\_util\), and working directory management (\cwd\). The crate also introduces a new \IoError\ type with explicit categorization methods (\categorize\_input\, \categorize\_internal\) to better distinguish between user-provided and internal paths in error reporting, and adds \IoCounter\ tracking for monitoring filesystem operations.

_app/buck2\fs · high confidence

Introduce buck2\_miniperf for capturing instruction counts

A new \buck2\_miniperf\ binary has been added to capture hardware performance counters, specifically user and kernel instruction counts, during build execution. This tool is statically linked and designed to be embedded as a compressed ELF section within the main \buck2\ binary, allowing it to be decompressed and executed by the forkserver. It writes performance data to a specified output path using the \bincode\ serialization format, enabling detailed performance profiling of build stages.

_app/buck2\miniperf · high confidence

Introduce buck2\_re\_configuration crate for Remote Execution settings

A new \buck2\_re\_configuration\ Rust library has been added to centralize the configuration logic for the Buck2 Remote Execution (RE) client. This module defines the \RemoteExecutionStaticMetadata\ struct and associated types (such as \CASdAddress\, \CASdMode\, and \CopyPolicy\) to parse and manage RE-specific Buckconfig options, including CAS connection counts, shared cache modes, TLS settings, and Thrift execution limits. This change decouples the RE client configuration from the broader \fbcode\ build environment, providing a dedicated, reusable component for handling remote execution parameters.

_app/buck2\_re\configuration · high confidence

Introduce buck2\_server\_ctx crate for server command context and wiring

The new \buck2\_server\_ctx\ crate centralizes the server-side command execution context, providing the \ServerCommandContextTrait\ and the \ServerCommandTemplate\ for running commands with DICE transactions and span tracking. It introduces late-binding traits for server commands (including \BxlServerCommands\, \OtherServerCommands\, \TargetsServerCommands\, \QueryServerCommands\, \AuditServerCommand\, and \StarlarkServerCommand\) to decouple command implementations. The crate also adds utilities for parsing and resolving target patterns with modifiers, handling partial stdout/stderr output, and emitting telemetry such as buckconfig changes and experiment tags.

_app/buck2\_server\ctx · high confidence

Introduce buck2\_util crate with shared string, slice, and cycle-detection utilities

A new \buck2\_util\ library has been added to centralize shared Rust utilities. It provides \ArcStr\, \ThinArcStr\, \ArcSlice\, and \ThinArcSlice\ types that offer efficient, shared-ownership string and slice handling with support for serialization and strong hashing. The crate also includes a \LazyCycleDetector\ for detecting cycles in parallel graph traversals, a \LateBinding\ mechanism to reduce compile-time dependencies, and helper modules for environment variable substitution, early command timing, and golden test generation.

_app/buck2\util · high confidence

Introduce buck2\_validation crate for caching and executing target validations

This change adds the \buck2\_validation\ crate, which implements the core infrastructure for running and caching target validations within Buck2. It introduces DICE keys (\SingleValidationKey\ and \TransitiveValidationKey\) to manage validation computations, allowing the system to build validation artifacts, materialize them, and parse JSON results (defined in \validator\_api.rs\) into cached outcomes. The implementation supports filtering optional validations via an injected key and ensures results are cached to avoid redundant work, while also handling error rendering with truncated messages for large diagnostic outputs.

_app/buck2\validation · high confidence

Introduce buck2\_wrapper\_common library for shared wrapper and client logic

A new \buck2\_wrapper\_common\ Rust library has been created to consolidate code shared between the Buck2 client and the wrapper. This library centralizes cross-platform process management (including \kill\, \process\_exists\, and creation time retrieval), introduces a \cleanall\ feature to discover and clean stale daemon artifacts, and provides shared utilities such as \TraceId\ generation, \is\_buck2\_exe\ detection, and background command helpers. It also standardizes error handling via \buck2\_error\ and manages platform-specific dependencies like \windows-sys\ on Windows and \nix\ on Unix.

_app/buck2\_wrapper\common · high confidence

Introduce built-in internal test runner for Buck2

The \buck2\_test\_runner\ module has been introduced to provide a default test execution engine for open-source Buck2 users, eliminating the need for an external forkserver harness. This new runner supports passing environment variables via the \--env\ flag, setting a maximum execution timeout (defaulting to 600 seconds) via \--timeout\, and forwarding arguments to test binaries using \--test-arg\. It communicates with the build system over TCP or Unix domain sockets, reporting test results and exit codes back to the orchestrator.

_app/buck2\_test\runner · high confidence

Introduce cgroup-based resource control and memory tracking for Buck2 actions

This change adds the \buck2\_resource\_control\ crate, which implements cgroup v2 management for the Buck2 daemon and its actions. It introduces a memory tracker that monitors daemon and action memory usage (current, swap, and pressure) and a scheduler that can suspend (freeze) or kill-and-retry actions when memory pressure exceeds configured thresholds. The module provides the infrastructure for creating cgroup pools, managing action lifecycles via \ActionCgroupSession\, and reporting resource control events, enabling more robust resource isolation and control for builds and tests on Linux.

_app/buck2\_resource\control · high confidence

Introduce content-based path support for build artifacts

The \buck2\_execute\ module now supports content-based paths for build artifacts. This change introduces the \ArtifactDyn\ trait and \ArtifactValue\ struct to handle artifacts that can be resolved via a content hash rather than just a configuration hash. It adds logic to compute and store content-based path hashes for files, directories, and symlinks, and exposes methods to resolve both the content-based path and the configuration-based path. This enables the executor to work with artifacts whose paths are determined by their content, improving cache efficiency and build reproducibility.

_app/buck2\execute · high confidence

Introduce dedicated Starlark debugger server crate

Buck2 now includes a new \buck2\_server\_starlark\_debug\ crate that implements the server-side logic for the Starlark Debug Adapter Protocol (DAP). This change moves the debugger implementation into a separate module, providing the core components for handling DAP requests (such as breakpoints, evaluation, and variable inspection) and managing the lifecycle of debug sessions. Users can now attach a debugger to running Starlark evaluations via the \buck2 starlark debug-attach\ command, enabling interactive debugging capabilities within the Buck2 build environment.

_app/buck2\_server\_starlark\debug · high confidence

Introduce dedicated buck2\_event\_log crate for event log management

The event log logic has been extracted into a new \buck2\_event\_log\ crate, providing a centralized location for writing, reading, and managing event logs. This change introduces a new \TailReader\ that supports tailing in-progress logs with configurable idle timeouts and writer state awareness, and implements a TTL policy that retains user logs for 365 days, CI logs for 28 days, and other logs for 60 days. The crate also adds a \UserEvent\ type to filter and serialize specific user-facing events (Starlark, Action Execution, Bxl Ensure Artifacts) into a separate log, and updates the default number of retained event logs on disk from 10 to 12.

_app/buck2\_event\log/src · high confidence

Introduce deferred artifact data structures

Added new \DeferredData\ and \DeferredId\ types in the \buck2\_artifact\ crate to represent asynchronously computed values and their lookup identifiers. \DeferredData\ wraps a \DeferredKey\ to store provider fields for deferred computation, while \DeferredId\ provides a unique identifier (including a trivial flag) for looking up deferred work, supporting both runtime and testing scenarios.

_app/buck2\artifact/src/deferred · high confidence

Introduce detailed aggregated metrics and graph sketching infrastructure

Buck2 now includes a new internal subsystem for collecting detailed build metrics and computing graph sketches. This change adds the core Rust types, event handling, and sketching algorithms (for action graphs and artifact paths) within the \detailed\_aggregated\_metrics\ module. While this provides the backend capability to track per-target metrics, memory usage, and remote execution platforms, it is currently gated by a new buckconfig option and does not yet expose these details to the user-facing build report or CLI output.

_app/buck2\_build\_api/src/build/detailed\_aggregated\metrics · high confidence

Introduce dice\_core incremental computation engine

Added the dice\_core library, implementing the core state for an incremental computation engine. This new crate provides the data structures and logic for managing versions, branches, and keys, including the ability to commit changes, fork branches, and resolve key revisions. It introduces core types such as Certificates, Branches, and Keys, along with an environment trait for plugging in custom execution logic. The implementation includes optimized collections for key-indexed hashing and a fuzzing test suite to verify invariants.

_dice/dice\core · high confidence

Introduce dupe\_derive crate for duplicating values

The new \gazebo/dupe\derive\ crate provides procedural macros to derive the \Dupe\ trait, which duplicates struct and enum values by recursively calling a specified duplication function (such as \Clone::clone\) on each field. It also includes \Clone\\ and \Copy\\ derive macros that allow implementing \Clone\ or \Copy\ without requiring all type parameters to implement those traits, and an explicit \Dupe\\ variant that skips the automatic trait-bound checks on generic parameters.

_gazebo/dupe\derive · high confidence

Introduce explicit cancellation and improved join primitives in dice\_futures

The dice\_futures library now provides a new explicit cancellation system, allowing futures to be cancelled via a CancellationContext and CancellationHandle, with support for critical sections and structured cancellation observers. It also introduces a new AtomicWakerSet primitive for efficient waker management and improved join\_all/try\_join\_all implementations that avoid livelocks and offer better memory efficiency compared to the standard futures crate.

_dice/dice\futures · high confidence

Introduce gRPC health check protocol and client library

Added a new \buck2\_health\_check\_proto\ module that defines the gRPC service and protobuf messages for Buck2's health monitoring system. This includes the \HealthCheck\ service with \UpdateContext\ and \RunChecks\ RPCs, allowing the client to send diagnostic context (such as command start traces and system info) and receive structured health reports (including severity, rich messages, and remediation links). The module also provides the Rust client bindings via \tonic::include\_proto!\ and builds the necessary Python gRPC stubs for cross-language interoperability.

_app/buck2\_health\_check\proto · high confidence

Introduce generic SQLite key-value table and database traits

The \app/buck2\_common/src/sqlite\ module now provides a reusable \KeyValueSqliteTable\ for storing string key-value pairs and a \SqliteDb\ trait that defines a standardized interface for SQLite-backed components. This change introduces a common structure (\SqliteTables\) that includes version and creation metadata tables alongside a domain-specific table, enabling consistent database initialization, version checking, and identity management across different subsystems.

_app/buck2\common/src/sqlite · high confidence

Introduce generic client-server request protocol and protobuf utilities

The \buck2\_cli\_proto\ library now provides a new generic request/response framework (\NewGenericRequest\/\NewGenericResponse\) that simplifies client-server interop by supporting commands such as \debug eval\, \debug anon-targets\, \explain\, \expand-external-cells\, \complete\, and \docs\. This change also introduces a \ProtobufSplitter\ for handling length-prefixed protobuf streams and migrates internal error handling to use the \buck2\_error\ crate instead of \anyhow\.

_app/buck2\_cli\proto/src · high confidence

Introduce granular action execution statistics and structured sub-error display

The event observer now tracks detailed action execution statistics, including counts for local, remote, cached, and fallback actions, as well as remote dep-file cache hits and excess cache misses. These stats are used to calculate and display a precise cache hit percentage in build reports and console output. Additionally, a new structured display system for action sub-errors has been added, allowing for the presentation of error categories, subcategories, file locations, and remediation hints in the console output.

_app/buck2\_event\observer/src · high confidence

Introduce host sharing requirements protocol buffer definitions

A new Buck2 build target has been added to define the \HostSharingRequirements\ message, which allows specifying access modes such as exclusive access, shared access with weight classes, or one-per-token and one-per-tokens strategies. This change introduces the \host\_sharing.proto\ schema, the corresponding Rust bindings via \tonic\, and the build configuration (\BUCK\ and \build.rs\) required to generate these types for use in the host sharing system.

_app/buck2\_host\_sharing\proto · high confidence

Introduce iterative Common Test daemon for the Erlang test shell

The test shell now uses a persistent Common Test daemon (ct\_daemon) to run tests, replacing the previous per-test process model. This change adds a suite of new modules (ct\_daemon, ct\_daemon\_node, ct\_daemon\_core, ct\_daemon\_runner, ct\_daemon\_hooks, ct\_daemon\_logger, ct\_daemon\_printer, ct\_daemon\capture) that manage a long-lived test node, allowing for incremental test execution, state preservation between runs, and improved I/O handling including support for ct:capture\\* APIs and custom hook execution within the shell environment.

_prelude/erlang/common\_test/test\exec · high confidence

Introduce lazy cquery and uquery contexts in BXL

This change adds new Starlark API contexts (\bxl.LazyCqueryContext\ and \bxl.LazyUqueryContext\) to the BXL buildfile API, enabling deferred and lazy evaluation of build graph queries. The \LazyCqueryContext\ exposes an \eval\ method to run general cquery strings against unconfigured targets, while the \LazyUqueryContext\ provides methods for graph traversal and filtering, including \allpaths\, \somepath\, \deps\, \rdeps\, \inputs\, \kind\, \attrfilter\, and \attrregex\_filter\. These operations return lazy results that can be resolved asynchronously, allowing for more efficient and flexible dependency analysis within buildfiles.

_app/buck2\_bxl/src/bxl/starlark\_defs/lazy\ctx · high confidence

Introduce lazy evaluation for Buck2 Uquery and Cquery operations

This change adds the underlying implementation for lazy Uquery and Cquery operations within the BXL (Buck2 eXtension Language) context. Specifically, it introduces \LazyUqueryOperation\ and \LazyCqueryOperation\ structs that defer the execution of query evaluations (such as \deps\, \rdeps\, \allpaths\, \testsof\, \attrfilter\, and raw \eval\) until their results are actually needed. This allows BXL scripts to construct complex query graphs without immediately triggering expensive build-graph traversals, improving performance for scripts that define but do not immediately consume all query results. The implementation supports both unconfigured (Uquery) and configured (Cquery) targets, integrating with the existing \QUERY\_FRONTEND\ and \GlobalCfgOptions\.

_app/buck2\_bxl/src/bxl/starlark\_defs/lazy\ctx/operation · high confidence

Introduce local resource setup and management for test execution

Buck2 now supports declaring and setting up local resources (such as sockets or named pipes) required by test targets. This change adds a new \LocalResourceInfo\ provider and a \LocalResourceRegistry\ to track and gracefully terminate the processes holding these resources. The test orchestrator now resolves required local resources, executes their setup commands, and passes the resulting environment variables to the test executor, ensuring proper cleanup when tests finish.

_app/buck2\test · high confidence

Introduce lock-free, sharded hashtable with cache-line isolation

The \shed/lock\_free\_hashtable\ crate now provides a new (almost) lock-free hashtable implementation. It features a sharded architecture (\ShardedLockFreeRawTable\) that isolates write-hot lock words from read-hot data on separate 128-byte cache lines to reduce contention. The table supports generic storage of arbitrary pointers (via \Box\, \Arc\, \NonZeroU32\, \NonZeroU64\, and raw pointers) through the \AtomicValue\ trait, offers optional memory profiling via the \allocative\ feature, and provides both non-consuming and consuming iterators for traversal.

_shed/lock\_free\hashtable · high confidence

Introduce mini\_vec crate with memory-optimized MiniVec and MiniBoxSlice

The new \shed/mini\_vec\ crate provides \MiniVec\<T\>\ and \MiniBoxSlice\<T\>\, which behave like standard \Vec\<T\>\ and \Box\<\[T\]\>\ but use high-bit pointer packing to store capacity and length metadata in the pointer's unused upper bits. This reduces the stack footprint of these types to a single machine word, which is beneficial for applications managing many small vectors. The implementation is platform-specific by default, requiring 64-bit architectures with free upper pointer bits, but can be built in a portable, two-word mode via the \mini\_vec\_no\_ptr\_packing\ configuration flag. On Rust nightly, the crate also enables \dropck\_eyepatch\ to relax drop-checking constraints.

_shed/mini\vec · high confidence

Introduce miniperf protocol buffer definitions for instruction counting

This change adds the \buck2\_miniperf\_proto\ Rust library, which defines the data structures for the miniperf performance profiling output. It introduces \MiniperfOutput\ and \MiniperfCounters\ to capture user and kernel instruction counts, along with timing metadata. The library includes logic to adjust instruction counts for multiplexing and provides serialization support via bincode, enabling the collection of detailed instruction-level metrics for build actions.

_app/buck2\_miniperf\proto · high confidence

Introduce new Android install and manifest utilities in the Android toolchain

The Android toolchain now includes a new set of helper utilities for managing Android device interactions and manifest parsing. A new \AdbHelper\ and \AdbOptions\ class provide a structured way to configure ADB execution, including options for multi-install mode, staged installs, APEX support, and custom executable paths. Additionally, a new \AndroidManifestReader\ interface and its executable main class allow for querying Android manifest files to extract key information such as the package name, version code, and instrumentation test runner, facilitating more robust manifest handling during the build and install process.

prelude/toolchains/android · high confidence

Introduce new Starlark LSP server implementation

A new Language Server Protocol (LSP) implementation for Starlark has been added to the \starlark\_lsp\ crate. This server provides IDE capabilities including symbol completion, go-to-definition, hover documentation, and diagnostic publishing. It introduces a new binding and scope analysis system to track variable definitions and usages, supports resolving symbols across loaded modules, and handles both file-based and internal \starlark:\ URIs for native types.

_starlark-rust/starlark\lsp · high confidence

Introduce new audit server application component

A new \buck2\_cmd\_audit\_server\ crate has been added to the application layer, providing the build infrastructure for an audit server. This component integrates with core Buck2 subsystems including analysis, build API, CLI protocol, execution, and file system handling, while also leveraging hashing, eventing, and Starlark map utilities to support its functionality.

_app/buck2\_cmd\_audit\server · high confidence

Introduce new execution infrastructure and caching components

The \buck2\_execute\_impl\ module has been restructured to include new execution strategies and caching logic. A \StackedExecutor\ is added to support chaining optional executors with a fallback, enabling flexible execution paths. A dedicated \ActionCacheUploadPermissionChecker\ is introduced to validate and cache permissions for uploading to the remote action cache, improving reliability and performance. Additionally, the \ActionCacheChecker\ now supports remote dep file caching, allowing Buck2 to store and retrieve dependency file information remotely for better incremental build support.

_app/buck2\_execute\impl · high confidence

Introduce new rust-project integration for Buck2-based Rust development

This change adds a new \rust-project\ tool under \integrations/rust-project\ that generates \rust-project.json\ files for Buck2-based Rust projects, enabling IDE support via rust-analyzer. The tool provides CLI commands to create new Rust projects (\new\), generate project metadata for development (\develop\ and \develop-json\), and check code (\check\). It handles sysroot resolution (via rustup or buckconfig), target discovery, dependency merging (including unittests), and diagnostic parsing. The implementation includes support for Windows paths, structured logging, and telemetry via Scuba (in fbcode builds).

integrations/rust-project · high confidence

Introduce offline build archive manifest and metadata support

Adds a new \buck2\_offline\_archive\ crate that defines the data structures for an offline archive manifest, including repository metadata (name and revision), project-relative paths, external absolute paths, and various symlink types (relative, absolute, and external). The library provides utilities to gather this information, such as querying Mercurial for repository details and handling symlink resolution, enabling the generation of manifests required for fully offline builds.

_app/buck2\_offline\archive · high confidence

Introduce open-source Scribe client wrapper with async message handling

Adds a new \shed/scribe\_client\ library that provides a wrapper around the Scribe client, exposing a \ScribeClient\ struct for sending messages. The client initializes a dedicated Tokio runtime to drive a background producer loop, ensuring messages are flushed to the remote Scribe daemon without blocking the main application thread. It supports both non-blocking \offer\ calls and synchronous \send\_messages\_now\ operations, while tracking detailed metrics such as successes, failures by type, queue depth, and bytes written.

_shed/scribe\client · high confidence

Introduce persistent worker and Apple bundling/signing tooling

Added a new persistent worker script (examples/persistent\_worker/persistent\_worker.py) that supports both Buck2 and Bazel protocols for long-running build actions. Additionally, added a suite of Python tools under prelude/apple/tools/bundling and prelude/apple/tools/code\_signing to handle Apple bundle assembly, incremental state management, Swift support, and code signing (including signing context serialization, command factories, and app ID parsing). Also added a tool (prelude/android/tools/native\_libs\_as\_assets\_metadata.py) to generate metadata for native libraries.

python · high confidence

Introduce promise artifacts for anonymous targets

Anonymous targets now support \ctx.actions.anon\_targets\ with promise artifacts, allowing rules to declare artifacts whose values are resolved asynchronously during analysis. This change adds a \PromiseArtifactRegistry\ to track these promises, introduces a \PromiseArtifactAttr\ type for attribute resolution, and enforces content-based path consistency between the promise and the resolved artifact. Users can now use \attr.source()\ and similar methods within anonymous targets to access these promised artifacts, with validation ensuring that short paths and content-based path requirements match between the promise declaration and the actual output.

_app/buck2\_anon\target/src · high confidence

Introduce shell-agnostic completion verification tool

A new \completion\_verify\ binary has been added to the \shed\ workspace to validate CLI shell completions for Bash, Fish, and Zsh. This tool runs a completion script inside isolated shell environments (using a forked \completest\_pty\ runtime) and compares the output against expected results, providing a reliable way to test and verify completion behavior across different shells.

_shed/completion\verify · high confidence

Introduce standalone Rage client command

A new standalone \rage\ client command has been added to Buck2, extracted from the existing client binary. This change introduces a dedicated build target (\buck2\_cmd\_rage\_client\) that depends on core infrastructure libraries such as \buck2\_fs\, \buck2\_hash\, and \superconsole\, enabling the rage functionality to operate as an independent component within the application.

_app/buck2\_cmd\_rage\client · high confidence

Introduce starlark\_fmt, a Starlark/BUCK file formatter

A new standalone tool, starlark\_fmt, is now available in tools/starlark\_fmt as a buildifier replacement for formatting Starlark and BUCK files. It provides subcommands to format files in-place, show diffs, read from stdin, and lint for formatting issues (the lint subcommand is internal-only). The formatter normalizes line endings, removes unused load symbols, sorts load statements and dictionary keys, and applies configurable sorting to list arguments and keyword arguments via a JSON configuration file. It supports suppression directives like \# fmt: off/on and \# @unsorted-dict-items, and includes comprehensive tests to verify idempotency and cross-platform behavior.

tools · high confidence

Introduce static\_interner library for memory-efficient value interning

A new \static\_interner\ crate has been added to the \shed\ workspace, providing a high-performance, thread-safe mechanism for interning values in memory. The library introduces an \Interner\<T\>\ type that stores unique instances of a value \T\ and returns lightweight, copyable \Intern\<T\>\ handles. These handles support pointer-based equality checks for fast comparison, while also implementing standard traits like \Hash\, \Eq\, \Ord\, and \Deref\ to allow seamless usage with existing Rust collections and logic. The implementation uses a sharded lock-free hash table for concurrency and supports optional features such as strong hashing and allocation tracking.

_shed/static\interner · high confidence

Introduce structured argv and expanded-argv tracking with config flag parsing

The \buck2\_common\ crate now includes a new \argv\ module that models the process command line as an \Argv\ struct containing both the raw arguments and an \ExpandedArgv\ that tracks the source of each argument (inline vs. from flagfiles). This enables the system to parse and expose configuration-related flags (such as \-c\, \--config-file\, \-m\, \--target-platforms\, and \--target-universe\) along with their provenance, supporting better logging, debugging, and configuration management.

_app/buck2\common/src · high confidence

Introduce the \`dupe\` crate for cheap, zero-allocation duplication

A new \dupe\ crate has been added, providing a \Dupe\ trait that serves as a cheap alternative to \Clone\ for types where duplication is constant-time and zero-allocation (such as \Arc\, \Rc\, and primitive types). This crate exposes the \Dupe\ trait, a \\#\[derive(Dupe)\]\ macro, and extension traits (\IterDupedExt\, \OptionDupedExt\, \ResultDupedExt\, \ResultDupedErrExt\) that allow users to call \.duped()\ on iterators, options, and results to efficiently duplicate contained references without the overhead of full cloning.

gazebo/dupe · high confidence

Introduce typed sketch wrappers for Buck2 analysis

A new \buck2\_sketches\ Rust library has been added to provide type-safe wrappers around the underlying \SetSketch\ data structure. This library defines specific sketch types—such as \DependencyGraphSketch\, \ActionGraphSketch\, and \MemoryUsageSketch\—to distinguish between different semantic uses of sketches (e.g., counting distinct elements vs. summing weights). By exposing domain-specific accessor names, this change clarifies caller intent and prevents ambiguity when interpreting cardinality estimates in Buck2's build analysis.

_buck2\sketches · high confidence

Introduce versioned, layered Buck settings with CLI overrides and rollout support

Buck now uses a new \.bucksettings.toml\ configuration system that supports layered overrides (local files, command-line flags, and versioned rollouts) and allows users to override specific settings via the \--setting\ flag. This change introduces a structured settings schema with sections like \\[log\_download\]\ and \\[hydration\]\, enabling controlled feature rollouts and per-user local customizations while maintaining backward compatibility with existing buckconfig fallbacks.

_app/buck2\common/src/settings · high confidence

Introduces buck2\_hash crate for optimized internal hashing

The \buck2\_hash\ crate has been moved to \app/\ and now provides a centralized abstraction for hash functions used throughout buck2. It replaces the standard library's security-optimized hasher with a faster \fxhash\-based implementation (\BuckHasher\) for internal maps where hash-flooding attacks are not a concern. The crate exposes type aliases like \BuckMutMap\ and \BuckMutSet\ for mutable collections, as well as \BuckIndexMap\ and \BuckIndexSet\ for insertion-order-preserving collections, along with a \buck\_indexmap!\ macro to facilitate their usage.

_app/buck2\hash · high confidence

Introduces dynamic shell completion support for Buck2

The new \buck2\_cmd\_completion\_client\ crate enables dynamic command-line completions for Bash, Fish, Zsh, and PowerShell. It provides a \buck2 completion\ command to generate static option completions and a hidden \buck2 complete\ command to resolve dynamic completions for targets and flagfiles (mode files) by interacting with the Buck2 daemon or filesystem, ensuring users get context-aware suggestions as they type.

_app/buck2\_cmd\_completion\client/src · high confidence

Introduction of buck2\_client build target

The build system now includes a dedicated \buck2\_client\ library target defined in \app/buck2\client/BUCK\. This target compiles the Rust source files located in \src/\\/\.rs\ and links against a comprehensive set of internal Buck2 modules (such as \buck2\_client\_ctx\, \buck2\_error\, and \buck2\_event\_log\) and external dependencies (including \tonic\, \clap\, and \tokio\), establishing the build foundation for the client-side application logic.

_app/buck2\_client, app/buck2\_cmd\_starlark\client · high confidence

Introduction of the Buck2 BXL library build target

A new Bazel build target has been added for the buck2\_bxl Rust library, defining its source files and a comprehensive set of internal dependencies (such as buck2\_action\_impl, buck2\_analysis, and starlark) along with third-party crates like clap and serde. This establishes the build configuration for the BXL component, which provides the execution environment for Buck2's build language extensions.

_app/buck2\bxl · high confidence

Introduction of the buck2\_anon\_target crate

A new Rust library crate named \buck2\_anon\_target\ has been added to the Buck2 application structure. This crate is configured to build from source files in its \src\ directory and depends on a comprehensive set of internal Buck2 modules (such as \buck2\_analysis\, \buck2\_artifact\, \buck2\_error\, and \buck2\_hash\) as well as external Rust dependencies like \async-trait\, \serde\, and \futures\. The oncall responsibility for this component is assigned to the \build\_infra\ team.

(repo-wide) · high confidence

Introduction of the buck2\_cfg\_constructor library

A new Rust library named \buck2\_cfg\_constructor\ has been added to the codebase. This component is responsible for handling configuration construction logic, integrating with core Buck2 subsystems such as DICE, the Starlark interpreter, and the build API. Its introduction establishes a dedicated module for managing target configuration, likely supporting the broader refactoring efforts seen in related commits regarding configuration validation and async migration.

_app/buck2\_cfg\constructor · high confidence

New BXL query function interfaces and query frontend trait

This change introduces new Rust traits in the \app/buck2\_build\_api/src/query\ module that define the API surface for Buck's BXL (Buck eXtension Language) query functions. Specifically, it adds \BxlCqueryFunctions\, \BxlUqueryFunctions\, and \BxlAqueryFunctions\ traits, which expose query operations such as \allpaths\, \somepath\, \deps\, \rdeps\, \testsof\, \owner\, \allbuildfiles\, \rbuildfiles\, and new operators like \targets\_in\_buildfile\ to the BXL environment. It also defines a \QueryFrontend\ trait with a \LateBinding\ registration, providing a unified interface for evaluating uquery, cquery, and aquery expressions, enabling external tools and scripts to interact with Buck's query engine through a consistent, extensible API.

_app/buck2\_build\api/src/query · high confidence

New Buck2 documentation server with agent guidance and multi-format output

A new \buck2\_cmd\_docs\_server\ crate has been introduced to centralize and enhance Buck2 documentation generation. It now provides an agent-specific command that outputs repository-defined \--agent-context\ schemas and enforces the \direct\_call=true\ flag for AI agents. The server supports generating documentation for Starlark built-ins (Starlark, Build, and Bxl APIs) and user-defined Starlark modules in both Markdown (using multi-page rendering with Docusaurus link integration) and JSON formats, allowing for structured consumption of API signatures and types.

_app/buck2\_cmd\_docs\server/src · high confidence

New Buck2 event log and error telemetry data models

This change introduces the \buck2\_data\ crate, which defines the Protobuf schemas (\data.proto\, \error.proto\) and Rust bindings for Buck2's event logging and error telemetry system. It establishes the structured data format for recording build invocations, command execution stages (analysis, materialization, action execution), and critical path metrics, while replacing the previous error categorization system with a flexible \ErrorTag\ enum for precise error classification.

_app/buck2\data · high confidence

New Buck2 example projects for bootstrapping, BXL tutorials, and persistent workers

The examples directory now includes several new sample projects to help users get started with advanced Buck2 features. The bootstrap example demonstrates how to configure a bootstrapping toolchain setup, specifically showing how to build a Rust compiler using a system toolchain and then use that compiled compiler to build a new toolchain. The bxl\_tutorial example provides a step-by-step guide to using Buck2's build language extension (BXL) for tasks like querying targets and analyzing dependencies. Additionally, a new persistent\_worker example demonstrates how to implement and use persistent workers for both local and remote execution via BuildBuddy, including configuration for different execution modes. A simple hello\_world C++ example and a no\_prelude example (showing manual rule/toolchain definition without the prelude) are also included.

examples · high confidence

New Common Test hooks for skipping tests and structured result reporting

The \cth\_hooks\ component now includes \cth\_skip\_cases\, a new hook that allows users to skip suite, group, or testcase callbacks by matching their qualified names against configured regular expressions. Additionally, the \cth\_tpx\ hook has been refactored to use a dedicated \cth\_tpx\_test\_tree\ module for building a structured map of test results, and a \cth\_tpx\_role\ module to coordinate multiple hook instances (top/bot) for accurate timing and failure detection. These changes enable more granular test control and richer, structured reporting of test outcomes.

_prelude/erlang/common\_test/cth\hooks · high confidence

New Common Test infrastructure modules for artifact handling and logging

The \common\ application now includes several new modules that standardize how Common Test results are managed. \artifact\_annotations\ and \test\_artifact\_directory\ handle the creation, serialization, and linking of test artifacts (such as logs, traces, and coverage data) to a designated artifact directory, ensuring they are properly annotated and uploaded. \test\_logger\ replaces previous logging setups by configuring the OTP logger with a file handler and capturing stdout to a UTF-8 encoded log file, while also retrying logger setup on transient file control timeouts. \ct\_stdout\ introduces a mechanism for emitting and processing progress markers in stdout, allowing for precise collection of output per test case. \common\_util\ provides shared utilities for Unicode handling, environment access, and test name parsing, and \buck\_ct\_provider\ defines a behavior for lifecycle hooks in the test runner.

_prelude/erlang/common\test/common · high confidence

New I/O tracing provider and refined filesystem error handling

The \app/buck2\_common/src/io\ module introduces a \TracingIoProvider\ that wraps existing I/O providers to record a manifest of accessed project files, Buck output entries, external paths, and symlinks during builds, enabling accurate I/O tracking. It also adds a new \FsIoProvider\ implementation that routes filesystem operations through Tokio's blocking threads with semaphore-based concurrency limits to prevent executor saturation, and handles EdenFS permission-denied errors gracefully by treating them as restricted directories rather than build failures.

_app/buck2\common/src/io · high confidence

New Starlark formatter with configurable autofixes

The \tools/starlark\_fmt\ tool has been introduced to provide a new Starlark/Buck file formatter. It normalizes line endings to Unix-style and applies a pipeline of autofixes, including moving \load()\ statements to the top of the file, sorting dictionary keys, and sorting list arguments and keyword arguments based on configurable priority rules. The formatter respects \\# fmt: off\ suppression regions and allows configuration overrides per file path (e.g., disabling sorting for \.bzl\ files).

_tools/starlark\fmt · high confidence

New \`buck2 targets\` server command with streaming, alias resolution, and JSON output

The \buck2 targets\ command is now served by a dedicated server-side implementation (\buck2\_cmd\_targets\_server\) that supports several new capabilities. Users can now use \--streaming\ to receive results as packages are processed, with configurable concurrency and cancellation support. The \--resolve-alias\ flag allows resolving target aliases without expanding patterns. Output can be formatted as JSON or JSON lines via the \--json-report\ flag. The command also supports \--keep-going\ to continue processing on errors and \--imports\ to display package imports across cell boundaries.

_app/buck2\_cmd\_targets\server/src/targets · high confidence

New action implementations for assembled\_dir, CAS artifacts, and dep-file fingerprints

The \buck2\_action\_impl\ crate now includes dedicated implementations for \assembled\_dir\, \cas\_artifact\, \copy\, \download\_file\, and \dep\_file\_fingerprint\ actions. The \assembled\_dir\ action allows users to assemble a directory from input artifacts using mixed copy and symlink modes. The \cas\_artifact\ action enables referencing Content-Addressable Storage (CAS) artifacts with explicit expiration handling. The \dep\_file\_fingerprint\ action provides a mechanism to generate canonical fingerprints for dependency files in JSON or argument list formats, supporting content-based path resolution. These changes expand the set of built-in actions available for build rule definitions.

_app/buck2\_action\impl/src/actions · high confidence

New analysis and build result data structures

The build API now exposes new data structures for analysis and build results. \AnalysisResult\ tracks analysis values, profiling data, promise artifacts, declared actions/artifacts, transitive validations, and requested anonymous targets. \ConfiguredBuildTargetResultGen\ and \AsyncBuildTargetResultBuilder\ provide detailed build outcome information including timed outputs, run info, graph properties, and errors, with support for streaming build results and fail-fast behavior.

_app/buck2\_build\api/src · high confidence

New buck2 audit subcommands for package values, file packages, and output parsing

The \buck2 audit\ client now includes several new subcommands to inspect build internals: \audit package-values\ exposes visibility, within\_view, and their caps for packages; \audit file-package\ maps file paths to package names; \audit output\ identifies the action producing a build artifact; and \audit parse\ breaks down buck-out paths. The audit client has also been refactored to use \CommonCommandOptions\ instead of the previous \AuditCommandCommonOptions\ and \ServerCommandContextTrait\, simplifying the client-side execution model.

_app/buck2\_cmd\_audit\client · high confidence

New buck2 docs subcommand for command, query, and Starlark documentation

The \buck2 docs\ command is now available to print documentation for Buck2 commands, query environments, and Starlark symbols. It includes \docs-agent\ to display repository-specific guidance for AI agents, \docs-starlark\ to retrieve documentation for user-defined Starlark symbols in JSON or Markdown file formats, and \docs starlark-builtins\ to generate documentation for built-in Starlark symbols. Query documentation (\docs-uquery\, \docs-cquery\, \docs-aquery\) can be output as Markdown or rendered text. Additionally, \docs markdown-help-doc\ generates Markdown documentation for any Buck2 subcommand, with \query\ automatically redirecting to \uquery\ documentation and \common-options\ providing a consolidated view of shared command options.

_app/buck2\_cmd\_docs\client · high confidence

New buck2 log diff commands for action divergence and external config comparison

Users can now compare two Buck2 event logs to identify build non-determinism and configuration differences. The new \buck2 log diff action-divergence\ command detects the first action with differing output digests between two builds, helping pinpoint non-deterministic behavior. Additionally, \buck2 log diff external-configs\ compares external Buck configuration values between two commands, supporting both human-readable and JSON output formats via the \--format\ flag to highlight added, removed, or changed configuration entries.

_app/buck2\_cmd\_log\client/src/diff · high confidence

New buck2\_certs crate for certificate management

A new Rust library, buck2\_certs, has been introduced to handle certificate-related logic within Buck2. This crate integrates with the rustls ecosystem (including rustls-native-certs and rustls-pki-types) and leverages tokio for asynchronous operations, tracing for observability, and x509-parser for certificate parsing. It is designed to support internal clients by providing a centralized component for certificate verification and management, with dependencies on existing Buck2 utility and error-handling modules.

_app/buck2\certs · high confidence

New buck2\_certs crate for certificate validation and TLS configuration

A new \buck2\_certs\ crate has been introduced to centralize certificate management. It provides functionality to load system and internal root certificates, configure TLS clients with these roots, and validate the validity of client and system certificates. The validation logic specifically checks for expired or missing certificates and provides detailed error messages with instructions for renewal, particularly for internal builds using the SKS agent for VPN-less scenarios.

_app/buck2\certs/src · high confidence

New buck2\_cmd\_debug\_client crate for debug command functionality

A new \buck2\_cmd\_debug\_client\ Rust library has been introduced to house debug-related commands. This crate aggregates dependencies for CLI argument parsing, serialization, and async runtime support, and integrates with core Buck2 components including the CLI protocol, client context, event logging, and file system abstractions to support debug client operations.

_app/buck2\_cmd\_debug\client · high confidence

New buck2\_cmd\_docs\_server crate for documentation generation

A new \buck2\_cmd\_docs\_server\ Rust library has been added to the Buck2 codebase to support the generation of command documentation. This component integrates with core Buck2 modules (such as \buck2\_core\, \buck2\_data\, and \buck2\_interpreter\) and external dependencies like \serde\ and \async-trait\ to facilitate the creation of documentation artifacts, likely in JSON or Markdown formats, for the Buck2 CLI.

_app/buck2\_cmd\_docs\server · high confidence

New buck2\_cmd\_targets\_server crate introduced

A new Rust library crate named \buck2\_cmd\_targets\_server\ has been added to the \app/buck2\_cmd\_targets\_server\ directory. This crate serves as a dedicated component for handling targets-related server commands, depending on core Buck2 modules such as \buck2\_fs\, \buck2\_hash\, and \buck2\_server\_ctx\, as well as external libraries like \blake3\, \tokio\, and \serde\_json\.

_app/buck2\_cmd\_targets\server · high confidence

New buck2\_configured crate for build configuration logic

A new Rust library crate named \buck2\_configured\ has been introduced to encapsulate build configuration logic. This crate depends on core Buck2 components such as \buck2\_build\_api\, \buck2\_build\_signals\, \buck2\_common\, \buck2\_core\, and \buck2\_error\, as well as utility libraries like \derive\_more\ and \futures\. It is owned by the \build\_infra\ oncall team and serves as a dedicated module for configuration-related functionality within the Buck2 application structure.

_app/buck2\configured · high confidence

New buck2\_configured crate for configuration and execution platform resolution

The \buck2\_configured\ crate has been introduced to centralize the logic for resolving target configurations and execution platforms. It provides the implementation for the \ConfiguredTargetCalculation\ interface, handling the evaluation of \config\_setting\ and \platform()\ targets, resolving execution platforms based on constraints and dependencies, and detecting cycles in the configured target graph. This module serves as the core wiring for how Buck2 determines which configuration applies to a target and which execution platform is used for its actions.

_app/buck2\configured/src · high confidence

New buck2\_daemon crate with macOS QoS lowering and in-process daemon support

The buck2 daemon logic has been extracted into a new \buck2\_daemon\ crate. On macOS, the daemon now automatically lowers its process priority to 'Utility' (configurable via \buckconfig\'s \\[buck2\] macos\_qos\_class\) to prevent it from starving other processes, with an option to skip this lowering. The crate also introduces an in-process daemon mode (used by \--no-buckd\) that runs the server in a separate thread within the client process, and adds a test-timeout mechanism (\BUCK2\_TERMINATE\_AFTER\) to force-exit the daemon if it hangs during testing.

_app/buck2\daemon/src · high confidence

New buck2\_env crate for environment variable management and soft-error handling

This change introduces the \buck2\_env\ crate, which centralizes the registration, parsing, and validation of Buck2 environment variables via the \buck2\_env\ macro. This macro allows developers to define environment variables with specific types, defaults, and applicability scopes (All, Internal, Testing), automatically registering them for the \buck2 help-env\ command. Additionally, the crate provides a \soft\_error!\ macro and infrastructure for handling non-fatal errors that are logged to Logview but do not crash the build by default, with behavior controllable via the \BUCK2\_SHOW\_SOFT\_ERRORS\ environment variable. The underlying \EnvHelper\ implementation has also been updated to use \buck2\_error\ instead of \anyhow\ for error handling.

_app/buck2\env · high confidence

New buck2\_http crate with configurable HTTP client and proxy support

The \buck2\_http\ crate introduces a dedicated HTTP client for Buck2, built on Hyper 1.x with support for HTTP/2, configurable timeouts, and concurrent request limits. It provides distinct client configurations for OSS and internal Meta environments, including VPNless access via x2p proxies and host-allowlisted environment proxies. The client handles redirects, tracks network statistics, and implements retry logic for transient errors, while using Buck2's custom error system to tag HTTP errors appropriately.

_app/buck2\http · high confidence

New buck2\_node crate for target node and attribute management

The build system introduces a new \buck2\_node\ crate that centralizes the logic for target nodes, attribute definitions, and configuration resolution. This module provides the core data structures for Starlark attributes (including types like \dep\, \label\, \string\, and \configuration\_dep\), handles attribute coercion and validation (such as for anonymous rules), and manages the traversal of configured dependencies. It serves as the foundational layer for how Buck2 represents and processes build targets and their dependencies.

_app/buck2\node · high confidence

New buck2\_query crate for query evaluation and graph traversal

The \app/buck2\_query\ crate has been introduced to centralize Buck2 query logic. It provides the \QueryEnvironment\ trait and \QueryEvaluator\ for evaluating query expressions, alongside a dedicated graph module (\query/graph\) that implements async BFS/DFS traversal and graph building. The crate also defines the \QueryTarget\ trait for target metadata access and includes a \VecAsMap\/\VecAsSet\ utility for efficient index-based graph storage.

_app/buck2\query · high confidence

New buck2\_query\_impls crate for query execution logic

A new \buck2\_query\_impls\ crate has been introduced to house the implementation details for Buck2's query system. This module contains the core evaluation engines for action queries (aquery), configured queries (cquery), and unconfigured queries (uquery), along with the necessary environment delegates and function modules. It also includes specialized traversal logic for the mixed action/transitive-set graph to optimize unfiltered dependency queries, and provides the BXL bindings for late-bound aquery functions.

_app/buck2\_action\_impl, app/buck2\_query\impls · high confidence

New buck2\_server\_commands crate consolidates server-side command implementations

The \buck2\_server\_commands\ crate has been introduced under \app/\ to centralize the implementation of Buck2 server commands. This crate provides the concrete logic for core operations including \build\, \install\, \complete\ (shell completion), \debug eval\, \debug anon-targets\, \explain\, and \expand-external-cells\. It acts as the wiring layer that registers these commands via the \OtherServerCommands\ interface, replacing the previous dependency on the monolithic \buck2\ crate and enabling a more modular server architecture.

_app/buck2\_server\commands · high confidence

New buck2\_transition crate for Starlark transition implementation

A new \buck2\_transition\ crate has been introduced to house the implementation of Starlark transition functions. This module provides the core logic for defining, fetching, and applying transitions, including the \TransitionInfo\ provider and the \transition()\ Starlark constructor. It handles the execution of transition functions against platform configurations, supporting both single and split transitions, and integrates with the DICE computation system for caching and dependency management.

_app/buck2\transition · high confidence

New cmp\_any crate for comparing dynamic Any types

The new \gazebo/cmp\_any\ crate introduces \PartialEqAny\ and \OrdAny\ wrappers, enabling users to compare \dyn Any\ trait objects by value and order them consistently. These utilities allow dynamic types to participate in equality checks and sorting operations by wrapping references and comparing both their \TypeId\ and underlying values.

_gazebo/cmp\any · high confidence

New crate for action metadata protocol definitions

A new crate, app/buck2\_action\_metadata\_proto, has been added to hold action result metadata. It includes the generated protocol buffer definitions for action\_metadata and exposes a constant key for remote depfile handling.

_app/buck2\_action\_metadata\proto/src · high confidence

New ctx.actions.assembled\_dir API for controlled directory assembly

Rule authors can now use \ctx.actions.assembled\_dir\ to create a directory containing specific artifacts, choosing for each entry whether it is copied as real bytes or laid out as a symlink via \assembled\_dir.copy()\ and \assembled\_dir.symlink()\. This provides a structured way to assemble directories with mixed materialization strategies, which is useful when some inputs must be physically present (e.g., for RPATH resolution) while others can be symlinked to save space.

_app/buck2\_action\impl/src/context · high confidence

New debug commands for allocation profiling, DICE hydration, and daemon diagnostics

The \buck2 debug\ command set has been expanded with several new subcommands to aid in performance analysis and daemon troubleshooting. Users can now profile memory allocation with \buck2 debug allocative\ and inspect jemalloc statistics via \buck2 debug allocator-stats\ (including a new \--purge\ option). DICE (Distributed Incremental Cache Engine) management is enhanced with \buck2 debug hydration\ to control page-out, page-in, and status reporting, as well as \buck2 debug dice-dump\ for exporting the DICE graph. Additional diagnostic tools include \buck2 debug anon-targets\ for introspecting anonymous targets, \buck2 debug crash\ for simulating daemon failures, and \buck2 debug flush-pgo-profile\ for flushing profile-guided optimization data.

_app/buck2\_cmd\_debug\client/src · high confidence

New derive macros for Default, VariantName, and UnpackVariants

The \gazebo\derive\ crate now provides three new procedural macros: \Default\\ generates a \Default\ implementation for structs without requiring all type parameters to implement \Default\; \VariantName\ implements a trait providing \variant\_name()\ and \variant\_name\_lowercase()\ methods for enums; and \UnpackVariants\ generates helper methods to extract inner values from specific enum variants. These macros enable ergonomic handling of default values and enum introspection/extraction in user code.

_gazebo/gazebo\derive · high confidence

New derive macros for Starlark value allocation, pagination, and type representation

The \starlark\_derive\ crate now provides several new procedural macros to simplify integrating Rust types with the Starlark runtime. \\#\[derive(AllocValue, AllocFrozenValue)\]\ allows enums to automatically implement value allocation for the heap. \\#\[derive(StarlarkPagable)\]\ enables serialization and deserialization of Starlark values, supporting field-level controls like \skip\, \pagable\, and custom \serialize\_with\/\deserialize\_with\ functions, along with a \bound\ attribute for overriding trait bounds. Additionally, \\#\[derive(StarlarkTypeRepr)\]\ generates type representations for enums and structs, and \\#\[derive(StarlarkPagablePanic)\]\ / \\#\[derive(StarlarkPagableViaPagable)\]\ provide utilities for types that either panic on serialization or bridge to existing \pagable\ implementations. These changes enhance the ergonomics of defining and managing complex Starlark-compatible types.

_starlark-rust/starlark\derive · high confidence

New display\_container utility for formatted output

A new \display\_container\ crate has been added to the \gazebo\ library, providing combinators to implement the \std::fmt::Display\ trait for container-like types. This includes \fmt\_container\ for wrapping items with prefixes and suffixes, \display\_pair\ for key-value formatting, and \iter\_display\_chain\ for chaining multiple display sources. The utilities support both standard compact output and an 'alternate' pretty-print mode that indents items across multiple lines, aiding in the visualization of complex data structures.

_gazebo/display\container · high confidence

New error format parser library for Buck2

A new Rust library, \buck2\_errorformat\, has been added to parse compiler error messages using the Vim-style \errorformat\ syntax. This library allows Buck2 to interpret complex, multi-line, and multi-pattern error outputs from external tools, extracting structured data such as file names, line/column numbers, error types, and messages. It supports features like multi-line message aggregation, file stack push/pop, and regex-based pattern matching, enabling more accurate and detailed error reporting in the build system.

_app/buck2\errorformat · high confidence

New event subscribers for build graph stats, test IDs, and system warnings

Added new event subscribers in the client context to capture build graph statistics (target names, configurations, and graph sizes) and write them to the remote event sink, and to persist test session IDs to a file upon discovery. Also added a subscriber to enforce the \BUCK2\_CONSOLE\_OUTPUT\_LIMIT\ environment variable by tracking cumulative output bytes and suppressing further output when the limit is exceeded. Additionally, introduced logic to detect and warn users about high memory pressure and low disk space based on system info events, and a minimal error console for \--console none\ mode.

_app/buck2\_client\ctx/src/subscribers · high confidence

New forkserver and internal test runner commands

Buck2 now exposes two new CLI commands: \forkserver\, which manages a persistent server process for build actions using either a file descriptor or a Unix socket for communication, and \internal\_test\_runner\, which executes tests via a platform-specific runner (Unix or TCP). The forkserver command is available on UNIX systems and requires either an \--fd\ or \--socket-path\ argument to establish its communication channel, while the internal test runner is restricted to the open-source version of Buck2 unless explicitly allowed via environment variable.

app/buck2/src/commands · high confidence

New gazebo library with safe casting, reference wrappers, and iterator extensions

The \gazebo/gazebo\ crate introduces a collection of Rust primitives, starting with \cast.rs\ which provides unsafe but strongly-typed wrappers for pointer and type conversions (e.g., \ptr\, \transmute\_unchecked\) to reduce typos. It adds \cell.rs\ with \ARef\, a zero-cost wrapper that unifies normal references and \RefCell\ borrows into a single type. The library also includes \cmp.rs\ with \cmp\_chain!\ and \eq\_chain!\ macros for early-exit comparison chains, and \ext/\ modules providing \IterExt\ (with \try\_any\, \try\_all\, \try\_unzip\), \OptionExt::try\_map\, and \SliceExt\ (with \try\_map\, \owned\, \as\_singleton\). Additional utilities include \file.rs\ for atomic directory creation and writing, \hash.rs\ for pre-hashed \Hashed\<T\>\ types, \phantom.rs\ for invariant \PhantomData\, and \variants.rs\ for enum variant introspection and unpacking.

gazebo/gazebo · high confidence

New installer protocol definition with device metadata and file name tracking

The buck2 installer now uses a new \install.proto\ definition that adds a \file\_names\ field to \InstallInfoRequest\ to declare expected files upfront, includes \installer\_name\ in \InstallResponse\ to identify the installer implementation, and introduces \DeviceMetadata\ in \FileResponse\ for logging device information. The protocol also defines \ErrorCategory\ (TIER\_0, INPUT, ENVIRONMENT) for structured error logging and includes a \ShutdownServer\ RPC.

_app/buck2\_install\proto · high confidence

New internal\_provider derive macro for Starlark providers

The buck2\_build\_api\_derive crate now provides the \#\[internal\_provider\] procedural macro, which automatically generates the Starlark implementation (StarlarkValue, ProviderLike, and ProviderCallable) for provider structs. Users can define providers with standard Rust structs, optionally specifying a custom methods function or using field\_type attributes to control Starlark type representations, with automatic generation of attribute accessors for struct fields.

_app/buck2\_build\_api\derive/src · high confidence

New library for reading embedded ELF sections from the executable

A new Rust library, \buck2\_embedded\_section\, has been added to read data embedded as non-allocated ELF sections within the running binary. This library supports both raw and zstd-compressed payloads, allowing the application to access embedded resources (such as \buck2\_miniperf\ data) directly from \/proc/self/exe\ without requiring external files or network access.

_app/buck2\_embedded\section · high confidence

New log subcommands for critical path, slowest path, external configs, and diffing

The \buck2 log\ command now includes several new subcommands to provide deeper insights into build performance and configuration. \buck2 log critical-path\ and \buck2 log slowest-path\ display the nodes on the respective build paths, including durations and reuse status, with support for readable, tabulated, JSON, and CSV output formats. \buck2 log external-configs\ shows the values and origins of buckconfigs for a selected command. Additionally, \buck2 log diff\ allows comparing two commands by analyzing action divergence and external configuration differences.

_app/buck2\_cmd\_log\client/src · high confidence

New pagable\_storage crate with Sled and SQLite backends

A new \pagable\_storage\ crate has been introduced, providing persistent storage backends for the pagable serialization framework. It includes a Sled-based backend for testing and a sharded SQLite backend for production use, which persists paged-out data using content-addressable keys and supports configurable write buffering and busy-timeout handling for concurrent access.

_pagable\storage · high confidence

New query server crate with DOT and HTML output formats

The \buck2\_cmd\_query\_server\ crate has been introduced to host query-related server commands, registering \uquery\, \cquery\, and \aquery\ via late bindings. This change adds support for new output formats for query results: DOT and DOT Compact graph visualizations (implemented in \dot.rs\) and HTML output (implemented in \html.rs\, which uploads results to Manifold in internal builds). The \query\_output\_format.rs\ module exposes these formats alongside existing Default, Json, and Starlark options.

_app/buck2\_cmd\_query\server/src · high confidence

New rage client module for automated debug data collection

A new \buck2\_cmd\_rage\_client\ library has been introduced to support the \rage\ command, which automatically gathers diagnostic information from failed Buck2 invocations. This module collects build metadata (revision, timestamps, command duration), system details (OS, hostname), source control state (Git/Hg snapshots), and daemon diagnostics (thread dumps, stderr, DICE dumps, and materializer state), then uploads these artifacts to the Manifold storage system for debugging.

_app/buck2\_cmd\_rage\client/src · high confidence

New read\_dump CLI tool for inspecting dice dumps

A new standalone binary \read\_dump\ has been added to the \dice\ crate, allowing users to read and inspect serialized dice dump files. The tool accepts a dump file as input and outputs the contents as pretty-printed JSON, either to the console or to a specified output file. It leverages the \clap\ library for command-line argument parsing and uses \bincode\ with legacy configuration to deserialize the \SerializedGraphNodeForKey\ structures from the dump.

_dice/read\dump · high confidence

New starlark subcommands for linting, typechecking, and debug-attach

The buck2 CLI now includes three new starlark subcommands: \starlark-lint\ to run the Starlark linter on specified paths, \starlark-typecheck\ to run the Starlark typechecker on specified paths, and \starlark-debug-attach\ to connect to the Starlark debug adapter protocol (DAP) server running in the buck daemon. The lint and typecheck commands forward their requests to the buckd server, while the debug-attach command forwards DAP requests from stdin to the daemon and returns DAP events and responses to stdout, including a custom subscriber that converts informative events to DAP output events for visibility in IDEs like VS Code.

_app/buck2\_cmd\_starlark\client/src · high confidence

New structured dynamic actions API with typed attributes and chaining support

This change introduces a new structured API for dynamic actions, replacing the previous positional argument model with a named-argument approach. Users can now define dynamic actions using \dynamic\_actions()\, which accepts an implementation function and a set of typed attributes defined via the \dynattrs\ namespace (e.g., \dynattrs.output()\, \dynattrs.artifact\_value()\, \dynattrs.dynamic\_value()\). This enables more robust type checking and allows dynamic actions to be chained, where the output of one action (a \DynamicValue\) can be consumed by another as a \ResolvedDynamicValue\. The implementation includes new Starlark types for \DynamicActions\, \DynamicActionsCallable\, \DynamicValue\, and \ResolvedDynamicValue\, along with the underlying infrastructure to manage these typed parameters and their lifecycle during analysis.

_app/buck2\_action\impl/src/dynamic · high confidence

New terminal-based games collection with menu system

The games module now includes a suite of playable terminal games (blocks, snake, jump, 2048, minesweeper, breakout, sokoban, life, and static) accessible via a central menu. This change introduces the core game infrastructure, including a unified game loop, input handling with legacy cmd.exe arrow key support, and a high-score system. It also restricts image decoding to PNG to ensure compatibility with the OSS Rust toolchain.

games · high confidence

New transitive validation API for target nodes

The build system now exposes a new validation API that allows validating a configured target node along with all its transitive dependencies. This is implemented via the \ValidationImpl\ trait, which defines the \validate\_target\_node\_transitively\ method, and the \TransitiveValidations\ data structure, which efficiently collects \ValidationInfo\ providers from a target and its recursive dependencies into a sparse graph. This enables build rules to perform comprehensive validation checks that consider the entire dependency graph rather than just the immediate target.

_app/buck2\_build\api/src/validation · high confidence

New utility libraries and test tools in the shed workspace

This change introduces several new Rust libraries and helper binaries to the shed workspace. It adds a lock-free hashtable (\lock\_free\_hashtable\) with stress and benchmark examples, a lock-free vector (\lock\_free\_vec\), and a mini-vector (\mini\_vec\) that supports nightly-only features. A new \provider\ crate implements a \std::any::Provider\ replacement for demand-driven value retrieval. Additionally, it includes a cgroup preparation script (\prep\_cgroup.sh\) and a memory pressure test tool (\use\_some\_memory\), a shell completion verification binary (\completion\_verify\), an RPM download utility (\rpm\_download\), a Scribe client wrapper (\scribe\_client\), a set sketch cardinality calculator (\setsketch\), and a \three\_billion\_instructions\ benchmark. The old \internment\_tweaks\ and \more\_futures\ targets have been removed.

shed · high confidence

New utility modules for Starlark environment and path resolution

The \app/buck2\_cmd\_starlark\_server/src/util\ directory now includes two new modules: \environment.rs\ and \paths.rs\. The \environment\ module provides an \Environment\ struct that manages the Starlark evaluation context, including globals, prelude loading logic, and preload imports. The \paths\ module introduces utilities for resolving and categorizing Starlark files (such as build files, BXL files, and load files) by traversing directories and handling file types, while respecting Buck's ignore rules and cell resolution.

_app/buck2\_cmd\_starlark\server/src/util · high confidence

Open-source Android toolchain and sample demo app

This change introduces the open-source Android build toolchain and a sample demo application. It adds a new \PostModel\ data class for the demo app, and implements core Android packaging components including \MiniAapt\ for resource parsing, \RDotTxtEntry\ for symbol handling, \ApkBuilder\ for APK creation, \D8Utils\ for dexing, and \AdbUtils\ for device interaction. It also includes \ResourceSourceMapExecutableMain\ and \ResourceSourceMapFormat\ to generate source maps for Robolectric tests, and \APKModule\ and \ExternalTargetGraph\ to support APK module structures.

repository · high confidence

Open-source the Buck resources Rust library

The \buck\_resources\ Rust library is now open-source and available in \integrations/resources/rust\. This library provides a \get\ function that allows Rust binaries built with Buck to look up resource files at runtime by reading a JSON manifest file generated alongside the executable. It handles path resolution relative to the binary's location and includes specific error types for issues such as missing executables, unreadable manifests, or invalid resource paths.

integrations/resources/rust · high confidence

Refactor Starlark artifact types and introduce ArtifactValue for content access

The artifact module has been restructured to introduce distinct Starlark types for different artifact states: \StarlarkArtifact\ for bound artifacts, \StarlarkDeclaredArtifact\ for unbound declarations, \StarlarkOutputArtifact\ for outputs, and \StarlarkPromiseArtifact\ for deferred artifacts. This refactoring includes adding \AssociatedArtifacts\ to track related files and exposing methods like \basename\, \extension\, \owner\, \short\_path\, \project\, and \as\_output\ on these types. A new \ArtifactValue\ type is introduced, allowing Starlark code to read artifact contents via \read\_string()\ and \read\_json()\, which is particularly useful for dynamic dependencies and action error handlers.

_app/buck2\_build\_api/src/interpreter/rule\defs/artifact · high confidence

Shared buck2 action-parallelism computation library

A new Rust library has been added to compute the distribution of concurrent action executions for a buck2 build invocation. This library calculates execution-only concurrency (excluding cache hits and queue time) and reports percentiles along with a time-weighted average. It is designed to be consumed by both the client-side InvocationRecorder for live metrics and an offline backfill binary, ensuring that both paths produce identical parallelism numbers.

_app/buck2\_action\parallelism · high confidence

Superconsole UI overhaul with new components and richer diagnostics

The superconsole terminal UI has been significantly refactored and expanded. It now features a new Starlark Debugger component to display attached debugger states, and a System Warning component that renders health issues (such as memory pressure and low disk space) using a new rich, box-styled message renderer. The header has been restructured into a TasksHeader that supports both simple and expanded progress views, while the IO panel now displays detailed memory metrics (RSS, malloc active/allocated) and CPU usage. Additionally, the Dice component now tracks check-deps and compute phases, and the Commands component has been updated to use the new error types and configuration-driven state.

_app/buck2\_client\ctx/src/subscribers/superconsole · high confidence

Support for bundled and Git-backed external cells

Buck2 now supports external cells sourced from bundled data or Git repositories. This change introduces the \buck2\_external\_cells\ crate, which implements the \ExternalCellsImpl\ interface to handle cell expansion and file operations. For bundled cells, it loads pre-packaged data (such as the \nano\_prelude\ via the \NANO\PRELUDE\ environment variable) and exposes them through a file operations delegate. For Git-backed cells, it performs \git init\, \fetch\, and \reset\ operations to check out specific commits, while explicitly stripping potentially interfering \GIT\\ environment variables to ensure reproducible builds. The implementation integrates with the materializer to declare and manage output leases during the expansion process.

_app/buck2\_external\cells · high confidence

Support for modifiers in CLI target pattern resolution

The pattern resolution logic in \buck2\_common\ now supports parsing and resolving target patterns with modifiers from the command line. New functions \parse\_patterns\_with\_modifiers\_from\_cli\_args\ and \parse\_and\_resolve\_patterns\_with\_modifiers\_from\_cli\_args\ allow users to specify modifiers when targeting files or packages. The \ResolvedPattern\ structure has been updated to store modifiers alongside package labels, ensuring that these modifiers are preserved and applied during the resolution of recursive and specific target patterns.

_app/buck2\common/src/pattern · high confidence

Support for tagging artifacts and command-line arguments

Users can now use the new \ctx.actions.artifact\_tag()\ API to associate tags with input and output artifacts, as well as command-line arguments. This capability allows artifact visitors (such as those used for dependency file tracking) to identify and group artifacts by category, enabling more accurate incremental builds. The implementation introduces \ArtifactTag\ for content-deterministic identity, \StarlarkTaggedValue\ for non-command-line artifacts, and \StarlarkTaggedCommandLine\ for command-line arguments, all registered in the \buck2\_build\_api\ interpreter module.

_app/buck2\_build\_api/src/interpreter/rule\_defs/artifact\tagging · high confidence

Removals

Removal of buck2\_data crate and event schema

The buck2\_data crate, which previously defined the protobuf schema (data.proto) and Rust bindings for Buck's internal event system, has been removed. This deletion eliminates the build targets, the proto definition file, and the serialization logic for event types such as BuckEvent, SpanStartEvent, and InstantEvent, effectively stripping out the infrastructure used to record and transmit build execution traces.

_buck2\data · high confidence

Removal of buck2\_execute\_impl crate and its executor implementations

The buck2\_execute\_impl crate has been removed from the codebase. This change eliminates the local, remote, hybrid, and caching executor implementations, as well as the deferred materializer logic and associated low-pass filtering and file-tree data structures that were previously contained within this module.

_buck2\_execute\impl · high confidence

Removal of buck2\_server crate and daemon implementation

The buck2\_server crate, which contained the Buck2 daemon implementation, has been removed. This includes the deletion of the build target (TARGETS), the main server entry point (daemon/server.rs), the command context handling (ctx.rs), active command tracking (active\_commands.rs), configuration parsing (configs.rs), and various daemon subsystems such as TCP listening, DICE state dumping, disk state management, forkserver launching, panic handling, and allocative profiling. This change eliminates the long-running daemon process and its associated state management from the buck2 codebase.

_buck2\server · high confidence

Removal of custom collection modules

The custom collection implementations—SortedMap, UnorderedMap, and UnorderedSet—have been removed from the buck2\_core crate. This deletion eliminates the internal data structures that previously provided sorted key ordering and hash-based storage with specific equality and hashing behaviors, effectively removing these types from the public API surface of the collections module.

_app/buck2\core/src/collections · high confidence

Removal of install\_proto build targets and source files

The \install\_proto\ directory has been completely removed, deleting the build configuration (\TARGETS\, \install.bzl\), the Protocol Buffer definition (\install.proto\), the Rust library source (\src/lib.rs\), the build script (\build.rs\), and the Python gRPC server implementation (\main.py\). This eliminates the local build rules and source code for the \install\_proto\ Rust and Python gRPC service that previously handled installation requests via rsync over a Unix domain socket.

_install\proto · high confidence

Removal of internal provider derive macro

The \buck2\_build\_api\_derive\ crate has been removed, eliminating the \\#\[internal\_provider\]\ proc-macro attribute that previously generated Starlark implementations for internal providers. Users can no longer use this macro to automatically generate Starlark value types, provider callables, and field accessors for Rust structs.

_buck2\_build\_api\derive · high confidence

Removal of legacy CLI implementation and test infrastructure

The legacy \cli\ directory has been removed, deleting the old \buck2\ binary entry point, the \cli\ Rust library, the daemon lifecycle documentation, and the Python-based daemon test server and tests. This change eliminates the previous client-server implementation and its associated test harness, which are no longer part of the build.

cli · high confidence

Removal of legacy CLI protocol definitions and build infrastructure

The \cli\_proto\ module, which previously defined the gRPC protocol for the Buck2 daemon (including messages for status, kill, and various query commands like Targets, Aquery, Uquery, and Cquery), has been completely removed. This deletion includes the \daemon.proto\ schema, the Rust source code (\src/lib.rs\) that implemented traits for handling client contexts and build options, and the associated build configuration (\TARGETS\ and \build.rs\). This change eliminates the legacy CLI-to-daemon communication layer from the codebase.

_cli\proto · high confidence

Removal of omnibus\_tools sharing utilities

The \omnibus\_tools\ directory has been removed, eliminating the \find\_implicit\_roots\, \find\_exclusions\, \analyze\_sharing\, and \debug\ BXL scripts that were previously used to identify implicit roots, default exclusions, and analyze omnibus sharing states. This change also removes the associated \README.md\ documentation, indicating that the shared omnibus roots support and these specific analysis workflows are no longer available in this location.

_omnibus\tools · high confidence

Removal of the buck2\_audit command and its subcommands

The \buck2\_audit\ crate and its associated build target have been removed from the codebase. This change eliminates the \buck audit\ CLI command and all its subcommands, including \audit-analysis-queries\, \audit-config\, \audit-dep-files\, \audit-execution-platform-resolution\, \audit-includes\, \audit-prelude\, \audit-providers\, \audit-visibility\, and \audit-module\. Users can no longer use this tool to inspect build configurations, target providers, execution platforms, dependency files, or Starlark module imports.

_buck2\audit · high confidence

Removal of the buck2\_client crate and its CLI commands

The buck2\_client crate, which housed the Buck2 command-line interface implementation, has been removed. This deletion eliminates the client-side code for all CLI commands (including build, clean, cquery, aquery, bxl, and various debug utilities) and the associated argument parsing and expansion logic. Users relying on this specific client binary or its command set will no longer have access to these features through this code path.

_buck2\client · high confidence

Removal of the buck2\_common crate

The buck2\_common crate has been removed from the codebase. This deletion eliminates the shared utilities and infrastructure previously provided by this module, including connection handling (buckd\_connection.rs), content-addressable storage digest management (cas\_digest.rs), client utilities (client\_utils.rs), daemon directory management (daemon\_dir.rs), dice integration for cells and file operations (dice/), Eden filesystem integration (eden/), executor configuration (executor\_config.rs), external symlink handling (external\_symlink.rs), file operations (file\_ops.rs), buildfile discovery (find\_buildfile.rs), temporary directory management (home\_buck\_tmp.rs), and invocation path resolution (invocation\_paths.rs).

(repo-wide) · high confidence

Removal of the buck2\_forkserver\_harness utility

The buck2\_forkserver\_harness application has been removed from the codebase. This utility previously allowed users to launch a forkserver for the Buck2 CLI and execute commands with configurable repetition and concurrency levels; this capability is no longer available.

_app/buck2\_forkserver\harness · high confidence

Removal of the buck2\_interpreter module

The buck2\_interpreter module has been removed from the codebase. This deletion eliminates the Starlark interpreter implementation, including the build file evaluation logic, the \native\ and \stdlib\ function definitions, and the integration with the dice dependency-injection system for interpreter state and configuration.

_buck2\_bxl, buck2\interpreter · high confidence

Removed C++ no-prelude example projects

The C++ example projects located in examples/no\_prelude/cpp/hello-world and examples/no\_prelude/cpp/library have been removed. This deletion eliminates the source files for the 'hello-world' executable and the 'library' component, which previously demonstrated basic C++ functionality without prelude support.

_examples/no\_prelude/cpp/hello-world, examples/no\prelude/cpp/library · high confidence

Removed legacy future cancellation and instrumentation utilities

The \more\_futures\ crate has removed several legacy components: the \DropTogether\ utility for coupled dropping, the \instrumented\_shared\ module for cross-thread span tracking, the \DropCancel\ and \spawn\_task\ APIs for reference-counted cancellation, and the \guarded\_rc\ utility for thread-safe reference counting. These removals simplify the crate by eliminating deprecated cancellation patterns and instrumentation logic no longer in use.

_shed/more\futures · high confidence

API

DICE public API is extracted into a dedicated module

The DICE incremental computation engine's public interface has been reorganized into a dedicated \api\ module. This change exposes core components such as \Key\, \InjectedKey\, \DiceTransaction\, and \DiceComputations\ through a structured public API, while moving internal implementation details like legacy logic and cycle detection into private or legacy submodules. Users now interact with a cleaner, more explicit public surface for building and managing DICE computations.

dice/dice · high confidence

Architecture

Consolidated Starlark global registration in the build API interpreter

The Buck2 build API interpreter now centralizes the registration of Starlark globals and internals into dedicated modules (\more.rs\ and \rule\_defs.rs\). This change consolidates previously scattered definitions—such as artifacts, providers, command-line inputs, and action error handlers—into a single initialization flow, ensuring that all build API symbols are registered consistently when the interpreter starts.

_app/buck2\_build\api/src/interpreter · high confidence

Extract buck2 build signals implementation into a dedicated crate

The build signals implementation has been moved from its previous location into a new, standalone crate (\app/buck2\_build\_signals\_impl\). This change isolates the implementation details, defining its own dependencies on core Buck2 components (such as \buck2\_analysis\, \buck2\_artifact\, \buck2\_critical\_path\, and \dice\) and establishing \build\_infra\ as the oncall team. This modularization separates the build signal logic from other parts of the codebase, improving maintainability and dependency management for this specific subsystem.

_app/buck2\_build\_signals\impl · high confidence

Extract build metadata into a dedicated module

The build information retrieval logic (revision, Windows internal version, release timestamp) has been moved into a new \buck2\_build\_info\ crate. This module exposes a \LateBinding\-based singleton for build metadata, allowing the application to access source control revision, Windows-specific versioning, and release timestamps in a centralized way.

_app/buck2\_build\info/src · high confidence

Extract concurrency management into a dedicated buck2\_concurrency crate

The concurrency handling logic for buck2 commands has been extracted from the main application into a new, standalone \buck2\_concurrency\ crate. This change isolates the logic that manages command admission, blocking, and concurrent execution based on Dice state equivalence, making the codebase more modular and easier to maintain. The new crate explicitly handles scenarios such as nested invocations, daemon preemption, and blocking when the daemon is not idle, while deliberately avoiding dependencies on heavy external libraries to prevent code coverage issues.

_app/buck2\concurrency · high confidence

Extract file watcher logic into a dedicated buck2\_file\_watcher crate

The file watcher implementation has been moved from the main buck2 application into a new, standalone \buck2\_file\_watcher\ crate. This refactoring introduces a unified \FileWatcher\ trait and a factory in \file\_watcher.rs\ that selects the active backend (EdenFS, Watchman, Notify, or FsHashCrawler) based on the \buck2.file\_watcher\ buckconfig setting and the current environment. The crate also introduces a scoped \DepFileCache\ for managing live dependency file state per repository and a \Mergebase\ trait for tracking source control merge bases, providing a cleaner separation of concerns for file system change detection.

_app/buck2\_file\watcher · high confidence

Extract shared logging utilities into buck2\_log\_common crate

The \buck2\_log\_common\ crate has been introduced to centralize shared logging infrastructure, specifically extracting the Chrome trace generation logic previously located elsewhere. This new library provides the \ChromeTraceCommand\ and associated rendering logic, allowing other Buck2 components to generate performance traces from event logs without duplicating code. Users benefit from a more modular codebase where trace generation is a reusable, shared capability.

_app/buck2\_log\common · high confidence

Extracted event log logic into a new buck2\_event\_log crate

The event log functionality has been extracted into a new, dedicated \buck2\_event\_log\ Rust crate. This change consolidates the code responsible for handling and processing Buck2 event logs, including dependencies on libraries like \jiff\ for timestamps, \prost\ for protocol buffers, and \tokio\ for async runtime support, into a single module. This structural change improves code organization by separating event log concerns from the broader Buck2 application logic.

_app/buck2\_event\log · high confidence

Introduce buck2\_common crate with shared dependencies and build configuration

A new \buck2\_common\ crate has been added to centralize shared Rust dependencies and build configuration for Buck2. This change introduces a \BUCK\ file that defines the library, specifying a comprehensive list of third-party Rust dependencies (such as \hyper\, \tonic\, \rusqlite\, and \tokio\) and internal Buck2 modules (like \buck2\_core\, \buck2\_http\, and \dice\). It also configures \autocargo\ to override \rusqlite\ features and include extra dependencies like \fbinit\ and \hostcaps\, while applying OS-specific dependencies for Linux and macOS. This consolidation allows other Buck2 components to share common utilities and dependencies more efficiently.

_app/buck2\common · high confidence

Local execution logic moved from forkserver to a dedicated buck2\_execute\_local crate

The local command execution and process management code has been extracted from the forkserver crate into a new, standalone \buck2\_execute\_local\ crate. This change introduces platform-specific implementations for process groups (using Unix process groups and Windows Job Objects) and adds support for cgroup-based resource control, including orphan process cleanup and action freezing. The new crate also includes a \MiniperfStatusDecoder\ to parse miniperf output for execution statistics and replaces the legacy \winapi\ dependency with \windows-sys\ on Windows.

_app/buck2\_execute\local · high confidence

New buck2\_action\_impl crate for action execution and dynamic output handling

The \buck2\_action\_impl\ crate has been introduced to centralize the implementation of build actions and dynamic output logic. It provides the runtime infrastructure for \ctx.actions\ methods (such as \run\, \write\, \copy\, and \download\) and manages the lifecycle of dynamic actions, including the registration of Starlark globals like \DynamicValue\ and \DynamicAttrs\. This change consolidates action execution details into a dedicated module, separating the implementation from the analysis API definitions.

_app/buck2\_action\impl/src · high confidence

Refactor file operations into a modular, DICE-integrated architecture

The file operations subsystem in \buck2\common\ has been restructured into distinct modules (\delegate\, \dice\, \io\, \error\, \metadata\, \testing\, \trait\\) to improve separation of concerns and testability. This change introduces a \FileOpsDelegate\ trait that abstracts file system interactions, with a concrete \IoFileOpsDelegate\ implementation that integrates with the \IoProvider\ and includes a \ReadDirCache\ for performance. File operations are now exposed via DICE keys (e.g., \ReadDirKey\, \ReadFileKey\), enabling efficient caching and invalidation through the \DiceFileComputations\ API. Error handling is centralized in a new \error\ module, providing richer context for file read failures. A \TestFileOps\ implementation is provided for unit testing, allowing mock file systems to be injected. The \FileChangeTracker\ is updated to track dirty keys for these new DICE-based operations, ensuring correct invalidation when files change.

_app/buck2\_common/src/file\ops · high confidence

Split targets server command into dedicated module

The \targets\ server command logic has been extracted from the general \buck2\_server\_commands\ crate into a new, dedicated \buck2\_cmd\_targets\_server\ crate. This new module now owns the implementation for the \targets\, \ctargets\, and \targets\_show\_outputs\ commands, including their request handling, output formatting, and integration with the server's late-binding command registry.

_app/buck2\_cmd\_targets\server/src · high confidence

Behavioural changes

2476 commits (129 fixes) modifying starlark-rust/starlark

A change to existing behaviour in starlark-rust/starlark — 2476 commits (129 fixs), 745 files.

prelude, starlark-rust/starlark · medium confidence · unverified

Add specific error tags for standard library error conversions

The buck2 error system now assigns distinct, specific tags to errors originating from standard library types. Conversions for \std::io::Error\ are categorized by platform and error kind (e.g., \IoNotFound\, \IoWindowsSharingViolation\, \IoStaleNfsHandle\), \std::process::ExitStatus\ is tagged as \ExitStatus\ or \ExitStatusUnknown\, and string parsing errors (\FromUtf8Error\, \Utf8Error\, \ParseBoolError\) are tagged as \StringUtf8\ or \ParseBool\. This allows users to identify and handle these specific standard library failure modes more precisely.

_app/buck2\error/src/conversion/stds · high confidence

Added placeholder file to support buck2 in non-ocamlrep repositories

A new placeholder file has been added to the shim/third-party/ocaml/opam/lib/ocaml directory to allow buck2 to run correctly in repositories that do not use the ocamlrep setup. This change ensures build compatibility for users outside the standard ocamlrep environment by providing the necessary file structure expected by the build system.

shim/third-party/ocaml/opam · high confidence

Artifact group staging now supports content-based path resolution

The artifact group calculation logic has been updated to handle content-based paths during the staging phase. When resolving artifacts for a group, the system now checks if an artifact requires content-based path resolution; if so, it passes the content hash to the path resolver and uses a lazy directory builder to construct the output directory. This ensures that artifacts relying on content hashes are correctly staged with their resolved paths, while maintaining compatibility for standard artifacts.

_app/buck2\_build\_api/src/artifact\groups · high confidence

Audit server subcommands now run inside the server process

The \buck2 audit\ subcommands (such as \analysis-queries\, \classpath\, \config\, \dep-files\, \execution-platform-resolution\, \file-package\, \includes\, \prelude\, \providers\, \package-values\, \perf\, and \deferred-materializer\) are now implemented as server-side handlers that execute directly within the Buck2 daemon. This change consolidates audit logic into the \buck2\_cmd\_audit\_server\ crate, allowing the server to resolve targets, compute provider collections, and render output without requiring a separate client-side process for these operations.

_app/buck2\_cmd\_audit\server/src · high confidence

Audit server supports inspecting Starlark module dependencies for TOML files

The \buck2 audit starlark\ command in the audit server now includes support for inspecting Starlark module dependencies when the loaded modules are TOML files. Previously, the command only handled \.bzl\ (LoadFile) and \.bxl\ files; the updated logic in \package\_deps.rs\ and the new \module.rs\ handler explicitly recognize \StarlarkModulePath::TomlFile\ alongside existing paths. This allows users to trace dependencies and inspect the environment of Starlark modules loaded from \.toml\ files via the audit server interface.

_app/buck2\_cmd\_audit\server/src/starlark · high confidence

BXL API now exposes structured Starlark types for target nodes, actions, and query results

The BXL Starlark API has been refactored to expose dedicated, strongly-typed objects for build graph elements instead of generic or opaque representations. Unconfigured and configured target nodes are now available as \bxl.UnconfiguredTargetNode\ and \bxl.ConfiguredTargetNode\, providing explicit methods like \get\_attr\, \get\_attrs\, \has\_attr\, \label\, \buildfile\_path\, \rule\_type\, \rule\_kind\, \oncall\, \deps\, and \inputs()\. Actions and action query nodes are exposed as \bxl.Action\ and \bxl.ActionQueryNode\, allowing users to retrieve action outputs, owner labels, and query-specific attributes. This change replaces previous patterns (such as the deprecated \attrs\ attribute on unconfigured nodes) with a consistent, method-based API for inspecting build targets and actions.

_app/buck2\_bxl/src/bxl/starlark\defs/nodes · high confidence

BXL API types and context objects are renamed to the bxl namespace

The BXL Starlark API now exposes its types under the \bxl\ namespace. This change renames several existing types to follow this convention, including \bxl.AnalysisResult\, \bxl.BuildResult\, \bxl.CliArgs\, \bxl.CqueryContext\, \bxl.EnsuredArtifactGroup\, and \bxl.EnsuredArtifactGroupInner\. Additionally, new context objects such as \bxl.CqueryContext\ are introduced to provide query capabilities within BXL scripts, and the \bxl\_main\ function is added to allow BXL scripts to be executed directly.

_app/buck2\_bxl/src/bxl/starlark\defs · high confidence

BXL command execution and streaming output support

The BXL (Buck eXecution Language) command implementation has been restructured to support streaming output and build reports. The \bxl\_command\ function now handles partial results via a \PartialResultDispatcher\, allowing stdout to be streamed to the client during execution, including when errors occur. It also generates and serializes a build report (\serialized\_build\_report\) in the response, capturing errors and artifact information. A new \bxl\_profile\_command\ has been added to support profiling BXL evaluations, writing profile data to a specified destination. The command registration and late-binding initialization have been consolidated into \commands.rs\ and \lib.rs\ respectively.

_app/buck2\bxl/src · high confidence

BXL evaluation now supports streaming output and structured cancellation

BXL scripts can now stream stdout and stderr output in real-time via a new \StreamingOutputWriter\ that dispatches messages through the event system, and the evaluation engine enforces a limit of 500 concurrent execution threads to prevent resource exhaustion. Additionally, BXL computations are now fully cancellable using structured cancellation contexts, allowing users to interrupt long-running BXL evaluations cleanly.

_app/buck2\bxl/src/bxl · high confidence

Buck2 CLI overhaul: new error handling, Windows admin warnings, and granular verbosity

The Buck2 CLI has been refactored to use a new \buck2\_error\ system instead of \anyhow\, providing structured error reporting with tags and context. On Windows, a new check warns users if they run Buck2 from an admin shell, suggesting a clean to avoid future failures. On Unix, Buck2 now prevents running as root unless the home directory is owned by root, emitting a soft error. The CLI now supports granular verbosity via the \-v\ flag (e.g., \-v=1,stderr\) and a new \--agent-context\ flag for AI agent telemetry. Additionally, the \--no-buckd\ option is now hidden from help, and the \cleanall\ command is available.

app/buck2/src · high confidence

Buck2 Eden I/O module ownership moves to build\_infra

The on-call responsibility for the Buck2 Eden integration has been transferred from the Buck2 team to the build\_infra team, as reflected in the updated BUCK build file for the app/buck2\_eden location.

_app/buck2\eden · high confidence

Buck2 binary entry point restructured with platform-specific allocators and late-bound initialization

The \buck2\ binary entry point (\app/buck2/bin/buck2.rs\) has been rewritten to introduce platform-specific memory allocators (tikv-jemallocator for Linux/macOS, mimalloc for Windows) and a fragmentation profiler for development builds. The startup sequence now explicitly initializes late-bound bindings for numerous internal crates (such as \buck2\_analysis\, \buck2\_query\_impls\, and \buck2\_cmd\_starlark\_server\) and sets up cryptography before execution. Additionally, the binary now supports a \client\_only\ build mode, logs start times via \InvocationRecorder\, and includes a warning when built via \cargo\ instead of \buck\ to alert users of potential performance regressions.

app/buck2/bin · high confidence

Buck2 test protocol schema and build configuration updates

The test protocol definition (test.proto) and its Rust build configuration have been updated to support new test execution features and infrastructure changes. Key schema additions include a 'variant' and 'repeat\_count' for test discovery, a renamed 'TestStage' message replacing 'DisplayMetadata' with cacheability flags, and new fields for tracking 'test\_session\_id', 'max\_memory\_used\_bytes', and 'INFRA\_FAILURE' status. The protocol now explicitly handles local resource requirements, disables test execution caching via a new flag, and integrates with the host-sharing and data proto schemas. The Rust build script (build.rs) has been modified to use an unsafe protoc setup, configure external paths for dependencies, and add clippy attributes, while the BUCK file defines the library dependencies on buck2\_data and buck2\_host\_sharing\_proto.

_app/buck2\_test\proto · high confidence

Buck2 website restructured with new navigation, language support, and internal/external variants

The Buck2 documentation website has been reorganized to improve discoverability and clarify the build system's capabilities. The sidebar has been restructured into distinct sections for About, Getting Started, Concepts, Buck2 Users, and Queries, replacing the previous layout. The homepage now prominently lists support for additional languages, including Haskell, Erlang, Java, and Kotlin, alongside existing ones. To support different audiences, the site now features internal and external variants: internal users see links to CodeHub and internal community groups, while external users see GitHub and Discord links. The navigation has been updated to point to new documentation paths (e.g., 'Why Buck2' moved to '/docs/about/why'), and a new 'TargetDiagram' component has been added to visually explain Buck2 labels. Additionally, the site configuration has been migrated to TypeScript, and a custom CSS theme has been applied to enhance sidebar readability and active link visibility.

website · high confidence

Cell alias resolution and cycle detection moved into the DICE graph

The cell alias resolver logic and cycle detection infrastructure have been integrated directly into the DICE computation graph. Users benefit from more accurate cycle detection for build graph nodes via the new CycleDetectorAdapter and PairCycleDetector, and cell alias resolution is now a first-class DICE key, ensuring consistent handling of external cells and improving build stability when resolving aliases across different project roots.

_app/buck2\common/src/dice · high confidence

Configurable hook for Buck2-based module discovery in the Erlang shell

The Erlang shell now uses a new \shell\_buck2\_module\_search\ module to locate source files for modules, replacing the previous implicit or file-system-only search logic. This change introduces a configurable hook (\find\_module\_source\) that allows the shell to query Buck2 build targets to resolve module sources, improving accuracy in complex build environments. The \user\_default\ module's \l/1\ command now leverages this new search mechanism to load modules, ensuring that the correct source files are identified and loaded via the Buck2 build system.

prelude/erlang/shell · high confidence

Configuration labels and IDs are now strictly validated and bound

Configuration labels are now validated to reject empty strings, lengths over 1000 characters, whitespace, parentheses, and names that clash with built-in platforms (e.g., \<unbound\>). Configuration identifiers must now include a 16-character hex hash (e.g., \label\#hash\), enforced by the new BoundConfigurationId type. This ensures that configuration lookups are explicit and that configuration data is uniquely identified by both its label and its content hash.

_app/buck2\core/src/configuration · high confidence

Configuration modifiers now use first-class attributes instead of metadata

Buck2 no longer supports defining configuration modifiers via the \metadata\["buck.cfg\_modifiers"\]\ dictionary. If a target still uses this legacy metadata approach, Buck2 will now emit a hard error instructing you to migrate to the first-class \modifiers\ attribute. This change is part of the broader rollout of the new \cfg\_constructor\ system, which also introduces support for CLI modifiers, target modifiers, and an optional \aliases\ field in the \set\_cfg\_constructor\ Starlark function.

_app/buck2\_cfg\constructor/src · high confidence

Configuration transitions now use ConfigurationData and support new transition identifiers

The configuration transition system has been refactored to use \ConfigurationData\ instead of the previous \Configuration\ type for both single and split transitions, ensuring consistent data handling. Additionally, the \TransitionId\ type has changed from a struct to an enum, introducing support for \MagicObject\ transitions (identified by path and name) and \Target\ transitions (identified by a \ProvidersLabel\), which expands how transitions can be uniquely identified and applied.

_app/buck2\core/src/configuration/transition · high confidence

Critical path analysis now includes detailed waiting categories and page-in tracking

The critical path logging in Buck2 has been enhanced to provide deeper visibility into build delays. The new \CriticalPathProtoEnhancer\ in \buck2\_build\_signals\_impl\ automatically inserts \Waiting\ entries to fill gaps between actions, categorized by reasons such as dependency resolution, materialization, and DICE page-ins. It also tracks specific waiting data for actions, including queue duration and user duration, and marks reused (cache-hit) nodes. Additionally, page-in chains are preserved through opaque DICE keys, and anonymous target nodes are now included in the critical path graph to give a more complete picture of build bottlenecks.

_app/buck2\_build\_signals\impl/src · high confidence

Critical path analysis now includes slowest path and waiting data

The critical path calculation backend has been enhanced to compute and expose the slowest path in addition to the standard critical path, providing users with more detailed insights into potential build optimizations. This change also incorporates waiting data into the node analysis, allowing for a more accurate representation of build bottlenecks caused by resource contention or scheduling delays. The logging backend now includes time spans for nodes, and the system supports anonymous target nodes in the critical path graph.

_app/buck2\_build\_signals\impl/src/backend · high confidence

Daemon client error handling and Windows process spawning improvements

The daemon client now uses the internal \buck2\_error\ system instead of \anyhow\ for error handling, providing structured error tags and context for better debugging. On Windows, the background process spawning logic has been refactored to use the \windows-sys\ crate instead of \winapi\, and now correctly passes environment variables to the spawned daemon process via a dedicated \daemon\_env\_vars\ argument, ensuring the daemon inherits the necessary environment context.

_app/buck2\_client\ctx/src/daemon · high confidence

Deduplication of tracked file digests by value

The CAS digest module now interns tracked file digests, ensuring that identical file content digests share a single allocation and a single CAS expiration record regardless of how many holders reference them. This change reduces memory usage and simplifies expiration tracking by consolidating duplicate digest entries into one canonical instance.

_app/buck2\_common/src/cas\digest · high confidence

Derive macro implementation moved to app/buck2\_error\_derive

The \buck2\_error\ derive macro implementation has been relocated from the \allocative\_derive\ module to a new dedicated \app/buck2\_error\_derive\ crate. This change includes renaming the build target to \buck2\_error\_derive\, updating the build configuration to use standard Rust library definitions, and adding the necessary Apache 2.0 and MIT license files to the new location.

_app/buck2\_error\derive · high confidence

Directory module refactoring and cleanup

The directory module in buck2\_core has undergone significant internal refactoring. The \DirectoryBuilder\ implementation file was removed, along with the \DashMapDirectoryInterner\ and various supporting modules like \directory\_data\, \directory\_hasher\, \entries\, \find\, \fingerprinted\_directory\, \macros\, \no\_hasher\, \shared\_directory\, and \walk\. The \mod.rs\ file was also deleted, indicating a restructuring or removal of the public API surface for this module. These changes simplify the directory handling logic by removing specific implementations and macros, likely as part of a broader effort to streamline the codebase.

_app/buck2\core/src/directory · medium confidence

Downward API trait updates error handling and map types

The DownwardApi trait in the downward API crate now uses buck2\_error::Result instead of anyhow::Result for its console, log, and external methods, and replaces std::collections::HashMap with buck2\_hash::BuckMutMap for the data parameter in the external method.

_app/buck2\_downward\api/src · high confidence

Eden I/O now detects daemon restarts and handles ACL-restricted paths

The Buck2 Eden integration now includes robustness improvements for production use. It detects when the underlying EdenFS daemon restarts (via PID and uptime tracking) and fails fast to prevent using stale cached state. Additionally, it correctly handles ACL-restricted directories by treating permission errors as restricted rather than build failures, and improves symlink handling on Windows to avoid trusting Eden's symlink reports when the filesystem exposes them as regular files.

_app/buck2\eden/src · high confidence

Erlang test runner migrates to JSON output format

The Erlang Common Test runner now produces test results and test listings in JSON format instead of the previous term-based serialization. This change introduces new modules (json\_interfacer, listing\_interfacer, test\_info) to handle JSON serialization, updates the test binary to use argparse for CLI argument parsing, and modifies the test runner to write structured JSON files (result\_exec.json, result) for better compatibility with external test infrastructure and improved performance.

_prelude/erlang/common\_test/test\binary · high confidence

Event log upload now falls back to curl if the Manifold CLI is unavailable

The event log upload mechanism in \buck2\_client\_ctx\ has been updated to handle environments where the Manifold CLI is not installed. Previously, the absence of the CLI (particularly on Windows) would prevent uploads. The new logic in \upload.rs\ explicitly checks for the CLI path and, if it is missing, falls back to using \curl\ with TLS certificates to upload the log files to the Manifold server. This ensures that event logs can still be uploaded reliably across different operating systems and deployment configurations.

_app/buck2\_client\_ctx/src/subscribers/event\log · high confidence

Expanded allocative support and new size-calculation utilities

The allocative library now supports a broader range of types, including chrono DateTime, jiff, compact\_str, either, serde\_json, slab, tokio, and triomphe, while removing the internal RcStr helper. Users gain new public APIs for memory accounting: size\_of\_reachable calculates the total size of a value and all reachable allocations (counting shared pointers once), and size\_of\_unique returns the size of a value plus its unique allocations. The derive macro now supports a \#\[allocative(visit = ...)\] attribute for custom field visitation and a \#\[allocative(bound = "...")\] attribute for precise generic bound control. Additionally, the FlameGraphBuilder is now Send, and a golden test harness has been added to validate flamegraph output.

allocative/allocative/src · high confidence

Expanded command-line fingerprinting and offline build support

The build API now computes content-based digests for expanded command lines (including executable, arguments, and environment variables) to enable precise cache lookups and deduplication. Additionally, run actions can now read from a separate offline cache for network operations like download\_file, and the system supports sharing per-command action paths via a directory interner to reduce memory usage during concurrent builds.

_app/buck2\_build\api/src/actions/impls · high confidence

Expanded derive(Allocative) capabilities for custom bounds, DSTs, and external visitors

The \test\_derive\ module now demonstrates and supports more advanced usage of the \\#\[derive(Allocative)\]\ macro. Users can now specify custom trait bounds via the \\#\[allocative(bound = ...)\]\ attribute, allowing for complex generic constraints (e.g., on \HashMap\ or unsized types). The derive macro also supports Data-Size-Tail (DST) structs, such as \struct Dst(str)\, and allows fields to be visited using external functions via the \\#\[allocative(visit = ...)\]\ attribute, enabling custom visitation logic for types that do not implement \Allocative\ themselves. Additionally, the module includes fixes for empty enums and updates license headers to a dual MIT/Apache-2.0 model.

_allocative/allocative/src/test\derive · high confidence

Expanded standard library type support and improved memory accounting

The allocative library now supports a broader range of standard library types, including \ManuallyDrop\, \TypeId\, \IpAddr\, \ThreadId\, \VecDeque\, \i128\, \u128\, \NonZeroI128\, \NonZeroU128\, and the standard library equivalents of lazy cells (\LazyCell\, \LazyLock\) and once-cells (\OnceCell\, \OnceLock\). Additionally, \Arc\ and \Rc\ implementations have been corrected to properly handle fat pointers and use accurate layout calculations for inner data. Memory accounting for \HashMap\ and \HashSet\ has also been improved to explicitly track capacity and unused capacity, providing more precise profiling data.

allocative/allocative/src/impls/std · high confidence

File tailer now runs on the Tokio runtime with background error logging

The file tailing mechanism in the client context has been refactored to run the polling loop on the Tokio async runtime instead of a dedicated OS thread. This change improves resource efficiency by avoiding the creation of separate threads for tailing stdout and stderr. Additionally, if the tailing loop encounters an error while reading the file, it is now logged as a warning rather than causing a silent failure or panic, providing better visibility into file access issues for the user.

_app/buck2\_client\_ctx/src/file\tailers · high confidence

Forkserver protocol updates: new RPC, cgroup/network fields, and execution stats

The forkserver gRPC API and protobuf definitions have been extended to support new operational capabilities. A new \SetLogFilter\ RPC allows clients to update the daemon's logging configuration at runtime. The \CommandRequest\ message now includes fields for optional stdout/stderr file redirection, configurable graceful shutdown timeouts, cgroup assignment, and network access policies. Additionally, the protocol supports reporting CPU instruction counts and other execution stats via \CollectedExecutionStats\ in exit events, and introduces \SpawnFailedEvent\ to report command spawn failures. The build system has also been migrated from the legacy \TARGETS\ file to a \BUCK\ file, updating the protobuf generation to use \extern\_path\ for \buck.data\ types and making the protoc setup function unsafe.

_app/buck2\_forkserver\proto · high confidence

Forkserver restructured with cgroup support and improved error handling

The forkserver has been restructured to support cgroup-based resource control, allowing actions to be run within isolated cgroup sessions. It now supports network isolation via a new \network\_access\ configuration option, enabling users to restrict network access for specific actions. The forkserver also introduces miniperf integration for memory tracking and performance monitoring on Linux. Error handling has been improved with the migration from \anyhow\ to \buck2\_error\, providing more structured error reporting. The forkserver now supports socket file communication in addition to file descriptors, and includes graceful shutdown capabilities. Additionally, it exposes the forkserver PID in status and supports log filter propagation from the main buck2 process.

_app/buck2\forkserver · high confidence

Fuzzy dice fuzzer adopts new Dice API and improves test reliability

The fuzzy dice fuzzer has been updated to use the new Dice computation APIs, switching from \DiceComputations\ to \DiceTransactionUpdater\ for setting equations and adopting \compute\_many\ for batch evaluations. This change introduces cancellation support via \CancellationContext\ and models DICE key equality behavior explicitly. Additionally, the fuzzer now runs with a larger worker stack size (16 MiB) to prevent stack overflows on deep computation graphs, captures execution results more robustly by catching panics, and writes failing test cases to disk for easier replay and debugging.

_dice/fuzzy\dice · high confidence

Host sharing now supports percentage-based resource weights and multi-token requirements

The host\_sharing library has been updated to allow tests to specify resource requirements as a percentage of available machine permits, in addition to the existing fixed-permit model. This is implemented via a new WeightPercentage type and a corresponding WeightClass::Percentage variant, which calculates the required permits dynamically based on the machine's total capacity. The HostSharingRequirements enum now includes a OnePerTokens variant that accepts a sorted list of tokens, enabling more granular sharing policies. Internally, the broker's semaphore management has been refactored to use a shared Arc\<NamedSemaphores\> instance across broker instances, and the named semaphore lookup logic has been optimized to reduce allocations on the hot path. The library also exposes new traits (Allocative, Pagable, Display) for better integration with memory tracking and debugging.

_host\sharing · high confidence

Improved action error classification distinguishes infrastructure failures from user errors

Buck2 now automatically categorizes failed action commands as infrastructure (environment) errors rather than generic user errors when the command's stderr indicates a failure in shared infrastructure. The new \infra\_error\_handler\ module scans stderr for specific patterns—such as "transport endpoint is not connected," "out of memory," "input/output error," and "dotslash error:"—and tags them with specific \ErrorTag\ values (e.g., \ActionCommandInfraFailure\, \ActionOom\, \IoNotConnected\, \DotslashError\). This allows users to better distinguish between build environment issues and mistakes in their own rules or inputs. The error handling logic is consolidated into the \actions/errors\ module, introducing \ActionError\ and \ExecuteError\ types that structure these diagnostics for both internal processing and Starlark \error\_handler\ contexts.

_app/buck2\_build\api/src/actions/errors · high confidence

Increased HTTP/2 flow-control window to prevent connection drops during message bursts

Buck2's internal gRPC connections (client-to-daemon, daemon-to-forkserver, and daemon-to-test-executor) now use a 64 MiB HTTP/2 connection-level flow-control window, up from the previous defaults (1–5 MiB). This change prevents connections from being closed with an \ENHANCE\_YOUR\_CALM\ error when trusted local peers exchange bursts of small messages (such as process exit events or per-test results) and the receiver temporarily falls behind. The \buck2\_grpc\ library also migrates its error handling from \anyhow\ to the internal \buck2\_error\ crate and updates its dependencies to \hyper\ 1.x and \tonic\ 0.14, ensuring compatibility with the new flow-control settings and modernizing the underlying transport stack.

_app/buck2\grpc · high confidence

Interactive Common Test shell with configurable preamble and new commands

The test shell now supports a configurable preamble via the \test\_cli\_lib\ application environment, allowing users to inject custom initialization code before the shell starts. The \test\ module exposes new public functions: \test:logs/0\ to print log files of currently running suites, and \test:run/1\ which accepts atoms (in addition to strings and integers) as test identifiers. The shell also improves unicode support for test listing and ensures correct \emu\_args\ are passed to the test node.

_prelude/erlang/common\_test/test\_cli\lib · high confidence

Introduce dedicated Starlark server command crate

The \buck2\_cmd\_starlark\_server\ crate has been introduced to host the server-side implementation for Starlark language services. This new module provides the command infrastructure and execution logic for the lint and typecheck subcommands, replacing the previous \buck2\_starlark\_server\ location. It implements the \StarlarkServerSubcommand\ trait to handle requests, managing file resolution, caching, and error reporting for linting and type-checking operations within the server context.

_app/buck2\_cmd\_starlark\server/src · high confidence

Introduce per-package string interning and new attribute coercion infrastructure

The build interpreter now uses a per-package interner for strings and attribute values to reduce memory usage and improve allocation efficiency. This change adds a new \ArcStrInterner\ and a generic \AttrCoercionInterner\ to deduplicate strings and other attribute data during the coercion phase. Additionally, it introduces coercion implementations for new or updated attribute types, including \metadata\, \target\_modifiers\, \transition\_dep\, and \within\_view\, ensuring these attributes are correctly processed and validated during build file evaluation.

_app/buck2\_interpreter\_for\build · high confidence

Introduce structured DaemonId and refined event dispatching

Buck2 now uses a dedicated \DaemonId\ type (a UUID-backed struct) to uniquely identify the daemon instance, replacing the previous raw \DAEMON\_UUID\ string handling. This ID is integrated into the \EventDispatcher\, which now carries the daemon ID alongside the trace ID and soft-error context for all emitted events. The event system also adds support for streaming stdout output via \streaming\_output\ and allows commands to emit \PartialResult\ events, enabling more granular progress reporting during long-running operations.

_app/buck2\events/src · high confidence

Introduce structured error categorization and tagging system

Buck2 replaces its previous error handling with a new \buck2\_error\ system that classifies errors into three tiers: Input (user errors), Environment (host or resource issues), and Tier0 (infrastructure bugs). This change introduces a comprehensive tagging system (\ErrorTag\) that allows errors to be categorized by source area (e.g., Eden, Watchman, RE) and specific cause, enabling better telemetry and issue tracking. The new system also supports structured source locations, typed context values, and seamless conversion from standard Rust errors and Starlark errors, ensuring that error messages remain user-friendly while providing rich metadata for debugging.

_app/buck2\error/src · high confidence

Introduction of the buck2\_cmd\_starlark\_server build target

A new build target, buck2\_cmd\_starlark\_server, has been added to the Buck2 codebase. This target defines a Rust library that aggregates source files from the app/buck2\_cmd\_starlark\_server directory and links against core Buck2 components such as the Starlark interpreter, file system abstraction (buck2\_fs), and client context libraries. This change establishes the build structure for the Starlark server command, replacing the previous buck2\_starlark\_server location.

_app/buck2\_cmd\_starlark\server · high confidence

Legacy configuration system refactored into modular components

The legacy configuration handling in \buck2\_common\ has been reorganized into a structured module (\legacy\_configs\) with dedicated files for distinct responsibilities. This change introduces a new \AgentContextSchema\ to parse and enforce \\[agent\_context\]\ field definitions from buckconfig, and a \CellsAggregator\ to consolidate cell definitions and aliases into a \CellResolver\. Configuration access is now mediated through a \LegacyBuckConfigView\ trait, and command-line config arguments are resolved into \ResolvedLegacyConfigArg\ types (flags and files) before being passed to the daemon. Additionally, configuration data is now integrated with the DICE system via \OpaqueLegacyBuckConfigOnDice\ and associated traits, allowing config values to be queried as DICE dependencies.

_app/buck2\_common/src/legacy\configs · high confidence

Linux daemon unsandboxing now requires a setuid wrapper with a minimum release version

On Linux, the Buck daemon connection logic now checks whether the system wrapper at \/usr/local/bin/buck\ is setuid and reports a release date of at least \20260630-090501\ before using it to start the daemon unsandboxed. If the wrapper is missing, not setuid, or too old, the daemon starts normally without unsandboxing. This change also restricts the unsandboxed wrapper usage to processes running under a specific identity (checked via \agent\_identity\_from\_env\) and requires the daemon executable to be named \buck2\ or \buck2-daemon\.

_app/buck2\_client\ctx/src/daemon/client/connect · high confidence

Major overhaul of Buck2 client commands and CLI structure

The \buck2\_client/src/commands\ module has been significantly refactored to modernize the CLI framework and improve error handling. The command-line argument parser has been upgraded from Clap 3 to Clap 4, introducing new common option structs (e.g., \CommonCommandOptions\, \CommonBuildConfigurationOptions\) that are flattened into individual commands like \build\, \clean\, and \bxl\. Error handling has been standardized by migrating from \anyhow\ to the custom \buck2\_error\ crate, utilizing \ExitResult\ and \ErrorReport\ for consistent categorization and reporting. Several new commands and flags have been added or modified, including \cleanall\, \ctargets\, \expand-external-cell\, and \explain\, alongside updates to \init\ (such as \--git\ support) and \clean\ (including \--background\ and adaptive stale-cleaning options).

_app/buck2\client/src/commands · high confidence

Migrate attribute resolution to buck2\_analysis with improved error handling and query support

The attribute resolution logic has been moved from buck2\_build\_api to the new app/buck2\_analysis/src/attrs location, introducing a dedicated AttrResolutionContext for resolving configured attributes. This change replaces the previous anyhow-based error handling with the new buck2\_error framework, providing more specific and helpful error messages for users during attribute validation. The migration also adds support for query macros (like $(query\_outputs ...)) and improves how dependencies are resolved, including better handling of execution platform resolution for exec\_deps. Additionally, the change introduces new attribute types like target\_modifiers and plugin\_dep, while removing the use of SourcePath in favor of the newer PackageRelativePath-based approach.

_app/buck2\analysis/src/attrs · high confidence

Migrate buck2\_client\_ctx build configuration and dependencies

The build file for the buck2\_client\_ctx module has been renamed from TARGETS to BUCK, and the oncall team has been updated from buck2 to build\_infra. The dependency management has shifted from explicit OS-specific lists to an autocargo-based configuration, replacing the fs2 crate with std file locking for daemon lifecycle locks and updating the Windows dependency from winapi to windows-sys. Additionally, the module now depends on the new buck2\_error crate for typed component errors, incorporates the detect\_eden crate for Eden mount checks, and adds several new dependencies including jiff for time formatting, console and crossterm for UI interactions, and various utility crates like strum and sysinfo.

_app/buck2\_client\_ctx, app/buck2\core · high confidence

Migrate error handling and license headers in Buck2 Downward API Proto

The Buck2 Downward API Proto library now uses the internal \buck2\_error\ crate for error handling instead of \anyhow\, requiring explicit error tags (e.g., \Tier0\, \Input\) for generated errors and replacing \anyhow::bail!\ with \buck2\_error!\. Additionally, the crate's license headers have been updated to reflect a dual-licensing model (MIT or Apache 2.0), and the \TryInto\ implementations for \proto::Event\ and \proto::LogLevel\ now return \buck2\_error::Error\ instead of \anyhow::Error\.

_app/buck2\_downward\_api\proto/src · high confidence

New buck2\_analysis crate structure and initialization

The buck2\_analysis crate has been reorganized with a new directory structure, introducing dedicated modules for analysis (calculation, env, plugins) and attribute resolution (attrs/resolve). A new lib.rs file initializes late bindings for configured attribute resolution and rule analysis calculation, establishing the core entry point for the analysis subsystem.

_app/buck2\analysis/src · high confidence

New build-intent advice system and refactored --out handling

The build command now includes a configurable advice system that can warn or block builds based on agent context and build intent settings, providing users with early feedback or requiring explicit acknowledgment via \--agent-context advice\_ack\. Additionally, the \--out\ logic has been extracted into its own module and refined to better handle symlink preservation and directory creation, ensuring more robust output copying behavior.

_app/buck2\client/src/commands/build · high confidence

New common CLI options and console configuration modules

This change introduces new shared command-line option structures and console management logic in the \buck2\_client\_ctx::common\ module. Users gain access to granular build report controls via the \--build-report-options\ flag (supporting \fill-out-failures\, \package-project-relative-paths\, \include-artifact-hash-information\, \exclude-action-error-diagnostics\, and \truncate-error-content\), as well as new \--streaming-build-report\ and \--overall-timeout\ options. Target configuration is now handled by dedicated \TargetCfgOptions\ and \TargetCfgWithUniverseOptions\ structs, exposing \--target-platforms\, \--modifier\ (shorthand \-m\), and \--target-universe\ (shorthand \-u\). Additionally, console behavior is standardized through \CommonConsoleOptions\ and the \ConsoleType\ enum, allowing users to explicitly select between \auto\, \simple\, \super\, or \none\ via the \--console\ flag or the \BUCK\_CONSOLE\ environment variable.

_app/buck2\_client\ctx/src/common · high confidence

New execution platform resolution and remote executor configuration

Buck2 now introduces a dedicated execution platform resolution system that distinguishes between user-defined platforms and legacy global execution platforms, providing clearer error messages when no compatible platform is found. The remote executor configuration has been significantly extended to support gang scheduling with locality constraints (region, datacenter, rack), persistent workers, custom container images, and revision interpolation for remote dependencies. Additionally, local executor options now default to using persistent workers, and the system supports passing resource units and priority settings for remote executions.

_app/buck2\_core/src/execution\types · high confidence

New lazy directory builder and exhaustiveness-aware deduplication

The directory module introduces a \LazyDirectoryBuilder\ that batches and sorts directory merges (largest first) and insertions before finalizing, improving performance for complex merge operations. It also adds an \ExhaustivenessHash\ to track whether a directory is a complete or partial listing, which is used by the new \DashMapDirectoryInterner\ to deduplicate shared directories based on both their content fingerprint and their exhaustiveness marking, ensuring correct materialization behavior.

_app/buck2\directory/src/directory · high confidence

Package listing now uses DICE for caching and sorted data structures

The package listing system in buck2\_common has been refactored to integrate with the DICE caching layer, meaning package metadata is now computed, cached, and retrieved via DICE keys rather than direct interpreter calls. This change improves performance and consistency by leveraging DICE's evaluation data tracking (including time spans and spans) and equality behavior. Additionally, the underlying data structures for files, directories, and subpackages have been migrated to sorted collections (SortedSet and SortedVec) to enable efficient prefix matching and binary search operations, and the resolver interface has been standardized to work with these new DICE-backed and sorted implementations.

_app/buck2\_common/src/package\listing · high confidence

Profile output now includes target patterns and uses a unified profile mode

The buck2 profile module now writes a targets.txt file to the output directory listing the specific targets being profiled, and the profile data is always written to a directory rather than a single file. The profiler configuration has been refactored to use a unified ProfileMode enum (replacing the previous Profiler enum) and supports multiple target patterns for loading and analysis profiles. Error handling has migrated from anyhow to the buck2\_error system, requiring explicit error tags for input-related errors.

_app/buck2\profile · high confidence

Provider flavor mapping and serialization improvements

The provider framework in \buck2\_core\ has been updated to improve performance and expand flavor support. The \map\_flavors\ function now logs a soft error when a platform flavor is encountered in a target, ensuring users are aware of ignored platform-specific configurations. New flavor mappings have been added, including \generate\_voltron\_string\_resources\, \dummy\_r\_dot\_java\, \nullsafex-json\, \class-abi\, \source-abi\, \source-only-abi\, and \compilation-database\. Internally, provider names and labels now use \triomphe::Arc\ and \ArcSlice\ for reduced memory usage, and types like \ProviderId\ and \ProviderName\ now implement \StrongHash\ and \Pagable\ traits to support efficient serialization and hashing.

_app/buck2\core/src/provider · high confidence

Provider framework refactored with new callable, collection, and dependency types

The provider system in the build API has been restructured to improve type safety and documentation. The \ProviderCollection\ now uses a new \CollectionKey\ wrapper for provider IDs to support pagable serialization, and the \Dependency\ type now explicitly wraps the provider collection and execution platform resolution, exposing \.label\ and provider access via \\[\]\ and \.get()\. User-defined providers are now constructed via a new \UserProviderCallable\ that enforces field type checking and supports custom method documentation. Additionally, new built-in providers have been added, including \ValidationInfo\, \DepOnlyIncompatibleInfo\, \InternalRunnerTestInfo\ for in-process test execution, and several worker-related providers (\WorkerInfo\, \WorkerRunInfo\, \LocalResourceInfo\).

_app/buck2\_build\_api/src/interpreter/rule\defs/provider · high confidence

Query commands moved to dedicated server module with partial-graph support

The \aquery\, \cquery\, and \uquery\ server command implementations have been extracted from the general \buck2\_server\_commands\ crate into a dedicated \app/buck2\_cmd\_query\_server/src/query\ module. This change introduces a new \QueryCommandTarget\ trait to standardize how different target types (actions, configured targets, and unconfigured targets) are serialized and displayed in query results. Additionally, the \uquery\ command now supports the \--allow-partial-graph\ flag, enabling queries to proceed even when the build graph is incomplete.

_app/buck2\_cmd\_query\server/src/query · high confidence

Query commands now support HTML, Starlark, and compact Dot output formats

The \buck2 query\, \aquery\, \cquery\, and \uquery\ commands now accept an \--output-format\ flag that allows users to select the result presentation style. In addition to the existing default list, JSON, and Graphviz Dot formats, users can now choose \html\ to generate an interactive target graph, \starlark\ to print targets as Starlark code, and \dot\_compact\ for a more condensed Graphviz representation. This change also introduces \--profile-mode\ and \--profile-output\ options for \cquery\ to enable Starlark profiling, and adds an \--allow-partial-graph\ flag to \uquery\ to gracefully handle missing nodes in open-ended graph traversals.

_app/buck2\client/src/commands/query · high confidence

Query functions now expose argument names and use explicit struct definitions

The buck2\_query\_derive macro now generates an \arg\_name\ method for query functions, allowing users to retrieve the name of an argument by its index. This is supported by refactoring the code generation to explicitly define the query function struct and its trait implementations (\QueryFunction\ and \QueryBinaryOp\) rather than embedding them in inline quotes. Additionally, the macro now requires \async\_trait\ to be in scope for the generated code and removes the dependency on the \gazebo\_lint\ plugin.

_app/buck2\_query\derive · high confidence

Refactor action execution infrastructure and introduce local dep-file caching

The action execution layer in buck2\_build\_api has been restructured to support new caching and execution modes. A new local dep-file cache mechanism has been added, allowing actions to skip execution when their dependency files are found in the local cache, which is reported via the new LocalDepFile execution kind. The system now supports content-based output paths, enabling unique scratch paths and improved cache key generation for remote execution. Additionally, the action executor now integrates with a new CacheUpload trait to handle action result uploads to the CAS, and exposes detailed execution metadata including timing, input file bytes, and dep-file cache write statistics.

_app/buck2\_build\api/src/actions/execute · high confidence

Refactor artifact materialization and filesystem resolution

The artifact materialization logic in the build API has been restructured to improve modularity and tracking. A new \GetArtifactFs\ trait and \ArtifactFsKey\ have been introduced to resolve the artifact filesystem via the Dice computation graph, ensuring consistent access to cell and path resolvers. The \ArtifactMaterializer\ trait is now implemented for \DiceComputations\ and \DiceComputationsData\, centralizing the logic for materializing final outputs. This change also integrates build signals to record detailed timing data (user, total, and queue durations) for final materialization steps, providing better visibility into the critical path performance of build outputs.

_app/buck2\_build\api/src/actions/artifact · high confidence

Refactor build API test infrastructure and update test assertions

The test suite for build API attributes has been reorganized, moving test files to a dedicated \buck2\_build\_api\_tests\ crate and updating imports to reflect internal module renames (e.g., \CommandLineFormatter\ to \CommandLineBuilder\, \BuckHashMap\ to \BuckMutMap\). Tests now use \GlobalsBuilder::standard\ with explicit \register\_select\ instead of the extended builder, and employ \Module::with\_temp\_heap\ for heap management. Additionally, assertion logic has been updated to use \as\_display\_no\_ctx()\ for string comparisons and \require\_compatible()\ for configuration steps, ensuring tests align with the new attribute resolution and display behavior.

_app/buck2\_build\_api\tests/src/attrs · high confidence

Refactor critical path calculation to use TimeSpan and expose detailed waiting data

The critical path calculation now uses TimeSpan for total duration tracking instead of raw Duration, allowing for more precise time boundary handling. Additionally, the system now exposes detailed waiting data categorized by specific phases (such as PreparingAction, CheckingCaches, MaterializingInputs, and LocalQueued) to provide better visibility into non-critical path time spent during build execution. This change also introduces stricter error handling for critical path computation failures, treating them as hard errors rather than panics, and ensures all nodes appear in the logged critical path for comprehensive performance insights.

_app/buck2\_build\signals/src · high confidence

Refactor deferred key system to support dynamic lambda results and deterministic serialization

The deferred key system in buck2\_core has been restructured to support dynamic lambda results and improve serialization stability. A new \DeferredHolderKey\ enum now wraps either a \BaseDeferredKey\ or a \DynamicLambdaResultsKey\, enabling the build system to track and resolve outputs from dynamically generated actions. The \BaseDeferredKey\ enum was expanded to include a \BxlLabel\ variant, allowing differentiation between BXL (Buck eXecution Language) and BZL (Bazel eXecution Language) contexts. Additionally, the \Ord\ implementation for \BaseDeferredKey\ now uses strong hashing for anonymous targets to ensure deterministic ordering during page-out serialization, which is critical for reproducible builds.

_app/buck2\core/src/deferred · high confidence

Refactor dynamic lambda result and parameter storage mechanisms

The dynamic lambda subsystem in the build API has been restructured to improve memory management and lifetime safety. The previous deferred framework for handling dynamic lambda inputs and results has been removed and replaced with a new, reference-based approach using \DynamicLambdaResult\ and dedicated storage traits (\DynamicLambdaParamsStorage\, \FrozenDynamicLambdaParamsStorage\). This change introduces new late-binding interfaces for calculating dynamic lambda results and managing the serialization/deserialization of lambda parameters, ensuring that values are handled with stricter lifetime branding and without the overhead of the old deferred system.

_app/buck2\_build\api/src/dynamic · high confidence

Refactor file ignore logic to support per-cell configuration and serialization

The file ignore handling in \buck2\_common\ has been restructured to support cell-specific ignore patterns and improved error reporting. The \IgnoreSet\ now supports serialization via the \Pagable\ trait, allowing ignore configurations to be cached and reused across dice computations. A new \CellFileIgnores\ component checks paths against both user-defined patterns (from the \project.ignore\ buckconfig key) and nested cell boundaries, providing detailed reasons for why a file is ignored. The default behavior for root cells continues to ignore the \buck-out\ directory, and the system now distinguishes between patterns matched by glob syntax versus literal directory names for more accurate error messages.

_app/buck2\common/src/ignores · high confidence

Refactor filesystem path resolution and error handling

The filesystem module has been restructured to improve path resolution and error handling. \ProjectRelativePath\ and \ProjectRelativePathBuf\ have been moved to their own module and now wrap \ForwardRelativePath\ directly, while \ProjectRoot::new\ now validates that the provided root is canonical. The \async\_fs\_util\ and \fs\_util\ modules have been removed in favor of the \buck2\_fs\ crate, and \ProjectRootTemp::new\ now uses \fs\_util::canonicalize\ to ensure a valid temporary directory. A new \ArtifactFs\ struct has been introduced to centralize the resolution of build artifacts, cell paths, and source paths, while \BuildArtifactPath\ and \BuckOutScratchPath\ now support content-based path hashing via the \BuckOutPathKind\ enum.

_app/buck2\core/src/fs · high confidence

Refactor of the internal path type system in buck2\_core

The \app/buck2\_core/src/fs/paths\ module has been restructured, removing the previous \abs\_path.rs\, \cmp\_impls.rs\, and \mod.rs\ files. This change consolidates and refactors the internal path types (such as \AbsPath\, \AbsPathBuf\, \ForwardRelativePath\, and \AbsNormPath\) and their comparison implementations. For users, this represents an internal architectural cleanup of how absolute and relative paths are handled within the core filesystem abstraction, likely improving type safety and reducing dependency on \anyhow\ for path validation errors, without changing the external build interface.

_app/buck2\core/src/fs/paths · medium confidence

Refactor output printing and command structure in buck2\_client

The buck2\_client module has been reorganized to improve code structure and output handling. A new \print.rs\ module centralizes the logic for formatting command outputs into plain, simple, or JSON formats, including specific handling for Windows path separators. The command definitions have been modularized into individual submodules under \commands.rs\, introducing support for new operations such as \cleanall\ and \expand-external-cell\. Additionally, the client library has migrated its error handling from \anyhow\ to the \buck2\_error\ crate and removed deprecated Rust unstable features like \box\_syntax\.

_app/buck2\client/src · high confidence

Refactor package path types and introduce SourcePath

The package module has been restructured to improve type safety and serialization capabilities. A new \SourcePath\ struct has been added to represent the path of a source artifact, combining a \PackageLabel\ and a \PackageRelativePath\. The \PackageRelativePath\ type now supports serialization (via \Serialize\/\Deserialize\) and pagable storage, and implements \AsRef\<str\>\ for easier string conversion. Additionally, the internal \Package\ struct's underlying data representation has been refactored, including the removal of the \PackageExt\ extension trait and the migration of hashing logic to use \strong\_hash\ for deterministic hashing across runs.

_app/buck2\core/src/package · high confidence

Refactor starlark\_map into a dedicated crate with optimized map implementations

The \starlark\_map\ module has been reorganized into a standalone crate, consolidating map and set data structures (\SmallMap\, \SmallSet\, \UnorderedMap\, \SortedMap\, etc.) and introducing a platform-independent \Fx64Hasher\ to ensure deterministic hashing across architectures. This change includes performance optimizations such as insertion sort for small maps, SIMD-accelerated lookups in \VecMap\, and the removal of the \Default\ dependency in favor of the \equivalent\ crate, while maintaining serialization and pagable support for these core types.

_starlark-rust/starlark\map · high confidence

Refactored action execution and artifact management internals

The action execution engine in \buck2\_build\_api\ has been restructured to improve memory efficiency and error handling. Key changes include migrating action calculations to use reference-based APIs to reduce future sizes, introducing a \BoxSliceSet\ for unique boxed slice storage, and consolidating error handling under a new \errors\ module with dedicated handlers for action and execution errors. The \ActionsRegistry\ now manages artifact declarations and output path conflicts more robustly, while the \ActionCalculation\ logic has been updated to track execution metrics, handle cancellation contexts explicitly, and support content-based path hashing for artifacts.

_app/buck2\_build\api/src/actions · high confidence

Refactored analysis registry to use extra\_value and new dynamic promise APIs

The analysis subsystem in buck2\_build\_api has been restructured to replace module globals with \extra\_value\ for storing dynamic outputs and error handlers, introducing new traits like \AnonPromisesDyn\ and \AnonTargetsRegistryDyn\ to manage anonymous targets and their associated promises. The \AnalysisRegistry\ now leverages these new dynamic storage mechanisms and integrates with the updated \AnalysisValueStorage\ to handle artifact declarations and action registrations more efficiently, while also supporting content-based path hashing for outputs.

_app/buck2\_build\api/src/analysis · high confidence

Refactored attribute resolution testing infrastructure

The testing utilities for attribute resolution have been moved from the \buck2\_build\_api\ crate to the new \buck2\_build\_api\_tests\ crate. This change updates the test context to use \GlobalsBuilder::standard\ instead of \extended\, integrates \ExecutionPlatformResolution\ into the resolution context, and modernizes the codebase by replacing \SharedResult\ with \BuckErrorOptionContext\ and updating provider collection handling to use \ProviderIdSet\ and \FrozenValueTyped\.

_app/buck2\_build\_api\tests/src/attrs/resolve · high confidence

Refactored cell model with new path and alias types

The cell system has been restructured to improve type safety and serialization. Cell names are now interned for efficiency, and cell aliases are strictly validated to prevent empty strings. Path handling has been updated with new types like CellPathRef and CellPathWithAllowedRelativeDir to better manage relative imports and directory traversal. Additionally, support for external cells has been expanded to include Git-backed origins with explicit object format validation (SHA1/SHA256), and nested cells are now explicitly tracked to prevent cross-cell boundary violations.

_app/buck2\core/src/cells · high confidence

Refactored command-line argument construction and formatting

The \cmd\_args\ module has been restructured to improve type safety and performance. A new \CommandLineBuilder\ and \CommandLineSink\ architecture replaces the previous formatter, enabling more efficient command-line assembly. The system now supports content-based path resolution for artifacts, allowing paths to be resolved using content hashes where appropriate. Shell quoting is now handled by an internal \shlex\_quote\ implementation to ensure consistent behavior across platforms. Additionally, the \replace\_regex\ option now accepts \StarlarkBuckRegex\ objects alongside strings, and a distributed slice mechanism (\COMMAND\_LINE\_ARG\_LIKE\_IMPLS\) allows external types to register as valid command-line arguments.

_app/buck2\_build\_api/src/interpreter/rule\_defs/cmd\args · high confidence

Refactored command-line argument formatting and testing infrastructure

The command-line argument system has been refactored to use a new \CommandLineBuilder\ instead of the previous \CommandLineFormatter\, introducing a structured approach to building and formatting command lines. This change includes the addition of declarative options such as \absolute\_prefix\, \absolute\_suffix\, \relative\_to\, \parent\, \hidden\, and \replace\_regex\ to the \cmd\_args\ API, allowing for more precise control over how artifacts and strings are rendered in final commands. The testing infrastructure has been significantly updated to support these new features, with comprehensive tests covering input/output handling, nested argument layers, and error conditions for invalid parameters.

_app/buck2\_build\_api\_tests/src/interpreter/rule\_defs/cmd\args · high confidence

Refactored daemon kill logic and connection error handling

The daemon client's kill functionality has been extracted into a dedicated module with explicit timeout constants for graceful and forceful shutdowns, improving reliability when terminating unresponsive daemons. Additionally, connection error handling has been enhanced to distinguish between transport errors, timeouts, and missing daemon processes, providing clearer diagnostics to users when the daemon cannot be reached or killed.

_app/buck2\_client\ctx/src/daemon/client · high confidence

Refactored deferred calculation logic to use borrowing views and late binding

The deferred calculation module has been restructured to improve performance and reduce memory overhead. The new \calculation.rs\ implementation introduces \DeferredHolder\ and \OwnedDeferredHolder\ enums, which provide borrowing and owned views of analysis, BXL, and dynamic lambda results respectively, allowing hot lookup paths to avoid cloning data. Additionally, the module utilizes \LateBinding\ for \EVAL\_ANON\_TARGET\ and \GET\_PROMISED\_ARTIFACT\ to resolve function pointers at runtime, and refactors the \lookup\_deferred\_holder\ function to work with \DeferredHolderKey\ and \BaseDeferredKey\ types, streamlining how deferred values are retrieved and resolved within the dice computation graph.

_app/buck2\_build\api/src/deferred · high confidence

Refactored event sink architecture with explicit filtering and truncation

The event sink implementation in \app/buck2\_events/src/sink\ has been restructured to improve reliability and reduce data volume. New sink types (\ChannelEventSink\, \NullEventSink\, \ErrorOnEventSink\, \TeeSink\) provide clearer control over event dispatching, including a sentinel sink that logs a soft error if events are sent without a proper dispatcher. The remote Scribe sink now explicitly filters events by default (defaulting to false) and applies smart truncation to large payloads—such as action execution stderr, test names, and invocation record CLI arguments—to prevent oversized messages. Additionally, cache hit events are stripped of unnecessary metadata, and specific action events are suppressed if they are not cost-effective to send.

_app/buck2\events/src/sink · high confidence

Refactored provider type system to support supertypes and precise callable typing

The provider type definitions in the Buck2 build API have been restructured to improve type safety and flexibility. The new \AbstractProvider\ type now serves as a base for all provider instances, allowing specific provider types to declare supertypes for better inheritance and matching. Additionally, a new \ty\_provider\_callable\ function enables more precise typing for provider creation functions, ensuring that callable providers are handled with stricter type constraints during interpretation.

_app/buck2\_build\_api/src/interpreter/rule\defs/provider/ty · high confidence

Refactored target label types and validation logic in buck2\_core

The target module in buck2\core has been restructured to improve type safety and performance. Target labels are now split into distinct \TargetLabel\ (unconfigured) and \ConfiguredTargetLabel\ types, with the latter explicitly storing configuration data and supporting efficient hashing and serialization. Target names now use \ThinArcStr\ for reduced allocation overhead and include stricter validation, such as prohibiting \...\ in names and issuing soft errors for special characters like commas and dollar signs. A new \TargetNameGlob\ type allows pattern matching for target names using \\\ wildcards. Additionally, a \TargetConfiguredTargetLabel\ wrapper was introduced to handle toolchain targets that require configuration without an execution platform.

_app/buck2\core/src/target · high confidence

Refactors Buck2 protobuf build rules and updates licensing

The build configuration for the Buck2 downward API protobuf library has been refactored to use explicit \proto\_srcs\ instead of globbing, and the oncall team has been updated from \buck2\ to \build\_infra\. Additionally, the \build.rs\ script now supports passing include paths via the \BUCK\_PROTO\_SRCS\ environment variable and calls \setup\_protoc\ as an unsafe operation, while license headers across the files have been updated to reflect the dual MIT/Apache 2.0 licensing model.

_app/buck2\_downward\_api\proto · high confidence

Remote execution client rewritten with connection pooling, TLS, and network statistics

The OSS remote execution gRPC client has been significantly refactored to improve reliability and observability. It now uses a connection pool (pool.rs) to manage gRPC channels, supporting configurable TLS (including CA certificates and client identities) and gRPC keepalive settings. The client now tracks global network upload/download statistics (stats.rs) and exposes local cache lookup metrics (TLocalCacheStats) in responses. Error handling has been standardized to use TStatus with categorized reason groups (TCodeReasonGroup) instead of the previous REError, and metadata structures have been updated to include Buck build info, client context, and gang execution specifications while removing deprecated host resource requirements.

_remote\_execution/oss/re\grpc · high confidence

Remote execution client updated to modern gRPC stack with Serde support and new proto definitions

The remote execution client has been rebuilt on a modern Rust stack, migrating from the legacy \slog\ logging to \tracing\ and upgrading core dependencies including \hyper\ to 1.x, \tonic\ to 0.14, and \prost\ to 0.13. This update enables native Serde serialization and deserialization for generated protobuf messages, allowing them to be easily converted to and from JSON or other formats. Additionally, the client now incorporates the latest Bazel Remote Execution and Google API proto definitions (updated to September 2025), which include support for digest-function-aware resource names, bytestream compression, and the new \SplitBlob\ capability for efficient large blob handling.

_remote\execution · high confidence

Renamed buck2\_protoc\_dev to buck2\_build\_info and updated ownership

The buck2 build target has been renamed from buck2\_protoc\_dev to buck2\_build\_info, and its oncall team has been moved from buck2 to build\_infra. The target now depends on buck2\_util instead of tonic-build, and the glob macro has been removed in favor of direct source file inclusion.

_app/buck2\_build\info · high confidence

Restructured rule definition modules and introduced new Starlark types

The rule definition codebase has been reorganized into dedicated modules for artifacts, command-line arguments, and context handling. This change introduces new Starlark types including \CommandExecutorConfig\ for configuring remote and local execution policies, \DigestConfig\ for inspecting hash capabilities, \AnalysisPlugins\ for accessing rule plugins, and \RequiredTestLocalResource\ for specifying test resource requirements. Additionally, the \AnalysisActions\ interface has been updated to support promise resolution and anonymous target tracking, while \ResolvedMacro\ and \ResolvedQueryMacro\ types now handle location and query macro expansion with improved artifact visiting.

_app/buck2\_build\_api/src/interpreter/rule\defs · high confidence

Rework builtin provider types with branded lifetimes and stricter validation

The builtin provider definitions in the build API have been refactored to use complex branded lifetimes (e.g., \ValueTyped\, \ValueOfUnchecked\) and stricter type checking. This change introduces new providers such as \DepOnlyIncompatibleInfo\ for custom soft-error categories, \ValidationInfo\ for build validation, and \LocalResourceInfo\ for test local resources. It also updates existing providers like \ConfigurationInfo\ to support \root\_values\, \DefaultInfo\ to expose field types and support sub-targets, and \ExternalRunnerTestInfo\ to include worker configuration and local resource requirements. Additionally, \ExecutionPlatformRegistrationInfo\ now supports an \exec\_marker\_constraint\ to distinguish execution platforms, and \InstallInfo\ has more precise type constraints for its file mappings.

_app/buck2\_build\_api/src/interpreter/rule\defs/provider/builtin · high confidence

Rework clean-stale command with adaptive policies and new event reporting

The \buck2 clean --stale\ command has been refactored to support adaptive cleanup policies based on disk space and time thresholds, configurable via the \--adaptive-unmaterialize-active\ flag and related buckconfig options. The implementation now uses a dedicated \CleanStaleArtifactsPolicy\ to handle both explicit and configured cleanup strategies, and reports detailed statistics via new \CleanCommandStart\ and \CleanCommandEnd\ events in the invocation record.

_app/buck2\server · high confidence

Reworked buck2\_artifact module structure and license headers

The buck2\_artifact crate has been reorganized to improve modularity and compliance. The module structure now explicitly exposes actions, artifact definitions, and deferred processing capabilities through dedicated submodules (actions, artifact, deferred). License headers across the affected files have been updated to reflect the dual MIT/Apache-2.0 licensing model, allowing users to select their preferred license. Additionally, the deferred.rs module was relocated from buck2\_build\_api to this crate, consolidating related artifact handling logic.

_app/buck2\artifact/src · high confidence

Shell completion now supports flagfile (mode file) targets and fixes target/option handling

The shell completion wrappers for Bash, Zsh, Fish, and PowerShell now provide dynamic completion for flagfiles (mode files) when the current token starts with \@\ or follows \--flagfile\/\--config-file\. Additionally, the wrappers correctly distinguish between subcommands that accept targets (like \build\, \run\, \test\) and those that do not, ensuring that target completions are only offered in the appropriate context and that options are handled properly.

_app/buck2\_cmd\_completion\client/src/completion · high confidence

Standardize build configuration and execution platforms

The build system now centralizes common configuration in a new \common.buckconfig\ file, establishing default execution platforms and defining cell aliases that map internal modules to the \gh\_facebook\_buck2\_shims\_meta\ cell. This change also sets the default Windows compiler identity to match the prelude's MSVC toolchain and configures the target platform detector to resolve platform dependencies for the root and shim cells.

.buckconfig.d · high confidence

Starlark language server restart capability and client stability improvements

The VS Code extension now includes a 'Restart Starlark Language Server' command, allowing users to manually restart the underlying language server without reloading the entire window. This is supported by refactoring the client initialization into a dedicated function and ensuring the client instance is properly managed in the extension's subscription list. Additionally, the extension has updated its dependency on \vscode-languageclient\ to use the \/node\ subpath export, fixed the \starlark/fileContents\ request to correctly stringify URIs, and improved error handling for server start and restart failures.

starlark-rust/vscode/client · high confidence

Starlark syntax crate restructured with new error and diagnostic infrastructure

The starlark\_syntax crate has been reorganized to centralize core syntax components, introducing a new \starlark::Error\ type that unifies error handling with rich diagnostic information. This change moves the call stack, code map, lexer, and diagnostic display logic into the syntax crate, enabling more consistent error reporting across the Starlark implementation. The new error system supports span-based diagnostics, call stack tracing, and improved error categorization, while maintaining backward compatibility with existing error handling patterns.

_starlark-rust/starlark\syntax · high confidence

Structured error conversion for external libraries

The buck2 error system now explicitly converts errors from a wide range of external dependencies—including clap, hyper, rusqlite, tokio, serde\_json, and thrift—into the unified buck2 error type. This change ensures that failures in these libraries are consistently tagged with specific categories (such as Input, Io, or CertExpired), allowing for more precise error reporting and telemetry.

_app/buck2\error/src/conversion · high confidence

Superconsole 0.3.0: API overhaul, new components, and build system migration

Superconsole has been updated to version 0.3.0, introducing a major API overhaul that removes the global \State\ system in favor of passing data directly to components via their fields, and changes the \Component::draw\_unchecked\ signature to return \Lines\ instead of \Vec\<Line\>\ with typed errors. The framework now includes new layout components (\DrawHorizontal\, \DrawVertical\) and a reusable \Spinner\ component for progress indicators. Additionally, the build system has migrated from the legacy \TARGETS\ file to \BUCK\ with \autocargo\ integration, and the \termwiz\ dependency has been replaced by \anstyle-parse\ for ANSI escape handling.

superconsole · high confidence

Superconsole table rendering refactored with new row types and ellipsis truncation

The superconsole's timed list table builder has been refactored to improve how task rows are rendered and truncated. The \Row\ struct is now an enum distinguishing between \TimedRow\, \SummaryRow\, and raw \Line\ entries, allowing for more structured handling of task details and auxiliary information. Truncation logic now uses a dedicated \truncate\_line\_with\_ellipsis\ function that preserves styling when cutting off long labels, replacing the previous inline logic. Additionally, the component's error type has been changed from \anyhow::Error\ to \buck2\_error::Error\, and it now relies on a \Timekeeper\ instance instead of a raw time speed factor for duration calculations.

_app/buck2\_client\_ctx/src/subscribers/superconsole/timed\list · high confidence

Switch to tonic-prost-build and support vendored protoc in Cargo builds

The \buck2\_protoc\_dev\ crate now uses \tonic-prost-build\ instead of \tonic\_build\, updating the internal builder to use \compile\_protos\ and adding a \boxed\ method for path handling. For Cargo builds, the library no longer relies on a local repository \protoc\ binary; instead, it uses the \protoc-bin-vendored\ crate to locate the protoc binary and include paths, with an optional \BUCK2\_BUILD\_PROTOC\ environment variable to override the path (useful for environments like NixOS). The \setup\_protoc\ method is now \unsafe\ and no longer requires a \repo\_root\ argument, reflecting the shift to environment-variable-based configuration and vendored dependencies.

_app/buck2\_protoc\dev · high confidence

Target labels are now immortal and globally interned for canonical identity

Target labels are now stored in a global, immortal interner backed by bump arenas, ensuring that identical labels always share the same memory allocation. This change provides strict pointer-equality for label comparison, which simplifies equality checks and improves performance by eliminating per-label reference counting or copying overhead. The implementation uses a lock-free hash table for concurrent interning and packs label data efficiently to reduce memory usage, while abandoned allocations from race conditions are tracked as slack to maintain accurate memory accounting.

_app/buck2\core/src/target/label · high confidence

Target pattern parsing now supports modifiers via ?modifier syntax

The pattern parser in \app/buck2\_core/src/pattern\ has been refactored to support a new \?modifier\ syntax (e.g., \//pkg:target?mod1+mod2\) for attaching modifiers to target and provider patterns. This change introduces new types like \Modifiers\, \TargetLabelWithModifiers\, and \ProvidersLabelWithModifiers\ to carry these modifiers through the parsing and resolution pipeline. The \PatternType\ trait and its implementations (\TargetPatternExtra\, \ProvidersPatternExtra\) have been updated to handle this extra context, and the parser now distinguishes between target patterns, configured target patterns, and configured provider patterns more explicitly. Additionally, the package pattern matching logic has been moved into a dedicated \package.rs\ module, and the error handling has been migrated from \anyhow\ to the internal \buck2\_error\ system.

_app/buck2\core/src/pattern · high confidence

Test API protocol and data models updated with new fields and error handling

The test API crate refactors its core data structures and protocol traits to support richer test execution metadata and improved error handling. The \ConfiguredTarget\ struct now exposes structured cell, package, and target fields instead of a legacy name, and the \TestStage\ enum replaces \DisplayMetadata\ to include cacheability flags, test variants, and repeat counts for stress runs. The \TestOrchestrator\ trait gains new capabilities: an \unstable\_heap\_dump\ method for debugging, an \attach\_info\_message\ method to surface executor info to users, and an \upload\_to\_cas\ RPC to send local test artifacts to the Content Addressable Storage. Execution requests now require \RequiredLocalResources\ and support disabling test execution caching. Internally, the crate migrates from \anyhow\ to the \buck2\_error\ system for consistent error propagation, switches the environment variable map from \HashMap\ to \SortedVectorMap\, and updates gRPC clients and servers to use \buck2\_grpc\ helpers with increased message size limits.

_app/buck2\_test\api · high confidence

Transitive sets now support configurable traversal orderings

Users can now specify the iteration order when traversing transitive sets and their projections. The \transitive\_set()\ definition and projection methods (such as \project\_as\_args\ and \project\_as\_json\) now accept an \ordering\ parameter, allowing values to be visited in preorder, postorder, topological, breadth-first (BFS), or depth-first (DFS) order. This gives build rules precise control over the sequence in which artifacts or arguments are processed, which is useful for ensuring deterministic command-line construction or respecting dependency hierarchies.

_app/buck2\_build\_api/src/interpreter/rule\_defs/transitive\set · high confidence

Update derive(Allocative) to support custom bounds and fix empty enum handling

The allocative\_derive macro now allows users to specify custom trait bounds via the \bound\ attribute, enabling more flexible generic implementations. Additionally, the generated code for empty enums has been corrected to avoid invalid Rust syntax, and the visitor entry method has been updated to \enter\_self\ for better type safety. The macro also now uses \quote!\ instead of \quote\_spanned!\ for most code generation, simplifying the output, and the global root registration macro now supports an \unsafe\ attribute for safer registration.

_allocative/allocative\derive · high confidence

Update to syn 3 and migrate build configuration

The buck2\_build\_api\_derive crate has been updated to use syn 3, requiring a corresponding upgrade of its proc-macro dependencies. Additionally, the build configuration has been migrated from the old TARGETS file to BUCK, the oncall team has been changed from buck2 to build\_infra, and a dependency on the gazebo library has been added.

_app/buck2\_build\_api\derive · high confidence

Updated allocative build configuration and license headers

The allocative crate's build system has been updated to support the RUSTC\_BOOTSTRAP=1 environment variable, allowing stable Rust compilers to enable nightly features when explicitly requested. The build definition (BUCK) now uses autocargo to manage dependencies, adding support for optional features like compact\_str, jiff, serde\_json, and sorted\_vector\_map, while removing support for owning\_ref, relative-path, sequence\_trie, and smartstring. License headers have been updated to reflect dual MIT/Apache-2.0 licensing.

allocative/allocative · high confidence

Updated dice\_examples to use new DICE API and dual licensing

The dice\_examples crate has been updated to align with the latest DICE API changes, including switching from DiceTransaction to DiceTransactionUpdater, adopting mutable references for computation contexts, and integrating cancellation support via CancellationContext. Key traits like MathEquations and Setup now require mutable access, and key equality is now defined via equality\_behavior() instead of compare(). Additionally, the crate now supports pagable keys and uses the new dice\_futures join\_all. The license headers have been updated to reflect dual licensing under MIT or Apache 2.0.

_dice/dice\examples · high confidence

Xcode version checker moved to prelude with new executable structure

The Xcode version checker tool has been relocated to the \prelude/toolchains/apple/xcode\_version\_checker\ directory. This change introduces a new executable structure consisting of a main checker binary (\xcode\_version\_checker\) that validates the installed Xcode version against expected short version or product build identifiers, and a helper executable (\xcode\_exec\_tester\) used to forward tool invocations. The implementation includes C/Objective-C source files for version comparison logic (reading from \/var/db/xcode\_select\_link/../version.plist\) and a dedicated test binary (\xcode\_version\_tester\) to verify version matching correctness.

_prelude/toolchains/apple/xcode\_version\checker · high confidence

Test coverage

1676 commits adding/updating tests in tests; Add Starlark fuzzing harness and focused Miri regression tests; Add buck2 error tests; Add tests for JSON artifact serialization and tagging; Added Rust integration tests for resource loading; Added analysis calculation tests for the Buck2 build API; Added comprehensive test suite for the DICE recomputation engine; Added golden tests for Starlark error callstack formatting; Added interpreter rule definition tests for artifacts and providers; Added test fixtures for certificate validation scenarios; Added test fixtures for core query tests; Added test fixtures for multi-cell completion scenarios; Added test fixtures for symlink and invalid file invalidation scenarios; Added test harness for action implementation context; Added test infrastructure for traversing detailed aggregated metrics; Added tests for ArtifactTag equality semantics; Added tests for OSS target translation logic; Added tests for Starlark error conversion and formatting; Added tests for StrongHash derive macro with generics and custom hashers; Added tests for action calculation and registry in buck2\_build\_api\_tests; Added tests for artifact group calculation logic; Added tests for built-in provider validation and behavior; Added tests for deferred calculation and caching behavior; Added tests for package view intersection enforcement; Added tests for soft\_error behavior and logging; Added tests for target node retrieval and configuration; Added tests for the Android Java ABI source analysis toolchain; Added unit test crate for Buck2 action implementation; Added unit tests for Buck2 node attribute coercion and selection logic; Added unit tests for the build interpreter; Enforce application dependency graph constraints; New dedicated test target for Buck2 build API; New testing utilities for artifact handling in build API tests; Provider field type validation and collection tests; Relocated build API tests to dedicated test crate; Transitive set testing utilities moved to dedicated test module.

Housekeeping

Add build definition for buck2\_event\_observer; Updated license headers in explorer files.

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 50 → 49 (-0.6)
  • Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 84 → 84 (-0.0)
  • Architecture 61 → 65 (+4.5)
  • Maturity 88 → 88 (-0.0)
  • Readiness 65 → 49 (-15.2)
  • Security 33 → 39 (+5.8)
  • Event Sourcing 100 → 100 (+0.0)
  • Accessibility 56 → 56 (+0.0)
  • Performance 66 (new)

Resolved (92)

  • Boundary-crossing change coupling: context.rs ↔ sled.rs (pagable/src/context.rs)
  • Boundary-crossing change coupling: write.rs ↔ testing.rs (app/buck2_action_impl/src/context/write.rs)
  • Change coupling: buck_ct_records.hrl ↔ test_logger.erl (prelude/erlang/common_test/common/include/buck_ct_records.hrl)
  • Change coupling: context.rs ↔ in_memory.rs (pagable/src/context.rs)
  • Change coupling: context.rs ↔ testing.rs (pagable/src/context.rs)
  • Change coupling: in_memory.rs ↔ testing.rs (pagable/src/storage/in_memory.rs)
  • Change coupling: starlark_declared_artifact.rs ↔ resolved_macro.rs (app/buck2_build_api/src/interpreter/rule_defs/artifact/starlark_declared_artifact.rs)
  • Change coupling: starlark_declared_artifact.rs ↔ transitive_set_args_projection.rs (app/buck2_build_api/src/interpreter/rule_defs/artifact/starlark_declared_artifact.rs)
  • Change-coupling hub: starlark_promise_artifact.rs → starlark_declared_artifact.rs, typ.rs, resolved_macro.rs, transitive_set_args_projection.rs (app/buck2_build_api/src/interpreter/rule_defs/artifact/starlark_promise_artifact.rs)
  • ClassTooLong: DaemonState (app/buck2_server/src/daemon/state.rs)
  • ConcurrencyHandler::wait_for_others (cognitive 49) (app/buck2_concurrency/src/lib.rs)
  • ConcurrencyHandler::wait_for_others (cyclomatic 16) (app/buck2_concurrency/src/lib.rs)
  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no pnpm-resolved versions to grade)
  • Documentation: no installation or build instructions (README.md)
  • Duplicated block (6 lines × 2) (app/buck2_bxl/src/bxl/starlark_defs/lazy_ctx/lazy_uquery_ctx.rs)
  • Duplicated block (6 lines × 3) (app/buck2_build_api/src/actions/error_handler.rs)
  • Duplicated block (7 lines × 2) (starlark-rust/starlark_derive/src/starlark_pagable_panic.rs)
  • Duplicated block (8 lines × 2) (starlark-rust/starlark/src/values/layout/typed.rs)
  • Error::from (cognitive 23) (app/buck2_build_api/src/actions/error.rs)
  • FileTooLong: heap/heap_type.rs (starlark-rust/starlark/src/values/layout/heap/heap_type.rs)
  • …and 72 more

New (241)

  • Boundary-crossing change coupling: action_cache.rs ↔ orchestrator.rs (app/buck2_execute_impl/src/executors/action_cache.rs)
  • Boundary-crossing change coupling: calculation.rs ↔ logging.rs (app/buck2_analysis/src/analysis/calculation.rs)
  • Boundary-crossing change coupling: cas_artifact.rs ↔ download.rs (app/buck2_action_impl/src/actions/impls/cas_artifact.rs)
  • Boundary-crossing change coupling: deferred.rs ↔ unhashed_outputs.rs (app/buck2_execute_impl/src/materializers/deferred.rs)
  • Boundary-crossing change coupling: eval_result.rs ↔ command.rs (app/buck2_node/src/nodes/eval_result.rs)
  • Boundary-crossing change coupling: tests.rs ↔ unhashed_outputs.rs (app/buck2_execute_impl/src/materializers/deferred/tests.rs)
  • Change coupling clique: context.rs, in_memory.rs, testing.rs (pagable/src/context.rs)
  • Change coupling: test_runner.erl ↔ ct_runner.erl (prelude/erlang/common_test/test_binary/src/test_runner.erl)
  • Change coupling: typ.rs ↔ transitive_set_args_projection.rs (app/buck2_build_api/src/interpreter/rule_defs/cmd_args/typ.rs)
  • ClassTooLong: AbiValidationInputs (prelude/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/k2-jvm-abi-gen/src/main/kotlin/pipeline/AbiGenPipeline.kt)
  • ClassTooLong: DeferredMaterializerAccessor (app/buck2_execute_impl/src/materializers/deferred.rs)
  • DeferredMaterializerCommandProcessor::run (cognitive 18) (app/buck2_execute_impl/src/materializers/deferred/command_processor.rs)
  • DiceStorage::page_out (cognitive 30) (dice/dice/src/storage.rs)
  • Duplicate intent with confusing naming. Both methods accept an iterator of key-value pairs. The distinction between generic_map_fields and map_entries is not clear from the signatures alone, suggesting two ways to do the same thing or a split between 'fields' (struct-like) and 'entries' (map-like) that isn't reflected in the parameter types.
  • Duplicate intent with confusing naming. Similar to the map case, visit_generic_set_fields and visit_set_entries both take an iterator of keys. The naming inconsistency (generic_..._fields vs ..._entries) is confusing.
  • Duplicated block (10 lines × 2) (app/buck2_execute_impl/src/executors/local.rs)
  • Duplicated block (10 lines × 2) (docs/developers/perf/scripts/frag_symbolize.py)
  • Duplicated block (10 lines × 2) (prelude/erlang/toolchain/app_src_builder.erl)
  • Duplicated block (10 lines × 2) (prelude/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/k2-jvm-abi-gen/src/main/kotlin/compilercompat/2.2.0/IrNonAbiStripper.kt)
  • Duplicated block (10 lines × 2) (prelude/toolchains/android/src/com/facebook/buck/testrunner/CrashAnalyzer.java)
  • …and 221 more

Changes since last survey

  • 300 commits — 280 feature/other, 20 fixes

By area

  • prelude/cxx — 32 commits
  • starlark-rust/starlark — 30 commits
  • (root) — 26 commits
  • prelude/toolchains — 22 commits
  • app/buck2_concurrency — 20 commits
  • prelude/apple — 18 commits
  • tests/core — 15 commits
  • app/buck2_execute — 10 commits
  • app/buck2_execute_impl — 10 commits
  • app/buck2_action_impl — 8 commits
  • app/buck2_build_api — 7 commits
  • prelude/android — 7 commits
  • prelude/linking — 5 commits
  • prelude/python — 5 commits
  • shim/xplat — 5 commits
  • app/buck2_client_ctx — 4 commits
  • app/buck2_common — 4 commits
  • pagable/src — 4 commits
  • prelude/erlang — 4 commits
  • prelude/java — 4 commits

Notable commits

  • fix: Fix Compose dependency override bridges
  • fix: Fix str.codepoints() declared element type
  • fix: Fix bare-RETURN ABI constructor VerifyError
  • fix: Fix broken fbcode//buck2/tests/core/help:test_help_env - test_help_env.py::test_help caused by D1215
  • fix: Fix buck2 e2e test_timeout_re broken by action-owned Python build info
  • fix: Kotlin 2.3 compiler-compat fixes + Strides mirror lint/i18n policy
  • fix: Pull in tokio-rustls ConnectionAborted fix
  • fix: Revert D114527270: Share distributed CUDA compile plans per target
  • fix: Revert D114527271: Use a placeholder path for CUDA dry runs
  • fix: Revert D114527272: Minimize CUDA dry-run toolchain inputs
  • fix: Revert D114527273: Share and compact dynamic compilation inputs
  • fix: Revert D114527274: Avoid materializing CUDA sources for dry runs
  • fix: Revert D114657899: Pluralize distributed CUDA dynamic inputs
  • fix: Revert D119337527: Minimize distributed CUDA replay inputs
  • fix: Revert D120352183
  • fix: Revert D120981311: Compact retained WriteAction::macro_files storage
  • fix: Revert D121230941: Build generated info as a DSO with link groups
  • fix: Revert D121459912: Route protoc actions to x86 execution
  • fix: Revert D121638464
  • fix: directory: Fix self-deadlock interning an exhaustiveness variant
  • …and 280 more

Architecture

  • Unchanged — 0 containers · 2 contexts · 0 edges

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

facebook/buck2 was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 30 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 1f3bcd7d4f18d6280cd2d366d414d52d971f548d — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-cb25ca4feafa.