<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alexander Ertli</title>
    <description>The latest articles on DEV Community by Alexander Ertli (@js402).</description>
    <link>https://dev.to/js402</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3166872%2Fa4ee43ac-33d2-48f8-a75e-89728075e64a.png</url>
      <title>DEV Community: Alexander Ertli</title>
      <link>https://dev.to/js402</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/js402"/>
    <language>en</language>
    <item>
      <title>Shouldn't AI Move From Cloud to Local Compute?</title>
      <dc:creator>Alexander Ertli</dc:creator>
      <pubDate>Sun, 14 Jun 2026 10:02:34 +0000</pubDate>
      <link>https://dev.to/js402/shouldnt-ai-move-from-cloud-to-local-compute-1gdd</link>
      <guid>https://dev.to/js402/shouldnt-ai-move-from-cloud-to-local-compute-1gdd</guid>
      <description>&lt;p&gt;A few things happened almost at the same time.&lt;/p&gt;

&lt;p&gt;GitHub moved Copilot deeper into usage-based billing.&lt;/p&gt;

&lt;p&gt;OpenAI kept pushing the Responses API as the default primitive for building agents.&lt;/p&gt;

&lt;p&gt;Anthropic launched Fable/Mythos and then had to suspend access a few days later because of a U.S. government directive.&lt;/p&gt;

&lt;p&gt;NVIDIA is putting “personal AI supercomputer” hardware into the market with DGX Spark and DGX Station.&lt;/p&gt;

&lt;p&gt;Individually, each of those stories is easy to treat as separate news.&lt;/p&gt;

&lt;p&gt;I do not think they are separate.&lt;/p&gt;

&lt;p&gt;I think they are all pointing in the same direction:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI coding is moving from a cloud feature into local infrastructure.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And that changes the question for developers.&lt;/p&gt;

&lt;p&gt;Not just:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which agent should I use?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Where does the agent run?&lt;br&gt;
Which models can it use?&lt;br&gt;
Who owns the runtime? And who the compute?&lt;br&gt;
What happens when pricing, policy, model access, or hardware changes?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is the part I think matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happened
&lt;/h2&gt;

&lt;p&gt;GitHub announced that Copilot plans transition to usage-based billing on June 1, 2026. The old premium request unit model is being replaced by GitHub AI Credits, with usage calculated from token consumption: input tokens, output tokens, and cached tokens, priced according to the model used. GitHub also says this is because Copilot has moved from a simple in-editor assistant toward an agentic platform that can run long multi-step coding sessions across repositories. (&lt;a href="https://github.blog/news-insights/company-news/github-copilot-is-moving-to-usage-based-billing/" rel="noopener noreferrer"&gt;The GitHub Blog&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;There is an important detail here: GitHub says code completions and Next Edit suggestions remain included and do not consume AI Credits. So this is not “every ghost text completion is billed now.” The bigger point is that agentic usage, chat, long-running sessions, code review, and heavier model work are now part of a visible token economy. (&lt;a href="https://github.blog/news-insights/company-news/github-copilot-is-moving-to-usage-based-billing/" rel="noopener noreferrer"&gt;The GitHub Blog&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;OpenAI is moving in the same direction from the other side. The Responses API was introduced as a new primitive for building agents, combining Chat Completions-style simplicity with tool use from the Assistants API. OpenAI also added built-in tools like web search, file search, computer use, and an Agents SDK with tracing and observability. (&lt;a href="https://openai.com/index/new-tools-for-building-agents/" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Then OpenAI expanded Responses further with remote MCP server support, Code Interpreter, improved file search, background mode for long-running tasks, reasoning summaries, and encrypted reasoning items. (&lt;a href="https://openai.com/index/new-tools-and-features-in-the-responses-api/" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;That is not just “new API features.”&lt;/p&gt;

&lt;p&gt;That is model vendors moving up the stack into runtime, tools, state, observability, and orchestration.&lt;/p&gt;

&lt;p&gt;Then the Anthropic Fable/Mythos story happened.&lt;/p&gt;

&lt;p&gt;Anthropic said the U.S. government issued an export-control directive requiring suspension of access to Fable 5 and Mythos 5 by foreign nationals, including foreign-national Anthropic employees. Anthropic said the practical result was that it had to disable access for all customers to ensure compliance. (&lt;a href="https://www.anthropic.com/news/fable-mythos-access" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;) The Verge reported the same basic story: an export-control directive citing national security concerns required blocking access for foreign nationals, and Anthropic cut access for all customers. (&lt;a href="https://www.theverge.com/ai-artificial-intelligence/949553/anthropic-fable-5-mythos-5-government-national-security" rel="noopener noreferrer"&gt;The Verge&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;You can argue about the policy. You can argue about the safety question. You can argue about whether the government overreacted.&lt;/p&gt;

&lt;p&gt;But as a developer, the practical lesson is boring:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;remote model access is not a stable primitive.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It can change because of price.&lt;/p&gt;

&lt;p&gt;It can change because of policy.&lt;/p&gt;

&lt;p&gt;It can change because of region.&lt;/p&gt;

&lt;p&gt;It can change because of provider risk posture.&lt;/p&gt;

&lt;p&gt;It can change because of model availability.&lt;/p&gt;

&lt;p&gt;That does not mean “never use frontier models.” That would be stupid. Frontier models are extremely useful.&lt;/p&gt;

&lt;p&gt;It means the runtime layer matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for us as developers
&lt;/h2&gt;

&lt;p&gt;For the last two years, a lot of AI tooling was sold like a product feature.&lt;/p&gt;

&lt;p&gt;Install extension.&lt;/p&gt;

&lt;p&gt;Sign in.&lt;/p&gt;

&lt;p&gt;Get magic.&lt;/p&gt;

&lt;p&gt;That worked for the first wave.&lt;/p&gt;

&lt;p&gt;But serious AI coding work is not just a UI feature anymore. It is a stack.&lt;/p&gt;

&lt;p&gt;You have model selection.&lt;/p&gt;

&lt;p&gt;You have context management.&lt;/p&gt;

&lt;p&gt;You have file search.&lt;/p&gt;

&lt;p&gt;You have tool execution.&lt;/p&gt;

&lt;p&gt;You have shell access.&lt;/p&gt;

&lt;p&gt;You have policy.&lt;/p&gt;

&lt;p&gt;You have logs.&lt;/p&gt;

&lt;p&gt;You have long-running tasks.&lt;/p&gt;

&lt;p&gt;You have cost.&lt;/p&gt;

&lt;p&gt;You have rate limits.&lt;/p&gt;

&lt;p&gt;You have model-specific quirks.&lt;/p&gt;

&lt;p&gt;You have the question of where your source code, prompts, tool results, and traces go.&lt;/p&gt;

&lt;p&gt;That is runtime territory.&lt;/p&gt;

&lt;p&gt;The uncomfortable part is that a lot of developers are now using agents that can inspect repos, edit files, run commands, open PRs, call tools, and sometimes run for minutes or hours — while the execution layer underneath is still treated like a black box.&lt;/p&gt;

&lt;p&gt;That is fine for experiments.&lt;/p&gt;

&lt;p&gt;It is not fine as the default future.&lt;/p&gt;

&lt;p&gt;If AI coding becomes part of normal development, then developers and teams need more control over the runtime.&lt;/p&gt;

&lt;p&gt;Not because cloud is bad.&lt;/p&gt;

&lt;p&gt;Because dependency without control is fragile.&lt;/p&gt;

&lt;h2&gt;
  
  
  The local compute trend is not a meme anymore
&lt;/h2&gt;

&lt;p&gt;The other signal is hardware.&lt;/p&gt;

&lt;p&gt;NVIDIA DGX Spark is a desktop AI system with a Grace Blackwell GB10 Superchip, 128 GB of coherent unified memory, and up to 1 petaFLOP of FP4 AI performance. NVIDIA says it can run AI development and testing workloads with models up to 200 billion parameters at the desktop, and two DGX Spark systems can connect for models up to 405 billion parameters. (&lt;a href="https://www.nvidia.com/en-us/products/workstations/dgx-spark/" rel="noopener noreferrer"&gt;NVIDIA&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;DGX Station goes even further. NVIDIA describes it as a deskside AI supercomputer with 748 GB of coherent memory and up to 20 petaFLOPS of AI compute, supporting models up to 1 trillion parameters. NVIDIA also announced DGX Station for Windows as a system that can serve as a dedicated AI supercomputer for one developer or a shared local compute node for teams. (&lt;a href="https://www.nvidia.com/en-us/products/workstations/dgx-station/" rel="noopener noreferrer"&gt;NVIDIA&lt;/a&gt;) (&lt;a href="https://nvidianews.nvidia.com/news/nvidia-dgx-station-for-windows-puts-a-trillion-parameter-ai-supercomputer-on-every-enterprise-desk" rel="noopener noreferrer"&gt;NVIDIA Newsroom&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Now, obviously, not everyone is buying a DGX Station.&lt;/p&gt;

&lt;p&gt;That is not the point.&lt;/p&gt;

&lt;p&gt;The point is the direction of travel.&lt;/p&gt;

&lt;p&gt;For a while, local AI meant “maybe you can run a small model on your laptop if you are patient.”&lt;/p&gt;

&lt;p&gt;Now the market is clearly moving toward a more serious local/on-prem/private-compute tier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;laptop for small models and simple workflows&lt;/li&gt;
&lt;li&gt;workstation for serious local development&lt;/li&gt;
&lt;li&gt;rented GPU box for heavier workloads&lt;/li&gt;
&lt;li&gt;team-local node for shared inference&lt;/li&gt;
&lt;li&gt;cloud frontier model when needed&lt;/li&gt;
&lt;li&gt;data center or cluster later&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is a very different world from “all useful intelligence lives behind one vendor API.”&lt;/p&gt;

&lt;p&gt;And once local or rented compute becomes powerful enough, the missing piece is not only the model runner.&lt;/p&gt;

&lt;p&gt;It is the runtime around it.&lt;/p&gt;

&lt;p&gt;Routing.&lt;/p&gt;

&lt;p&gt;Compatibility.&lt;/p&gt;

&lt;p&gt;Policies.&lt;/p&gt;

&lt;p&gt;Tools.&lt;/p&gt;

&lt;p&gt;Logs.&lt;/p&gt;

&lt;p&gt;Editor integration.&lt;/p&gt;

&lt;p&gt;The boring stuff.&lt;/p&gt;

&lt;p&gt;The stuff that makes it usable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The ecosystem is already forming
&lt;/h2&gt;

&lt;p&gt;This is where I think people should not be tribal.&lt;/p&gt;

&lt;p&gt;If you want to start today, there are already good projects.&lt;/p&gt;

&lt;p&gt;Kilo Code is an open-source AI coding agent across VS Code, JetBrains, CLI, and cloud. It supports many models, bring-your-own-key usage, multiple agent modes, autocomplete, and a full agentic coding experience. (&lt;a href="https://kilo.ai/" rel="noopener noreferrer"&gt;Kilo&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;OpenCode is another important piece. It is an open-source coding agent available as a terminal interface, desktop app, or IDE extension. It is model-agnostic and clearly sits in the “developer agent” category. (&lt;a href="https://opencode.ai/docs/" rel="noopener noreferrer"&gt;OpenCode&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Ollama is probably the easiest starting point for local models. It gives developers a simple way to run and manage open models locally, and it exposes a REST API for chat and generation on &lt;code&gt;localhost:11434&lt;/code&gt;. (&lt;a href="https://ollama.com/" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt;) (&lt;a href="https://github.com/ollama/ollama" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;If you are more advanced, or responsible for a team, vLLM is the next layer to understand. It is a high-throughput and memory-efficient inference and serving engine. The docs highlight Hugging Face integration, streaming outputs, tool calling and reasoning parsers, distributed inference features, and OpenAI-compatible API serving. (&lt;a href="https://docs.vllm.ai/" rel="noopener noreferrer"&gt;vLLM&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;That rough map matters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;want to just run a local model: start with Ollama&lt;/li&gt;
&lt;li&gt;want an open-source coding agent: try Kilo Code or OpenCode&lt;/li&gt;
&lt;li&gt;want serious serving for a team: look at vLLM&lt;/li&gt;
&lt;li&gt;want editor-native workflows: look at the VS Code/JetBrains/CLI agent space&lt;/li&gt;
&lt;li&gt;want policy, runtime, compatibility, local tools, and owned compute to become one layer: that is the gap I care about&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I do not see these projects as enemies.&lt;/p&gt;

&lt;p&gt;Actually the opposite.&lt;/p&gt;

&lt;p&gt;They form the market.&lt;/p&gt;

&lt;p&gt;They teach users what is possible.&lt;/p&gt;

&lt;p&gt;They normalize local models, open-source agents, model routing, self-hosting, and running AI outside a single cloud product.&lt;/p&gt;

&lt;p&gt;That makes the next layer possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this changed for Contenox
&lt;/h2&gt;

&lt;p&gt;This is also why I changed the shape of Contenox.&lt;/p&gt;

&lt;p&gt;For a while it was too easy to describe Contenox as “another agent runtime” or “a local agent framework.”&lt;/p&gt;

&lt;p&gt;That framing is too small.&lt;/p&gt;

&lt;p&gt;The direction is now clearer:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contenox should be a local-first AI runtime for top-tier agent work without giving up control.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The agent is still important.&lt;/p&gt;

&lt;p&gt;But the agent is the proof workload.&lt;/p&gt;

&lt;p&gt;The deeper product is the runtime layer underneath it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;run on compute you control&lt;/li&gt;
&lt;li&gt;use local, rented, or provider-backed models&lt;/li&gt;
&lt;li&gt;expose compatibility surfaces existing tools understand&lt;/li&gt;
&lt;li&gt;route across providers and models&lt;/li&gt;
&lt;li&gt;understand model capabilities&lt;/li&gt;
&lt;li&gt;execute tools safely&lt;/li&gt;
&lt;li&gt;keep policy and approvals visible&lt;/li&gt;
&lt;li&gt;log what happened&lt;/li&gt;
&lt;li&gt;support editor workflows&lt;/li&gt;
&lt;li&gt;avoid turning every local experiment into a fragile pile of glue scripts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is also why the VS Code extension matters.&lt;/p&gt;

&lt;p&gt;Not because VS Code is the whole product.&lt;/p&gt;

&lt;p&gt;Because editor AI is where the runtime has to prove itself immediately.&lt;/p&gt;

&lt;p&gt;Autocomplete has to be fast.&lt;/p&gt;

&lt;p&gt;Chat has to stream.&lt;/p&gt;

&lt;p&gt;Tool calls need approvals.&lt;/p&gt;

&lt;p&gt;Filesystem and shell access need boundaries.&lt;/p&gt;

&lt;p&gt;Model/provider selection must be understandable.&lt;/p&gt;

&lt;p&gt;The user should not need to run a whole browser control panel or expose a random HTTP server just to use local/editor AI.&lt;/p&gt;

&lt;p&gt;The editor is the pressure test.&lt;/p&gt;

&lt;p&gt;If the runtime can support a good VS Code experience, it becomes much more than a CLI experiment.&lt;/p&gt;

&lt;h2&gt;
  
  
  The goal: local-first, but not limited
&lt;/h2&gt;

&lt;p&gt;When I say local-first, I do not mean “local only.”&lt;/p&gt;

&lt;p&gt;That would be another trap.&lt;/p&gt;

&lt;p&gt;A local-first top-tier AI agent should be able to use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a small local model when that is enough&lt;/li&gt;
&lt;li&gt;a bigger local model on a workstation&lt;/li&gt;
&lt;li&gt;Ollama for simple local model management&lt;/li&gt;
&lt;li&gt;vLLM for team-grade serving&lt;/li&gt;
&lt;li&gt;OpenRouter or provider APIs when frontier capability is the right tradeoff&lt;/li&gt;
&lt;li&gt;future local/team GPU boxes when they make sense&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point is not purity.&lt;/p&gt;

&lt;p&gt;The point is control.&lt;/p&gt;

&lt;p&gt;You should be able to choose where the model runs.&lt;/p&gt;

&lt;p&gt;You should be able to move workloads.&lt;/p&gt;

&lt;p&gt;You should be able to see what tools the agent called.&lt;/p&gt;

&lt;p&gt;You should be able to approve dangerous actions.&lt;/p&gt;

&lt;p&gt;You should be able to keep logs.&lt;/p&gt;

&lt;p&gt;You should be able to switch from one backend to another without rewriting your whole workflow.&lt;/p&gt;

&lt;p&gt;That is the “without compromises” part for me.&lt;/p&gt;

&lt;p&gt;Not “everything is free.”&lt;/p&gt;

&lt;p&gt;Not “local models beat every frontier model.”&lt;/p&gt;

&lt;p&gt;Not “cloud is bad.”&lt;/p&gt;

&lt;p&gt;The compromise I do not want is this one:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To get a good AI coding experience, you must give up ownership of the runtime.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I think we can do better.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The recent news is not one story.&lt;/p&gt;

&lt;p&gt;Copilot metering shows that agentic coding work has real variable cost.&lt;/p&gt;

&lt;p&gt;OpenAI’s Responses API shows that model providers are turning tools, state, tracing, and orchestration into platform primitives.&lt;/p&gt;

&lt;p&gt;The Anthropic Fable/Mythos disruption shows that access to frontier capability can change suddenly because of policy.&lt;/p&gt;

&lt;p&gt;NVIDIA’s DGX Spark and DGX Station show that local and team-local AI compute is becoming a serious product category, not just a hobby setup.&lt;/p&gt;

&lt;p&gt;And the open-source ecosystem around Kilo Code, OpenCode, Ollama, and vLLM shows that developers are already moving toward a world where AI coding is not one cloud feature, but a stack.&lt;/p&gt;

&lt;p&gt;That is the world I want Contenox to fit into.&lt;/p&gt;

&lt;p&gt;Not as another random agent.&lt;/p&gt;

&lt;p&gt;As a local-first runtime for serious agent work on compute you control.&lt;/p&gt;

&lt;p&gt;The agent is what proves the product.&lt;/p&gt;

&lt;p&gt;The runtime is the product. &lt;/p&gt;

&lt;p&gt;Contenox: Free and OpenSource forever.&lt;/p&gt;

&lt;p&gt;Ctrl + P&lt;br&gt;
&lt;code&gt;&amp;gt; ext install contenox.contenox-runtime&lt;/code&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>vscode</category>
      <category>llm</category>
    </item>
    <item>
      <title>Vibecoding: How to get from 0 to SaaS in hours.</title>
      <dc:creator>Alexander Ertli</dc:creator>
      <pubDate>Wed, 03 Dec 2025 17:20:42 +0000</pubDate>
      <link>https://dev.to/js402/antigravity-how-to-get-from-0-to-saas-in-hours-27bg</link>
      <guid>https://dev.to/js402/antigravity-how-to-get-from-0-to-saas-in-hours-27bg</guid>
      <description>&lt;p&gt;With today's tools, validating an idea doesn't require coding.&lt;br&gt;
This is about &lt;strong&gt;Vibecoding&lt;/strong&gt;, a buzzword few define.&lt;/p&gt;

&lt;p&gt;It’s assumed to be a &lt;strong&gt;Skill&lt;/strong&gt;, just like programming. I may be or may not be, I’m not sure. So I run an experiment.&lt;/p&gt;

&lt;p&gt;Everything began when I downloaded a new IDE from this site → &lt;a href="https://antigravity.google/" rel="noopener noreferrer"&gt;https://antigravity.google/&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Okay, but what if? What about? Is this safe?&lt;br&gt;
No, let’s stop those thoughts. I set a hard rule: &lt;strong&gt;Let’s not overthink this and have some fun.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;



&lt;p&gt;Have a quick peek at what we are building here:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frr3rbpj24nzqi01utjno.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frr3rbpj24nzqi01utjno.png" alt="Screenshot-Final-App" width="800" height="678"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;First prompt on the freshly installed IDE:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;init me a next-js project with shadcn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Seeing the Agent install dependencies and validate the newly created project was impressive, but it also created the temptation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;okay, this takes too long; I would already be done with this!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Resisting the urge to take control, I waited. A couple of minutes later, the Agent finished the task.&lt;/p&gt;

&lt;p&gt;So I followed up:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Set up a decent landing page, write an appropriate copy for a technology career advisor app
- That only requires a CV with 
    - a card-style embedding that is hinting at a drop, your CV here.
    - Also have a sign-in form for recurring users
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And there it was, an App running in Chrome that contained exactly what I asked for.&lt;/p&gt;




&lt;p&gt;Next prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fix design issues like padding and placement, and we should prefer SSR or static where possible for better SEO. Also, add a dark mode toggle.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That was not that easy for the Agent to execute, so I had to follow up:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The navbar has still placement and padding issues, and we need to flesh it out, and the colour theme switcher is not respecting the system settings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yeah. A minute later, it’s fixed.&lt;/p&gt;




&lt;p&gt;Watching the Bot iterate on mistakes grew boring. I thought:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I'm doing it wrong—this isn't proper Prompt Engineering!"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I need to tell the Agent exactly what code I need and how exactly it would wire it. Which files to create and which to edit.&lt;/p&gt;

&lt;p&gt;Or don’t I? It kinda worked, so just let’s continue.&lt;/p&gt;

&lt;p&gt;After confirming via Chrome that it looks decent now, there is still a lot to nag on.&lt;/p&gt;

&lt;p&gt;Next Instruction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Okay, let's go. We need to make the landing page body clearer. Currently, the 'Drop your CV' section is not clearly labelled, and the signing form is not clearly separated from the new user onboarding flow.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I got what I asked for, then realised I wanted something else and blamed the Model for following instructions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Make the onboarding more prominent. 
- So that it does not need a description as an internal tool would
- INSTEAD, ensure this UX would properly work as if it's a saas
- move the signing form into a more subtle and more appropriate spot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now I had an app skeleton, perfect for a portfolio screenshot—just as the IDE warned me, I was out of tokens. Time for a break.&lt;/p&gt;




&lt;p&gt;Two hours later, casually browsing the generated code:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ugh... here we should have used..., and this file structure? We should have done... And how will...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I stopped catching myself almost wanting to rewrite everything.&lt;/p&gt;

&lt;p&gt;Let’s continue, I prompted the Agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Okay! Next, we need a DB. Let's add Supabase for simplicity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After creating a &lt;code&gt;.env&lt;/code&gt; with the proper entries I followed up with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Now let's wire up the CV component so that the user can drop a txt or md, and we move to the next screen where we show the user their CV they just posted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After checking the results via my Browser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Perfect! Next, wire up OpenAI, so we have it available and form a function in the server that we can use later with a proper prompt.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Minutes later, I got what I wanted. Dropping the Key into the &lt;code&gt;.env&lt;/code&gt;, then restart the server. Walking through the entire UI to reach a conclusion.&lt;/p&gt;




&lt;p&gt;Still not done, I instructed the busy bot with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Okay, but before the user can get an analysis, he has to sign in or sign up. We should use Supabase here; it's a new page we get when the user clicks on the analytics button.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yep, there it was, but still not quite right. I described the model that bordered me:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;After I hit create account, I got this weird message: 'Please check your email to confirm your account. ' It looks like an error, but it's not. We need to address this.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A while later, after the browser popped up several times and the chat history became busy, the agent returned to Idle.&lt;/p&gt;

&lt;p&gt;While verifying the results, I started noticing: testing changes is becoming difficult. Log in, click through the whole app, restart the server, repeat all the steps. This became more time-consuming than waiting for the Agent to complete a task. Antigravity clearly was using playwright internally, but I never got the scripts it used to test the App.&lt;/p&gt;

&lt;p&gt;After a moment of freezing, I decided to skip the rabbit hole of writing automated E2E tests. It’s a classic SWE trap for early-stage projects:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“It takes 3 minutes to test, let’s spend 2 hours to automate it! (and another hour every time we introduce a change, updating them)”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s focus on &lt;strong&gt;Product building&lt;/strong&gt;!&lt;/p&gt;




&lt;p&gt;So I prompted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Next, the system should remember the analysis results and prevent re-analysis of the same CVs.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But instead of a busy Agent, I got an &lt;strong&gt;out-of-tokens&lt;/strong&gt; message.&lt;/p&gt;

&lt;p&gt;A few hours later, once the token limit recovered, I reopened the IDE. Since I’d closed it, I had to recover the chat history. My plan: replace the feature set and try again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The system should remember the analysis results and prevent re-analysis of the same CVs. Let’s go!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Okay, something was done. As always, I hit accept all and launched the browser. Something was off. I read the change log and the documentation the model created.&lt;/p&gt;

&lt;p&gt;Ah, okay, I forgot to create the Table in Supabase. I quickly did that and re-tested the whole App. I still wasn't working, so I read the logs showing that the server couldn't map them to the code...&lt;/p&gt;

&lt;p&gt;Hm. Did we hit the wall? Time to take over?&lt;/p&gt;




&lt;p&gt;I resisted the temptation again, trying to think through what went wrong. Here is what I hypothesised:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Probably the Agent was unable to verify if the logic worked because the DB table was not present, so it coded blindly”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I copied and pasted the Table structure from Supabase into the chat interface and instructed the model to adapt the code to properly integrate with it.&lt;/p&gt;

&lt;p&gt;A back-and-forth started. I tested the App, the model desperately tried to follow through my prompts like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;“Continue evaluating the root cause” → “Okay, I saw you found some Issues, so yes, let's do that. Execute your suggestions.”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Half an hour later, we resolved the CV cache issue. I still was not satisfied. So I shared my observations on another Issue with the model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Despite being logged in when hitting the analyse button, this is wrong, and even if I truly would not be logged in, it should not have been an error but a sign-up/sign-in page
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yeah, I noticed that the more I chat with the Agent, the more I pretend to have never coded, and the more I pretend to have no Idea what’s broken here. Somehow funny.&lt;/p&gt;

&lt;p&gt;It worked. Dedicated to finishing this App, I went back to vibecoding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;We have broken links in the navbar, flesh the necessary pages out.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That was easy, as the bot returned static pages quickly.&lt;/p&gt;




&lt;p&gt;We continued:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;We have an analysis of another CV button on one of our pages, but in addition to that button, I want a new button that leads to a new feature that would provide in-depth career guidance, which builds on top of that analysis and the CV... Let's first flesh out a mock page and wire it up properly.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Okay, this one was also easy. I still could not help myself, but imagine all the warnings the linter would throw at me, while glipping through the codebase...&lt;/p&gt;

&lt;p&gt;So I instructed the model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Use npm run lint and fix any issues
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yeah. The agent died several times trying to execute the task. I persisted that it should continue. And magic, magic, the Issues were all fixed.&lt;/p&gt;

&lt;p&gt;I decided to continue, let’s push that further:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Okay, perfect, let's create a mock checkout page in the UI.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verifying the changes and doing the obligatory out-of-token break! I continued:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Let's wire up Stripe; we may also need to revisit our checkout-page mock.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As I already knew, this is an external dependency... So I need multiple turns to fix this after adding the needed &lt;code&gt;.env&lt;/code&gt;s, with prompts like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I added the needed envs, continue fixing the integration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With that done... the journey continued with another Prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;now we need to keep track if a user has a subscription now we need to keep track if a user has a subscription
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;As expected, the implementation plan clearly showed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WARNING
Database Schema: This will create a new subscriptions table in your Supabase database.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yep, so I precreated the table and informed the model before it wrote any code. Within two turns, I had what I needed.&lt;/p&gt;

&lt;p&gt;I let the Agent finish the remaining mock pages and elements, such as the advanced career guidance page. And walked through the last UX issues.&lt;/p&gt;

&lt;p&gt;Finally, it was good enough for me, and after a review, 2 more out-of-token breaks... We got the plumbing done to deploy it via CI, and the Project went live.&lt;/p&gt;

&lt;p&gt;Yup, this was a standard MVP build cycle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;project scaffolding&lt;/li&gt;
&lt;li&gt;landing page&lt;/li&gt;
&lt;li&gt;onboarding&lt;/li&gt;
&lt;li&gt;UX refinement&lt;/li&gt;
&lt;li&gt;data model&lt;/li&gt;
&lt;li&gt;external services (Supabase, OpenAI, Stripe)&lt;/li&gt;
&lt;li&gt;testing/verification&lt;/li&gt;
&lt;li&gt;DB integration&lt;/li&gt;
&lt;li&gt;subscription logic&lt;/li&gt;
&lt;li&gt;deployment&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;!!! Now it’s your turn.&lt;/strong&gt;&lt;br&gt;
→ Was that Vibecoding?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>saas</category>
      <category>javascript</category>
    </item>
    <item>
      <title>I Let an LLM Write JavaScript Inside My AI Runtime. Here’s What Happened</title>
      <dc:creator>Alexander Ertli</dc:creator>
      <pubDate>Tue, 18 Nov 2025 20:55:21 +0000</pubDate>
      <link>https://dev.to/js402/i-let-an-llm-write-javascript-inside-my-ai-runtime-heres-what-happened-2n0h</link>
      <guid>https://dev.to/js402/i-let-an-llm-write-javascript-inside-my-ai-runtime-heres-what-happened-2n0h</guid>
      <description>&lt;p&gt;Two weeks ago I read a line about tool use with Claude that stuck in my head. Paraphrased:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Direct tool calls don’t really scale.&lt;br&gt;
Have the model &lt;strong&gt;write code that uses tools&lt;/strong&gt;, and execute that code instead.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At the same time, I was knee-deep in wiring a JavaScript execution environment into Contenox, my self-hosted runtime for deterministic, chat-native AI workflows.&lt;/p&gt;

&lt;p&gt;So of course the thought was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;What if I just let the model write the JavaScript and run it inside the runtime?&lt;/em&gt; 😅&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This post is about what happened when I tried exactly that.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is Contenox?
&lt;/h2&gt;

&lt;p&gt;Very short version:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Contenox is a self-hostable runtime for sovereign GenAI applications.&lt;/strong&gt;&lt;br&gt;
It models AI behavior as &lt;strong&gt;explicit state machines&lt;/strong&gt;, not opaque prompt chains.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Some key properties:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Runtime, not a library&lt;/strong&gt;, &lt;strong&gt;Explicit state machines&lt;/strong&gt;, &lt;strong&gt;Chat-native interface&lt;/strong&gt;, &lt;strong&gt;Vendor-agnostic &amp;amp; self-hosted&lt;/strong&gt;, &lt;strong&gt;written in go with lots of passion and zero tolerance for shortcuts&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The experiment: ask it to fetch and summarize a TODO
&lt;/h2&gt;

&lt;p&gt;Once the JS execution hook was in place (a Goja VM with some globals exposed), I wired up a new state machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mux_input → moderate → generate_js → run_js → eval_js_result → (repair_js?) → answer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I opened the Contenox chat UI and typed:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; “Hey Contenox, fetch the TODO item from jsonplaceholder and summarize it.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The first attempt &lt;em&gt;didn’t&lt;/em&gt; go as planned.&lt;/p&gt;

&lt;p&gt;Instead of a neat summary, I got:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Contenox:&lt;/strong&gt;&lt;br&gt;
“I'm sorry, but it seems there was a problem fetching the TODO item from the provided URL due to an Internal Server Error (status code: 500). Unfortunately, I couldn't retrieve any data at this time. My apologies for the inconvenience!”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I checked manually – Cloudflare was having a moment, JSONPlaceholder was behind it, and the request really was failing. Okay, fair. Long coffee break.&lt;/p&gt;

&lt;p&gt;A bit later, I went back to the &lt;em&gt;same chat&lt;/em&gt; and typed:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; “okay let's try again now.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This time the reply was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Contenox:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;Task titled "delectus aut autem" is incomplete. Nothing to summarize here.&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Wait. It worked? Just like that?&lt;/p&gt;




&lt;h2&gt;
  
  
  Under the hood: LLM → JavaScript → tools → LLM
&lt;/h2&gt;

&lt;p&gt;Looking at the execution trace made it clear what happened.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Input is normalized and moderated
&lt;/h3&gt;

&lt;p&gt;The workflow starts with:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;mux_input&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Parses the incoming chat history into a normalized &lt;code&gt;messages&lt;/code&gt; array.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;moderate&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Uses a small model to classify the input as safe/unsafe.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Output: &lt;code&gt;0&lt;/code&gt; → safe → continue.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So far this is standard workflow stuff.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;generate_js&lt;/code&gt;: the LLM writes JavaScript
&lt;/h3&gt;

&lt;p&gt;Next, the &lt;code&gt;generate_js&lt;/code&gt; task runs with a system instruction like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;“You are an expert JavaScript agent for the Contenox runtime…”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;“You must output JSON: { "code": "" }”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;“You can use httpFetch, executeTask, executeTaskChain, …”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;“Script must be synchronous, no async/await, and must return a JSON-serializable object.”&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Given the chat history, the model produced something like this (simplified):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"var result;
var answer;
var meta = { steps: [] };

var todoUrl = &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;https://jsonplaceholder.typicode.com/todos/1&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;;

// Step 1: Fetch the TODO item
meta.steps.push(&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;Fetching TODO item from &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; + todoUrl);
var fetchResponse = httpFetch(todoUrl);

if (!fetchResponse.ok) {
  answer = &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;I couldn't access that item right now because there was some trouble with getting it. Please check the URL or try again later.&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;;
  meta.error = {
    message: &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;HTTP fetch failed&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;,
    url: todoUrl,
    status: fetchResponse.status,
    statusText: fetchResponse.statusText,
    body: fetchResponse.body,
    error: fetchResponse.error
  };
  result = { answer: answer, meta: meta };
} else {
  var todoItem;
  try {
    todoItem = JSON.parse(fetchResponse.body);
    meta.raw = todoItem;
  } catch (e) {
    answer = &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;I fetched the item, but I couldn't understand its format. It doesn't seem to be valid JSON.&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;;
    meta.error = {
      message: &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;JSON parse error&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;,
      rawBody: fetchResponse.body,
      parseError: e.toString()
    };
    result = { answer: answer, meta: meta };
  }

  if (todoItem) {
    // Step 2: Summarize the TODO item using an LLM
    meta.steps.push(&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;Summarizing TODO item with LLM&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;);
    var prompt = &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;Summarize the following TODO item in a concise sentence: &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; + JSON.stringify(todoItem);
    var summarizeTask = executeTask(prompt, &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;gpt-4o-mini&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;, &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;openai&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;);

    if (!summarizeTask.success) {
      answer = &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;While I managed to fetch your TODO details, the summary tool had a hiccup and couldn't provide me with a concise sentence right now. We seem to be experiencing some temporary issues.&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;;
      meta.error = {
        message: &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;LLM task execution failed&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;,
        task_id: summarizeTask.task_id,
        error: summarizeTask.error
      };
      result = { answer: answer, meta: meta };
    } else {
      answer = summarizeTask.response;
      meta.llmResponse = summarizeTask.response;
      result = { answer: answer, meta: meta };
    }
  }
}

result;"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few important details here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;It &lt;strong&gt;encodes error handling&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If HTTP fails → user-friendly &lt;code&gt;answer&lt;/code&gt;, raw error in &lt;code&gt;meta.error&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If JSON parse fails → similar pattern.&lt;/li&gt;
&lt;li&gt;If the inner LLM call fails → fallback message.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It &lt;strong&gt;delegates the actual summarization&lt;/strong&gt; to another model via &lt;code&gt;executeTask&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It &lt;strong&gt;returns a structured &lt;code&gt;result&lt;/code&gt;&lt;/strong&gt; with both &lt;code&gt;answer&lt;/code&gt; and &lt;code&gt;meta&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is not the model “calling tools” directly. It’s the model &lt;strong&gt;writing a program&lt;/strong&gt; that calls tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;code&gt;run_js&lt;/code&gt;: execute the code in a sandbox
&lt;/h3&gt;

&lt;p&gt;The next task is &lt;code&gt;run_js&lt;/code&gt;, which is just a Contenox &lt;code&gt;hook&lt;/code&gt; that calls the JS sandbox:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"js_sandbox"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"tool_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"execute_js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"{{.generate_js.code}}"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the trace you can see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An &lt;code&gt;httpFetch&lt;/code&gt; log for the JSONPlaceholder URL.&lt;/li&gt;
&lt;li&gt;A response with &lt;code&gt;status: 200 OK&lt;/code&gt; when things finally worked.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An &lt;code&gt;executeTask&lt;/code&gt; log with the summarization prompt:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Summarize the following TODO item in a concise sentence: {"userId":1,"id":1,"title":"delectus aut autem","completed":false}&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The sandbox result looked roughly like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"result"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"answer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Task titled &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;delectus aut autem&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; is incomplete."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"meta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"llmResponse"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Task titled &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;delectus aut autem&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; is incomplete."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"raw"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"userId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"delectus aut autem"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"completed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"steps"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"Fetching TODO item from https://jsonplaceholder.typicode.com/todos/1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"Summarizing TODO item with LLM"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"logs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"var result; ..."&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. &lt;code&gt;eval_js_result&lt;/code&gt;: success or retry?
&lt;/h3&gt;

&lt;p&gt;Now comes the evaluator:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It receives a description of the JS sandbox output.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The system prompt is very strict:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;ok&lt;/code&gt; is true &lt;strong&gt;and&lt;/strong&gt; there is a non-empty &lt;code&gt;result.answer&lt;/code&gt; → respond with &lt;code&gt;success&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Otherwise → respond with &lt;code&gt;retry&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On the successful run, it answered:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;success
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the workflow does &lt;em&gt;not&lt;/em&gt; go into &lt;code&gt;repair_js&lt;/code&gt; or &lt;code&gt;run_js_retry&lt;/code&gt;. Happy path.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. &lt;code&gt;answer&lt;/code&gt;: extract the final user message
&lt;/h3&gt;

&lt;p&gt;The final task, &lt;code&gt;answer&lt;/code&gt;, is intentionally boring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;System prompt: &lt;em&gt;“You are a purely extractive post-processor. Do NOT invent content. Just surface the best existing &lt;code&gt;answer&lt;/code&gt; field.”&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It gets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First run (&lt;code&gt;run_js&lt;/code&gt; result).&lt;/li&gt;
&lt;li&gt;Second run (&lt;code&gt;run_js_retry&lt;/code&gt;), if any.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Selection rule:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Take the &lt;strong&gt;last non-empty &lt;code&gt;answer&lt;/code&gt;&lt;/strong&gt; you see.&lt;/li&gt;
&lt;li&gt;Output it &lt;em&gt;verbatim&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In our case it found:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Task titled "delectus aut autem" is incomplete.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that’s exactly what Contenox replied in chat.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why this is interesting (to me, at least)
&lt;/h2&gt;

&lt;p&gt;What I originally set out to build:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A runtime for &lt;strong&gt;deterministic, observable&lt;/strong&gt; GenAI workflows.&lt;br&gt;
Tasks, transitions, hooks – all explicit and replayable.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What I accidentally stumbled into:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A multi-model, self-orchestrating agent pattern,&lt;br&gt;
where LLMs write code that uses tools, and the runtime executes and evaluates that code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The pattern looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Planner LLM&lt;/strong&gt; (&lt;code&gt;generate_js&lt;/code&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Reads user intent + history.&lt;/li&gt;
&lt;li&gt;Emits JavaScript that calls &lt;code&gt;httpFetch&lt;/code&gt;, &lt;code&gt;executeTask&lt;/code&gt;, &lt;code&gt;executeTaskChain&lt;/code&gt;, hooks, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Execution environment&lt;/strong&gt; (&lt;code&gt;run_js&lt;/code&gt; in Goja)&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Deterministic execution of that JS.&lt;/li&gt;
&lt;li&gt;Full logs of every HTTP call, every inner LLM call, every step.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Controller LLM&lt;/strong&gt; (&lt;code&gt;eval_js_result&lt;/code&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Looks at the sandbox result.&lt;/li&gt;
&lt;li&gt;Decides: is this good enough? Retry? Repair?&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Repair LLM&lt;/strong&gt; (&lt;code&gt;repair_js&lt;/code&gt;, if needed)&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Gets the previous code + error output.&lt;/li&gt;
&lt;li&gt;Writes a fixed version of the JS.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Answer LLM&lt;/strong&gt; (&lt;code&gt;answer&lt;/code&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Doesn’t “reason” at all.&lt;/li&gt;
&lt;li&gt;Just extracts the final &lt;code&gt;answer&lt;/code&gt; text safely.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of that is expressed as an explicit &lt;strong&gt;state machine&lt;/strong&gt; in Contenox.&lt;/p&gt;

&lt;p&gt;No hidden loops, no undocumented retries, no magic glue code inside some SDK. It’s all visible in the workflow graph and trace.&lt;/p&gt;




&lt;p&gt;To me, that’s the exciting part:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You don’t have to choose between “boring deterministic workflows” and “fancy agents”.&lt;br&gt;
You can build the agent &lt;em&gt;on top of&lt;/em&gt; deterministic workflows.&lt;br&gt;
And everything stays **self-hosted, inspectable, and auditable if you want.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>llm</category>
      <category>javascript</category>
      <category>ai</category>
      <category>go</category>
    </item>
    <item>
      <title>Vibe Coding a Simple Feature Took 3 Hours. Here's Why.</title>
      <dc:creator>Alexander Ertli</dc:creator>
      <pubDate>Wed, 27 Aug 2025 19:02:01 +0000</pubDate>
      <link>https://dev.to/js402/vibe-coding-a-simple-feature-took-3-hours-heres-why-4f7m</link>
      <guid>https://dev.to/js402/vibe-coding-a-simple-feature-took-3-hours-heres-why-4f7m</guid>
      <description>&lt;h2&gt;
  
  
  The Setup
&lt;/h2&gt;

&lt;p&gt;Today, I tried what people call &lt;em&gt;vibe coding&lt;/em&gt;. The rule: I only prompt the model for code—no touching the output manually.&lt;/p&gt;

&lt;p&gt;The task seemed simple enough: add &lt;code&gt;Seed&lt;/code&gt; and &lt;code&gt;TopP&lt;/code&gt; parameters to my Go model-provider abstraction. This was straightforward plumbing, with the catch that &lt;strong&gt;all existing unit and integration tests must still pass&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I started with this interface:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;ChatArgument&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;setTemperature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;float64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;setMaxTokens&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;setTopP&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;float64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// to be implemented&lt;/span&gt;
    &lt;span class="n"&gt;setSeed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;     &lt;span class="c"&gt;// to be implemented&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the usual entry points:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;VLLMChatClient&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;Chat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="n"&gt;ChatArgument&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;OpenAIChatClient&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;Chat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="n"&gt;ChatArgument&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;OllamaChatClient&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;Chat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="n"&gt;ChatArgument&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;GeminiChatClient&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;Chat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="n"&gt;ChatArgument&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="n"&gt;modelrepo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;Role&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"system"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Content&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"You are a task processor talking to other machines. Answer briefly."&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;Role&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Content&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"What is the capital of Italy?"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;chatClient&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Chat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;modelrepo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;WithTemperature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;modelrepo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;WithMaxTokens&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;60&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;require&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NoError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;assert&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Contains&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;strings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ToLower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Content&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="s"&gt;"rome"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All I wanted was to add two new arguments. A 20–60 minute manual job, tops.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Unexpected Detour
&lt;/h2&gt;

&lt;p&gt;Instead of giving me the tiny change I asked for, the model rewrote my implementations. Massive diffs. The &lt;code&gt;ChatArgument&lt;/code&gt; interface turned into... something else entirely. Sure, that might have been fine for a greenfield project, but in my codebase, four other layers depended on the existing package API, which exposed the &lt;code&gt;With...&lt;/code&gt; option pattern.&lt;/p&gt;

&lt;p&gt;That’s when I got curious: Why was the model so confident about "fixing" something I didn't want fixed?&lt;/p&gt;




&lt;h2&gt;
  
  
  The Debate
&lt;/h2&gt;

&lt;p&gt;So I asked it to brainstorm patterns.&lt;br&gt;
Three hours later, I was in a full-on design debate with my AI assistant. It defended its choices like a junior dev who thinks they’re right and you just don’t understand their genius.&lt;/p&gt;

&lt;p&gt;The first idea it pushed was the classic Go functional options pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;ChatOption&lt;/span&gt; &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;chatOptions&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;chatOptions&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Temperature&lt;/span&gt; &lt;span class="kt"&gt;float64&lt;/span&gt;
    &lt;span class="n"&gt;MaxTokens&lt;/span&gt;   &lt;span class="kt"&gt;int&lt;/span&gt;
    &lt;span class="n"&gt;TopP&lt;/span&gt;        &lt;span class="kt"&gt;float64&lt;/span&gt;
    &lt;span class="n"&gt;Seed&lt;/span&gt;        &lt;span class="kt"&gt;int&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;WithTemperature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="kt"&gt;float64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;ChatOption&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On paper? Looks fine. In practice? Useless for my case. There’s no way to tell if &lt;code&gt;TopP&lt;/code&gt; was actually set or if it just defaulted to &lt;code&gt;0.0&lt;/code&gt;. And since LLM API defaults are rarely zero and differ between vendors, that distinction is critical.&lt;/p&gt;

&lt;p&gt;But instead of adjusting, the model doubled down. Builder pattern. Map-based options. Configuration structs. Each round, it grew more confident and more critical of my existing approach.&lt;/p&gt;




&lt;h2&gt;
  
  
  Breaking the Rule
&lt;/h2&gt;

&lt;p&gt;By 3 PM, I was staring at my to-do list—performance benchmarks, landing page copy, demo prep—and realizing that none of that was happening today.&lt;/p&gt;

&lt;p&gt;So I broke my own rule. I handed the model the blueprint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;ChatConfig&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Temperature&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="kt"&gt;float64&lt;/span&gt; &lt;span class="s"&gt;`json:"temperature,omitempty"`&lt;/span&gt;
    &lt;span class="n"&gt;MaxTokens&lt;/span&gt;   &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;     &lt;span class="s"&gt;`json:"max_tokens,omitempty"`&lt;/span&gt;
    &lt;span class="n"&gt;TopP&lt;/span&gt;        &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="kt"&gt;float64&lt;/span&gt; &lt;span class="s"&gt;`json:"top_p,omitempty"`&lt;/span&gt;
    &lt;span class="n"&gt;Seed&lt;/span&gt;        &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;     &lt;span class="s"&gt;`json:"seed,omitempty"`&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;ChatArgument&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;ChatConfig&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This new interface was less flexible than my original, but it was simple enough for the AI to understand while still preserving the key feature: &lt;strong&gt;pointers&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;nil&lt;/code&gt; → &lt;strong&gt;Unset&lt;/strong&gt;, use vendor default.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;amp;0.0&lt;/code&gt; → &lt;strong&gt;Explicitly set&lt;/strong&gt; to zero.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s exactly what you need when bridging multiple LLM APIs with different defaults.&lt;/p&gt;

&lt;p&gt;And once I gave it the pattern, the model behaved. Five minutes later, I had the snippets I needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Takeaway
&lt;/h2&gt;

&lt;p&gt;In hindsight, the problem wasn’t just “bad AI output.” My variable names weren't perfect, the interface was more of a type-safety sanity check, and some comments were stale. This context pollution—the typical stuff in any living codebase—probably nudged the model toward the wrong patterns.&lt;/p&gt;

&lt;p&gt;Still, what should’ve been a one-hour manual coding task turned into a three-hour argument with an overconfident assistant.&lt;/p&gt;

&lt;p&gt;More importantly, it validated why my abstraction looks the way it does. The pointer-based config wasn’t some over-engineering exercise; it was a deliberate design to handle the &lt;strong&gt;unset vs. explicit&lt;/strong&gt; states across inconsistent vendor APIs.&lt;/p&gt;

&lt;p&gt;The model, lacking that context, kept trying to “fix” it.&lt;/p&gt;

&lt;p&gt;The lesson? AI can be an excellent executor when you hand it a precise blueprint. But as an architect? Not so much.&lt;/p&gt;

&lt;p&gt;And that’s exactly why I built &lt;a href="https://github.com/contenox/runtime" rel="noopener noreferrer"&gt;contenox/runtime&lt;/a&gt; — because if you want agents to do serious work, abstractions and guardrails aren’t optional.&lt;/p&gt;

&lt;p&gt;I’ll invite you to join: let’s take control back from the LLMs.&lt;/p&gt;

</description>
      <category>go</category>
      <category>ai</category>
      <category>softwaredevelopment</category>
      <category>productivity</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Alexander Ertli</dc:creator>
      <pubDate>Sat, 05 Jul 2025 17:43:10 +0000</pubDate>
      <link>https://dev.to/js402/-2168</link>
      <guid>https://dev.to/js402/-2168</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/naveens16/behold-the-modular-monolith-the-architecture-balancing-simplicity-and-scalability-2d4" class="crayons-story__hidden-navigation-link"&gt;Behold the Modular Monolith: The Architecture Balancing Simplicity and Scalability&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/naveens16" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F238528%2F233bea95-49d9-4e49-b566-5a04a41781ce.png" alt="naveens16 profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/naveens16" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Kubernetes with Naveen
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Kubernetes with Naveen
                
                
              
              &lt;div id="story-author-preview-content-2596269" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/naveens16" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F238528%2F233bea95-49d9-4e49-b566-5a04a41781ce.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Kubernetes with Naveen&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/naveens16/behold-the-modular-monolith-the-architecture-balancing-simplicity-and-scalability-2d4" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jun 16 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/naveens16/behold-the-modular-monolith-the-architecture-balancing-simplicity-and-scalability-2d4" id="article-link-2596269"&gt;
          Behold the Modular Monolith: The Architecture Balancing Simplicity and Scalability
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/microservices"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;microservices&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devops"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devops&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/kubernetes"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;kubernetes&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cloudnative"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cloudnative&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/naveens16/behold-the-modular-monolith-the-architecture-balancing-simplicity-and-scalability-2d4" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;12&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/naveens16/behold-the-modular-monolith-the-architecture-balancing-simplicity-and-scalability-2d4#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>microservices</category>
      <category>devops</category>
      <category>kubernetes</category>
      <category>cloudnative</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Alexander Ertli</dc:creator>
      <pubDate>Thu, 26 Jun 2025 19:09:15 +0000</pubDate>
      <link>https://dev.to/js402/-5hld</link>
      <guid>https://dev.to/js402/-5hld</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/shayy/everyone-is-wrong-about-sqlite-4gjf" class="crayons-story__hidden-navigation-link"&gt;Everyone Is Wrong About SQLite&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/shayy" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2711665%2Fe528db00-6ac0-4654-b0d5-c68d84ed332e.png" alt="shayy profile" class="crayons-avatar__image" width="400" height="400"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/shayy" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Shayan
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Shayan
                
                
              
              &lt;div id="story-author-preview-content-2628249" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/shayy" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2711665%2Fe528db00-6ac0-4654-b0d5-c68d84ed332e.png" class="crayons-avatar__image" alt="" width="400" height="400"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Shayan&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/shayy/everyone-is-wrong-about-sqlite-4gjf" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jun 26 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/shayy/everyone-is-wrong-about-sqlite-4gjf" id="article-link-2628249"&gt;
          Everyone Is Wrong About SQLite
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/javascript"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;javascript&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/shayy/everyone-is-wrong-about-sqlite-4gjf" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;174&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/shayy/everyone-is-wrong-about-sqlite-4gjf#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              51&lt;span class="hidden s:inline"&gt;&amp;nbsp;comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            7 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Scaling Go Tests with Smart Naming Conventions</title>
      <dc:creator>Alexander Ertli</dc:creator>
      <pubDate>Sat, 07 Jun 2025 17:57:49 +0000</pubDate>
      <link>https://dev.to/js402/scaling-go-tests-with-smart-naming-conventions-4e92</link>
      <guid>https://dev.to/js402/scaling-go-tests-with-smart-naming-conventions-4e92</guid>
      <description>&lt;p&gt;&lt;em&gt;(How I accidentally built a test naming system that worked)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It's common mantra in the Go ecosystem to test with the real thing whenever possible. But as our codebase grew, running tests with &lt;code&gt;go test -v&lt;/code&gt; became a reason to take a 5-minute coffee break. Here's how we solved it.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚡️ Quick Go Testing Refresher
&lt;/h3&gt;

&lt;p&gt;Go's testing conventions are beautifully simple:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Test files&lt;/strong&gt;: End with &lt;code&gt;_test.go&lt;/code&gt; (e.g., &lt;code&gt;service.go&lt;/code&gt; → &lt;code&gt;service_test.go&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test functions&lt;/strong&gt;: Start with &lt;code&gt;TestXxx(t *testing.T)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run tests&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  go &lt;span class="nb"&gt;test&lt;/span&gt; ./...          &lt;span class="c"&gt;# All tests in subdirectories  &lt;/span&gt;
  go &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt;             &lt;span class="c"&gt;# Verbose output  &lt;/span&gt;
  go &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;-run&lt;/span&gt; TestFoo   &lt;span class="c"&gt;# Run specific tests  &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's scale this foundation.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 Understanding Test Types in Go
&lt;/h3&gt;

&lt;p&gt;As our system grew, we needed clear test categories:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Unit Tests&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test isolated logic (pure functions, single components)
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Example&lt;/em&gt;: &lt;code&gt;ValidateUserEmail()&lt;/code&gt; formatting
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scope&lt;/strong&gt;: Single package, no cross-boundary calls
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed&lt;/strong&gt;: Instant (no I/O, only Go code)
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Integration Tests&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test interactions with real dependencies (DBs, APIs, Testcontainers)
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;and cross-package boundaries&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Example&lt;/em&gt;: &lt;code&gt;UserService.Save()&lt;/code&gt; writing to PostgreSQL + calling &lt;code&gt;auditlog&lt;/code&gt; package
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed&lt;/strong&gt;: Slower (requires live services)
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;End-to-End (E2E) Tests&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test full system workflows
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Example&lt;/em&gt;: HTTP API calls from auth to DB persistence or testing SDK-interfaces&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed&lt;/strong&gt;: Very slow&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With these categories defined, we needed a way to run them separately.&lt;/p&gt;

&lt;h4&gt;
  
  
  🔧 First Attempt: Environment Variables
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"INTEGRATION_TESTS"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Skip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Skipping integration test"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Problems emerged&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;IDE test runners would "pass" (but actually skip) tests
&lt;/li&gt;
&lt;li&gt;CI configurations became bloated
&lt;/li&gt;
&lt;li&gt;Easy to forget setting env vars
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🧪 Second Try: Regex in Test Names
&lt;/h4&gt;

&lt;p&gt;Next try postfixing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;TestUserService_Integration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;testing&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;-run&lt;/span&gt; &lt;span class="s1"&gt;'/Integration$'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But this broke constantly in the monorepo with &lt;code&gt;-C&lt;/code&gt; directory changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 The Solution: Go-Native Prefix Naming
&lt;/h3&gt;

&lt;p&gt;Standardized on:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;TestUnit_&lt;/code&gt; for fast, isolated tests
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;TestIntegration_&lt;/code&gt; for cross-package/dependency tests
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;TestUnit_User_ValidateEmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;testing&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;TestIntegration_UserService_CreateWithAuditLog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;testing&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🚀 Why This Works
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Blazing Fast Local Runs&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   go &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;-run&lt;/span&gt; ^TestUnit_ ./...  &lt;span class="c"&gt;# 0.3s vs 3 minutes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clear Intent&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;   &lt;span class="n"&gt;TestUnit_Parser_HandlesEdgeCases&lt;/span&gt;
   &lt;span class="n"&gt;TestIntegration_PaymentService_ProcessesRefund&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Simplified CI&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;   &lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
     &lt;span class="na"&gt;unit&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
       &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;go test -run ^TestUnit_ ./...&lt;/span&gt;
     &lt;span class="na"&gt;integration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
       &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;go test -run ^TestIntegration_ ./...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;IDE Friendly&lt;/strong&gt;
Every Go-aware editor understands these prefix conventions.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  📦 Key Takeaways
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Names Are Contracts&lt;/strong&gt; - &lt;code&gt;TestUnit_&lt;/code&gt;/&lt;code&gt;TestIntegration_&lt;/code&gt; creates clear boundaries
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fail Fast&lt;/strong&gt; - Slow tests shouldn't sneak into quick runs
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start Small&lt;/strong&gt; - Just rename one test today
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>go</category>
      <category>testing</category>
      <category>devops</category>
    </item>
    <item>
      <title>Go &amp; AES-GCM: A Security Deep Dive</title>
      <dc:creator>Alexander Ertli</dc:creator>
      <pubDate>Thu, 15 May 2025 16:48:52 +0000</pubDate>
      <link>https://dev.to/js402/go-aes-gcm-a-security-deep-dive-3ec8</link>
      <guid>https://dev.to/js402/go-aes-gcm-a-security-deep-dive-3ec8</guid>
      <description>&lt;h2&gt;
  
  
  Understanding AES-GCM Nonces. A Go Security Deep Dive.
&lt;/h2&gt;

&lt;p&gt;Once, while working on a project to upskill a bit, I came across countless resources recommending GCM (Galois/Counter Mode) for encrypting data in Go. Many snippets I found looked similar to this one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"crypto/aes"&lt;/span&gt;
    &lt;span class="s"&gt;"crypto/cipher"&lt;/span&gt;
    &lt;span class="s"&gt;"crypto/rand"&lt;/span&gt;
    &lt;span class="s"&gt;"fmt"&lt;/span&gt;
    &lt;span class="s"&gt;"io"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"verysecretkey123"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// Never hardcode keys in real life!&lt;/span&gt;
    &lt;span class="n"&gt;plaintext&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This is the data to encrypt"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;aes&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewCipher&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;aesgcm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;cipher&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewGCM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;nonce&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;make&lt;/span&gt;&lt;span class="p"&gt;([]&lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;aesgcm&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NonceSize&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ReadFull&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rand&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Reader&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nonce&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;panic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;ciphertext&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;aesgcm&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Seal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nonce&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;plaintext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%x&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ciphertext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The lack of error handling and hardcoded secrets immediately should raise the eyebrows of any Go developer.&lt;/p&gt;

&lt;p&gt;Let’s quickly fix the issues that make this code problematic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"bufio"&lt;/span&gt;
    &lt;span class="s"&gt;"crypto/aes"&lt;/span&gt;
    &lt;span class="s"&gt;"crypto/cipher"&lt;/span&gt;
    &lt;span class="s"&gt;"crypto/rand"&lt;/span&gt;
    &lt;span class="s"&gt;"fmt"&lt;/span&gt;
    &lt;span class="s"&gt;"io"&lt;/span&gt;
    &lt;span class="s"&gt;"os"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"AES_KEY"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;panic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"AES_KEY environment variable not set"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c"&gt;// Read input from stdin&lt;/span&gt;
    &lt;span class="n"&gt;reader&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;bufio&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Stdin&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;plaintext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ReadBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sc"&gt;'\n'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;EOF&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;panic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;aes&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewCipher&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;panic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;aesgcm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;cipher&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewGCM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;panic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;nonce&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;make&lt;/span&gt;&lt;span class="p"&gt;([]&lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;aesgcm&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NonceSize&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ReadFull&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rand&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Reader&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nonce&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;panic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;ciphertext&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;aesgcm&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Seal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nonce&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;plaintext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%x&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ciphertext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This version addresses hardcoded secrets and improves error handling. You would use it like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;my-secret-file.txt | &lt;span class="nv"&gt;AES_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;verysecretkey123 ./not-so-secure-cipher
&lt;span class="c"&gt;# or:&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"This is the data to encrypt"&lt;/span&gt; | &lt;span class="nv"&gt;AES_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;verysecretkey123 ./not-so-secure-cipher
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;GCM from the &lt;code&gt;crypto/cipher&lt;/code&gt; library seems a quick and convenient solution for encrypting data. But wait; is this it? I thought developing secure systems is hard?! We must be doing something wrong…&lt;/p&gt;

&lt;h3&gt;
  
  
  GCM 101
&lt;/h3&gt;

&lt;p&gt;And yes, there are some critical issues beyond the obvious ones that we addressed briefly in the last example. For ciphers, you have to assume that the ciphertext is accessible to anyone.&lt;/p&gt;

&lt;p&gt;Imagine this code snippet ends up as a component to encrypt the message exchange between two company branches. Charly, your typical threat, was patiently monitoring the encrypted communication between the two company branches. Over time, he has intercepted a vast amount of ciphertext. Knowing that the company uses AES-GCM, he assumes the following message format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+ - - - - - - + - - - - - + - - - -- - + - - -- -+
| NONCE (12B) | TAG (16B) | CIPHERTEXT | PADDING |
+ - - - - - - + - - - - - + - - - -- - + - - -- -+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Charlie’s main focus is analyzing the nonce values within the intercepted messages. After painstaking analysis of the captured traffic, Charly notices a pattern.&lt;/p&gt;

&lt;p&gt;Before we can continue, we need some theoretical background. GCM’s strength lies in its combined encryption and authentication capabilities. However, it heavily relies on unique nonces (Number used ONCE) for each encryption operation. Reusing a nonce twice breaks any security GCM offers, potentially exposing the plaintext of all messages where the nonce was reused and allowing the attacker to bypass the authentication protection.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Forbidden Attack
&lt;/h4&gt;

&lt;p&gt;Nonce reuse allows an attacker to recover the authentication key, enabling them to modify or craft messages. This issue is detailed in this &lt;a href="https://csrc.nist.gov/csrc/media/projects/block-cipher-techniques/documents/bcm/comments/800-38-series-drafts/gcm/joux_comments.pdf" rel="noopener noreferrer"&gt;document by NIST&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Copying others’ code from the web (or an AI system) could have severe consequences in this case. Translating the requirements for proper nonce usage into code means tracking all nonces used with a given key, which is impractical with a significant amount of traffic.&lt;/p&gt;

&lt;p&gt;An alternative would be to keep track of the number of messages encrypted with the same key and rotate the key when the probability of a nonce collision becomes too high. GCM typically uses 96-bit nonces. Let's assume that this is approximately 2⁴⁸ (about 281 trillion) messages until you have a 50% collision risk. 50% may be too risky for your use case.&lt;/p&gt;

&lt;p&gt;The official rule of thumb is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The total number of invocations of the authenticated encryption function shall not exceed 2³², including all IV lengths and all instances of the authenticated encryption function with the given key.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf" rel="noopener noreferrer"&gt;NIST Special Publication 800-38D&lt;/a&gt; (8.3 Constraints on the Number of Invocations)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ok, a counter? Problem solved? Well, no. Now we would also need to protect the nonce counter from being altered without authorization. Hashing will do, but guess what—we need another key for this. Lastly, we would need to rotate the key at some point. In the context of persisted data, we may even have to keep the history of the keys.&lt;/p&gt;

&lt;p&gt;Back to Charly. The pattern he discovered was that due to a flaw in the company’s implementation, the nonce generation process occasionally resets after a server restart or network glitches. This flaw, while seemingly minor, has allowed Charly to collect a significant number of messages encrypted with the same nonce, most notably the all-zero nonce, which is the default value after a reset.&lt;/p&gt;

&lt;p&gt;Charly realizes that this is his golden opportunity. He focuses on the subset of messages that share the all-zero nonce. This allows him to gain access to sensitive information across a large number of messages.&lt;/p&gt;

&lt;p&gt;I’ll leave it to your imagination what will happen next.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;What a great find for Charly; what a disastrous day for the devs and the company. Let's take these lessons from the scenario to challenge our abilities and start questioning if some apparent simplicity is based on our false assumptions or harbors devastating vulnerabilities. I encourage you to go beyond the obvious, question the familiar, and always strive for the highest standard you can deliver. After all, the integrity of your data, and perhaps even the fate of a company, could very well depend on it.&lt;/p&gt;

</description>
      <category>go</category>
      <category>security</category>
      <category>encryption</category>
      <category>cryptography</category>
    </item>
  </channel>
</rss>
