Lighthouse AdvisorySLED AI Adoption Intelligence
← Back to results

From the Anthropic edition of November 26, 2026

Academic researchCautionaryPreprint, not peer reviewedNewly relevant · May 2026

Preprint (May 2026): across 1,980 legacy-code modernization calls on 11 production LLMs, semantic-trap snippets drifted in 39.7% of attempts and producing models endorsed 31.7% of their own drift as behavior-preserving

Gokul Chandra Purnachandra Reddy, Aditya Lolla, Harsha Sanku (arXiv preprint authors) · Software engineering research; applicable to public-sector legacy modernization · Not specified; laboratory study

Publisher
arXiv (cs.SE)
Original publication
Submitted to arXiv May 20, 2026
Source retrieved
2026-11-27
Read original source

What happened

An independent preprint tested 11 production LLMs on 1,980 legacy-code modernization calls and found that code requiring real semantic changes drifted from original behavior in 39.7% of attempts, against 7.0% on control code. When asked to judge their own output, the models endorsed 31.7% of drifted outputs as behavior-preserving, sometimes after explaining the very distinction they broke. Drift rates did not track model capability or price.

Why it matters

Why now: Anthropic's Nov. 25 migration post argues that AI-written code must be checked by external verifiers and human review; this study supplies independent evidence for that point. Agencies running Claude Code modernization pilots (as in Seattle) should not accept model self-review or AI-ported tests as proof of correctness. Limited applicability: small Python 2 corpus, models not identified on the inspected page.

Evidence and measured results

Controlled study with a behavioral oracle, control baseline and released artifacts; preprint. Consistent with Anthropic's own report of 98% test pass versus about 25% production match and with Swimm's Feb. 2026 competitor test showing inconsistent Claude Code COBOL extraction.

Limitations and uncertainty

Preprint, not peer reviewed. Abstract page inspected; the abstract does not name the models, so whether Claude models were included was not verified. Small 60-snippet Python 2 corpus, not COBOL or production government systems; function-level snippets, not agentic whole-system migration with external verifiers.

Put this evidence to work

Lighthouse Advisory interpretation, grounded in this source. Enriched 2026-11-27; this does not change the original publication date. Each role follows the same checklist so takeaways compare across sources.

Sales

Role takeaway
Customer problem
Agencies need assurance that AI-modernized code preserves legally significant behavior.
Stakeholders
  • Application modernization lead
  • Program owners of eligibility or payment logic
  • Internal audit
  • Procurement
Discovery questions
  • How will you detect behavior changes the AI does not report?
  • Which logic areas (numeric, eligibility, dates) carry the most risk?
  • Will vendors provide independent verification evidence?
Value hypothesis
Independent verification can catch silent drift that model self-review misses; it adds cost but reduces risk.
Potential engagement
A short verification-design workshop and benchmark run on a sample of agency legacy code.
Unsupported claims
  • Does not show Claude specifically drifts at these rates
  • Not evidence about COBOL or whole-system migration
  • No cost or time data

Pre-sales engineering

Role takeaway
Fit
Relevant to any LLM-assisted code translation; strongest for function-level rewrites with subtle semantics.
Architecture and integration
Behavioral oracle or differential tests between legacy and new code; model output never self-certified.
Prerequisites
  • Executable legacy code or recorded outputs
  • Typed comparison harness
  • Trap-case inventory
Constraints
  • Small Python 2 corpus limits generalization
  • Models unnamed on inspected page
  • Preprint status
Security
Not a security study; ensure differential testing uses synthetic or approved data.
Proof of value
  • Run agency sample code through generation plus independent oracle
  • Measure self-review miss rate on agency code
  • Compare drift across candidate models

Delivery

Role takeaway
Work
Embed independent behavioral verification in AI-assisted modernization.
Dependencies
  • Legacy runtime access
  • Test harness
  • Expert reviewers
Ownership
Modernization engineering lead with internal audit oversight
Skills and adoption
Train reviewers on legacy-language semantic traps and on not trusting model explanations.
Governance checkpoints
  • Verification plan approved before generation starts
  • Independent evidence required at each component acceptance
  • Audit of drift findings before expanding scope
Acceptance criteria
  • Proposed: zero components accepted on model self-review alone
  • Proposed: drift detected by oracle tracked per component
  • Proposed: high-risk logic areas covered by differential tests
Risks
  • Silent behavior changes in payments or eligibility
  • Overreliance on model explanations
  • Reviewer skill gaps

Implementation considerations

Lighthouse Advisory interpretation across the operating dimensions a public-sector buyer must settle before this evidence becomes a design. Each note answers the question under its heading for this specific source.

Architecture and integration

What must connect, and where does the AI sit in the workflow?

Modernization pipelines need an independent behavioral oracle (legacy runtime outputs, differential tests) rather than the generating model's judgment.

Governance

Who approves, reviews and stays accountable for outcomes?

Acceptance criteria for AI-assisted migrations should prohibit self-certification by the generating model and require independent tests or human review.

Security and privacy

What data, permissions and controls need testing?

Silent semantic drift in numeric or eligibility logic can create incorrect payments or decisions without errors; the study does not address security controls directly.

Accessibility and workforce

Who is affected, and what skills or accommodations follow?

Reviewers need legacy-language semantic expertise, since the failures concentrate in subtle language differences.

Procurement

What should contracts, pricing and exit terms secure?

Contracts for AI-assisted modernization should require vendors to provide independent verification evidence, not model-generated assurances.

Operating model

Which teams own the service once it runs?

Separates the roles of code generator and verifier; agencies should staff or contract the verifier role explicitly.

Publication history

  1. 2026-11-26Anthropic · Issue 263 resources
Read preserved resource versions (JSON)

Stable resource ID: arxiv-2605-21537-llm-code-modernization-self-review-failures