How Prompt Hashing and RSS Caps Catch Silent Regressions in AI C++ Evals
AI-generated C++ patches can pass all functional tests while still introducing hidden performance regressions, such as excess memory allocations or changed cache behavior, that standard output-only golden file checks never detect. A proposed evaluation harness addresses this by adding two explicit locks: a SHA-256 hash pinning the exact prompt used to generate a patch, and hard caps on wall-clock time and resident set size. The prompt hash is stored in a checked-in JSON contract file, so any change to the prompt text requires a deliberate commit updating the hash, preventing silent drift between eval runs. Resource budgets for time and memory must be measured on the same machine class used for grading, as mixing laptop and remote VM figures invalidates the caps. Together, these two mechanisms ensure that a green build reflects genuine correctness and performance stability, not just matching output strings.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in