Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

GitHub Engineering 9 min read Case study mediumAdept

How to choose the next safe step in application modernization

Before picking a replacement framework, build an evidence inventory of what an application actually runs on and still does, then choose the least disruptive treatment per component: keep, upgrade, swap, wrap, or rewrite only when evidence justifies it. A time-boxed feasibility check decides between capturing legacy behavior and then upgrading, or building a thin modern slice first when the old code cannot run. Explicit safety levels (L0–L4) state how much regression protection actually exists. Applied to PiggyMetrics, BrowserQuest, DOOM and ADempiere, the method showed that a single broken embedded-MongoDB test dependency, not the architecture, was blocking PiggyMetrics, and the procedure is now packaged as the doc-and-modernize Copilot agent skill.

Related posts

  • ScarfBench: Benchmarking AI Agents for Enterprise Java Framework Migration

    Hugging Face easyNovice

    ScarfBench is an open benchmark of 34 enterprise Java applications (102 implementations, 204 migration tasks, ~151K LOC, 1,331 expert-written tests) for evaluating AI agents on migrations between Spring, Jakarta EE and Quarkus, scored on whether the result builds, deploys and preserves behavior. Frontier agents reach under 10% behavioral success, compile success consistently overstates migration quality, and Jakarta EE is the hardest target. Agents are overconfident: Claude Code claimed 29 of 30 whole-app builds succeeded, but only 22 did. Configuration dominates migration effort, the work proceeds as iterative dependency resolution across layers, and environment problems like Docker caches, ports and the Maven wrapper often block validation, so independent build-and-test verification remains essential.

  • How We Fixed the Dependency Confusion Vulnerability in Over 600 Ruby Applications

    Shopify Engineering mediumAdept

    Shopify closed a dependency confusion hole across roughly 600 Ruby applications by migrating each `Gemfile.lock` to Bundler's newer format, which pins every gem to an explicit source. A custom Bundler plugin did the upgrade without changing dependency versions: it allowed only patch updates during regeneration, then restored the original versions. A CLI running on top of CI gave each repository its own environment, ran the migrations in parallel and opened pull requests automatically. Shopify also failed CI on outdated Bundler versions and worked with the Bundler maintainers on changes that shipped in 2.2.21 and 2.2.22, the latter preventing lockfiles from regressing to the old format.

  • The Case Against Monkey Patching, From a Rails Core Team Member

    Shopify Engineering mediumAdept

    Monkey patching Rails and other gems is brittle and should be avoided. Patches break silently on upgrades because private APIs carry no deprecation warnings, they can leave apps exposed after security releases, they pile up as tech debt, and they change behavior globally. Ruby refinements are not a safe alternative: at Shopify they added 13 seconds to monolith boot time by busting method caches and are now banned. Before patching, try upgrading, recheck usage, or fix the problem upstream. If a patch is unavoidable, keep it small and version-guarded in lib/patches, call super, document and test it, and plan its removal.

  • Taking the fear out of migrations

    incident.io mediumAdept

    Data model migrations can be made low-risk with a four-step playbook: create the new model, dual-write to old and new (backfilling dependent and existing data with rerunnable jobs), read from both and alert on mismatches before switching reads behind a feature flag, then stop writing to and drop the old model. incident.io walks through the pattern using its move from hard-coded string incident statuses to a per-organisation incident_statuses table. Every step before dropping the old writes is reversible, so nothing has to be rushed and the read cutover can be undone with a feature flag. Simple migrations still finish in half a day to a day, and the work can be split across several engineers once the schema exists.

  • How to Write Code Without Having to Read It

    Shopify Engineering mediumAdept

    Engineers can safely change unfamiliar code with minimal reading by letting the compiler, linter and unit tests guide them: locate the entrypoint via user-visible strings (or git bisect for regressions), make the breaking change at the leaf component, then climb the callstack following build errors and sweep back down via lint errors, exhaustive switches and test failures. To make code easier for the next "non-reader," replace comments with enforced checks, wrap primitives in custom types, merge dependent arguments into tagged unions, nested objects or enums, and split decision logic into pure functions so unit tests stay simple. Examples use React Native and TypeScript but the approach generalizes to any typed, tested codebase.

The quest for software engineering knowledge.

Look:
Layout: