◉CLAUDE LABJP
●CC 2.1.330 — No new release over the weekend; 2.1.330 is current and fixes "JSON schema is invalid" when the API rejects MCP tool schemas●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 7 days left. Move to claude-sonnet-5-5●CHROME — Users report Claude in Chrome failing on Authorize with "This isn't working right now"●NEW — New: Remote MCP hanging on expired auth? Check for mcp-remote first●EASEL — 2.1.330 adds easel, a built-in mod that draws charts on request. Turn auto charts off in /config●GEMINI 2.5 — Using Gemini 2.5 alongside Claude? From 12/1 requests reroute to newer models, billed at their rates●CC 2.1.330 — No new release over the weekend; 2.1.330 is current and fixes "JSON schema is invalid" when the API rejects MCP tool schemas●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 7 days left. Move to claude-sonnet-5-5●CHROME — Users report Claude in Chrome failing on Authorize with "This isn't working right now"●NEW — New: Remote MCP hanging on expired auth? Check for mcp-remote first●EASEL — 2.1.330 adds easel, a built-in mod that draws charts on request. Turn auto charts off in /config●GEMINI 2.5 — Using Gemini 2.5 alongside Claude? From 12/1 requests reroute to newer models, billed at their rates
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 Code291Automation44Operations25ShellIndie Dev23

✦ 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-08-22
Handing a long job to another session — and the completion marker for when the notification never arrives
How to use notify_when_idle to hear when another Claude Code session finishes, and a small completion marker that keeps you from waiting forever when the notification is dropped.
⟐ Claude Code2026-08-03
Existence Checks Pass, Writes Fail — Probing Capabilities Before an Unattended Run
A directory existing and a directory being writable are two different facts. Measured results from five broken-environment cases, why static clues cannot predict the worst of them, and a capability-probe preflight for unattended Claude Code runs.
⟐ Claude Code2026-10-23
When a Nightly claude -p Said MCP Needed Authentication, I Added a Preflight That Splits Sleep From Keychain
When a nightly claude -p run wakes up to MCP servers stuck on authentication or failed, a preflight can decide before the run whether to skip it, and a short checklist can tell sleep, a locked keychain and expired auth apart in the morning. Includes a fix for a parser that silently skipped servers with spaces in their names.