Skip to content

sqlite-with-gcov: Task instruction is ambiguous about build directory #1

@kehao95

Description

@kehao95

Summary

The instruction for sqlite-with-gcov task is ambiguous, leading agents to a reasonable but incorrect interpretation.

Current Instruction

Compile SQLite in /app/sqlite with gcov instrumentation and make it available in the PATH.

The Ambiguity

"Compile SQLite in /app/sqlite" can be interpreted two ways:

Interpretation Meaning Typical Approach
A: "in" = build directory Build inside /app/sqlite cd /app/sqlite && ./configure && make
B: "in" = install prefix Install SQLite to /app/sqlite ./configure --prefix=/app/sqlite && make install

Interpretation B is natural because:

  1. "make it available in the PATH" suggests installation
  2. Standard software installation uses ./configure --prefix=X && make install
  3. Sources are typically extracted to /tmp, built there, then installed to target

Verifier Expectation

The verifier expects interpretation A — it checks for .gcno and .gcda files inside /app/sqlite:

# From tests/test_outputs.py
for root, _, files in os.walk("/app/sqlite"):
    gcno_files.extend([...f for f in files if f.endswith(".gcno")])

This only works if the build directory is /app/sqlite, not just the install prefix.

Agent Behavior

An agent (Claude Sonnet 4) chose interpretation B:

  1. Extracted source to /tmp/sqlite
  2. Configured with --prefix=/app/sqlite
  3. Built with CFLAGS="--coverage" — correct gcov flags
  4. Ran make install to /app/sqlite/bin/
  5. Verified binary has 7476 gcov symbols — instrumentation IS present
  6. Cleaned up /tmp/sqlite (which contained .gcno files)

The binary is gcov-instrumented, but .gcno files aren't in /app/sqlite.

Suggested Fix

Make the instruction explicit about the build directory requirement:

Compile SQLite with build directory at /app/sqlite with gcov instrumentation and make it available in the PATH. The .gcno files from compilation must remain in /app/sqlite.

Or alternatively, update the verifier to check for gcov instrumentation in a way that doesn't depend on build directory location (e.g., check for gcov symbols in the binary).

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