惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 叶小钗
WordPress大学
WordPress大学
N
Netflix TechBlog - Medium
MyScale Blog
MyScale Blog
Stack Overflow Blog
Stack Overflow Blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 聂微东
M
MIT News - Artificial intelligence
F
Fortinet All Blogs
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
T
Tailwind CSS Blog
Recent Announcements
Recent Announcements
Jina AI
Jina AI
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
OpenZeppelin v5
Pratik Daith · 2026-05-03 · via DEV Community

Pratik Daithankar

1) Problem and Migration Scope

OpenZeppelin v5 migration in Solidity repos is expensive because it combines:

  • high-volume mechanical rewrites (imports and safe symbol moves),
  • behavior-sensitive edge cases (Ownable initialization and token hook migrations),
  • strict regression expectations from compile and test pipelines.

This project focuses on one concrete production migration:

  • package: @praddzy/openzeppelin-v5-safe-imports
  • target: safe OpenZeppelin import and allowlisted symbol migrations
  • objective: automate deterministic changes first, then route unresolved edge cases to AI/manual review.

2) Why This Matters in Production

Real teams delay upgrades because maintenance work is repetitive and risky. The migration value is not only speed, but confidence:

  • deterministic bulk updates reduce repetitive manual edits,
  • explicit TODO markers isolate risky areas instead of masking them,
  • baseline vs post-codemod verification protects against silent regressions.

This directly maps to the Boring AI rubric: accuracy, coverage, reliability on real repositories.

3) What We Built

3.1 Deterministic Codemod Layer

The workflow applies allowlisted safe rewrites such as:

  • @openzeppelin/contracts/security/ReentrancyGuard.sol -> @openzeppelin/contracts/utils/ReentrancyGuard.sol
  • @openzeppelin/contracts/security/Pausable.sol -> @openzeppelin/contracts/utils/Pausable.sol
  • upgradeable symbol rewrites where import migration is safe (IERC20Upgradeable -> IERC20, etc.).

Design constraint:

  • deterministic layer should never guess behavior-sensitive intent.
  • uncertain cases must remain explicit via TODO markers.

3.2 AI Edge-Case Layer

AI is used as a follow-up workflow step for unresolved patterns, not as a replacement for deterministic rewrites.

Captured edge-case backlog (primary validation target):

  • token_hooks_update_migration: 81
  • removed_module_usage: 60
  • ownable_initializer_initial_owner: 10
  • total TODO markers after deterministic pass: 151

4) Safety and Accuracy Controls

To minimize false positives:

  • rewrite set is allowlisted and scoped to known-safe transformations,
  • risky patterns are deferred instead of auto-fixed blindly,
  • evidence compares baseline and post-codemod compile/test status on real repos.

Zero-regression interpretation used here:

  • baseline compile/test pass,
  • post-codemod compile/test pass,
  • no new regression signal in evaluation summaries.

5) Real-Repo Evaluation Method

For each real repository:

  1. clone pinned ref,
  2. run baseline compile and tests,
  3. run codemod workflow,
  4. run post-codemod compile and tests,
  5. compare statuses and record verdict.

Environment strategy:

  • memory tiering includes 4096MB and higher fallbacks,
  • selected tier for the final successful matrix runs: 4096MB.

6) Quantitative Results

Important: compile/test columns below are command exit codes (0 = success, non-zero = failure), not item counts.

Target Repo Baseline Compile (Exit Code) Baseline Test (Exit Code) Post Compile (Exit Code) Post Test (Exit Code) Regression Any Verdict Selected Tier
foundry-defi-stablecoin-cu 0 0 0 0 false pass 4096
openzeppelin-contracts 0 0 0 0 false pass 4096
openzeppelin-contracts-upgradeable 0 0 0 0 false pass 4096

Aggregate outcome:

  • real repos validated: 3
  • regression verdict: pass across all 3
  • AI proof workflow status: 0
  • requirement completion score: 100%

7) Constraints and Honest Boundaries

This project intentionally does not claim full semantic automation for all OpenZeppelin v5 deltas.

What is automated with confidence:

  • deterministic import/symbol rewrites in the allowlisted rule set.

What is intentionally deferred:

  • semantic migrations requiring project-specific intent, represented as explicit TODO categories.

This boundary is deliberate to protect accuracy.

8) Reproducibility Commands

npm ci
npm test
npm run evidence:ai -- --target .codemod-eval-final/openzeppelin-contracts-upgradeable --workflow-path . --output .codemod-eval-final/ai-proof-summary.json
npm run evidence:hackathon -- --workdirs .codemod-eval-final,.codemod-eval --ai-proof .codemod-eval-final/ai-proof-summary.json --output .codemod-eval-final/hackathon-requirements.json

Enter fullscreen mode Exit fullscreen mode

9) Public Proof Links

10) Judge-Facing Final Summary

This submission demonstrates a production-oriented migration workflow:

  • deterministic codemods for safe high-volume changes,
  • explicit AI/manual handling for edge cases,
  • evidence-backed reliability on real public repositories,
  • zero regression signal across baseline vs post-codemod compile/test runs.

The result is not "magic full automation"; it is a reliable migration system with clear boundaries, measurable evidence, and repeatable execution.