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

推荐订阅源

大猫的无限游戏
大猫的无限游戏
MyScale Blog
MyScale Blog
雷峰网
雷峰网
量子位
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
T
Tailwind CSS Blog
月光博客
月光博客
博客园 - 【当耐特】
博客园_首页
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
爱范儿
爱范儿
阮一峰的网络日志
阮一峰的网络日志
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
WordPress大学
WordPress大学
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
人人都是产品经理
人人都是产品经理
V
V2EX
酷 壳 – CoolShell
酷 壳 – CoolShell

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
How I Found Real Bugs in MoneyPrinterTurbo, CodeceptJS, a...
Kapil Rathore · 2026-06-16 · via DEV Community

Kapil Rathore

How I Found Real Bugs in MoneyPrinterTurbo, CodeceptJS, and Magento — And Got Them Merged

A QA engineer's journey into open source contribution


The Problem I Was Trying to Solve

I work as a QA Automation Engineer. Every day I see the same pattern — a developer pushes a commit, QA gets it, and we test... everything. The entire regression suite. Even when only one small thing changed.

I thought: what if a tool could tell you exactly what to test, based on what actually changed?

So I started building one. And to validate it, I needed real code. Real commits. Real bugs.

That's how I ended up contributing to three major open source repositories.


Repo 1 — MoneyPrinterTurbo (25k+ ⭐)

Bug: Groq provider had no default model name

While analyzing a recent commit that added Groq as an LLM provider, I noticed something inconsistent.

Every other provider in llm.py had a default model name configured:

# Other providers — defaults exist
g4f         "gpt-3.5-turbo-16k-0613"
gemini      _DEFAULT_GEMINI_MODEL

# Groq — no default ❌
groq_model_name = ""

The WebUI had a default (llama-3.3-70b-versatile), but users running via config.toml only — without the WebUI — would hit a validation error silently.

The fix: Add a service-side default for Groq in llm.py, consistent with other providers.

Harry (the maintainer) reviewed it, agreed, and merged it. ✅


Bug 2: CLI validation gaps for --video-source local

A second analysis found two validation gaps in the newly added CLI:

  1. --stop-at terms silently returned empty terms when --video-source local was set — no error, no warning, just {"terms": ""}.

  2. Missing --video-materials was only caught after expensive LLM + TTS steps completed — failing at Step 5 with a generic error, wasting all that compute.

# Fix — fail fast at parse time
if args.video_source == "local" and not args.video_materials:
    parser.error("--video-materials is required when --video-source is local")

Both guards were added. PR merged. ✅


Repo 2 — CodeceptJS (10k+ ⭐)

Bug: --shuffle flag silently ignored

This one was subtle. A previous PR (#5438) had added this.testFiles.sort() in run() to fix worker suite distribution — a correct fix for that problem. But it introduced a regression:

// loadTests() — shuffles correctly when --shuffle is set
if (this.opts.shuffle) {
  this.testFiles = shuffle(this.testFiles)  // ✅
}

// run() — always sorts, silently overwriting the shuffle ❌
this.testFiles.sort()

Every time --shuffle was set, the randomized order was immediately overwritten by the unconditional sort. The flag appeared to work — no error, no warning — but tests always ran in the same alphabetical order.

Fix: One guard condition:

if (!this.opts.shuffle) {
  this.testFiles.sort()
}

DavertMik — the creator of CodeceptJS — reviewed and merged it.

"Thank you for catching it!" — his exact words. ✅


Repo 3 — Magento / Adobe Commerce (14k+ ⭐)

Bug: Race condition crashes entire bulk price update batch

While reviewing a recent commit (ACP2E-4998) that fixed a NoSuchEntityException in TierPriceValidator, I noticed the fix was incomplete.

The same race condition existed in a sibling class — InvalidSkuProcessor — which is used by all three bulk price APIs (base price, special price, tier price).

The flow:

  1. retrieveProductIdsBySkus() builds a list of valid SKUs
  2. productRepository->get($sku) is called on each SKU — without a try/catch
  3. If a product is deleted between steps 1 and 2 (concurrent catalog modification), NoSuchEntityException propagates uncaught and kills the entire batch — all other valid SKUs are discarded silently
// Before — crashes entire batch if product deleted between lookup and fetch
if ($allowedPriceTypeValue && $type == Type::TYPE_BUNDLE) {
    $product = $this->productRepository->get($sku);  // ⚠️ throws if deleted
    if ($product->getPriceType() != $allowedPriceTypeValue) {
        $valueTypeIsAllowed = true;
    }
}

// After — graceful handling
try {
    $product = $this->productRepository->get($sku);
    if ($product->getPriceType() != $allowedPriceTypeValue) {
        $valueTypeIsAllowed = true;
    }
} catch (NoSuchEntityException $e) {
    $skuDiff[] = $sku;  // treat as invalid SKU and continue
}

The same pattern was already fixed in TierPriceValidator::checkQuantity()InvalidSkuProcessor was just missed.

PR submitted and all tests passing (Unit, Static, WebAPI). Under review by the Adobe team. 🤞


What I Learned

1. Real bugs hide in plain sight

None of these were exotic vulnerabilities. They were logic gaps — a missing guard, a missing default, a flag that silently did nothing. The kind of thing that slips through because the code runs, it just doesn't work correctly.

2. One commit tells a story

Looking at a commit in isolation is powerful. The Groq bug was visible because I was focused on just that commit — what changed, what didn't, what should have changed but wasn't touched.

3. Open source maintainers are generous

Every maintainer responded quickly, reviewed carefully, and gave detailed feedback — even when they disagreed. Harry, DavertMik, the Magento team — all professional and kind.

4. Validation matters

Not every finding was correct. One security analysis I submitted was rejected — the maintainer showed me defense layers I hadn't seen (framework-level sanitization that wasn't visible from the diff alone). That's part of the process. The goal is to be genuinely helpful, not to rack up PRs.


What's Next

I'm continuing to analyze more repositories using the same methodology. If you're a maintainer and want a free regression analysis of a recent PR or commit — feel free to reach out.

And if you're a QA engineer wondering whether open source contribution is worth your time — it absolutely is. You learn faster, you build credibility, and you contribute something real.


Thanks for reading. If this was useful, I'd love to hear your thoughts in the comments.