Software Engineering · Cross-listed from cs.CR
When the Approved File Is Unchanged: Authority-Set Integrity for Deployment and Coding-Agent Approvals
Md Imran Hossen
An approval for a deployment, a release, or an
agent-issued command is recorded against one object: a workflow file, a script, a command line. The run that follows also reads other repository files, which decide what the deployment creates and which changes a policy allows, so an edit to one of them after approval passes any check on the approved object. Such edits are the common case. In the history of 20 public repositories, 296 of the 542 commits that change a file the run reads (54.6%) leave the approved file untouched, all of them ordinary development with no adversary involved. We demonstrate the consequence on two of those repositories: an edit outside the approved workflow adds a bucket-write policy to a deployed role, a one-line edit removes the human approval required for high-risk changes, and a check on the approved file accepts both. We define authority-set integrity: an approval is sound when it binds every repository file the authorized run is configured to read, and exact when it binds no other file. A binding over that set rejects both edits and re-requests a standing approval on about one commit in ten. The hard part is naming the set. Coding
agents asked to produce the binding compute the digest correctly and bind different file sets from run to run, so a checker cannot take the set on the
agent's word. It should compute the digest itself and draw the set from a source it can verify, such as the deployment tool's own record of its inputs or a manifest declared in the repository.
Read the full abstract ▾
Software Engineering
TurnCost: Turns, Not Observations: Cache-Aware Loop Engineering for Coding Agents
Pramod Kumar and Raj Kumar Pandey
AI coding
agents operate in iterative loops: they modify code, run tools, inspect the results, and decide what to do next. We call the design of this process loop engineering, which includes context management, model selection, compaction, and termination. Existing efficiency work mainly compresses tool observations or routes selected turns to cheaper models, but the practical opportunity for these optimizations remains unclear. We analyze 600 publicly released coding-
agent trajectories spanning two
agent scaffolds and two
language models. Median observations contain only 118-286
tokens, while the large build logs commonly used to motivate compression occur near the ninety-ninth percentile. Moreover, 98.6% of input
tokens are served from a prefix cache, so flat input pricing overestimates loop cost by roughly 7x on average under near-ideal caching. We derive and empirically validate a closed-form break-even condition for model delegation. Delegation increases cost in half of the evaluated settings, near the predicted boundary. More broadly, turn count explains 84% of the variance in log trajectory cost, compared with 4% for mean observation size; the most expensive trajectories have the most turns despite having the smallest observations. These associations suggest that observation-focused methods target a secondary cost factor, and identify unnecessary turns as the larger and largely unexamined opportunity, though we do not establish that turns can be removed while holding task success fixed. We release TurnCost, a tool for re-scoring trajectory corpora under alternative caching, pricing, compression, and routing policies.
Read the full abstract ▾
Software Engineering
Humans vs. Machines: A Comparison With AI Agents in Software Reverse Engineering
Samuele Doria, Stefano De Rosa, Ruoyu Wang et al. (+3 more)
Can an autonomous AI
agent reverse engineer a binary as well as a skilled human analyst? Do they adopt the same strategy, and can
agents scale to real-world programs? We compare human and LLM-based software reverse engineering (SRE): nine models tackle two compact static-analysis challenges previously solved by human analysts, scored with a common understanding rubric, and we record their complete interactions with IDA Pro. This lets us compare not only what humans and
agents recover, but also how they investigate a binary. The best
agents (GPT-5.5 Pro, Claude Opus 4.8, and Kimi K3) achieve statistically human-competitive understanding on both tasks, while weaker models remain far behind. Ablations show that the gap depends on code representation and workflow demands, not on model capability alone: open-weight models improve substantially with richer code representations, whereas frontier models show no significant change. Similar success rates hide different workflows. Humans repeatedly revisit functions and follow local program structure; strong
agents jump across the binary, retrieve information broadly, and rarely return to inspected code, a behavior we call greedy fetching. This strategy is not fixed: given semantically richer code,
agents fetch less without losing understanding. Because greedy fetching aggregates large amounts of code in the
agent's context, we measure context-window saturation across 4,000 real-world binaries: large windows accommodate many programs, but larger applications and lower-level representations quickly exhaust them. Autonomous reverse engineering is becoming competitive, with a large speed advantage, but scaling it will require better navigation, selective
retrieval, and persistent analysis state, not merely larger context windows.
Read the full abstract ▾
All authors Samuele Doria, Stefano De Rosa, Ruoyu Wang, Zion Leonahenahe Basque, Eleonora Losiouk, Simone Aonzo
Software Engineering
AI-Native Product Management: A Vision
Ricardo Britto
Artificial intelligence is increasingly used to support product management tasks. At the same time, AI-native research and development (R&D) may increase software realization capacity. Organizations may realize software faster than they can identify, qualify, and reconsider what should be realized. This paper asks how product management should be re-envisioned under these conditions. We synthesize research on software product management, product learning, human-AI collaboration, and the Product Management and R&D boundary. We propose a
vision in which AI becomes a persistent participant in product work. The
vision covers sensing, exploration, decision-making, realization, and learning. We propose six principles and make the
vision tangible through an operating model grounded in human professionals, AI personas,
agents, skills, and a shared product context. We further argue that AI-native Product Management and AI-native R&D can form a continuous product-learning process. Finally, we identify four AI-specific research directions that require empirical investigation.
Read the full abstract ▾
Software Engineering
Testuary: Agentic Test Generation with Zero-Shot Parallelism
Kevin Kammler and Dominik Sobania
Agentic approaches for automated test generation can reach high-quality results, but they improve a given test suite incrementally, so a weak starting point may lead to many iterations or insufficient tests. To address this, we present Testuary, which provides the agentic phases with an improved starting point. Testuary first generates multiple test suites through independent, parallel zero-shot requests, checks and repairs them deterministically, and combines them into a single suite with a novel structural merging approach. A runtime-weighted set-cover reduction removes redundant tests without losing covered lines, branches, or killed mutants. After that, two agentic phases target the remaining gaps in coverage and mutation score. We compare Testuary with established search and LLM-based test generation approaches. The non-agentic first phase alone already significantly outperforms the current state-of-the-art. After the agentic phases, Testuary achieves on average more than 99.9% line and branch coverage as well as a mutation score of 98.6%, significantly outperforming all compared baseline approaches. Testuary needs fewer model requests and its test suites are on average smaller and faster than those of the compared agentic approach.
Read the full abstract ▾
Software Engineering
Do Modifications Made by Coding Agents Make Subsequent Software Maintenance Harder?
Ruwei Pan, John Zhang, Linhao Wu et al. (+3 more)
Coding
agents increasingly maintain repositories over time, where each change becomes the starting point for subsequent tasks. Yet existing
benchmarks either start tasks from developer-written code or cannot separate later-task difficulty from the effects of an
agent's earlier changes. We ask whether
agent-written code makes subsequent maintenance harder and whether the cost stems from inherited test failures or the code itself. We introduce SWE-Maintain, comprising 100 three-event maintenance episodes from 50 real-world Python repositories, with hidden tests certified across each sequence. Each later task is evaluated twice with the same
agent and tests: from the developers' preceding patches (Developer-History) and from the
agent's own changes (
Agent-History). Across five coding systems, two backbone models, and 1,996 paired later events,
Agent-History reduces later-task resolution by 5.6 percentage points on average. When success additionally requires all earlier tests to pass, the gap reaches 14.0 points. Two-thirds of
Agent-History starting repositories already fail earlier tests, and only 1.9% of events starting from those states end with all accumulated tests passing. When the inherited code passes earlier tests and the next task is not already solved, the disadvantage disappears (+2.7 points; 95% CI [-0.5, +6.1]). These findings suggest that the main downstream cost of
agent-written changes lies in inherited test failures rather than a measurable maintenance disadvantage in code that preserves earlier tested behavior. Evaluations should therefore include
agent-produced history, and coding
agents should preserve earlier behavior across changes.
Read the full abstract ▾
All authors Ruwei Pan, John Zhang, Linhao Wu, Yakun Zhang, Hongyu Zhang, Lu Zhang
Software Engineering
TileCas: Cascading Kernel Development Across Programming Abstractions
Xinyu Xiao, Zihe Song, Dezhi Ran et al. (+2 more)
Programming abstractions have traditionally been designed for humans, but code generation is increasingly performed by models and autonomous
agents. We investigate abstractions for machine-driven programming through GPU and AI-accelerator kernel generation. High-level domain-specific
languages (DSLs) simplify search by delegating implementation details to compilers, while lower-level representations provide finer-grained control at the cost of a larger and more complex search space. In this paper, we present TileCas, a unified, pluggable interface that enables coding
agents to develop kernels across multiple editable abstraction levels. Rather than committing to a single representation, TileCas allows an
agent to transfer and refine candidates across levels through Cross-Level Diagnosis, which maps correctness and performance feedback to actionable controls at different abstraction levels; Abstraction Scheduling, which selects both the candidate and representation from which subsequent refinement should proceed; and a Heterogeneous Search Tree, which preserves and revisits alternative search trajectories spanning multiple representations. We integrate TileCas with two code
agents AKO and KDA, and evaluate both integrations on 50 end-to-end KernelBench Level 3 workloads across two accelerator platforms and two
language models. Giving equal weight to the four accelerator-model configurations, AKO with TileCas achieves an arithmetic-mean speedup of $4.84\times$, compared with $3.75\times$ for the strongest evaluated baseline without TileCas, an improvement of 29.0%. Integrating the same interface with KDA improves its mean speedup by 69.2%, with gains in every configuration. These results show that allowing coding
agents to navigate across programming abstractions can improve machine-driven software development and can be reused across different base workflows.
Read the full abstract ▾
All authors Xinyu Xiao, Zihe Song, Dezhi Ran, Wei Yang, Tao Xie
Software Engineering
Does Failure Feedback Direct Agent Self-Modification?
Rong He
Self-improving
agents use failure feedback to revise their code or instructions, but gains after selection do not establish target-specific repair or generalization. We measure directedness by comparing repair of a randomly selected target failure with repair of the parent's other failures. Across 145 eligible modifications in public Darwin Gödel Machine logs, we find no detectable target-specific advantage. Controlled instruction-revision experiments with small open models show that relevant feedback can improve target repair. In a second study with a pre-specified analysis plan, target feedback raised repair by 20 percentage points for Qwen3-4B relative to matched same-category feedback; the 7-point increase for Phi-4-mini was not significant. Target repair did not reliably imply held-out improvement. Held-out gains were concentrated in settings with identifiable, repairable failure mechanisms, including planted errors and natural tool-interface failures. Benefits of edit localization and regression screening varied across settings, while eight-step revision loops and GEPA ended at similar mean held-out accuracy. Evaluations should report target repair, transfer to related failures, and held-out net change separately.
Read the full abstract ▾
Software Engineering
Executable but Unfaithful: Mock Object, Stub, and Assertion Generation by LLMs and Coding Agents
Hao Ning, Jiahui Dong, Zhen Yang et al. (+7 more)
Mocking is a foundational practice in unit testing, enabling developers to isolate the code under test by replacing real dependencies with simulated alternatives. Automating the generation of mock objects, stubs, and mock assertions has been a long-standing research goal. However, capture-and-replay approaches rely on recording the runtime behavior of actual dependencies. Evolutionary approaches such as StubCoder overcome this requirement but constrain generation to predefined symbol pools. Large
language models (LLMs) and coding
agents offer an alternative by generating mocking artifacts from source code without requiring recorded dependency executions or fixed symbol pools. Yet, no systematic study has evaluated their capabilities across all three artifact types. To address this gap, we construct MockBench, a
benchmark comprising 165 mock artifact generation tasks from real-world Java and Python projects, with validated reference mock objects, stubs, and mock assertions. We evaluate six LLMs and three coding
agents in terms of executability, behavior fidelity, and interaction-fault detection capability, complemented by comparisons with existing tools and sensitivity analysis. Experimental results show that LLMs and coding
agents indeed have been the state-of-the-art techniques in mock-based testing. More specifically, compared with LLMs, coding
agents substantially improve executability, while these gains do not consistently translate into higher behavior fidelity or better interaction-fault detection. Furthermore, we analyze 660 failures from LLMs and coding
agents, and identify ten error types across the three artifact categories, revealing behavioral deviations that passing tests can conceal. Our findings highlight the challenges of mock artifact generation and provide practical guidance for both developers and researchers.
Read the full abstract ▾
All authors Hao Ning, Jiahui Dong, Zhen Yang, Guanda Yan, Yichen Sun, Xuanyu Zhu, Zheng Shen, Yifei Pei, Jacky Keung, Jie M. Zhang
Software Engineering
LASER: Defeasible Certificate Search for Long-Range Protocol Dependencies
Zihan Tang and Huibiao Zhu
Protocol specifications rarely justify executable behavior in one place: a transition may inherit its source state from a remote control block, name its events only by number, and remain subject to a later correction. Recovering the nearby clause is therefore insufficient; the system must assemble a source-linked certificate and determine whether any stronger rule applies. We introduce
LASER, a proof-carrying search method for sparse, defeasible protocol evidence.
LASER represents missing support and unresolved corrections as explicit obligations, searches typed evidence routes, and lets an occurrence-aware symbolic checker alone decide whether a certificate warrants, refutes, or leaves a behavior unresolved. On 91 BehaviorCheck families under a matched 2K budget,
LASER improves Joint Edge+Proof over the strongest local reader on two model families ($\Delta=+.132$, $p=.017$; $\Delta=+.198$, $p<.001$) while cutting false discoveries by 2–3$\times$. Controlled replays attribute the gain and its limits: neither reference routing nor deterministic citation expansion alone exceeds the local baseline; whole-document reading (29–65K
tokens), two-round iterative
retrieval, and even oracle minimal-certificate evidence all fail to reach
LASER, localizing the bottleneck in typed obligation closure rather than evidence access. An authority-corruption replay shows source-link errors only cause abstention, while the only unsafe-warrant mechanism is mis-recording a Held erratum as Verified, confined to that erratum's family.
LASER thus improves long-range dependency recovery while converting incomplete evidence and uncertain authority into explicit residual obligations rather than unsupported behavior.
Read the full abstract ▾
Software Engineering · Cross-listed from cs.AI
Reels-RSI: Program-Level Self-Improvement for Code-Rendered Explainer Videos
Wei Lin
Explainer
videos – a worked geometry problem, why the sky is blue, how a dynasty fell – are usually one more target for pixel
video generation. We argue they are a different kind of artifact: a program (script, storyboard and per-frame animation code) that a deterministic renderer turns into frames. A program can be read, diffed, tested and audited; pixels can only be watched. Reels-RSI is an open-source reel director for any
agent harness; its self-improvement happens at the program level rather than in weights or
prompts. Every revision pass is logged with a code snapshot; a retrospective pairs each check finding with the diff that fixed it and proposes lessons; a lesson that a static check can catch is compiled into a rule with a must-fail and a must-pass example, so the
memory is unit-tested; and a rule learned today runs over everything made before it. A bounded,
benchmark-gated step lets an
agent rewrite the director's playbook, kept only when blind pairwise judgments on held-out topics prefer it; nothing enters
memory without a human decision. Across 111 reels – a field study, two playbook evolutions, a 2x2
memory ablation, a weaker director, a 48-reel learning curve and a judge-reliability study – we find that the rule learned in the field caught four latent defects in frames authored before it existed and none after; that rules are an audit for a strong director (eight unguarded reels, no violation) and a guard for a weaker one (thirty violations unguarded versus five); that lessons shorten revision loops but do not compound or move the judge; and that the first rewrite's 11–1 verdict was a position bias in our vote design (judges pick the second-shown reel 62–81% of the time), masking scripts that traded thirteen facts for craft. We document four failure modes of the preference signal, which check caught each, and the fixes. Code, rules, lessons and data are public.
Read the full abstract ▾
Software Engineering
What Counts as the Same Task? Executable Contracts for Robustness Evaluation of Tool-Using Agents
Shaikh Akib Shahriyar, MD. Akil Raihan Iftee, Armon Barton et al. (+1 more)
Robustness tests for tool-using
agents often change the
agent's environment, for example by hiding a hostile note in an invoice, and then judge the
agent by what it does. The result tells us about the original task only if the changed test case is still a valid test of that task. Many evaluations decide this with weak rules, such as accepting any well-formed edit or any edit that stays close to the original in
embedding space. We propose executable task contracts. A contract states which facts define a task, which edits are allowed, and what finishing the task means, and it checks each changed test case before the
agent runs. We compare validity rules by scoring the same 14,336 stored
agent runs under each rule. Across four encoders,
embedding thresholds allowed 75-100% of edits that changed the task, such as swapping the payee, yet rejected 24-45% of valid hostile notes. With a MiniLM cosine threshold, Mistral appeared vulnerable on all 64 tasks, but only 26 had a successful valid attack. Replaying a saved solution and allowing edits to
benchmark fields fail in similar ways. Evaluations should state, and check, what counts as the same task.
Read the full abstract ▾
All authors Shaikh Akib Shahriyar, MD. Akil Raihan Iftee, Armon Barton, Matthew Wright
Software Engineering
When Is a Reconciliation Break Real? A Temporal Correctness Contract for Streaming Financial Reconciliation
Abhishek Sharma
Reconciliation systems decide, continuously, whether money the ledger expected has arrived at the bank. On an asynchronous stream that decision is taken against partial evidence: a credit that has not appeared may be missing, or may simply not have been posted yet. Deployed pipelines settle this with a timeout or a watermark, and the exceptions are treated as findings. We give a temporal correctness contract that says when such a verdict is admissible, relative to a declared per-source lateness bound, and a checker for it that needs no ground truth. The contract separates three things an operator otherwise sees only as a rising break rate: the reconciler decided too early, an input broke the bound it declared, or the money really is gone. On workloads from a published payment simulator, the standard remedy for a stalled streaming join, an idleness timeout, introduces contract violations on 5.42% of obligations (95% CI [3.94, 6.92]) on traffic where the same job without it is exactly sound, and violations vanish once the timeout reaches the slow source's posting period, as predicted. Under a lateness shift, all four identity-based reconcilers we test raise spurious breaks on between 18.3% and 23.0% of the credits the bank did settle, while their contract violation rate stays at or below 1.01%: the checker attributes the loss to 240 bank-side and 413 ledger-side bound violations rather than to the reconcilers. Tracking one horizon per source leaves break latency 12.7% lower on average and halves its tail (p99 224 against 446 ticks) at equal soundness, though it is not cheaper at every cost setting and we report where it loses. An Apache Flink interval join, written the ordinary way, violates the contract on 14.9–20.1% of obligations. The contract is expressible as SQL over the tables a reconciliation system already keeps, agreeing with the reference implementation on all 4,395 verdicts.
Read the full abstract ▾
Software Engineering
Rethinking SZZ Search Strategies: Lessons from Claude Code
Inase Kondo, Masanari Kondo, Daniel M. German et al. (+3 more)
Identifying bug-inducing commits (BICs) is important for studying software bugs and maintaining software, yet the accuracy of existing SZZ methods remains limited. Although various improvements have been proposed, many SZZ methods still rely on code tracing, which searches for BICs by tracing code changed in a bug-fixing commit (BFC) back to earlier commits. However, this approach may miss the actual BIC when the code responsible for introducing a bug differs from the code modified to fix it. To overcome this limitation, we investigate whether BIC identification can be improved by exploring search strategies that are not constrained to start with code tracing. We use Claude Code, a coding
agent that has demonstrated high BIC identification accuracy in prior research, to explore such strategies. Rather than prescribing a search process or providing predefined candidate commits, we allow Claude Code to independently investigate a Git repository. We evaluate its identification accuracy and search behavior on 79 Java cases from 70 repositories. In 79.7% of runs, Claude Code reviewed commit histories before inspecting individual code diffs. It used commit messages to select changes for closer inspection. With this approach, Claude Code achieves an F1 score of 0.771, significantly outperforming all ten evaluated SZZ baselines. Our failure analysis also reveals incorrect oracle labels and ambiguities in BIC definitions in the studied evaluation
dataset. After reconstructing the evaluation
dataset to address these issues, Claude Code achieves an F1 score of 0.938. A key lesson from Claude Code for improving SZZ search strategies is to use semantic information to find relevant commits and then examine their code changes, rather than starting with code tracing.
Read the full abstract ▾
All authors Inase Kondo, Masanari Kondo, Daniel M. German, Olivier Nourry, Yasutaka Kamei, Yoshiki Higo
Software Engineering
Re-executing Coding-Agent Evaluations: Unchanged Decisions and Unresolved Policy Risk
Tianyu Ding, Yaocheng Tong, Muzhi Yang et al. (+3 more)
Executable tests grade large
language model (LLM) coding-
agent patches for leaderboards, rewards and self-improvement. Two preregistered re-execution studies returned negative results. SWE-bench Pro v1's offline option rejected none of 59 accepted Go patches whose grading configuration changed. Their exploratory, unweighted upper confidence limit is 4.95% under candidate independence, leaving a 3% exposed-patch risk unresolved; the preregistered
estimator uses inverse sampling-probability weights. An extension was inconclusive. In a selected stratum, a reconstructed module cache built from the reference solution's dependencies rejected accepted alternatives from four models that passed with their own dependencies. Re-executing 1,929 selected
agent-version/task evaluations from the Darwin Gödel Machine's archive preserved best-
agent selection and system-variant ranking, with search history and scores of evaluations not rerun fixed. Exploratory host, image and adapted-grader comparisons also preserved them. Seven of 23 disagreements with archived verdicts did not recur on a second host; rebuilt images changed 16 three-run majority verdicts (0.83%) under four-CPU execution. We provide an evidence-to-claim summary, lessons for grader audits and an anonymous replication package. These results concern accepted patches and fixed-history decisions; general policy safety and adaptive-learning robustness require broader evaluations.
Read the full abstract ▾
All authors Tianyu Ding, Yaocheng Tong, Muzhi Yang, Fei Jiang, Lei Yang, Boya Yu
Software Engineering · Cross-listed from cs.CR
SecReason: Vulnerability Detection and In-Stream Self-Repair for LLM Code Generation
Ruidong Han, Zhensu Sun, Chengyan Ma et al. (+4 more)
Large
language models (LLMs) may introduce security vulnerabilities into generated code, which can persist into production when verification focuses on functional correctness. Existing defenses act before, during, or after generation, but none inspects the code during generation. Security
prompts and retrieved security knowledge act before any code exists, constrained decoding limits
token choices but cannot guide repair, and post-hoc repair must regenerate the full response.
Reasoning LLMs draft code early in their streamed chain of thought, and in this pre-delivery window the code exists only inside the
reasoning stream. We present SecReason, an in-stream defense that monitors this window. Dual-track incremental scanning applies security rules, checking each statement as it is emitted and tracing dataflows across the accumulated code. When a security rule fires, SecReason interrupts generation, inserts an in-stream warning, and resumes decoding, so the model repairs the draft within the same
reasoning trace without regenerating the full response. On tasks where unassisted generation introduces vulnerabilities, \system raises the share of runs delivering secure and functionally correct code from below 15% to 72.8%–98.1% on \tool{CWEval} and \tool{SecCodeBench}. \system consumes fewer
tokens than post-hoc repair, and when security rules misfire on secure code, it limits the functional regressions from false warnings.
Read the full abstract ▾
All authors Ruidong Han, Zhensu Sun, Chengyan Ma, Yuqing Niu, Zhou Yang, Siqi Ma, David Lo
Software Engineering
Taylor-Approximation-Based Repair of High Floating-Point Errors
Xin Yi, Liqian Chen, Hengbiao Yu et al. (+5 more)
Numerical libraries can still lose many bits of accuracy on localized ill-conditioned inputs, such as roots, poles, cancellation points, and branch boundaries. This paper presents NPTaylor, a Taylor-approximation-based framework for repairing localized high floating-point errors in numerical C routines. Given a high-error input, a localized repair domain, a high-precision oracle, and an error threshold, NPTaylor searches over Taylor degree, expansion center, segmentation, and floating-point evaluation strategy. It emits guarded C patches that use a generated Taylor evaluator inside the repair domain and fall back to the original routine outside it. Candidate patches are accepted only after validating the emitted C code on recorded local samples, guard endpoints, and the pre-repair peak input. The generated evaluator uses coefficient splitting and compensated Horner evaluation to reduce rounding error introduced by the patch itself. We evaluate NPTaylor on GSL
benchmark workloads. On 38 one-input functions, both NPTaylor and AutoRNP repair all 114 configurations across three accuracy thresholds. NPTaylor is 3.33x faster by
geometric-mean offline repair time and emits 0.162x as many C bytes. In the strictest setting, its median repair time is 3.74s versus 81.97s for AutoRNP. NPTaylor also repairs localized multi-input
benchmark cases beyond AutoRNP's implemented one-input workflow. These results show that Taylor-based guarded patches can provide compact, efficient local repairs, while the claims remain validation-relative rather than full-domain proofs.
Read the full abstract ▾
All authors Xin Yi, Liqian Chen, Hengbiao Yu, Shangwen Wang, Tao Tang, Chun Huang, Xiaoguang Mao, Ji Wang
Software Engineering
Specification-Based Testing of Large Language Models
Kausar Moshood, Jace Bolante, Roshan Aditya Murali et al. (+1 more)
Model cards, system cards, and safety reports increasingly document LLM safety behaviors, yet safety evaluations typically start from predefined
benchmarks rather than asking which documented claims those
benchmarks actually test. We introduce LEST (LLM Evaluation through Specification-driven Testing), a framework that treats documented safety claims as specifications for black-box testing. In LEST, each claim determines which
benchmark prompt tests it and whether a Refuse-to-Comply transition, where a model refuses a
prompt but complies with its mutated version, counts as evidence against it. LEST mutates these
prompts to search for counterexamples, manually validates each candidate, and traces validated counterexamples back to the claims they contradict. We evaluate LEST using the system cards of Claude Opus 4.8 and GPT-5.5 with 97 seed
prompts from SORRY-Bench across Mental Health and Self-Harm, Harmful and Violent Content, and
Fairness and Bias. Of 56 identified safety claims, 29 (51.8%) are
prompt-testable, but only 17 (58.6%) are exercised by an applicable
benchmark prompt. Both models refuse >95% of
benchmark prompts. Evaluating 1,836 mutated
prompts on both models reveals 312 candidate Refuse-to-Comply transitions flagged by automated response classifiers. However, human validation confirms only 19 (6.1%) as both intent-preserving and genuinely compliant, showing automated evaluation substantially overestimates behavioral failures. Tracing these 19 transitions back to the claims reveals counterexamples for 6 of 9 covered claims for which refusal is an applicable oracle. Our results show that
benchmark prompts may not be sufficient to validate all documented LLM safety behavior, and automated failure detection requires manual validation. LEST provides end-to-end traceability from natural-
language safety documentation to executable tests and human-validated counterexamples.
Read the full abstract ▾
All authors Kausar Moshood, Jace Bolante, Roshan Aditya Murali, Manish Motwani
Software Engineering
HoldSpec: A Machine-Checked Model and Conformance Suite for the Payment Authorization Hold Lifecycle
Abhishek Sharma
When a merchant authorizes a card and captures the funds later, the money sits in a state that neither party fully controls: held on the cardholder's account, not yet taken, and due to lapse on a deadline set by the card network. What a merchant may do to that hold, capture part of it, capture again, void it, raise it, let it expire, is business logic that every payment service provider implements slightly differently and none of them specifies formally. We give the lifecycle a state machine in TLA+, parameterized by a provider capability profile, and check eight safety invariants and three liveness properties over 6 profiles, five of them built from Stripe's and Adyen's published documentation. From the same machine we generate a conformance suite that runs black-box against a provider API. Against 61 seeded defects that are distinguishishable from a correct implementation, the generated suite detects 100%, where random sequences with the same call budget reach 56% and a hand-written integration suite reaches 69%; random sequences given ten times the budget still reach only 67%. Running the same suite between two providers turns the comparison into a search, and it returns short executable witnesses for divergences the two documentation sets imply but neither states, including one that breaks the common assumption that a single adapter interface can sit over both, because closing a hold and releasing its remainder is a capture on one provider and a cancel on the other. We report what we could not do: no provider sandbox credentials were available, so every result here concerns documented behavior, and the suite that would test the providers themselves is part of what we release.
Read the full abstract ▾