An integration test under tests/ is compiled as a separate crate that links the library (crate name <project>) as an external dependency. It does not share the library's internal name resolution:
Since there's no repository present in this environment (no Cargo.toml, no <project> source, and no Rust toolchain), I'll deliver the diagnosis and fix as a self-contained markdown runbook. The root cause is a Rust crate-boundary/name-resolution issue, so it can be stated exactly and verified with standard Cargo commands.
cannot find type GraphDbSource in this scope in the scheduler_tick integration targetAn integration test under tests/ is compiled as a separate crate that links the library (crate name <project>) as an external dependency. It does not share the library's internal name resolution:
src/** unit tests live in the same crate and can resolve module paths like crate::graph::GraphDbSource (or an unqualified name brought in by a use in the module) even when the module is private. That is why cargo test --lib passes.crate:: refers to the test crate itself, and private/unexported module paths from the library are invisible. Only items reachable through the crate's public API — including pub use re-exports — can be named.The type GraphDbSource was recently made public via a re-export at the crate root, but the scheduler_tick test was not updated to import it. The identifier is therefore unresolved in the test crate, producing:
error[E0433]: cannot find type GraphDbSource in this scope
Typical trigger: the test previously relied on crate::... (valid only for unit tests) or simply references GraphDbSource without a use.
Step 1 — Confirm the re-export exists in src/lib.rs. The type must be publicly reachable, e.g.:
// src/lib.rs
pub mod graph; // (or keep the module private)
pub use graph::GraphDbSource; // public re-export at the crate root
If the re-export is missing, add the pub use line above. If the module is already pub, <project>::graph::GraphDbSource is also a valid path, but importing the root re-export is preferred so the internal module layout can change without breaking tests.
Step 2 — Import the re-export explicitly in the integration test. Add the import at the top of tests/scheduler_tick.rs:
// tests/scheduler_tick.rs
use <project>::GraphDbSource; // <-- the missing import; uses the public re-export
#[test]
fn scheduler_tick_persists_sources() {
// GraphDbSource is now in scope; no other change needed.
let source = GraphDbSource::new(/* ... */);
// ... existing assertions ...
}
Do not use crate::GraphDbSource in an integration test — crate there is the test binary, not <project>.
Step 3 — Remove any stale private paths. Replace patterns such as:
// wrong in an integration test: private module / wrong crate root
use crate::graph::GraphDbSource;
with the crate-root re-export import shown in Step 2.
Run both the unit and integration targets, since a fix that only satisfies --lib does not prove the external path resolves:
# 1. Compile every target, including tests (catches E0433 early)
cargo check --all-targets
# 2. Unit tests (these already passed; guard against regressions)
cargo test --lib
# 3. The previously failing integration target, by name
cargo test --test scheduler_tick
# 4. Full suite as the final gate
cargo test
A successful run ends with the integration binary reporting test result: ok, and cargo check --all-targets exits 0 with no E0433 for GraphDbSource.
Optional confirmation that the path is public:
cargo doc --no-deps && \
grep -r "GraphDbSource" target/doc/<project>/index.html
Seeing GraphDbSource in the generated crate-root docs confirms it is publicly reachable, which is the contract the integration test now relies on.
One-line summary: the library re-exported GraphDbSource publicly, but the external integration crate must import it — add use <project>::GraphDbSource; to tests/scheduler_tick.rs and verify with cargo test --lib and cargo test --test scheduler_tick.
# Evidence - Problem class: rust-integration-test-missing-public-reexport-import - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-24T03:48:09.465Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "A worker updated an integration test to use a newly public GraphDbSource type but did not update the test module import. The library unit tests passed while the integration target failed with cannot find type GraphDbSource. The fix is to import the re-export explicitly and run both unit and integration targets.", "environment": "<project> scheduler tick", "language": "rust", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "rust-integration-test-missing-public-reexport-import", "provider": "openrouter", "solved_at": "2026-09-24T03:48:09.465Z", "version": "rust stable"}Since there's no repository present in this environment (no Cargo.toml, no <project> source, and no Rust toolchain), I'll deliver the diagnosis and fix as a self-contained markdown runbook. The root cause is a Rust crate-boundary/name-resolution issue, so it can be stated exactly and verified with standard Cargo commands.
cannot find type GraphDbSource in this scope in the scheduler_tick integration targetAn integration test under tests/ is compiled as a separate crate that links the library (crate name <project>) as an external dependency. It does not share the library's internal name resolution:
src/** unit tests live in the same crate and can resolve module paths like crate::graph::GraphDbSource (or an unqualified name brought in by a use in the module) even when the module is private. That is why cargo test --lib passes.crate:: refers to the test crate itself, and private/unexported module paths from the library are invisible. Only items reachable through the crate's public API — including pub use re-exports — can be named.The type GraphDbSource was recently made public via a re-export at the crate root, but the scheduler_tick test was not updated to import it. The identifier is therefore unresolved in the test crate, producing:
error[E0433]: cannot find type GraphDbSource in this scope
Typical trigger: the test previously relied on crate::... (valid only for unit tests) or simply references GraphDbSource without a use.
Step 1 — Confirm the re-export exists in src/lib.rs. The type must be publicly reachable, e.g.:
// src/lib.rs
pub mod graph; // (or keep the module private)
pub use graph::GraphDbSource; // public re-export at the crate root
If the re-export is missing, add the pub use line above. If the module is already pub, <project>::graph::GraphDbSource is also a valid path, but importing the root re-export is preferred so the internal module layout can change without breaking tests.
Step 2 — Import the re-export explicitly in the integration test. Add the import at the top of tests/scheduler_tick.rs:
// tests/scheduler_tick.rs
use <project>::GraphDbSource; // <-- the missing import; uses the public re-export
#[test]
fn scheduler_tick_persists_sources() {
// GraphDbSource is now in scope; no other change needed.
let source = GraphDbSource::new(/* ... */);
// ... existing assertions ...
}
Do not use crate::GraphDbSource in an integration test — crate there is the test binary, not <project>.
Step 3 — Remove any stale private paths. Replace patterns such as:
// wrong in an integration test: private module / wrong crate root
use crate::graph::GraphDbSource;
with the crate-root re-export import shown in Step 2.
Run both the unit and integration targets, since a fix that only satisfies --lib does not prove the external path resolves:
# 1. Compile every target, including tests (catches E0433 early)
cargo check --all-targets
# 2. Unit tests (these already passed; guard against regressions)
cargo test --lib
# 3. The previously failing integration target, by name
cargo test --test scheduler_tick
# 4. Full suite as the final gate
cargo test
A successful run ends with the integration binary reporting test result: ok, and cargo check --all-targets exits 0 with no E0433 for GraphDbSource.
Optional confirmation that the path is public:
cargo doc --no-deps && \
grep -r "GraphDbSource" target/doc/<project>/index.html
Seeing GraphDbSource in the generated crate-root docs confirms it is publicly reachable, which is the contract the integration test now relies on.
One-line summary: the library re-exported GraphDbSource publicly, but the external integration crate must import it — add use <project>::GraphDbSource; to tests/scheduler_tick.rs and verify with cargo test --lib and cargo test --test scheduler_tick.
# Evidence - Problem class: rust-integration-test-missing-public-reexport-import - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-24T03:48:09.465Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "A worker updated an integration test to use a newly public GraphDbSource type but did not update the test module import. The library unit tests passed while the integration target failed with cannot find type GraphDbSource. The fix is to import the re-export explicitly and run both unit and integration targets.", "environment": "<project> scheduler tick", "language": "rust", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "rust-integration-test-missing-public-reexport-import", "provider": "openrouter", "solved_at": "2026-09-24T03:48:09.465Z", "version": "rust stable"}