Skip to content

feat(task): discover Go workspaces - #11559

Merged
jdx merged 1 commit into
agent/uv-workspace-inferencefrom
agent/go-workspace-inference
Aug 1, 2026
Merged

jdx merged 1 commit into
agent/uv-workspace-inferencefrom
agent/go-workspace-inference

Conversation

@jdx

@jdx jdx commented Jul 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • discover modules from root go.work use directives without requiring the Go executable
  • derive stable go: project IDs and provenance from each module's go.mod
  • keep Go dependency edges explicit through [monorepo.projects] overrides, with documentation and focused coverage

Why

This completes the Go workspace-provider milestone in TASK_CACHE_PARITY.md. Go workspace membership is authoritative, while task-graph dependency relationships can be supplied explicitly when module metadata does not capture the desired build ordering.

Validation

  • cargo test task::workspace::go
  • mise run test:e2e test_task_go_workspace_graph
  • mise run lint-fix
  • cargo clippy --workspace --all-features --all-targets -- -D warnings

AI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.


Note

Low Risk
New optional provider behind existing monorepo graph discovery; no auth or data-path changes, with extensive tests and conservative edge handling.

Overview
Adds Go workspace discovery to the experimental monorepo project graph, alongside existing Cargo, uv, and Node providers.

A new GoWorkspaceProvider reads root go.work use directives (single lines and blocks) and each module’s go.mod module path—without invoking the go binary—to register projects as stable go:<module-path> IDs with provenance and workspace_source metadata. Modules outside the monorepo root are skipped; missing or invalid modules surface clear errors. Dependency edges are not inferred from require/replace; docs describe using [monorepo.projects] depends_add / depends instead.

Monorepo graph discovery in config now includes the Go provider in both strict and lenient paths. Documentation covers Go discovery and overrides; TASK_CACHE_PARITY.md marks the Go workspace milestone complete. Coverage includes unit tests in go.rs and e2e test_task_go_workspace_graph.

Reviewed by Cursor Bugbot for commit c19df4f. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5ec7b37e-98b8-407a-adeb-d09f7250e3e8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds Go workspace discovery to the monorepo project graph.

  • Parses root go.work use directives and derives stable project IDs and provenance from module go.mod files.
  • Registers the Go provider for strict and lenient project discovery.
  • Documents explicit dependency overrides and adds focused unit and end-to-end coverage.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the current implementation resolves direct, ancestor, and chained external symlinks before deciding whether a missing workspace module should be rejected.

Important Files Changed

Filename Overview
src/task/workspace/go.rs Implements Go workspace parsing, module discovery, containment checks, and regression coverage for external and chained symlink paths.
src/config/mod.rs Registers the Go workspace provider alongside the existing Cargo, Node, and uv providers.
src/task/workspace.rs Exposes the new Go workspace provider module.
e2e/tasks/test_task_go_workspace_graph Verifies discovered Go projects, configured dependency edges, provenance, and graph explanation output.
docs/tasks/monorepo.md Documents Go workspace discovery behavior and explicit dependency configuration.

Reviews (8): Last reviewed commit: "feat(task): discover Go workspaces" | Re-trigger Greptile

@jdx
jdx force-pushed the agent/go-workspace-inference branch from d4ed58b to 4d0487c Compare July 31, 2026 20:34
Comment thread src/task/workspace/go.rs Outdated
@github-actions

github-actions Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▃▄▄█▇▅▆▅▅▅▆▃▂▁▁▄▃▃▃▅ 84,668,464 → 84,761,617 +0.11% 17.89 → 21.20ms +18.49%
hook-env ▅▅▅█▇▇▇▇▇▄▇▄▁▃▃▅▂▆▅▃ 87,067,676 → 86,984,806 -0.10% 19.01 → 21.05ms +10.72%
ls ▅▆▅█▅▅▄▅▅▄▇▂▁▃▂▂▁▄▅▄ 76,687,691 → 76,633,146 -0.07% 15.57 → 16.61ms +6.64%
registry ▁▁▁▆▅▄▄▅▆▅▆▂▇▂▂▂█▅▃▅ 50,212,106 → 50,267,166 +0.11% 11.62 → 11.87ms +2.11%
startup ▁▁▁█▇▇▇▇▇▇▇▃▂▂▂▃▃█▇█ 16,075,010 → 16,098,646 +0.15% 7.86 → 8.61ms +9.49%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

c19df4fc6e56 vs 48e5c84da4ea · measured on the runner, not pushed to the history.

@jdx
jdx force-pushed the agent/go-workspace-inference branch from 4d0487c to d132da1 Compare July 31, 2026 20:49
Comment thread src/task/workspace/go.rs
@jdx
jdx force-pushed the agent/go-workspace-inference branch from d132da1 to 783c41f Compare July 31, 2026 22:31
@jdx
jdx force-pushed the agent/go-workspace-inference branch from 783c41f to e60016b Compare July 31, 2026 23:07
Comment thread src/task/workspace/go.rs
@jdx
jdx force-pushed the agent/go-workspace-inference branch from e60016b to 0c21113 Compare July 31, 2026 23:19
Comment thread src/task/workspace/go.rs
@jdx
jdx force-pushed the agent/go-workspace-inference branch from 0c21113 to d492310 Compare August 1, 2026 00:01

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d492310. Configure here.

Comment thread src/task/workspace/go.rs
Comment thread src/task/workspace/go.rs Outdated
@jdx
jdx force-pushed the agent/go-workspace-inference branch from d492310 to c19df4f Compare August 1, 2026 00:10
@jdx
jdx merged commit 18b00aa into main Aug 1, 2026
31 checks passed
@jdx
jdx deleted the agent/go-workspace-inference branch August 1, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant