SShortSingh.
Back to feed

How One Engineer Solved Feature Flag Access Inside Inngest's Restricted Lambda Steps

0
·1 views

A software engineer faced a complex distributed-systems challenge when trying to gate workflow changes behind a feature flag inside Inngest, where each pipeline step runs as a separate AWS Lambda invocation with no access to the normal dependency-injection container. The team's container relies on Node's AsyncLocalStorage scoped per HTTP request, but Inngest steps bypass standard middleware, leaving each step with an empty async context and no way to retrieve services or flag state. An initial fix using AsyncLocalStorage's enterWith() inside Inngest's transformInput hook appeared correct but failed in production because the binding only applied to a nested Promise microtask, not the async context where the actual step callback executed. The root cause is a subtle but general AsyncLocalStorage trap: enterWith() does not propagate to the context of a parent promise continuation, only to its own descendants. The documented solution was to replace enterWith() with containerStore.run() at a sufficiently high point in the call stack so that Inngest's entire execution engine runs within the correctly bound async context.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

OpenAI harness fix, EU AI gigafactories, and Cognition's SWE-1.7: AI roundup Aug 1, 2026

OpenAI revealed on July 29 that GPT-5.6 Sol's poor ARC-AGI-3 benchmark score of 7.8% was caused by a flawed evaluation harness that discarded reasoning between moves, not by the model itself. Enabling retained reasoning and context compaction in the Responses API lifted Sol's score from 13.3% to 38.3% and allowed it to clear all six benchmark levels, a feat no frontier model achieves on the official leaderboard. The finding highlights that benchmark results reflect the combined effect of model, harness, and settings rather than model capability alone. Meanwhile, the European Commission launched a formal tender on July 30 to build up to seven AI gigafactories across the EU, backed by up to €10 billion in public funding and a €30 billion total target including private investment, with awards expected in early 2027. Separately, AI coding lab Cognition released SWE-1.7 in July, a new frontier coding model built on a Kimi K2.7 base and trained via reinforcement learning, featuring innovations in sampling stability, multi-continent training, and extended task horizons.

0
ProgrammingDEV Community ·

AI Agent Safety Belongs in the Environment, Not the Agent's Own Judgment

A developer building a browser-based AI agent argues that the standard 'can this be undone?' safety check is flawed, proposing 'reach' — how far damage could spread if the agent is wrong — as a better measure. The core problem is that an agent cannot assess its own blast radius because it lacks context, such as not knowing an email list has 50,000 recipients. In a browser, risk is compounded because the agent inherits all active sessions, meaning the same action can be harmless on one site and irreversible on another. The developer's solution moves safety controls into the environment itself: credential fields are stripped from the page before the agent sees them, structurally sensitive controls always trigger human confirmation regardless of the agent's assessment, and a timeout counts as a denial rather than a pause. One unsolved challenge remains — how to let users resume a denied task later when the underlying page state may have already changed.

0
ProgrammingDEV Community ·

CS Student Launches Technical Writing Series on AI, Python, and NLP

A computer science student and aspiring technical writer has introduced herself to the Dev.to community while sharing her ongoing work in technical content creation. She has published a deep-dive guide on Natural Language Processing on her Hashnode blog, covering text preprocessing pipelines and practical Python examples using the spaCy library. The article aims to explain how computers interpret and understand human language. She is seeking constructive feedback from developers and writers to improve the clarity of her technical explanations. The author plans to continue publishing in-depth articles covering AI, Python, and broader software concepts.

0
ProgrammingDEV Community ·

Kubernetes Hiring Is Flawed When Trivia Tests Replace Real Engineering Judgment

A growing debate in the developer community argues that Kubernetes job interviews are increasingly misaligned with actual on-the-job demands. Many interview questions test obscure implementation details — such as kernel-level eBPF behavior — while the real role may involve routine tasks like adjusting CPU resource limits. Critics contend that memorization-based screening filters out capable engineers who excel at structured problem-solving, log analysis, and diagnosing live failures under ambiguous conditions. Hiring managers are also faulted for borrowing 'hard questions' from the internet and using fixed answer keys, even when they lack the depth to evaluate alternative but valid responses. The core argument is that a technical interview should mirror the decisions an engineer will actually face, rewarding diagnostic reasoning over rote recall.

How One Engineer Solved Feature Flag Access Inside Inngest's Restricted Lambda Steps · ShortSingh