Repository navigation
build: remove stale Cargo.lock from workspace member test-contract-integration - #5890
Merged
Merged
Conversation
…tegration The file is a leftover from before the crate joined the root workspace (last touched 2025-03-06). Cargo ignores a member's own lockfile and resolves against the root Cargo.lock, so it affects no build, but it pins tracing-subscriber 0.3.18, time and serde_with at vulnerable versions. Dependabot reads it, raises security alerts, and starts a per-directory security job for /tests/test-contract-integration that cannot succeed (failed to find a workspace root), failing on every run. Claude-Session: https://claude.ai/code/session_01TQ6aGBw27ftE4fBPMwNGqV
sanity
commented
Oct 14, 2026
sanity
left a comment
Collaborator
Author
There was a problem hiding this comment.
Light review (independent read; the change was written by a separate agent)
Tier: Light. The change deletes one lockfile and touches no code or workflows.
Verified:
tests/test-contract-integrationis a root workspace member (Cargo.toml:8), so cargo resolves it from the rootCargo.lockand ignores the per-crate one..github/dependabot.yml:209-212already documents that this crate is covered "through the shared Cargo.lock". The per-crate lockfile contradicts that, and it is what spawns the failing per-directory security job for/tests/test-contract-integration.- No consumer builds the crate against its own lockfile:
test_utils::compile_contract/ensure_contract_compiledandcrates/core/tests/{connectivity,operations_before_join}.rscompile it by name through the workspace.- netcheck reads it as a path (
crates/netcheck/src/main.rs:76). - Nothing under
.github/orscripts/builds it standalone.
Can't be checked pre-merge: whether the Dependabot failure stops. Dependabot runs only on the default branch, so check the next "Dependabot Updates" run after merge.
Out of scope: the glib Dependabot failures for / and /apps/freenet-ping are a separate issue.
Verdict: Ready to merge on green CI.
[AI-assisted - Claude]
Contributor
Claude Rule Review: Failed to runThe Claude rule review step failed (likely an authentication or API issue). Check the workflow logs for details. Advisory review against |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Dependabot security-update runs on
mainfail every time for/tests/test-contract-integration(e.g. run 38584125641 for tracing-subscriber; alsotime,serde_with; 13 failures since 2026-08-15):Root cause:
tests/test-contract-integration/Cargo.lockis a stale leftover from before the crate joined the root workspace (last touched 2025-03-06, #1414). The crate has been a root workspace member usingworkspace = truedeps since #2922 (2026-02-09), so cargo ignores this lockfile and uses the rootCargo.lock(which has tracing-subscriber 0.3.23). But Dependabot's dependency graph reads it, sees tracing-subscriber 0.3.18 / oldtime/serde_with, raises (false) alerts, and launches a per-directory security job for that unconfigured directory. That job fetches only the crate directory and cannot locate the workspace root (Dependabot's implicit parent walk infind_workspace_rootonly climbs as many levels as the manifest name has slashes, not the directory depth), so it fails on every run. No othertests/workspace member has its own lockfile; the standalone fixtures that do have one declare their own[workspace]and are unaffected.Approach
Delete the dead lockfile. This removes the source of the stale alerts and of the jobs that can never succeed, without touching any dependency or build input. I considered adding
package.workspace = "../.."to the member manifests, but with the lockfile gone no per-directory job is started, so it would be unverifiable churn. Real vulnerabilities in the root lock are still covered by the existing/cargo entry.Testing
cargo metadataon the crate copied alone into a temp dir.cargo metadata --locked --manifest-path tests/test-contract-integration/Cargo.tomlsucceeds;cargo check --locked --offline -p test-contract-integrationsucceeds and no lockfile is regenerated (git statusclean). Test contract compilation goes through the workspace target dir (test_utils::compile_contract), so it does not use the per-crate lock.cargo in /tests/test-contract-integrationfailures appear after merge and the stale alerts auto-close.glibfailures for/and/apps/freenet-ping.[AI-assisted - Claude]
https://claude.ai/code/session_01TQ6aGBw27ftE4fBPMwNGqV