SpecGuardBench: Can Coding Agents Construct Reliable Validation Harnesses from Natural Language Specifications?
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
As coding agents become more capable, tests remain the primary evidence for judging whether their code is correct. Yet passing available tests does not establish that an implementation satisfies its natural language specification. Reliable validation requires checks that faithfully capture the specification and scenarios that thoroughly exercise the code, but current benchmarks provide limited insight into whether agents can construct such evidence themselves. We introduce SpecGuardBench, a benchmark of 291 tasks from 13 real-world repositories, covering 8 types of verification logic such as functional postconditions and interaction protocols. Given a natural language specification, repository context, and a reference implementation, an agent constructs a validation harness comprising executable checks and test scenarios. The checks should reject implementations that violate the specification while accepting those that satisfy it, and the scenarios should thoroughly exercise the code. Across four proprietary and open-weight coding agents, none constructs a harness scored as faithful on the benchmark's implementations for more than 63% of the tasks. The bottleneck lies less in exploring test scenarios than in constructing checks that faithfully reflect the specification. Specifically, the agents show a clear tendency to write checks that mirror the reference implementation rather than the specification, and therefore reject implementations that the specification permits.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 19 of its 25 references that are in the map. First posted on arXiv 12 Oct 2026.
Builds on
19 of 25 references.
Closest ancestors · 3
Same direction, newest first
- 2026PBT-Bench: Benchmarking AI Agents on Property-Based Testing13 May
- 2025Agentic Property-Based Testing: Finding Bugs Across the Python Ecosystem10 Oct
- 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents18 Jun
Other references · 16
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2023nl2spec: Interactively Translating Unstructured Natural Language to Temporal Logics with Large Language Modelscited by 60
- 2024Enchanting Program Specification Synthesis by Large Language Models using Static Analysis and Program Verificationcited by 58
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 57
- 2024SpecGen: Automated Generation of Formal Program Specifications via Large Language Modelscited by 53
- 2024TestGenEval: A Real World Unit Test Generation and Test Completion Benchmarkcited by 52
- 2024TESTEVAL: Benchmarking Large Language Models for Test Case Generationcited by 40
- 2024TDD-Bench Verified: Can LLMs Generate Tests for Issues Before They Get Resolved?cited by 34
- 2025VERINA: Benchmarking Verifiable Code Generationcited by 34
- 2023Can Large Language Models Write Good Property-Based Tests?cited by 31
- 2025CLEVER: A Curated Benchmark for Formally Verified Code Generationcited by 29
4 more
- 2025Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification Inferencecited by 16
- 2025Rethinking Verification for LLM Code Generation: From Generation to Testingcited by 14
- 2025Investigating Test Overfitting on SWE-benchcited by 6
- 2026CodeSpecBench: Benchmarking LLMs for Executable Behavioral Specification Generationcited by 4
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Harnessing Code Agents for Automatic Software Verification
- 2026Beyond Type-checking: Towards Holistic Evaluation of Formal Specification Generation
- 2026Automating Formal Verification with Agent-Guided Tree Search
- 2026From Verification Failures to Reusable Guidance for Coding Agents
- 2026SWE-Proof: Can Language Models Resolve Real-World Issues with Machine-Checked Proofs?
- 2026CheckerBench: Can Long-Horizon Agents Synthesize Static-Analysis Checkers?
- 2026When the Specification Emerges: Benchmarking Faithfulness Loss in Long-Horizon Coding Agents
- 2026Intent Formalization: A Grand Challenge for Reliable Coding in the Age of AI Agents