Skip to content

aider-polyglot: 3 rust exercises are unsolvable offline (crates.io dependencies) #291

Description

@elronbandel

What's broken

Three rust exercises declare crates.io dependencies in the Cargo.toml the suite compiles:

task exercise dependency
205 rust/gigasecond time = "0.3"
207 rust/grep anyhow = "1.0"
219 rust/simple-cipher rand = "0.8"

The image is eval.benchmark.internet="false" and only java (gradle) and javascript (npm) are pre-cached at build time, so every attempt dies at Could not resolve host: index.crates.io. Verified by running Exercism's own reference solution through the real grader: all three score 0.0. No agent can pass them.

Since #289 the agent is also handed that failure with upstream's "The tests are correct, don't try and change them. Fix the code in src/lib.rs to resolve the errors." — telling it to fix a network error in its own code.

Why it isn't a one-liner

A cargo fetch pass over the rust exercises during the build (mirroring the gradle/npm loops) is not sufficient:

  • cargo fetch populates the registry index plus the crates it resolved at build time, but resolution runs again at test time and picks versions the fetch never downloaded — observed with deranged v0.5.8, a transitive dependency of time.
  • Pinning the resolution by committing the generated Cargo.lock into the exercise did not close it either; the cache still lacked the locked version.

A working fix probably means cargo vendor into a directory plus a .cargo/config.toml [source] replacement in the scratch tree, so resolution cannot reach the network at all. Worth measuring the image-size cost first.

Meanwhile

The oracle gate in #289 deliberately does not register these three. Adding them would encode a known-broken state as expected; they should be added as part of the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions