CLAUDE LABJP
DESIGN — Claude Design gets a major update: design-system imports, direct canvas editing, and more export formatsCODE — Claude Design can start from your local codebase and hand a design off to Claude Code to implementFABLE — Fable 5, a Mythos-class model made safe for general use, is now available in Claude Code v2.1.170FIX — Mid-stream connection drops now preserve partial responses instead of showing a raw errorSCROLL — A new wheelScrollAccelerationEnabled setting disables mouse-wheel scroll acceleration in fullscreenTIER — The Claude Design beta is available to Pro, Max, Team, and Enterprise customersDESIGN — Claude Design gets a major update: design-system imports, direct canvas editing, and more export formatsCODE — Claude Design can start from your local codebase and hand a design off to Claude Code to implementFABLE — Fable 5, a Mythos-class model made safe for general use, is now available in Claude Code v2.1.170FIX — Mid-stream connection drops now preserve partial responses instead of showing a raw errorSCROLL — A new wheelScrollAccelerationEnabled setting disables mouse-wheel scroll acceleration in fullscreenTIER — The Claude Design beta is available to Pro, Max, Team, and Enterprise customers
Articles/Claude Code
Claude Code/2026-06-19Advanced

An Article My Gate Rejected Got Published — The Cost of Chaining the Quality Gate and git push in One Call

In an unattended publishing pipeline, an article my quality gate had rejected went live anyway. The cause was chaining the gate and git push into a single shell call. Here is how the exit code gets swallowed, and a two-phase publish-marker design that refuses to push until every gate has demonstrably passed.

Claude Code158Automation27Operations3Shell2Indie Dev17

Premium Article

One morning I went cold reading back the logs. An article my quality gate had stopped the night before — flagged with 🛑 violation detected — was sitting live on the site. The gate log clearly said it had failed. And yet, in the same run, git push had fired and the article was published.

The gate itself wasn't the problem. The problem was that I had written verification and publishing as a single shell call. As an indie developer running unattended publishing across several sites, I've learned that how the shell interprets exit codes turns directly into incidents. So I want to record what was actually happening and how I rebuilt it.

What happened the moment I chained them

The task body looked roughly like this:

python3 article_gate.py "$JA" "$EN"; git push origin main

It reads top to bottom as "gate, then push," which looks safe. But ; ignores the success or failure of what came before it entirely. Even if the gate exits with code 1, the shell runs the next git push as if nothing happened. That one line always meant "push regardless of what the gate decided."

In unattended runs there's no moment where a human reads the log and stops it. The instant I joined them with ;, verification became decoration that protected nothing.

The difference between ; and &&, and the single surviving exit code

Swapping ; for && prevents most of this incident on its own.

# Dangerous: pushes even if the gate fails
python3 article_gate.py "$JA" "$EN"; git push origin main
 
# Better: pushes only if the gate succeeded
python3 article_gate.py "$JA" "$EN" && git push origin main

&& runs the right side only when the left side exits 0. Most people know this much.

The trap is that an agent or scheduler treats this one line as a single command, and only the final exit code survives in its hands. With a && b, if a fails the whole thing is a failure — but you cannot tell apart "stopped at a" from "a passed and b (push) failed" without reading the log. When your execution layer only observes one success/failure value, the verification verdict never reaches the outside before the run barrels through to the irreversible step. That's exactly why I no longer consider && alone to be enough.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Why connecting a verification command and an irreversible action in one call swallows failures — the semicolon, pipes, command substitution, and set -e gaps — shown with reproducible code
A two-phase design using set -euo pipefail and a publish marker so push only runs after every gate has passed
Splitting verification and publishing into separate calls as a structural safeguard that forces evidence-before-action in unattended agent runs
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Claude Code2026-06-17
When an Announced Billing Change Is Withdrawn at the Last Minute, Change No Code
A billing change that was supposed to take effect was withdrawn on the day. To survive announce, apply, and revert without touching code, I keep platform behavior behind a single flag and project the monthly delta from real logs.
Claude Code2026-06-13
What the June 15 Claude Code Billing Change Means for Headless Runs
From June 15, 2026, the Agent SDK, headless claude -p, GitHub Actions, and third-party agents move to monthly credits. Here's how a solo developer running automation decided what to keep and what to cut.
Claude Code2026-05-18
Why Your `cd` and `export` Vanish Between Claude Code Bash Calls
Claude Code's Bash tool runs each call in a fresh shell, so cd and export never persist. Here's the symptom, the cause, and five practical patterns I use across my Dolice Labs pipelines.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →