1. The State Management Question Is Usually Asked Backwards A fetched ticket, the currently selected ticket, an authenticated user, an editable reply, and a search value are all “state.” They still need different owners. The server owns the saved ticket. Navigation identifies the selected ticket. The user controls the unfinished reply. A search value may be temporary input or a committed view that a link should preserve. A support agent moving from reading a conversation to generating, editing, and sending a reply crosses several of those boundaries on one screen. Choosing a global-state library first skips the harder questions: who can change each value, how long should it survive, and what makes it authoritative? My AI Support Assistant provides a concrete example. Its React and TypeScript frontend uses Context for the current session, TanStack Query for ticket and message data, React Router for navigation, and component state for editable forms. Shareable search and filter controls are a proposed addition. The useful architectural lesson is how these responsibilities fit together, including the boundaries I still need to strengthen. In Frontend System Design: How I Would Architect a Production Dashboard in React, I considered the broader dashboard architecture. Here I want to isolate one question: how should state ownership be divided inside it? I start with ownership, lifetime, and source of truth, then choose the mechanism that fits each responsibility. I start by asking where a value comes from. Is it an authoritative server record, a user's unfinished input, a navigation choice, or a computation over other values? Then I ask what should happen when the component unmounts, the route changes, the browser reloads, or the account changes. Scope and lifetime are different. A value can be needed by several sibling components while still belonging only to one screen. Conversely, a small user object can have an application-wide session lifetime. “Several consumers” i
Ubuntu's cloud images are the quickest way to a Linux VM I know. There's no installer to click through, the download is under 1 GB, and they boot in seconds. Then you boot one on your Mac and hit two walls at once: the disk is about 3.5 GB, and there's no account you can log in with. Both walls have the same cause. A cloud image expects a cloud to finish setting it up. On your laptop, there is no cloud, so you have to play its part. This post walks through what that means and how to do it by hand on macOS with QEMU: a login, a disk of the size you want, and SSH without the fingerprint prompt. It ends with a script that does all of it, and two open-source tools that do it for you. Written with the help of an AI assistant, and reviewed by me. I build Velo Workspaces, a Mac app that automates these steps, but nothing here needs it: everything works with plain QEMU, and the same ideas apply to UTM, Tart or anything else that boots a disk image. Grab the arm64 image for Ubuntu 26.04 and look at it: curl -LO https://cloud-images.ubuntu.com/releases/26.04/release/ubuntu-26.04-server-cloudimg-arm64.img qemu-img info ubuntu-26.04-server-cloudimg-arm64.img Despite the .img name it's a QCOW2 file. Its virtual size is about 3.5 GiB, while the file itself is under 1 GB, because QCOW2 only stores the blocks that hold data. Inside is a fully installed Ubuntu: an EFI system partition, a root filesystem, a kernel, and cloud-init. What it doesn't have is a user you can sign in as. The stock ubuntu account is created by cloud-init at first boot, with its password locked, and the only way in is an SSH key that "the cloud" hands over. So everything depends on cloud-init finding a datasource: the place a cloud publishes a VM's configuration. On first boot, a tool called ds-identify looks for one (EC2's metadata service, Azure's, GCE's, and a dozen more). On Ubuntu, if it finds none, cloud-init simply disables itself. No account is created, no SSH key is installed, and the disk isn't grow
Authentication is one of the first security boundaries developers build when creating a Node.js application. Whether you are building a REST API, SaaS platform, mobile backend, or internal dashboard, you need a reliable way to verify who is making a request. Node.js gives us the building blocks to implement authentication, but secure authentication requires more than checking a username and password. Password hashing, token validation, expiration, input validation, and careful error handling all play important roles in protecting user accounts and application data. A common authentication flow starts when a user submits an email and password to a login endpoint. The server looks up the account, compares the supplied password with the stored password hash, and issues an authentication token when the credentials are valid. The original password should never be stored directly in the database. For password storage, Node.js provides the built-in crypto module, which can derive a strong key from a password using scrypt. In production systems, dedicated password-hashing libraries such as Argon2 or bcrypt are also common choices. The important principle is that passwords must be salted and computationally expensive to hash so that leaked password databases are harder to exploit. JWTs are another common approach for API authentication. After successful login, the server signs a token containing limited claims such as the user's identifier and expiration time. Protected routes then verify the token before allowing access, while the server should reject malformed, expired, or incorrectly signed tokens. The following example demonstrates the core concepts using only Node.js built-in modules. It creates a small HTTP API with registration, login, and protected-profile endpoints, while keeping the example dependency-free and easy to run and inspect. const http = require('http'); const crypto = require('crypto'); const PORT = 3000; const JWT_SECRET = 'replace-this-with-a-long-rand
Work on a distributed system long enough and you'll know the particular cold sweat of the dual write. You insert an order into the database and the transaction commits. Then you have to tell something outside the database, a service over HTTP or a Kafka topic, and the connection drops before you can. The order exists and nobody downstream knows. Or it goes the other way: the message goes out first, the transaction rolls back, and a consumer is now holding an event for an order that was never created, a ghost. No amount of try/catch will make those two writes atomic. Think of paying at a restaurant. The payment is your database transaction and the receipt is the message to the outside world. Walk out without the receipt and you can't prove the meal happened. The transactional outbox pattern is the industry's answer to that gap. You don't collect the receipt at the door, you put it in your pocket the moment you pay: the message goes into an outbox table in the same transaction as the business row, so both commit or neither does. That solves the dual write, and creates the problem this post is about. Someone still has to take the receipt out of your pocket and show it to the world. In the usual design that's a relay, a separate service outside the database that polls the outbox table, delivers each row and marks it done. The relay looks small on the whiteboard and turns out large in production. It has its own deployment, configuration, connection string and alerts. It has to claim rows without two instances grabbing the same one, retry, back off, give up, and put whatever it gave up on somewhere a person can look. And since it lives outside the database, its view of the world can drift away from the database's, which is how relays end up polling a replica for hours while reporting an empty queue. I wrote ulak because I kept building that relay, and every time it was the least interesting and most fragile part of the system. ulak is a C extension for PostgreSQL 14 throu
6 of 6 prompts that a UserPromptSubmit hook blocked never reached the model, yet all 6 were still written to the session transcript (4 of them twice), and claude -p exited 0 with "subtype": "success" every time. Context injection matched the hooks page: plain stdout and additionalContext arrived in 2 of 2 runs each, 10,000 characters arrived whole, 50,000 became a 1,949-character preview, and a hook that exited 1 or printed a bare JSON object delivered nothing in 4 of 4 runs. UserPromptSubmit runs after you press Enter and before Claude sees what you typed. That position makes it the hook people reach for in two situations: adding context to every prompt (the current branch, today's date, a rule worth repeating) and refusing a prompt outright (a pasted key, a request that should never go out). Both jobs come down to one question. Of everything the hook prints, what goes in front of the model, what goes to the person or the script running Claude Code, and what goes to disk? The hooks reference answers most of that in prose, and I wanted the answer from the session files instead. So I built a lab with a single hook, ran it 20 times under claude -p across ten output shapes, two runs per shape, and read what every run left behind. Everything below ran on 2026-09-30 with Claude Code 2.1.285 (claude --version) and claude-opus-5-5 (selected with --model opus). The documentation quotes come from https://code.claude.com/docs/en/hooks.md, fetched the same day with trafilatura. These are the sentences I tested, quoted as fetched: On exit 0: "For most events, Claude Code writes stdout to the debug log and doesn't show it in the transcript. The exceptions are UserPromptSubmit, UserPromptExpansion, SessionStart, and PostModelSwitch, where Claude Code adds plain-text stdout as context that Claude can see and act on." In the UserPromptSubmit section: "Plain stdout and the additionalContext value are each injected as a system reminder that starts with the hook's name; Claude reads b
새 뉴스레터나 알림 서비스를 연결한 직후 메일 인증이 실패하면 새 서비스의 설정값부터 다시 복사하기 쉽습니다. 하지만 같은 도메인에 v=spf1 정책을 두 개 게시했다면, 각각의 값이 올바르더라도 SPF 평가는 오류로 끝날 수 있습니다. RFC 7208은 같은 이름에서 여러 SPF 레코드가 선택되면 permerror로 처리하도록 정합니다. DNS 관리 화면에서 줄이 두 개 보인다는 이유만으로 중복이라고 단정하지는 않습니다. 긴 TXT 문자열이 화면에서 여러 조각으로 보이는 경우와, 같은 호스트 이름에 독립된 v=spf1 TXT 레코드가 두 개 있는 경우는 다릅니다. 조회한 이름과 각 레코드의 시작 값을 함께 확인하세요. example.com TXT "v=spf1 include:mail-a.example.net ~all" example.com TXT "v=spf1 include:mail-b.example.net ~all" 위 주소는 설명용 가상 값입니다. 운영 DNS에 그대로 넣으면 안 됩니다. 둘 중 나중에 추가한 줄만 지우면 새 도구가 실패하고, 먼저 있던 줄을 지우면 기존 업무 메일이 실패할 수 있습니다. 변경 전에는 실제 발송 주체를 적어 봅니다. 발송 경로 점검할 것 업무 메일함 제공업체의 공식 SPF 안내와 현재 사용 여부 자동 알림 실제 발송 도메인 또는 IP와 최근 발송 기록 뉴스레터 사용 중인 도구인지, 계약만 남은 도구인지 목록을 만들면 남겨야 할 include와 제거할 오래된 권한을 구분하기 쉬워집니다. 필요한 발송 경로를 한 SPF 정책에 모으되, 두 문자열을 단순히 이어 붙이지 않습니다. 각 서비스의 최신 공식 문서를 기준으로 값을 구성하고, SPF의 DNS 조회 한도도 확인하세요. 한 줄이 되었다는 사실만으로 permerror가 사라졌다고 확신할 수는 없습니다. 저장 후에는 DNS 조회 결과에서 같은 이름에 정책이 하나인지 확인합니다. 이어 업무 메일함, 자동 알림, 새 발송 도구에서 각각 시험 메일을 보내고 원본 헤더의 인증 결과를 살핍니다. 받은편지함 도착 여부만 보면 다른 인증 문제를 놓칠 수 있습니다. 핵심은 '어느 줄을 지울까'보다 '현재 누가 이 도메인으로 보내는가'입니다. 실제 발송 경로를 보존한 채 정책을 하나로 합치는 상세 순서는 SPF PermError와 중복 TXT 레코드 점검 가이드에 정리했습니다.
TL;DR Un modelo de código abierto, Darwin-180B-RSI, ocupa ahora el puesto #1 en 10 de los 48 benchmarks oficiales de Hugging Face, el mayor número entre las 95 organizaciones que compiten. La segunda posición es Z.ai, con 4. El décimo primer puesto es MDPBench (parsing de documentos multilingües, 83.65). Se suma a los dos anteriores orientados al trabajo real: IFStruct (salida estructurada, 98.95%) y ExtractBench (extracción de documentos, 90.29). El modelo mejora solo con RSI a nivel de modelo (auto mejora recursiva): resuelve problemas verificables, se queda únicamente con sus propias soluciones confirmadas como correctas y vuelve a entrenar con ellas. Al mismo tiempo, Gate Arcade, una app para juzgar acciones de agentes, fue elegida Spaces of the Week de Hugging Face. Dentro va ZTC, una técnica que juzga leyendo el estado interno del modelo sin generar ni una sola letra. Este post está pensado para que lo pueda leer alguien de ingeniería: qué miden los benchmarks, cómo se logró y por qué ZTC es relevante para agentes en producción. Hugging Face mantiene un conjunto de benchmarks oficiales sobre los que cualquier organización puede registrar resultados medidos con el arnés de evaluación oficial de cada prueba. Hoy son 48 benchmarks y 95 organizaciones participantes. Que una misma familia de modelos encabece 10 de ellos no es un promedio alto: es haber ganado la prueba, una por una, en dominios muy distintos. Lo interesante no es solo la cantidad, sino el reparto. Hasta hace poco, los primeros puestos estaban en pruebas tipo examen: ciencia de posgrado, olimpiadas de matemáticas, preguntas de estilo jurídico. Los tres añadidos recientes miden otra cosa: la capacidad de hacer el trabajo que una empresa realmente le encarga a un modelo. Área Benchmark Puntuación Ciencia y conocimiento GPQA Diamond 94.44 Ciencia y conocimiento MMLU-Pro 88.12 Matemáticas AIME 2026 100 Matemáticas HMMT 2026 100 Razonamiento visual MMMU-Pro 79.48 Jurídico LEXam 68.94 Jurídico LEXam-hard
A flaky test passes sometimes and fails sometimes, with no change to the code. One flaky test is an annoyance. Twenty of them destroy trust in your pipeline: developers start clicking "re-run" by reflex, and real failures slip through because everyone assumes it's "just flakiness again." After many years working on QA and release pipelines, I've found that most flaky tests come from a small number of root causes. Here are six practical fixes, roughly in the order you should try them. You can't fix what you can't see. Before changing any tests, find out which tests are flaky and how often. A simple approach: re-run your suite several times on the same commit and record which tests produce different results. # Run the suite 10 times and keep each JUnit report for i in $(seq 1 10); do pytest tests/ --junitxml=reports/run-$i.xml || true done Any test that both passed and failed across those runs is flaky. Many CI platforms and test-reporting tools can also track this automatically over time. Rank the flaky tests by failure rate and start with the worst offenders. This is the single most common cause I see, especially in UI and API tests: # Flaky: assumes the page loads within 2 seconds time.sleep(2) button = driver.find_element(By.ID, "submit") On a busy CI runner, two seconds is sometimes not enough. Wait for a condition instead of a duration: # Stable: waits up to 10 seconds, but continues as soon as the button is clickable from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC button = WebDriverWait(driver, 10).until( EC.element_to_be_clickable((By.ID, "submit")) ) The same principle applies to services: poll a health endpoint until it responds rather than sleeping for a fixed time after startup. If test B only passes when test A runs first, you have hidden shared state. It usually shows up when tests run in parallel or in a different order. Common culprits: Tests that share a database row or user acco
Email verification failures are hard to investigate. A user says the message never arrived, support sees a failed attempt, and an engineer opens logs full of addresses, provider responses, and sometimes the verification token. The team can find the problem, but sensitive data is now spread across systems never meant to be mailboxes. I prefer treating email debugging as a small threat-modeling exercise. The goal is not to hide every detail from every operator. It is to make the useful detail available at the right boundary, for the shortest reasonable time, with a clear reason for each field. An email address is often used as an account identifier, so it tends to follow a request through application logs, queues, retries, dashboards, and support tickets. A disposable email account used in a test can look harmless, but the same logging path may handle a real customer address tomorrow. A dummy e mail value in a fixture does not make an unsafe logging design safe. Verification tokens deserve more care. They are usually bearer credentials: anyone who gets a live token may be able to complete an account action. Logging the full URL for “temporary troubleshooting” is therefore a credential leak. Logs and screenshots can outlive the token by a long time. The first design question should be: what decision is an engineer trying to make? Common answers are whether a message was queued, whether the provider accepted it, whether the user requested a newer code, or whether a worker exceeded its retry budget. None of these decisions requires the original message body or a full verification URL. A redacted event can still be precise: keep an internal event name, request reference, keyed account reference, delivery status, attempt number, and timestamp. Add a recipient domain or provider only when it answers a real operational question. The account_ref should be a stable, keyed reference rather than an unsalted email hash. A plain hash of a common address is easy to guess. A keyed H
For a startup choosing an uptime monitoring API, the healthcheck constraint that changes the decision is not the monthly monitor price: it is whether a checkout alert can be assigned to a revenue path, an owning team, and a failure budget without copying customer or order data into a second system. TL;DR: use an external probe for the public Node.js checkout edge, a separate heartbeat for scheduled payment-reconciliation work, and an internal outcome metric for completed checkout attempts. Give every signal a stable service and cost-center label, but keep order IDs, email addresses, cart contents, and raw request bodies out of monitor labels. Publish status from a deliberately small set of service-level states. Then compare buy and build options on retained event volume, operator time, data location, exportability, and status-page behavior rather than an advertised entry price. That is the cheapest design I would defend at an SLO review because each paid signal has a named decision attached to it. A probe answers reachability. A heartbeat answers whether scheduled work ran. An outcome metric answers whether checkout worked. None can substitute for the others. Consider a bounded incident exercise, not a claimed production anecdote. The public /healthz route returns success, while checkout attempts fail after the Node.js process hands work to a payment dependency. At the same time, the nightly reconciliation job stops sending heartbeats. An uptime probe alone stays green; an order-by-order monitor becomes expensive and creates a data-handling problem; a single public status switch hides the distinction between interactive checkout and delayed reconciliation. At 09:00, the edge probe can establish that the process accepts a request, but it cannot establish that the payment handoff succeeds. At 09:05, a missing reconciliation heartbeat says the scheduled path is late, but it cannot say whether current buyers can pay. If the public component changes state on either event
Three embedding launches landed in one week. Every one came with a chart. None of the charts were drawn on your documents. On September 24, 2026, TopK introduced topk-embed-v1, a family of multi-vector embedding models for text and visual documents. Two smaller sizes are open source. On September 30, Cohere released Embed 5 in Pro and Fast tiers. "Both tiers share a single embedding space, so teams can index with Pro and query with either model without rebuilding the index." Across 40 development datasets, Cohere says the mixed pairs averaged 1.6% and 2.7% losses against same-model baselines. The same day, Perplexity introduced pplx-embed-v2-context-9b-preview, trained "to retrieve both answer chunks and supporting context rather than a single gold chunk." It was scored on context-bench, which turbopuffer keeps private "to reduce the risk of training contamination." Different products. Same direction. Retrieval is no longer one number. Did you find the answer? Did you find what proves it? Can you swap the query model without rebuilding the index? The Perplexity model card has my favorite warning of the week. Embeddings from the preview "should not be mixed with embeddings from a future release." That's the part I keep thinking about. Shared space is a claim. Mixing is a migration. The only benchmark that knows your documents is the one you build. So let's build a tiny one. By the end, you'll run one command: npx tsx eval.ts And watch an eval compare two embedding models, decide whether to ship, and catch an index you should not mix. No API key. No model. Just TypeScript. One honesty note: the "embedding models" here are hashed bag-of-words vectors, not neural models. They are stand-ins so the eval has something to grade. Swap in your provider's embed call and keep the rest. What We Are Building Project Setup Step 1: Label a Tiny Corpus Step 2: Mock Embedding Models Step 3: Index and Rank Step 4: The Metrics Step 5: Compare, Gate, and Mix Where It Breaks Down The Big
When an autonomous agent struggles on long terminal tasks, the standard engineering response is to add scaffolding. You wrap the model in state machines, inject environment probes, add reflection loops, and supply intermediate test harnesses until it stumbles across a solution. That scaffolding works for exploration. The mistake is taking the resulting raw trajectory and feeding it directly into supervised fine-tuning. Direct trajectory SFT bakes the exploration crutches into model weights. If an agent solved a Linux debugging task by reading an internal verifier script, probing harness-specific state variables, or wandering through fifteen failed retries, training on that trace teaches the model to expect those exact environment leaks in production. Strip the scaffolding away at deployment, drop the agent into a bare bash shell, and performance falls apart. A paper from IntelligenceLab and the University of Maryland (arXiv:2610.02826) details this exact failure mode and tests a systematic fix called Recursive Self-Rewrite (RSR). The authors ran Qwen-3.8-27B across roughly 3,000 terminal tasks using three structurally different harnesses: Terminus 2 (a general terminal execution loop), StateM (a state-machine harness with phase-local context and checked transitions), and Recursive Self-Reflect Terminus (a loop with explicit reflection steps). Different harnesses succeeded on different domains. StateM handled structured, multi-phase setup tasks that required maintaining execution state across interruptions. The reflection harness handled messy trial-and-error debugging. Combined, the three harnesses solved 759 tasks, beating the single strongest harness by 34.3%. If you stop there, you have a pile of heterogeneous execution traces. Some traces rely on StateM's explicit transition assertions. Others rely on self-reflection prompts or leak evaluation scripts into the bash history. Training directly on those raw traces yielded mediocre gains. On Terminal-Bench 4, an eva
Combat is where Godot 4 projects start crashing for the first time. Everything works Trying to call a function on a previously freed instance. Invalid access to property or key 'global_position' on a base object of type 'previously freed'. Cannot call method 'take_damage' on a null value. Resumed function 'flash()' after await, but class instance is gone. (Exact wording shifts a little between 4.x versions — older builds say Invalid get index ... (on base: 'previously freed') — but the causes are the same.) "Previously freed" means your variable still points at a node that queue_free() already null — it's a dangling pointer, so if target: and if target != null: can both let it through. Here are the four ways combat code ends up Symptom. A homing projectile, a turret or an enemy AI crashes a few frames after Cause. You saved the target in a variable (var target: Node2D) and kept using it. queue_free(). Your variable never heard Fix. Check is_instance_valid() before every use — it's the only check that catches var target: Node2D func _physics_process(delta: float) -> void: if not is_instance_valid(target): target = null _pick_new_target() return var dir := global_position.direction_to(target.global_position) velocity = dir * speed move_and_slide() If many systems track the same enemy, clear the reference at the source instead of tree_exiting fires right before the node leaves the tree: func set_target(t: Node2D) -> void: target = t t.tree_exiting.connect(func(): target = null, CONNECT_ONE_SHOT) await Symptom. Hit-flash or knockback code crashes only sometimes, usually on the killing Cause. await pauses your function. Anything can happen while it's paused — await is suspect. # crashes when the hit also kills the enemy func hit_flash(enemy: Node2D) -> void: enemy.modulate = Color.RED await get_tree().create_timer(0.1).timeout enemy.modulate = Color.WHITE # enemy may be gone by now Fix. Treat every await as a checkpoint and re-validate after it: func hit_flash(enemy: Nod
When developers hear “EHR integration,” the first thought is usually an API. But a production telehealth platform needs more than an API client. It needs an integration layer that can handle authentication, mapping, retries, errors, synchronization and external-system failures. A simplified architecture looks like: Patient App | v Telehealth API | v Integration Layer | +------> EHR | +------> Lab | +------> Pharmacy The integration layer should manage the authentication mechanism required by the target system. Don't spread EHR credentials and integration logic throughout the core application. Keep the external integration boundary explicit. Your internal patient model may not match the external EHR representation. For example: Telehealth Patient | +-- firstName +-- lastName +-- dateOfBirth +-- email may need to map into a FHIR Patient resource or another format supported by the EHR. The mapping should be explicit and testable. This is one of the hardest parts. The same patient can have different identifiers across systems. You need a reliable strategy for: Existing patient lookup Patient creation Identifier mapping Duplicate prevention Reconciliation Consider this: Telehealth Backend | | Create Encounter v EHR | X Timeout Did the EHR reject the request? Or did it process the request but the response never reach your application? Retrying blindly could create a duplicate. This is where idempotency and transaction tracking matter. External healthcare systems can fail. Your integration layer should have a defined strategy for: Timeouts Rate limits Authentication failures Validation failures Temporary outages Partial failures Queues can help decouple patient-facing workflows from slower external operations where the workflow allows it. A basic integration might only retrieve: EHR → Telehealth A mature workflow may require: EHR → Telehealth Telehealth → EHR For example: Patient | v Telehealth consultation | v Clinical documentation | v Integration Layer | v EHR The secon
The setup You've got a @Stable data class, you're passing it into a composable, and Layout Inspector's recomposition counter is still climbing every time the parent redraws. The usual advice — "mark your classes @Stable or @Immutable" — doesn't fix it, because the leak isn't in the data class. It's in the lambda next to it. @Stable data class CartSummary(val itemCount: Int, val totalCents: Long) @Composable fun CartHeader(summary: CartSummary, onCheckout: () -> Unit) { Row { Text("${summary.itemCount} items — ${summary.totalCents.toFormattedPrice()}") Button(onClick = onCheckout) { Text("Checkout") } } } CartHeader looks stable on paper: a @Stable data class and a function-typed parameter, which Compose treats as stable if the lambda itself is stable across recompositions. The bug lives in how the caller constructs that lambda. @Composable fun CartScreen(viewModel: CartViewModel) { val summary by viewModel.summary.collectAsStateWithLifecycle() var promoCode by remember { mutableStateOf("") } CartHeader( summary = summary, onCheckout = { viewModel.checkout(promoCode) } // new instance every recomposition ) } Every time CartScreen recomposes — and promoCode changing on every keystroke guarantees that — the trailing lambda passed to onCheckout is a new object. Compose's stability check for CartHeader compares the lambda instance, not its captured values' equality, so a structurally identical-looking lambda still reads as "changed," and CartHeader recomposes along with it, even though summary itself didn't change and the composable only cares about onCheckout being callable, not which promoCode snapshot it happens to close over. This is the part Layout Inspector won't tell you directly: it'll show CartHeader recomposing on every keystroke in an unrelated text field, and the instinct is to go check CartSummary's stability, which is a dead end — it was never the problem. The lambda doesn't need to capture promoCode by value at the point it's created — it needs to read pro
Un modelo de lenguaje con más de 100.000 millones de parámetros normalmente necesita un servidor con varias GPU de centro de datos. Strata, un motor de inferencia open source, lo hace correr en una tarjeta gráfica de PC gamer con apenas 12 GB de VRAM gracias al offloading de expertos. La pieza central es Qwen3.8-Flash-Next, un modelo de mezcla de expertos (MoE) de 125.000 millones de parámetros que normalmente vive en un clúster de GPU empresariales. Strata lo comprime y lo reparte entre la VRAM y la RAM de una PC normal, con instalación de un clic para Windows y Linux. Strata corre un MoE de 125B de parámetros en una gpu de 12 GB combinando offloading de expertos y cuantización GGUF.- Los modelos MoE activan solo unos pocos expertos por token, lo que libera al resto de la VRAM.- GGUF reduce los pesos de Q2_0 e IQ3_S a pocos bits, y el paquete completo cabe en un disco de unos 70 GB.- Una RTX 5070 de 12 GB llega a 94 tokens por segundo escribiendo en el nivel de cuantización más agresivo.- Un gotcha clave: la PC puede congelarse 1 a 3 minutos mientras Strata carga 35 a 55 GB en RAM. El offloading de expertos es la técnica de inferencia que reparte los pesos de un modelo de mezcla de expertos (MoE) entre la VRAM de la GPU y la RAM del sistema, dejando en la tarjeta gráfica solo los expertos que se activan en cada token. La idea aprovecha una propiedad central de los modelos de mezcla de expertos: aunque el modelo tenga cientos de miles de millones de parámetros en total, cada token solo necesita un subconjunto pequeño de ellos. Strata explota esa dispersión para que el modelo completo nunca tenga que vivir entero en la VRAM, uno de los cuellos de botella más caros del hardware de IA. Antes de proyectos como este, correr un modelo de 125.000 millones de parámetros significaba alquilar varias GPU de centro de datos tipo A100 o H100, con facturas de nube de miles de dólares al mes. La técnica cambia esa ecuación: convierte un problema de infraestructura en un problema d
La differenza fra una risposta inutile e una risposta che usi sta in due righe della richiesta. Non serve un prompt lungo, non serve una formula magica, e non serve imparare un linguaggio nuovo: servono quattro elementi e l'ordine giusto in cui metterli. Qui trovi le regole che i fornitori stessi documentano, con i loro esempi prima e dopo, più i modelli di richiesta divisi per compito — scrivere, riassumere, tradurre, chiedere un'immagine — e la spiegazione di perché i «mega-prompt» che girano online funzionano peggio di una richiesta di quattro righe. Alla fine saprai scrivere un prompt tuo, e saprai quando quello che hai scritto non funziona. In una frase: un prompt che funziona dice chi parla, cosa deve fare, con quali informazioni e in che formato — e mette le istruzioni prima del testo su cui lavorare. Le due regole che fanno la differenza più spesso: le istruzioni in cima e la specificità su lunghezza, formato e destinatario. Tutto il resto è contorno. La guida ufficiale di Google — «Prompting Guide 101», un PDF di 71 pagine pensato per chi usa Gemini — riduce tutto a quattro aree: Persona, Task, Context, Format. Cioè: chi deve essere l'assistente, cosa deve fare, con quali informazioni, e in che forma deve restituire il risultato. L'esempio che danno è completo e vale la pena copiarlo come modello: Sei un program manager in [settore]. Scrivi un'email di sintesi esecutiva per [destinatario] basandoti su [dettagli sui documenti rilevanti]. Limita a punti elenco. Prompting Guide 101, Google — esempio ufficiale Da notare due cose. La prima: non serve usare tutti e quattro gli elementi ogni volta — la guida lo dice esplicitamente. La seconda, ed è quella che conta di più: il verbo deve esserci sempre. «Riassumi», «scrivi», «cambia il tono», «traduci»: senza un comando, quello che hai scritto è un contesto, non una richiesta. OpenAI documenta le sue regole con esempi contrapposti, ed è il modo più chiaro di vederle — nelle sue «Best practices for prompt engineerin
How immutability, explicit data, pattern matching, and result values change software design. The first warning sign usually appears after the team is already productive. People know the syntax. They can build Phoenix controllers, write Ecto queries, use pipelines, and get features into production. And yet the code still feels wrong. A GenServer starts looking suspiciously like a service object. Pipelines connect functions that return unrelated values. Structs are updated directly from everywhere. Business failures become exceptions. Loops disappear, but the underlying algorithms still assume mutable arrays. The team has learned Elixir syntax without changing how it thinks about software. I have worked with Elixir for about a decade and helped many engineers learn it. I have seen the same pattern across different teams and experience levels: the syntax comes quickly. Habits learned in imperative and object-oriented ecosystems take much longer to unlearn. Experienced developers will learn case, with, and Enum.map/2. One important adoption risk lies elsewhere: whether the team can recognize which familiar assumptions no longer serve them. If I were introducing Elixir to an experienced engineering team, I would focus much less on syntax and much more on four mindset shifts. Here is the short version: Move from mutable state to immutable values. Move from imperative instructions to declarative transformations. Move from methods on objects to functions over explicit data. Move from inspect-then-branch code to patterns and explicit results. The inherited habit. In imperative languages, state is commonly represented by values that change over time. An accumulator, object, or array is updated in place, and the algorithm is understood as a sequence of mutations. Why it creates awkward Elixir. A direct translation tends to reproduce mutation through excessive rebinding, indexed list access, or stateful processes. The syntax changes, but the algorithm still assumes that one loc
Daily requests from AI agents on Cloudflare's network grew by more than 1,700% over the past year, and for the first time more than half the traffic Cloudflare carries is not human (Source: Cloudflare, 2026). Every one of those requests needs a browser session to land in, and almost none of the work that made models reliable in 2024 touched that layer. The bottleneck moved below the model. A human audit published this week walked all 165 tasks of WebArena-Lite under six conditions and found that automatic evaluators missed between 5.45 and 8.49 percentage points of real task success (Source: arXiv, 2026). The same paper then read the 102 failed trajectories and found the failures were not reasoning failures at all. They were scrolling loops, expired sessions, clicks that never landed, and half-filled forms (Source: arXiv, 2026). Give the agent better execution state and a procedural guide, and corrected success on those tasks moved from 34.55% to 38.18% (Source: arXiv, 2026). Memory scaffolding alone lifted an untrained 9B model from 13.90% to 18.80% (Source: arXiv, 2026). None of those gains came from a smarter model. They came from the agent keeping track of where it was. The gap exists because identity is not a property of your code. A page inspecting a session sees a screen size, a GPU string, a font list, a timezone, a language, a TLS handshake signature, and an event stream. A patched browser engine decides those values inside the engine, where a page cannot tell a reported value from a faked one (Source: GitHub, 2026). That is why the open-source agent stacks arriving this autumn ship browsers rather than wrappers. The popular one patches a real Firefox engine in C++, keeps one coherent identity per seed so screen, fonts, GPU, timezone, and language agree, and leaves nothing for a page to find: no WebDriver flag, no DevTools protocol, no automation globals (Source: GitHub, 2026). It still accepts any model through a one-line switch, because the model was neve
x402 Agent Spending Guard: Give Your Agent a Budget Before You Give It a Wallet On September 30, 2026, x402-seatbelt shipped — a free, open-source, zero-dependency npm package (plus a Python version, agentseatbelt on PyPI) that checks every x402 payment before it leaves your machine: budget cap, per-payment cap, emergency stop, and an optional Pay Safe verdict (GO / CAUTION / STOP). The justification is first-party monitor data from the author's own paid-x402-API monitor: of 27,499 endpoints tracked on September 30, 2026, 2,777 failed their last health check and 1,495 charged more than their own directory listing. (Source: dev.to/gntechtools) This isn't a one-off — the ecosystem landed the same answer this week from six directions: Guard Enforces x402-seatbelt (Sept 30) maxTotalUsd + maxPaymentUsd, parallel reservations, stop(), Pay Safe GO/CAUTION/STOP StableCoinManager / ERPC (Sept 25–27) Ceilings enforced in code; agent can only LOWER limits at runtime; fails closed; paid a real 1.21 EURC invoice on Base x402-agent-wallet (mid-Sept) $1/day, $0.10/request max, $0.05 approval threshold; only settled spends consume budget; HMAC-signed verdicts thebuyside-x402-agent (mid-Sept) $0.05/call, $1/day rolling, host allowlist, confirm-before-pay default x402 Foundation @x402/mcp (Sept 24) spendControls, $1 default cap, policies filter before wallet signs Countersign @countersign/x402 (Sept 18) Pre-flight allow/deny/needs_approval; decides, never signs The mental model: the guard answers "can we afford it" (fail-closed rules). The decision gate answers "should it happen at all" (confidence scoring → auto-pay / human confirm / block + escalate). Notice the guards already speak the gate: x402-agent-wallet's $0.05 approval threshold IS the confirm band. Pay Safe CAUTION IS the confirm band. Countersign's needs_approval is the confirm band. We ran both sides through our live decision gate tonight: Legit $0.03 whitelisted payment → 0.0714 → escalate $2.50 retry-loop attack (50x o
Docker has disclosed a critical vulnerability (CVE-2026-105445) in Docker Hub that let attackers access another user's container repositories using a personal access token (PAT). [...]
A 42-of-42 failure rate in our LLM benchmark was a parser bug. How we found it, fixed our scorer without fudging results, and a checklist for your evals.
Programaste un atajo con Ctrl+S y en Mac tu usuario presiona Cmd+S sin que pase nada: ese bug silencioso aparece en casi cualquier editor web que no distingue entre plataformas. Los atajos de teclado no son solo una preferencia de cada sistema operativo, sino un conjunto de nombres, teclas físicas y propiedades de evento que cambian entre Windows, macOS y Linux, y que tu código tiene que manejar explícitamente. Esta guía repasa esas diferencias desde cero: qué tecla hace qué en cada sistema, cómo las ve JavaScript a través de KeyboardEvent, y cómo escribir una función que funcione igual sin importar dónde corra tu aplicación. metaKey se activa con Cmd en Mac y ctrlKey con Control en Windows: son dos propiedades distintas del mismo evento.- Backspace en Windows equivale a Delete en Mac, y Delete en Windows equivale a Forward Delete en Mac.- event.code identifica la tecla física sin importar el idioma del teclado; event.key cambia según el layout.- Fn+Return simula la tecla Enter numérica en los MacBook que no tienen esa tecla física.- Cmd+Q, Cmd+Tab y Ctrl+Alt+Supr nunca llegan a JavaScript porque el sistema operativo los intercepta antes. Los atajos de teclado son combinaciones de una tecla modificadora (Ctrl, Alt o Cmd) y una tecla principal que disparan una acción en una aplicación. En la web no hay una sola combinación universal: Windows, macOS y Linux asignan nombres y funciones distintas a teclas como Control, Alt o Suprimir. La causa de fondo es histórica. Apple diseñó su teclado alrededor de la tecla Comando (⌘) para evitar chocar con los atajos que el sistema reservaba para sí mismo, mientras que Windows heredó la convención de Control de los terminales Unix y DOS. Décadas después, ninguno de los dos layouts es más correcto que el otro: son dos soluciones distintas al mismo problema de reservar teclas para el sistema operativo. Para un desarrollador que nunca tocó código multiplataforma, esto puede sonar a detalle cosmético, pero no lo es. Una aplicación que
I run The DJ Calendar — a real-time EDM tour date platform that's been in production since 2015. It's a single PHP + vanilla JS codebase with zero frameworks, zero build tools, and zero package managers. Over the past few weeks, I went through the codebase and extracted every reusable pattern into its own open-source repo. Not tutorials. Not simplified examples. The actual production code, cleaned, documented, and pushed. Here's the full portfolio. Every repo shares the same rules: Zero dependencies. No npm install. No Composer. No build step. Clone it and open index.html, or include the file. Extracted from production. Every pattern was already running on a live site before it became a repo. Live demo or CI test. If it runs in the browser, there's a GitHub Pages demo. If it's backend, there's a CI pipeline proving it works. MIT licensed. Use it, fork it, ship it. The hover preview system from the homepage cards. Hover any artist card and hear a 30-second iTunes preview with a real Web Audio API equalizer driving 8 canvas bars. Key patterns: iTunes Search API integration, Web Audio analyser with fftSize=64, generation-counter race condition guard, consent-first design (touch toggle, reduced-motion skip, autoplay gate). Repo | Live Demo The decorative 8-bar equalizer strip that runs on every homepage card. Pure CSS animation with a 1KB optional JS injector. Respects prefers-reduced-motion. Zero JS required to render — the CSS alone is the full widget. Repo | Live Demo A geolocation-aware tour map. Asks for location consent once, calculates haversine distance to upcoming shows, and renders them on a Leaflet map. If the user declines location, it shows a friendly fallback — it doesn't nag. Repo | Live Demo Client-side search across ~1,000 pages using a prebuilt JSON index. Scored AND matching across weighted fields (title, artist, venue, city), keyboard-first combobox with full ARIA wiring. Zero server round-trips after page load. This is the feature I'm proudest of on
For years, Amazon Connect concurrency treated every contact on a channel as if it cost the same effort. A statement-copy request and a twelve-attachment chargeback dossier landed in the same "up to 5 emails per agent" bucket, and the math only balanced on the average, never on the tail. Workload-type capacity, launched on September 9, 2026 for Task and Email, breaks that bucket. It is a small change on the configuration screen and a large one in staffing arithmetic, and it ships with a failure mode that deserves an audit before any pilot. 5: workload types per channel, per routing profile. The connect:WorkloadType attribute takes up to 500 values; the routing profile takes 5 rows per channel. The big taxonomy does not fit the configuration. 1–10: concurrency per row, sum ≤ 10 per channel. Each workload type gets its own ceiling, but the channel's total budget is still 10 slots. 0: workload-type fields in the concurrency API. MediaConcurrency documents Channel, Concurrency and CrossChannelBehavior. Nothing else. The old model is easy to describe: the routing profile sets Maximum contacts per agent per channel, plus one CrossChannelBehavior per channel. Four channels, four rows, done. The new model inserts a dimension between the channel and the contact. There is a system predefined attribute, connect:WorkloadType, that you populate with your own values: Dispute-Review, KYC-Refresh, Statement-Request. The contact gets the value from the Set contact attributes flow block or from the UpdateContact API. In the routing profile, the Task or Email channel stops having one row and gets up to five, each with its own concurrency from 1 to 10 and its own cross-channel behavior. Cross-channel behavior now has three options, and the middle one is the interesting one: no other channels or workload types, only other workload types of the same channel, allow other channels concurrently. You can state that an agent on Dispute-Review receives absolutely nothing else, while an agent on
OPENING: We built a vertically integrated command center for Load Bearing Empire's valet trash operation—5 frontend pages orchestrating 8 concurrent VAPI voice agents, 8 discrete automation workflows, and a Postgres schema handling real-time dispatch, customer management, and billing across six tables. The backbone: Supabase Edge Functions consuming VAPI webhooks, Asterisk PBX for telephony routing, and a self-hosted infrastructure stack deployed to Vercel. In this post, we'll break down the architecture, the webhook pattern that keeps agents and automations in sync, and how we scaled from a single-person operation to a system handling hundreds of concurrent interactions—without leaving the tech debt of traditional call center software.
Most concurrency tutorials explain lock and Interlocked in a paragraph and move on. I wanted to see what they actually do, so I ran a deliberately tiny experiment on my laptop: increment a counter 100,000 times using Parallel.For, four different ways. The results contained one expected finding and one that changed how I think about parallel code. The Experiment The unsafe version looks harmless: csharp I then wrote three corrected versions and a plain sequential loop for comparison: csharp // 2. Interlocked // 3. Thread-local accumulation, merged once per task The line looks atomic, but it compiles to three steps: read the current value, add one, write the result back. Two threads can interleave those steps: Time Thread A Thread B Counter in memory Two increments happened, but the counter moved by one. Across 100,000 attempts on several threads, most of those collisions go unnoticed, because nothing throws and nothing is logged. Result 1: The Unsafe Version Was Wrong Every Time Across 13 runs of the unsafe version, spread over three versions of the test program, the final value was never 100,000. The results ranged from 1,020 to 32,690, which means between roughly 67% and 99% of the increments were lost. The answer also changed on every run, which makes this kind of bug hard to catch: a test that passes once proves nothing. Result 2: Timings (Release Build, .NET 8) The first round of any benchmark includes compilation and thread-pool start-up, so the table below uses rounds 2 and 3 only. Times are in milliseconds. Version Result Time (ms) These come from one machine and one process, and from Visual Studio, so the ordering and the rough size of the gaps are meaningful, but I wouldn't trust the decimals. The Surprise: Parallel Made It Slower The plain sequential loop beat every parallel version. Even the best correct parallel version, thread-local accumulation, was roughly eight to nine times slower than a simple for loop. Interlocked was around 65 to 80 times slower,
AI Dev Weekly is a Thursday series covering the AI developer news that changes what you can build, what it costs, and how you should operate it. Last week's releases made agents more capable and persistent. This week made the supporting pieces more interesting: cheaper workers, a purpose-built decision endpoint, another large model to evaluate, and stronger local execution controls. There is plenty to test, but availability needs careful reading. Haiku 5.5 is available now. Mistral Large 4 has an API preview, not downloadable weights yet. OpenAI's Decisions API is a beta. GitHub's local sandbox has reached general availability, while its desktop computer-use feature remains a preview. Those are different levels of readiness, not interchangeable launch labels. Anthropic launched Claude Haiku 5.5 on October 7. The model ID is claude-haiku-5-5, and it brings adjustable effort to the Haiku family. The target workloads include classification, summaries, context compaction, database queries, and delegated coding tasks. The new standard token prices depend on prompt length. All figures below are dollars per million tokens: Token type Prompts up to 100K Prompts over 100K Input $0.10 $0.50 Output $0.50 $2.50 Cache reads $0.01 $0.05 Cache writes $0.125 $0.625 For the shorter tier, input and output rates are 90% below Haiku 4.5. That is not a promise that every application becomes 90% cheaper. Longer prompts have different rates, and tokenization changes the number of billed tokens for the same text. Anthropic also cut Sonnet 5.5 cache reads from $0.20 to $0.10 per million tokens. Standard input and output pricing did not change. The launch announcement covers both updates. Migration deserves its own test run. The Haiku 5.5 migration guide tells developers to recount prompts, replace explicit thinking budgets with adaptive thinking, remove sampling parameters, and stop relying on assistant prefills. Response handlers should select content blocks by type rather than assuming th
You don't need a massive GPU cluster to learn how modern frontier AI works. In our new video on the freeCodeCamp.org YouTube channel, you will build, pre-train, and fine-tune a working 25-million para