v2.5 - #2637
Conversation
* First pass. * Second pass. * Update schemas.
* new: Validate project graph cycles per dependency scope partition. Splits the project graph's single DAG into two internally partitioned DAGs: production (production/peer) and development (development/build/root) scopes. Each partition enforces its own acyclicity, so dependency cycles that cross the production/development boundary (common in Go) no longer fail with a cycle error, or silently drop dependency edges. The public API is unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * new: Add edge case coverage for scope partitioned graphs. Audits and locks in behavior for: peer/production and build/development loops (same partition, rejected or disconnected), self-dependencies, three-node chains closed across the partition boundary, cached graph round-trips containing cross-partition cycles, and unit-level set_graph validation guarding the cache-hit path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * new: Add partitioned graph traversal and toposort helpers. Introduces a ScopePartition enum and partition-aware helpers on ProjectGraph: partitioned_graph, partitioned_dependencies_of, partitioned_dependents_of, deep variants of both, and partitioned_toposort (dependency-first ordering). Establishes the convention that anything requiring an acyclic graph consumes a partition, while the unioned graph remains for scope-blind, cycle-tolerant queries only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix: Re-sync node weights when placeholder nodes are dropped. When the builders finalize a graph, placeholder (loading) nodes are filtered out, renumbering the remaining nodes while their weights kept referencing pre-filter indices. Weight-based lookups (get_node_keys, deep traversals, labeled/DOT rendering) would then resolve the wrong entry or panic after building a partial graph. Weights are now rewritten to match their post-filter indices: centrally in ProjectGraph::set_graph for the project graph, and at both builder finalize sites for the task graph. This bug predates the scope partition rework. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Polish. * Bump. * tests: Match cycle errors by diagnostic code. The full workspace test run unifies cargo features and enables miette's fancy renderer, which line-wraps diagnostic messages. That split the expected "would introduce a cycle" substring across a newline, so the should_panic assertions failed in CI while passing for a single package. Match on the project_graph::would_cycle code instead, which is never wrapped, following the existing convention in task_hasher_test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* First pass. * Add utils.
There was a problem hiding this comment.
Pull request overview
This PR prepares the codebase for a v2.5 release by adding OpenTelemetry (OTLP) export support to the CLI, reworking project-graph cycle handling to validate per dependency-scope partition, and migrating version constraints from semver to version_spec (alongside a broader dependency refresh).
Changes:
- Add CLI OpenTelemetry export controls (
--otel,--otel-logs,--otel-service-name) and update docs/env var references. - Rework project graph building/validation so cycles are only rejected within a scope partition (production vs development), allowing cross-partition cycles.
- Replace
semverusage withversion_specrequirements/versions, update proto tooling version, and refresh workspace dependencies.
Reviewed changes
Copilot reviewed 57 out of 60 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| website/static/schemas/v2/workspace.json | Align workspace schema versionConstraint with a shared Requirement definition. |
| website/static/schemas/v2/project.json | Update schema descriptions to reference bitbucket-legacy. |
| website/docs/env-vars.mdx | Document OTEL-related environment variables and standard OTEL exporter vars. |
| website/docs/commands/overview.mdx | Add OTEL global flags and an OpenTelemetry overview section. |
| wasm/Cargo.lock | Refresh WASM lockfile dependencies. |
| vite.config.ts | Ignore local OTEL data directory in Vite processing. |
| scripts/otel/otel-collector.yaml | Add a local OTEL collector config for trace/metric/log capture. |
| packages/types/src/workspace-config.ts | Introduce Requirement alias and use it for versionConstraint; update bitbucket wording. |
| packages/types/src/tasks-config.ts | Update docstrings for dependency ordering behavior. |
| packages/types/src/project-config.ts | Update docstrings to reference bitbucket-legacy. |
| justfile | Add local OTEL collector and OTEL test helper recipes. |
| crates/workspace/src/workspace_builder.rs | Update sync workspace builder to partition-aware cycle checks and deferred edge handling. |
| crates/workspace/src/workspace_builder_async.rs | Propagate project graph finalization errors. |
| crates/workspace/src/tasks_builder.rs | Re-sync task-graph node weights after filtering placeholder nodes. |
| crates/workspace/src/projects_builder.rs | Update async projects builder to use DiGraph + partition-aware cycle checks and fallible finalize. |
| crates/vcs/src/vcs.rs | Switch version support checks from semver to version_spec. |
| crates/vcs/src/git/git_error.rs | Update git version parse error typing to version_spec. |
| crates/vcs/src/git/git_client.rs | Switch git version parsing to version_spec::Version. |
| crates/vcs/Cargo.toml | Replace semver dependency with version_spec. |
| crates/task-runner/src/output_hydrater.rs | Use starbase_archive extension-based unpacking helper. |
| crates/task-runner/src/output_archiver.rs | Use starbase_archive extension-based packing helper. |
| crates/project-graph/tests/snapshots/project_graph_test__project_graph__cycles__sync_builder__renders_a_partition_cycle_to_dot.snap | Add snapshot coverage for DOT rendering with cross-partition cycles. |
| crates/project-graph/tests/project_graph_test.rs | Add fixtures/tests for cross-partition cycles and partitioned traversals. |
| crates/project-graph/tests/fixtures/self-loop/a/moon.yml | Add self-loop fixture for cycle handling tests. |
| crates/project-graph/tests/fixtures/peer-prod-loop/b/moon.yml | Add peer/production loop fixture. |
| crates/project-graph/tests/fixtures/peer-prod-loop/a/moon.yml | Add peer/production loop fixture. |
| crates/project-graph/tests/fixtures/dev-prod-loop/b/moon.yml | Add dev/prod loop fixture. |
| crates/project-graph/tests/fixtures/dev-prod-loop/a/moon.yml | Add dev/prod loop fixture. |
| crates/project-graph/tests/fixtures/dev-prod-chain-loop/c/moon.yml | Add dev/prod 3-node chain loop fixture. |
| crates/project-graph/tests/fixtures/dev-prod-chain-loop/b/moon.yml | Add dev/prod 3-node chain loop fixture. |
| crates/project-graph/tests/fixtures/dev-prod-chain-loop/a/moon.yml | Add dev/prod 3-node chain loop fixture. |
| crates/project-graph/tests/fixtures/build-dev-loop/b/moon.yml | Add build/dev loop fixture. |
| crates/project-graph/tests/fixtures/build-dev-loop/a/moon.yml | Add build/dev loop fixture. |
| crates/project-graph/src/project_graph.rs | Introduce scope partitions, union + partitioned graphs, partitioned traversals/toposort, and cycle checks. |
| crates/pdk-api/src/lib.rs | Update re-exports for new version-spec-related proto API types. |
| crates/config/tests/workspace_config_test.rs | Update tests to use version_spec::Version and new error wording. |
| crates/config/src/workspace_config.rs | Switch workspace version_constraint to version_spec::Requirement. |
| crates/config/src/toolchain/proto_config.rs | Bump PROTO_CLI_VERSION to 0.59.0. |
| crates/config/src/template/template_locator.rs | Switch template locator version parsing to version_spec::Version. |
| crates/config/src/project/dep_config.rs | Add scope partition helper methods on DependencyScope. |
| crates/config/src/lib.rs | Replace semver re-exports with version_spec types. |
| crates/config/Cargo.toml | Remove semver + schematic semver type feature, rely on version_spec. |
| crates/cli/tests/misc_test.rs | Update test to use Requirement parsing. |
| crates/cli/tests/exec_test.rs | Update unpack helper to unpack_from_ext. |
| crates/cli/src/shared.rs | Wire OTEL options into tracing initialization and adjust error/exit plumbing. |
| crates/cli/Cargo.toml | Enable starbase OTEL feature. |
| crates/app/src/systems/analyze.rs | Switch version constraint validation to Requirement. |
| crates/app/src/session.rs | Switch version parsing type to version_spec::Version. |
| crates/app/src/commands/upgrade.rs | Update upgrade flow to write Requirement constraints. |
| crates/app/src/app.rs | Add CLI flags/env vars for OTEL export configuration. |
| crates/app/Cargo.toml | Remove semver, bump a few deps, and add version_spec. |
| crates/api/src/launchpad.rs | Switch Version import to proto_core::Version. |
| crates/api/Cargo.toml | Remove semver dependency. |
| crates/action-pipeline/src/lib.rs | Increase recursion limit for deeply nested future trait solving. |
| crates/action-graph/tests/action_graph_builder_test.rs | Update version spec construction to new UnresolvedVersionSpec variant. |
| CHANGELOG.md | Document OTEL support, project graph cycle partitioning, and partial-graph lookup fix. |
| Cargo.toml | Update workspace dependency versions and proto/version_spec versions. |
| Cargo.lock | Refresh lockfile for updated deps and new OTEL-related crates pulled by starbase. |
| .gitignore | Ignore local OTEL collector data output directory. |
| .github/workflows/rust.yml | Bump CI proto version to 0.59.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .into()); | ||
| } | ||
|
|
||
| self.project_graph.add_edge(index, dep.1, dep_config.scope); |
| let mut graph = DiGraph::with_capacity(nodes.len(), edges.len()); | ||
| let mut indexes = FxHashMap::default(); | ||
| let mut projects = FxHashMap::default(); | ||
|
|
Run report for 41779cf6
|
| Action | Time | Status | Info | |
|---|---|---|---|---|
| 🟩 | SyncWorkspace |
328.7ms | Passed | |
| 🟩 | SyncProject(types) |
5.7ms | Passed | |
| 🟩 | SyncProject(website) |
4.9ms | Passed | |
| 🟩 | SetupProto(0.59.0) |
8.5s | Passed | |
| 🟩 | SetupToolchain(node:22.18.0) |
6.4s | Passed | |
| 🟩 | SetupToolchain(yarn:4.16.0) |
624.8ms | Passed | |
| ⬛️ | SetupToolchain(javascript) |
0.2ms | Skipped | |
| 🟩 | SetupEnvironment(javascript) |
3.4ms | Passed | |
| ⬛️ | InstallDependencies(javascript) |
0.8ms | Skipped | |
| 🟦 | RunTask(types:typecheck) |
230.5ms | Cached | |
| 🟦 | RunTask(types:test) |
304ms | Cached | |
| 🟦 | RunTask(types:build) |
505.8ms | Cached | |
| 🟦 | RunTask(report:test) |
245.4ms | Cached | |
| 🟦 | RunTask(visualizer:test) |
247.6ms | Cached | |
| 🟦 | RunTask(website:test) |
944.1ms | Cached | |
| 🟦 | RunTask(report:build) |
1.2s | Cached | |
| 🟦 | RunTask(vscode-extension:test) |
582ms | Cached | |
| 🟦 | RunTask(vscode-extension:build) |
868.1ms | Cached | |
| 🟦 | RunTask(website:build) |
51.1s | Cached |
Environment
OS: Linux
Matrix:
os = ubuntu-latest
Changed files
.github/workflows/rust.yml
.gitignore
AGENTS.md
CHANGELOG.md
CONTRIBUTING.md
Cargo.lock
Cargo.toml
crates/action-graph/tests/action_graph_builder_test.rs
crates/action-pipeline/src/lib.rs
crates/api/Cargo.toml
crates/api/src/launchpad.rs
crates/app/Cargo.toml
crates/app/src/app.rs
crates/app/src/commands/upgrade.rs
crates/app/src/session.rs
crates/app/src/systems/analyze.rs
crates/cli/Cargo.toml
crates/cli/src/shared.rs
crates/cli/tests/exec_test.rs
crates/cli/tests/misc_test.rs
crates/config/Cargo.toml
crates/config/src/lib.rs
crates/config/src/project/dep_config.rs
crates/config/src/template/template_locator.rs
crates/config/src/toolchain/proto_config.rs
crates/config/src/workspace_config.rs
crates/config/tests/workspace_config_test.rs
crates/pdk-api/src/lib.rs
crates/project-graph/src/project_graph.rs
crates/project-graph/tests/__fixtures__/build-dev-loop/a/moon.yml
crates/project-graph/tests/__fixtures__/build-dev-loop/b/moon.yml
crates/project-graph/tests/__fixtures__/dev-prod-chain-loop/a/moon.yml
crates/project-graph/tests/__fixtures__/dev-prod-chain-loop/b/moon.yml
crates/project-graph/tests/__fixtures__/dev-prod-chain-loop/c/moon.yml
crates/project-graph/tests/__fixtures__/dev-prod-loop/a/moon.yml
crates/project-graph/tests/__fixtures__/dev-prod-loop/b/moon.yml
crates/project-graph/tests/__fixtures__/peer-prod-loop/a/moon.yml
crates/project-graph/tests/__fixtures__/peer-prod-loop/b/moon.yml
crates/project-graph/tests/__fixtures__/self-loop/a/moon.yml
crates/project-graph/tests/project_graph_test.rs
crates/project-graph/tests/snapshots/project_graph_test__project_graph__cycles__sync_builder__renders_a_partition_cycle_to_dot.snap
crates/task-runner/src/output_archiver.rs
crates/task-runner/src/output_hydrater.rs
crates/vcs/Cargo.toml
crates/vcs/src/git/git_client.rs
crates/vcs/src/git/git_error.rs
crates/vcs/src/vcs.rs
crates/workspace/src/projects_builder.rs
crates/workspace/src/tasks_builder.rs
crates/workspace/src/workspace_builder.rs
crates/workspace/src/workspace_builder_async.rs
justfile
packages/types/src/project-config.ts
packages/types/src/tasks-config.ts
packages/types/src/workspace-config.ts
rust-toolchain.toml
scripts/otel/otel-collector.yaml
vite.config.ts
wasm/Cargo.lock
website/docs/commands/overview.mdx
website/docs/env-vars.mdx
website/static/schemas/v2/project.json
website/static/schemas/v2/workspace.json
Run report for 41779cf6
|
| Action | Time | Status | Info | |
|---|---|---|---|---|
| 🟩 | SyncWorkspace |
471.3ms | Passed | |
| 🟩 | SyncProject(types) |
7.1ms | Passed | |
| 🟩 | SyncProject(website) |
6.6ms | Passed | |
| 🟩 | SetupProto(0.59.0) |
10.2s | Passed | |
| 🟩 | SetupToolchain(node:22.18.0) |
9.8s | Passed | |
| 🟩 | SetupToolchain(yarn:4.16.0) |
1.4s | Passed | |
| ⬛️ | SetupToolchain(javascript) |
0.3ms | Skipped | |
| 🟩 | SetupEnvironment(javascript) |
4.6ms | Passed | |
| ⬛️ | InstallDependencies(javascript) |
0.7ms | Skipped | |
| 🟦 | RunTask(types:typecheck) |
347.4ms | Cached | |
| 🟦 | RunTask(types:test) |
519.5ms | Cached | |
| 🟦 | RunTask(types:build) |
874.6ms | Cached | |
| 🟦 | RunTask(report:test) |
2.3s | Cached | |
| 🟦 | RunTask(website:test) |
2.3s | Cached | |
| 🟦 | RunTask(visualizer:test) |
2.3s | Cached | |
| 🟦 | RunTask(report:build) |
687ms | Cached | |
| 🟦 | RunTask(vscode-extension:test) |
408.3ms | Cached | |
| 🟦 | RunTask(vscode-extension:build) |
669.9ms | Cached | |
| 🟦 | RunTask(website:build) |
47.2s | Cached |
Environment
OS: Windows
Matrix:
os = windows-latest
Changed files
.github/workflows/rust.yml
.gitignore
AGENTS.md
CHANGELOG.md
CONTRIBUTING.md
Cargo.lock
Cargo.toml
crates/action-graph/tests/action_graph_builder_test.rs
crates/action-pipeline/src/lib.rs
crates/api/Cargo.toml
crates/api/src/launchpad.rs
crates/app/Cargo.toml
crates/app/src/app.rs
crates/app/src/commands/upgrade.rs
crates/app/src/session.rs
crates/app/src/systems/analyze.rs
crates/cli/Cargo.toml
crates/cli/src/shared.rs
crates/cli/tests/exec_test.rs
crates/cli/tests/misc_test.rs
crates/config/Cargo.toml
crates/config/src/lib.rs
crates/config/src/project/dep_config.rs
crates/config/src/template/template_locator.rs
crates/config/src/toolchain/proto_config.rs
crates/config/src/workspace_config.rs
crates/config/tests/workspace_config_test.rs
crates/pdk-api/src/lib.rs
crates/project-graph/src/project_graph.rs
crates/project-graph/tests/__fixtures__/build-dev-loop/a/moon.yml
crates/project-graph/tests/__fixtures__/build-dev-loop/b/moon.yml
crates/project-graph/tests/__fixtures__/dev-prod-chain-loop/a/moon.yml
crates/project-graph/tests/__fixtures__/dev-prod-chain-loop/b/moon.yml
crates/project-graph/tests/__fixtures__/dev-prod-chain-loop/c/moon.yml
crates/project-graph/tests/__fixtures__/dev-prod-loop/a/moon.yml
crates/project-graph/tests/__fixtures__/dev-prod-loop/b/moon.yml
crates/project-graph/tests/__fixtures__/peer-prod-loop/a/moon.yml
crates/project-graph/tests/__fixtures__/peer-prod-loop/b/moon.yml
crates/project-graph/tests/__fixtures__/self-loop/a/moon.yml
crates/project-graph/tests/project_graph_test.rs
crates/project-graph/tests/snapshots/project_graph_test__project_graph__cycles__sync_builder__renders_a_partition_cycle_to_dot.snap
crates/task-runner/src/output_archiver.rs
crates/task-runner/src/output_hydrater.rs
crates/vcs/Cargo.toml
crates/vcs/src/git/git_client.rs
crates/vcs/src/git/git_error.rs
crates/vcs/src/vcs.rs
crates/workspace/src/projects_builder.rs
crates/workspace/src/tasks_builder.rs
crates/workspace/src/workspace_builder.rs
crates/workspace/src/workspace_builder_async.rs
justfile
packages/types/src/project-config.ts
packages/types/src/tasks-config.ts
packages/types/src/workspace-config.ts
rust-toolchain.toml
scripts/otel/otel-collector.yaml
vite.config.ts
wasm/Cargo.lock
website/docs/commands/overview.mdx
website/docs/env-vars.mdx
website/static/schemas/v2/project.json
website/static/schemas/v2/workspace.json
Merging this PR will improve performance by 42.3%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | hash_files[1000] |
12.9 ms | 9 ms | +42.3% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing develop-2.5 (41779cf) with master (50d91a0)
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2637 +/- ##
==========================================
+ Coverage 75.87% 76.08% +0.20%
==========================================
Files 314 314
Lines 27689 27952 +263
==========================================
+ Hits 21009 21267 +258
- Misses 6680 6685 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
* Update rust. * Update deps.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 60 out of 63 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
packages/types/src/tasks-config.ts:945
- Same issue as above in the partial config type: the JSDoc should explain that
trueruns deps in parallel andfalseruns them serially (with subtree ordering), instead of implying the behavior is always sequential.
| * Runs direct task dependencies (via `deps`) in sequential order. | ||
| * This _does not_ apply to indirect or transient dependencies. | ||
| * Each dependency's own dependency subtree is also ordered, so that | ||
| * transitive dependencies run after the preceding direct dependency. |
* Integrate vendor protos. * Pipe daemon client through. * Rework action blob. * Add tests. * Start on hydrate. * Move things around. * Add packer. * Add unpacker. * Add tests. * Add hydrate procedure. * Polish. * Bump. * Always show logs. * Fixes. * Polish. * Fixes. * Fix windows.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 113 out of 126 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (3)
crates/cache-storage/src/storage.rs:326
archive_manifestholds thebackground_taskstokio::sync::Mutexguard across an.await(set.join_next().await). Holding async mutexes across await points can block unrelated cache operations and risks deadlocks if other paths need the same lock while these uploads run. Drop the guard before awaiting the join set.
crates/daemon-server/src/daemon_server.rs:211- When
backend_idis unknown, the error returned isinvalid_argument("Missing storage backend"), but the request did provide a backend ID. This is confusing for callers. Also,remoteis inferred from the backend ID string, which is brittle. Prefer an "Unknown storage backend" message and deriveremotefrom whether the backend came fromstorage.get_remote_backends()vsget_local_backends().
crates/daemon/src/connector.rs:293 - The daemon is now spawned with
--log traceby default. Trace-level logging can generate very large log files and add overhead in real workspaces (especially now that CI always uploads/prints the daemon log). Consider keeping the default atdebug/infoand letting users opt intotracevia an env var or CLI flag when troubleshooting.
| let JobContext { | ||
| emitter, | ||
| workspace_graph, | ||
| .. | ||
| } = job_context; |
* Add cache. * Use bytes. * Rework plugin cache. * Remove old cache. * Fix lint.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 134 out of 147 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
crates/daemon-server/src/daemon_server.rs:140
ArchiveTaskOutputsforwards aManifestparsed from the RPCActionResult, but never populatesmanifest.digest_source. Sincecache_engine.storage.archive_manifest()now relies onManifest::collect_blob_inputs()(which only uploads the action/fingerprint blob whendigest_sourceis set), RE-compliant backends may reject the stored action result because the action digest is missing from the CAS.
.gitattributes:3- The linguist vendored pattern points at
crates/daemon-proto/proto/vendor/**, but the vendored protos are undercrates/daemon-proto/vendor/**, so the attribute won't apply as intended.
crates/daemon-proto/proto/vendor/** linguist-vendored
No description provided.