frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: How do you catch silent logic bugs that don't crash?

1•vortexshadow•1h ago
I’ve seen cases where JavaScript code keeps running fine, tests pass, and there are no errors, but the internal logic becomes invalid.

For example:

order.status = "paid" order.invoiceId = null

No crash. No exception. Just wrong state.

How do experienced teams usually detect or guard against this kind of issue in real production systems?

Comments

OsrsNeedsf2P•48m ago
Fail as early as possible. In this specific case, invariants help.
vortexshadow•30m ago
Exactly.

Failing early is the key part — especially before invalid state has a chance to propagate through the system.

What I’ve found tricky in React apps is identifying where those invariants should live when the logic spans multiple async updates.

Do you usually enforce them close to state updates, or at higher-level boundaries?

vortexshadow•31m ago
To add some context: I’m specifically thinking about cases where each individual state update looks valid on its own, but the combination over time breaks a business rule.

For example, async flows where status updates and data creation are handled in different places.

Curious how teams make these kinds of assumptions explicit in practice.

al_borland•30m ago
Wouldn’t this be a gap in the tests that needs to be closed?
vortexshadow•29m ago
Tests definitely help, and I agree they should cover as much logic as possible.

The gap I’ve seen is that tests usually validate expected scenarios, while some invariants only break after specific sequences of events or over time — especially with async flows and state that evolves across renders.

In practice, we found tests and runtime checks to be complementary: tests verify intent, invariants catch unexpected drift when reality doesn’t match assumptions.

vortexshadow•20m ago
One nuance I keep seeing is that each individual update is valid, but the invariant only breaks after a specific sequence of events.

That’s where things get tricky to reason about upfront.

From PSTN to Private Azure OpenAI: Shipping a Real-Time Voice AI Stack on AKS

https://blog.miraiminds.co/
1•kirtan998•1m ago•0 comments

Show HN: Image Text Editor – replace text inside images (no layers)

https://imagetexteditor.org/
1•zhaomeng•3m ago•0 comments

Oh My PI: coding agent CLI, unified LLM API, TUI and web UI libraries

https://github.com/can1357/oh-my-pi
1•kachapopopow•10m ago•0 comments

Portrait of the Machine as a Young Artist (1965)[pdf]

https://monoskop.org/images/6/63/Pierce_JR_1965_Portrait_of_the_Machine_as_a_Young_Artist.pdf
1•ofalkaed•11m ago•0 comments

Show HN: Nex.Design – AI+Senior=10x, AI+Junior=3x with debt

https://www.nex.design/
1•zxzxy1988•18m ago•0 comments

The Missing Semester of Your CS Education (2026)

https://missing.csail.mit.edu/2026/course-shell/
2•geox•20m ago•0 comments

VaultGemma: A Differentially Private LLM

https://arxiv.org/abs/2510.15001
3•todsacerdoti•21m ago•0 comments

AsyncGBP+: Bridging SSL/TLS and Heterogeneous Computing with GPU-Based Providers

https://ieeexplore.ieee.org/document/10713226
1•westurner•21m ago•0 comments

Persistent shock wave around dead star puzzles astronomers

https://phys.org/news/2026-01-persistent-dead-star-puzzles-astronomers.html
1•wglb•26m ago•2 comments

Musk vs. Altman emails visualized in Apple Mail

https://openmail.one
1•opus45•27m ago•0 comments

Glazed sherds in remote Gobi Desert reveal ancient Persian trade connections

https://phys.org/news/2026-01-glazed-sherds-remote-gobi-reveal.html
2•wglb•30m ago•1 comments

I removed AI from my I Ching app

https://castiching.com/articles/why-no-ai
2•jackzhuo•30m ago•2 comments

VirWorld AI: Best AI Image to Video Free Promo Maker

https://image-to-video.app
1•julian2026•33m ago•0 comments

Software Too Cheap to Meter

https://secondthoughts.ai/p/software-too-cheap-to-meter
1•gmays•33m ago•0 comments

Astronomer uses 'China Sky Eye' to reveal binary origin of fast radio bursts

https://phys.org/news/2026-01-astronomer-china-sky-eye-reveal.html
1•wglb•36m ago•1 comments

Profession by Isaac Asimov

https://www.abelard.org/asimov.php
3•bkudria•36m ago•0 comments

Researchers solve mystery of universe's 'little red dots'

https://phys.org/news/2026-01-mystery-universe-red-dots.html
1•wglb•41m ago•1 comments

MetaXuda – 1.1 Tops GPU Runtime for Apple Silicon ML (Rust and Metal)

https://github.com/Perinban/MetaXuda-
1•perinban•44m ago•1 comments

Musk Seeks Up to $134B Damages from OpenAI, Microsoft

https://www.bloomberg.com/news/articles/2026-01-17/musk-seeks-up-to-134-billion-damages-from-open...
3•SanjayMehta•45m ago•0 comments

AI Zettelkasten Builder

https://edge.dog/docs
1•castalian•49m ago•0 comments

What the Ancient Pigment Ochre Tells Us About the Human Mind

https://www.discovermagazine.com/prehistoric-use-of-ochre-can-tell-us-about-the-evolution-of-huma...
2•thunderbong•58m ago•0 comments

Dark Mode vs. Light Mode: Which Is Better?

https://www.nngroup.com/articles/dark-mode/
1•seanwilson•58m ago•0 comments

Kaliningrad

https://en.wikipedia.org/wiki/Kaliningrad
1•kaycebasques•59m ago•0 comments

Claude Code read my codebase and generated an O'Reilly-style technical manual

https://www.linkedin.com/signup/cold-join
2•kurinikku•1h ago•0 comments

Why AI Doesn't Think: We Need to Stop Calling It "Cognition"

https://docs.google.com/document/d/1FHUgpRTtL23cUygPhAh7xasccfKpX0T2ZGdlcsEr-4U/edit?usp=sharing
4•m_Anachronism•1h ago•2 comments

Gemini Introduces Personal Intelligence

https://blog.google/innovation-and-ai/products/gemini-app/personal-intelligence/
1•gmays•1h ago•1 comments

Forecats

https://secondthoughts.my/posts/projects/forecats/
1•unsnap_biceps•1h ago•0 comments

Anthropic's Claude Code and the rise of autonomous coding tools

https://www.wsj.com/tech/ai/anthropic-claude-code-ai-7a46460e
2•julienchastang•1h ago•0 comments

Tell HN: YouTube disabled advanced subtitling, and is stripping it from old vids

2•mister_mort•1h ago•0 comments

I created an MCP that lets AI debug runtime code (breakpoints, stepping, etc.)

https://github.com/ai-debugger-inc/aidb
1•jefflester•1h ago•1 comments