noodcon's picture mondk's picture
Duplicate from mondk/TerminalBench-DockerLess
b199558
|
Raw History Blame Contribute Delete
1.33 kB

Make the report build work again

build.sh is supposed to regenerate dist/report.txt and then run the project's own test suite. Right now it does neither:

$ bash build.sh
build.sh: line 5: OUTDIR: unbound variable

Nothing in the repository is sacred except the inputs and the tests. Fix the build so that bash build.sh, run from the workspace root, exits 0 and produces:

  • dist/report.txt
  • build/gen.log

Both files must contain the same text: one name=score line per record from data/input.txt, in input order, followed by a single mean=<value> line where the value is the arithmetic mean of the scores printed with exactly two decimal places.

For the shipped data/input.txt the expected content is:

alpha=10
beta=20
gamma=31
delta=40
epsilon=55
mean=31.20

Constraints

  • data/input.txt must not change.
  • The tests in tests/ must not change; they must pass as written. They are run by build.sh itself, so a build that "succeeds" while skipping them is not a fix.
  • dist/ and build/ are build outputs; they may be recreated freely.
  • Only the Python standard library is available, and there is no network.

Notes

  • bash build.sh must be safe to run repeatedly.
  • Do not silence failures with || true; the build has to fail loudly when a step really fails.