Skip to content

fix(project): track Cargo workspace provenance - #799

Merged
yyjeqhc merged 2 commits into
yyjeqhc:mainfrom
ITSGJY:fix/project-operation-workspace-provenance
Sep 30, 2026
Merged

yyjeqhc merged 2 commits into
yyjeqhc:mainfrom
ITSGJY:fix/project-operation-workspace-provenance

Conversation

@ITSGJY

@ITSGJY ITSGJY commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • resolve effective Cargo workspace provenance when Rust project operations start from a workspace member
  • bind the member manifest, workspace manifest, and workspace lockfile into the retained project-operation provenance
  • reuse the same workspace-aware source truth for project_validate and project_build admission and pre-execution fencing
  • extend queue-time regression coverage for workspace-root manifest and lockfile changes

Details

Project operations already retain a manifest digest and re-plan both at Job admission and again before native execution after a local queue wait.

For a Cargo workspace member, the nearest recipe root is the member package, while Cargo workspace configuration and dependency state may live at the workspace root. The shared project-recipe layer now resolves that relationship and contributes the relevant workspace inputs to the existing provenance digest.

Rust provenance covers:

  • the selected package/member Cargo.toml
  • the effective workspace Cargo.toml when distinct
  • the workspace-root Cargo.lock when present

The native execution cwd remains the selected package/member root, so package-selection behavior is unchanged.

Explicit Cargo package.workspace references are resolved within the registered Project boundary; workspace provenance outside that boundary is rejected.

Go project provenance retains its existing go.mod / go.sum behavior.

Queue-time fencing

The existing same-Job lifecycle is preserved:

plan
  -> admission fence
  -> local queue
  -> pre-execution fence
  -> native process

If the retained Cargo workspace manifest or lockfile changes while a member-scoped build or validation Job is queued, the pre-execution fence now observes the changed provenance and terminates the Job as not_started with the existing stale-plan result.

Source-only changes remain outside this planning fence.

Validation

Focused local validation:

  • cargo test --locked -p webcodex-workspace --lib — 76 passed
  • cargo test --locked -p webcodex-validation --lib — 109 passed
  • cargo fmt --all -- --check
  • cargo metadata --locked --no-deps --format-version 1
  • workspace dependency-boundary check
  • git diff --check

GitHub Actions completed successfully on 08f6e4e8a496e84c8e7de9a27771e88734e0cde9, including Linux workspace/Runner/Server tests, Windows and macOS native/desktop coverage, Docker Server, contract checks, and MCP conformance.

Relates to #599.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 08:06

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@yyjeqhc
yyjeqhc merged commit 73be6e5 into yyjeqhc:main Sep 30, 2026
16 checks passed
@ITSGJY
ITSGJY deleted the fix/project-operation-workspace-provenance branch September 30, 2026 09:04
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.

3 participants