Skip to content

About

Fixed Terminal-Bench (Harbor) log-report task — oracle reward 1, nop reward 0

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

log-report — fixed Terminal-Bench (Harbor) task

A small, everyday software-engineering task: parse an Apache-style access log into a JSON traffic report. This repo contains the repaired task after fixing several authoring defects so it builds reproducibly, leaks nothing, and is graded honestly.

The task

The agent is given /app/access.log (Common Log Format) and must write /app/report.json with three keys:

key meaning
total_requests number of requests (non-empty log lines)
unique_ips number of distinct client IPs (first field of each line)
top_path most frequently requested path (request target in the quoted request)

For the committed 6-line fixture the correct report is {"total_requests": 6, "unique_ips": 3, "top_path": "/index.html"}.

What was broken (and fixed)

Format / manifest (task.toml)

  • artifacts was a bare string pointing at the wrong file ("/app/out.json"). → now an array pointing at the real output: ["/app/report.json"].
  • Personal-identity fields (author_name, author_email) removed.

Environment (environment/Dockerfile)

  • Base image was unpinned (python:latest) → pinned to python:3.13-slim-bookworm.
  • The reference solution (solution_hint.py) was COPYed into the agent image → removed entirely; the image now only contains /app/access.log.

Verifier (tests/)

  • Tests only checked that report.json existed and was non-empty — any junk passed. → now load the JSON, enforce the exact schema, and assert each value with type checks.
  • test.sh wrote the reward to the wrong path (/app/reward.txt) and produced no ctrf.json → now writes /logs/verifier/reward.txt and emits /logs/verifier/ctrf.json via pytest --ctrf; always exits 0.
  • tests/Dockerfile bakes the pinned verifier deps (pytest, pytest-json-ctrf); test.sh installs nothing at verify time.

Instruction (instruction.md)

  • Was vague prose with no output path, filename, schema, or numbered criteria, and inconsistent with the verifier. → rewritten as an unambiguous prompt with five numbered success criteria mapping 1:1 to the five tests; output path and keys named; each quantity defined precisely without revealing the literal answers.

Calibration (Harbor 0.15.0)

harbor run -p log-report -a oracle   # reward 1.0  (5/5 tests pass)
harbor run -p log-report -a nop      # reward 0.0  (5/5 tests fail)

A wrong solution (e.g. an off-by-100 request count) is caught: test_total_requests fails and the run scores reward 0.0.

About

Fixed Terminal-Bench (Harbor) log-report task — oracle reward 1, nop reward 0

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages