An LLM gateway is a small system with a big trust load. It's small enough for one on-call to own, and it holds your org's model credentials, its spend attribution and its audit trail. That combination shapes how you run it: conservative where the trust is, pragmatic everywhere else. The runbook set I keep for one has four incidents, not forty. These are the ones that actually happen, and every runbook has the same four steps: Detect: the metric or the report that tells you. Assess: the one query that sizes it. Act: the sequence, in order. Close: the artifact you leave behind. The last step is the one teams skip. An incident without its artifact is a memory, and the memory is the next incident. Before any runbook, the pager needs rules, or every incident review starts with "we ignored the alert". Three severities with fixed meanings: info: a forecast. No action needed; the owner glances at it. Goes to the team channel. warn: act this week. Team channel plus the team lead. crit: spend or integrity is at risk now. The platform on-call channel (page-worthy) plus a webhook into the incident system. Two rules keep the pager trusted: Fire on state entry, not state persistence. Crossing 95% of a budget fires once. Sitting at 96% doesn't fire again. A re-fire is allowed after a 24-hour cooldown, and only if the state got worse by a level. One escalation, then stop. An unacknowledged crit escalates once, after 4 hours, then goes quiet. An alert that pages forever gets muted, and a muted crit is the incident. Here's how my default thresholds split. Treat them as starting points to tune, not laws: Signal warn (this week) crit (now) Budget, per team or feature 95% of the hard limit 100% (hard) and 110% (overage) Cost anomaly a feature's 7-day cost ≥ 3× its 30-day average a team's daily cost ≥ 5× its 30-day daily average, or one request over your per-request cap Metering completeness below the 99.9% SLO below 99.5% for an hour Provider breaker open, and fail-over worked open, and
A dashboard query runs while a background job updates ten thousand rows. In a lock-based engine, that SELECT waits—sometimes for seconds—until every UPDATE releases its row locks. PostgreSQL's MVCC sidesteps this entirely: readers operate on a snapshot taken at query start, so they never block writers and writers never block readers. The mechanism is straightforward. When a row changes, PostgreSQL writes a new tuple version instead of overwriting the old one. The previous version remains visible to any transaction whose snapshot predates the commit. Under steady-state conditions with adequate vacuuming, read latency tends to remain stable regardless of write throughput, but it can degrade if vacuum falls behind or bloat accumulates. The trade-off is storage. Dead tuple versions accumulate until vacuum reclaims them. That maintenance overhead—bloat, autovacuum tuning, the occasional VACUUM FULL—is the only real cost of MVCC. The rest of this article shows why, for read-dominated systems, that cost is worth paying and how to keep it bounded. PostgreSQL ships with Read Committed as the default isolation level. When a transaction runs at this level, every SELECT (without FOR UPDATE/SHARE) takes a snapshot at query start. That snapshot contains only rows committed before the query began; it never sees uncommitted data or changes committed by concurrent transactions during the query's execution. SET TRANSACTION ISOLATION LEVEL READ COMMITTED; SELECT * FROM accounts WHERE id = 42; The snapshot is per-query, not per-transaction. Two successive SELECT commands in the same transaction can return different results if other transactions commit between them. This is the mechanism that lets readers proceed without ever blocking on writers. Writers behave symmetrically: UPDATE, DELETE, SELECT FOR UPDATE, and SELECT FOR SHARE search for target rows using a snapshot taken at command start. They lock only the specific rows they modify, not the entire table or index range. Reader take
A Command That Matched Zero Files Still Exits 0: How to Catch Silent CI Failures Every engineer has felt the cold dread of pushing a critical fix, watching the CI pipeline turn gloriously green, and then discovering in production that the deployment script didn't touch a single file because a glob pattern quietly evaluated to nothing. The pipeline passed. The logs looked clean. But your code was never updated. Why does this happen? In standard shell scripting and CI environments like GitHub Actions, commands like grep, find, or custom glob expansions frequently exit with status 0 even when they match zero files or process zero items. To a build system, "no errors encountered while running the binary" is indistinguishable from "successfully processed your target files." In this article, we examine why silent zero-match failures are a silent killer of CI reliability, and how you can bulletproof your automation pipelines using strict assertion wrappers and open-source verification tools. Let's look at a typical cleanup or linting step in a CI pipeline: find src/ -name "*.legacy.js" -delete If src/ contains no files matching *.legacy.js, what does find return? 0. To the shell, find executed successfully: it searched the directory, encountered no permission errors or syntax issues, and completed its execution. It has no concept of your intent that matching files ought to exist. Now scale this to a deployment workflow: sed -i 's/OLD_VERSION/NEW_VERSION/g' dist/**/*.bundle.js If your build step changed the output directory structure or filename extensions, dist/**/*.bundle.js might expand to a literal string or match nothing. sed might fail or do nothing, but depending on how the shell handles globbing (especially with nullglob disabled), the command might either fail or silently succeed with zero modifications. If your CI script uses set -e, it only catches non-zero exit codes. A zero exit code gives your pipeline a false sense of security. During large-scale refactors, p
A small SaaS should choose a hosted metrics dashboard API by testing whether it can preserve four incident signals across a rollback: request outcomes, latency, queue age, and deployment identity. The cheapest-looking chart is irrelevant if a reverted release changes labels, duplicates counters, or erases the boundary between the faulty version and the recovery. Start with the retention bill, keep the evidence needed to reconstruct a customer-support incident, and treat charts and alerts as replaceable views over that evidence. Short answer: send bounded, versioned metrics from the application, retain enough regional and deployment context to compare US and EU behavior, and evaluate any hosted service through export, replay, and rollback drills. Do not let the dashboard become the only audit trail. For custom application metrics, the dominant term is usually not the number of attractive charts. It is the number of time series retained over time: every metric name combined with every distinct label set produces another series. A support endpoint labeled by region, operation, outcome, and release stays bounded; adding customer_id, ticket_id, or raw error text makes its cardinality track business activity and defeats a predictable retention plan. Put numbers on the design before choosing an API. Consider an explicit planning model, not a benchmark: 4 signals, 2 regions, 6 operations, 3 outcomes, and 2 simultaneously relevant releases produce at most 288 active combinations. A customer identifier with 10,000 possible values would multiply the model into millions of combinations. The exact storage charge depends on the service, aggregation, scrape or push interval, and retention policy, but the architectural result does not: bounded dimensions are suitable for metrics; incident-specific identity belongs in a durable event record. For a small Node.js SaaS backed by Postgres, the runtime and database do not change that arithmetic; they change where the durable event can be
[ internet ] ──► ┌──────────────────────┐ ──► [ your VPN users ] │ NetScaler ADC / GW │ │ CVE-2026-88771 9.5 │ unauthenticated │ CVE-2026-88772 9.5 │ remote code execution └──────────────────────┘ Two zero-day remote code execution bugs in Citrix NetScaler ADC and NetScaler Gateway were confirmed actively exploited before any patch existed, and the first public warnings came from a Reddit thread, not the vendor. Citrix shipped fixes on September 27, but there is a detail buried in the advisory that most teams will miss: if you patched last month for the authentication bypass, your current build is still vulnerable to both of these. I was following the watchTowr thread on X when this broke, and cross-checked it against Citrix's advisory, the Tenable FAQ, and the r/Citrix threads before writing this. Everything below comes from those primary sources. One honesty note: I do not run a NetScaler fleet myself, so treat this as a triage plan built from public records, not field experience. Adapt the paths and endpoints to your environment. CVE-2026-88771 is improper input validation leading to unauthenticated arbitrary command execution. Citrix says it affects all deployments in the affected version range, with no extra feature needed to be enabled. That makes it the scarier of the two: if your appliance is in the range, the precondition is just reachability. CVE-2026-88772 is a memory overflow that can end in remote code execution or denial of service, and it requires DTLS to be enabled. That is the trap: DTLS is on by default for NetScaler Gateway VPN virtual servers unless someone explicitly turned it off. A "we don't use that feature" assumption does not protect a default install. Both score 9.5. Neither is related to the August authentication bypass pair, CVE-2026-19490 and CVE-2026-19489. Because the builds that fixed the last round of flaws are inside the affected range for this round. If you are on 14.1-73.32 or 13.1-63.21, the builds released August 19 for CVE-202
Researchers warn that hackers could soon exploit a maximum-severity vulnerability (CVE-2026-103849) affecting Magento and Adobe Commerce, potentially allowing them to execute arbitrary PHP code on store servers. [...]
The memory built into a coding agent lives inside that vendor's tools. What I tell one agent stays with that agent, and the next one I open in the same project starts from nothing. A checked-in instruction file gets part of the way, since any agent can read the repository, but it belongs to the repository: it can't hold what spans projects, or what I wouldn't commit. So I built a memory that sits outside the agents: a Postgres store behind six MCP tools, remember_fact, remember_note, recall_facts, search_notes, revise_fact and forget. It holds facts, which record both when something was true and when I believed it, and notes, which are searchable text. Today it runs locally, for one user, as a Claude Code plugin. The tools were the easy part. The work was in four requirements around them, and the first three fail silently when you get them wrong. I'm writing them down because I'm deciding whether to build a hosted version, lontar.dev, and because they hold no matter who builds it. Each claim below says how I know it: built (in the code today), measured (by me, with the Claude Code version named where it matters), found (in Claude Code's shipped binary), documented (in a vendor's documentation, untested unless also marked measured) or designed (written down, not built). Most of what I want an agent to remember belongs to one context. A client's deployment quirks belong with that client's repositories; how I like commit messages written belongs everywhere. So the store is divided into spaces, and the first design question was who picks the space for each read and write. The obvious answer is a space parameter on every tool, and I didn't add one. A parameter the model fills in is a parameter any text in its context can argue for: a README, a web page, another tool's output. lontar's tools can't name a space, so a model can't ask for another one. Built. Instead the server decides once, at startup, from where it was started. Claude Code starts each session's MCP server i
The short version: we set a hard daily loss limit of $50. For at least the 42 trading days we can measure, the number actually running was about $142. Nothing crashed. No alarm fired. The logs were clean. We found it by hand, weeks later, by comparing what we had written down with what the machine had actually done. "Daily loss limit" in plain words: a ceiling on how much the account may lose in one day. When the ceiling is hit, trading stops. It is the one rule that is not supposed to be negotiable. That was the entire idea. It did not work. Our bot keeps its risk rules in a small file it reads at startup. One entry said, in effect, stop trading for the day once the loss reaches $50. We wrote that line ourselves. We believed it was running. Everyone who has ever configured a safety limit believes it is running — that is exactly why this kind of bug survives so long. Every tick, the bot computes a day cap from the account balance: 1.5% of the balance, which on a roughly $9,500 account is about $142. Then it assigned that value to the variable that holds the cap. Here is the part that matters. That assignment was unconditional. It did not compare the two numbers. It did not ask which one was stricter. It just wrote over whatever was there — including the $50 that our own rule file had just supplied. So the rule file was read. The rule file was then discarded, silently, before anything could act on it. We had two caps and the code kept the looser one. Think about what a working limit looks like from the inside. When the loss approaches the cap, the bot stops trading and says so. When the cap is never reached, the bot also does nothing and says nothing. Those two states — "nothing to do yet" and "the guard is disabled" — produce the same output. A silence that means fine and a silence that means broken are indistinguishable if the only thing you watch is whether the bot complained. That is the whole trap. The guard was healthy in the only sense the logs could express.
A shipment update is one business event but potentially hundreds of subscriber deliveries. The operational constraint that changes the design is not the one-minute clock; it is the possibility that the clock, the public webhook, the queue, and a worker will each retry independently. Short answer: use cron only to trigger a public HTTPS enqueue endpoint every minute, give each shipment-subscriber delivery a stable idempotency key, and let queue workers own rate-limited processing. The scheduler releases work. It must not become the worker or the record of what was delivered. The resulting decision is cron -> public admission endpoint -> queue -> paced workers. For an e-commerce shipment fan-out, the durable truth belongs beside the queue consumer: (shipment_id, update_version, subscriber_id) identifies the operation, while attempt counts and timestamps describe transport activity. Those are different things. Keep them different. There are three retry boundaries, and collapsing them produces duplicate notifications. First, cron may call the public endpoint again. Second, a standard queue may deliver a message more than once because its contract is at-least-once. Third, a worker may retry after a downstream 429, honoring Retry-After when it is present and otherwise applying exponential backoff. All three attempts must carry the same business identity even though they have different transport identities. The admission endpoint should return only after it has durably recorded or published the subscriber jobs. If the same minute is triggered twice, inserting the same stable keys must leave the admitted set unchanged. A worker should acknowledge a queue message only after the subscriber operation has reached its durable completion point. This doesn't manufacture exactly-once delivery across two independent systems; the interval after a remote subscriber accepts a request but before the local completion record commits remains ambiguous. The practical contract is at-least-on
For years, AI benchmarks answered one question: how fast is this chip on this model? A synthetic prompt went in, tokens came out, a number got recorded. That was fine when AI meant "one model, one GPU, one answer." That world is gone. Nobody ships a bare model anymore. They ship pipelines — an embedder, a vector database, a reranker, and three LLM calls working a question like a relay team. Or an agent that reads code, runs commands, and fixes bugs before answering. Timing one runner and calling it the team's score was becoming fiction. On September 16, MLCommons released MLPerf Inference v6.1, and it finally grades the relay team. Two brand-new tests: an End-to-End RAG benchmark that times the entire retrieval pipeline as one thing, and an Edge Agentic benchmark that replays 1,007 turns of a real coding agent on a desktop. A record 30 organizations submitted 120 systems and 486 results — and buried in the numbers is a clear signal about where the industry's engineering energy is actually going. Think of AI benchmarks as report cards. Until now, the report card had one subject: math. "How fast can you solve this equation?" Useful — but your AI doesn't do math homework all day. It searches documents, reads them, reasons over what it found, and writes an answer. That's a group project. The old test timed one kid on the math worksheet and extrapolated. The new test times the whole group project: the researcher (embedder), the librarian (retriever), the editor (reranker), and the writer (LLM). If the writer is a genius but the librarian is slow, the project is slow — and now the report card says so. The second new test is even more relatable. It takes a recording of an AI coding assistant doing real work — 20 full sessions, 1,007 turns of reading code, running commands, fixing bugs — and replays it on a single machine, one request at a time, exactly the way a developer on a laptop runs an agent. Then it measures how long each turn takes. As first-time submitter Atlas In
A login form has two inputs and a button. The code to submit it is about ten lines. Behind that button there are at least a dozen separate systems, and any of them can be the reason your form "doesn't work." Most of us only debug the first and last ones. This post follows one login request all the way down and back up. At each layer I'll cover what happens, what can break, and how to look at it yourself. Here's the form: Log in sequenceDiagram participant B as Browser participant D as DNS participant E as Edge (CDN / load balancer) participant A as App server participant DB as Database B->>B: click, validation, submit event, fetch() B->>D: who is api.example.com? D-->>B: IP address B->>E: TCP or QUIC handshake, then TLS B->>E: POST /api/login E->>A: forward request A->>DB: SELECT user by email DB-->>A: row with password hash A->>A: verify hash, create session A-->>E: 200 + Set-Cookie E-->>B: response B->>B: update state, render One caveat before we start. Steps 3 and 4 often don't happen. If the browser already has an open connection to that host, it reuses it and skips straight to sending the request. I'll show the full cold-start path because it's the most informative, but a warm request is much shorter. fetch() call Clicking the button doesn't send anything. The click fires a click event, which bubbles up the DOM. Its default action is to submit the enclosing form. Before the submit event fires, the browser runs built-in constraint validation (required, type="email", pattern). If a field is invalid, the browser shows its error bubble and no submit event fires at all. That's why a handler you put on submit sometimes seems to be ignored. If validation passes, you get the submit event: const form = document.querySelector("#login"); form.addEventListener("submit", async (event) => { event.preventDefault(); // stop the native full-page navigation const data = Object.fromEntries(new FormData(form)); const response = await fetch("/api/login", { method: "POST", headers:
Short answer: treat a gaming account's short-expiry password-reset SMS as an asynchronous, evidence-producing workflow, not as a successful POST. Register the sender before launch, bind each attempt to the account being recovered, poll delivery state, rate-limit resends, and keep a fallback that does not depend on the same carrier path. This matters even more when the reset is part of legal-intake verification: an accepted API request proves neither handset delivery nor that the correct person controlled the phone. Normal delivery can fail because a sender is unregistered, a US or EU carrier filters the traffic, the handset is unavailable, or a route is temporarily delayed. None of those conditions becomes less real because the code expires quickly. The operational target should therefore separate API acceptance, delivery evidence, and successful verification, with an SLO for each state transition and an alert on attempts stuck before expiry. An SMS provider can accept work before a carrier makes its own decision. Sender registration and campaign rules affect that downstream decision, while handset conditions and temporary routing delays sit beyond the application's immediate control. Shared routes deserve particular scrutiny because the reputation and registration context may not map neatly to one game's traffic. The dangerous implementation has one Boolean named sent. A more defensible ledger records an internal attempt ID, user ID, destination country, provider message ID, requested time, expiry time, last observed delivery state, resend lineage, and the final verification result. Do not log the OTP itself. Retain the minimum evidence your legal and security teams approve, and make the retention period an explicit policy rather than an accidental property of application logs. Acceptance is not delivery. There is no webhook event push in Infrai's SMS or email namespaces, so delivery evidence must be pulled from its status or event resources. That limits orchestrat
I kept rebuilding the same failure: five agents in one chat window, no memory of what was blocked, and a "done" that nobody had checked. Better prompts did not fix it. A bigger model did not fix it either. Structure did. A company has a board, roles with defined handoffs, a gate before anything ships, and a budget someone is actually watching. So I wrote that scaffolding down as code instead of vibes: four Python modules, standard library only, plus a five-role roster and a demo you can run offline, with no API keys, in seconds. Four symptoms, all of them organizational rather than model-related: Nothing remembers what is blocked. Agent 3 asks for something Agent 1 already produced, or waits forever on a step that silently failed. "Done" means "the model stopped talking." No check between an artifact being produced and an artifact being shipped. Loops. A task blocks, gets retried with the same input, blocks again, forever. Costly and invisible. Nobody watches the meter. You find out you burned the month's quota on the 31st, when it is a post-mortem instead of a control. Each of those is a missing structure, not a missing prompt. Here is what I put in its place. A SQLite table, a parents list per task, and one transition rule: a task becomes ready only when every parent is done. No prose ordering, no "we'll do this after that, remember". def refresh(self): """todo -> ready once every parent is done; done parents unlock children.""" rows = self.conn.execute("SELECT id,status,parents FROM tasks").fetchall() done = {r["id"] for r in rows if r["status"] == "done"} for r in rows: if r["status"] != "todo": continue parents = json.loads(r["parents"]) if all(p in done for p in parents): self.conn.execute( "UPDATE tasks SET status='ready',updated_at=? WHERE id=?", (_now(), r["id"]) ) self._event(r["id"], "ready", {"unlocked_by": parents}) Every transition — created, ready, claimed, completed, blocked — appends a row to an events table. The log is append-only, so a crash never
Seven critical CVEs across two product lines. None exploited yet. No workarounds exist. Here's the fast triage. CVE-2026-76485, CVE-2026-76486, CVE-2026-76501 Affects: Cisco Nexus 3000 and 9000 Series switches The NGOAM (VXLAN OAM) feature has improper input validation on IP traffic. Crafted packets → root code execution, no auth required. Each CVE has slightly different feature prerequisites: CVE Requires CVE-2026-76485 NGOAM + SRv6 OR NV Overlay CVE-2026-76486 NGOAM + NV Overlay + at least one peer VTEP CVE-2026-76501 NGOAM + SRv6 (Nexus 9000 only — 3000 doesn't support SRv6) Check your exposure right now: bash show feature | include ngoam show feature | include nve show feature | include srv6
An Express production health check endpoint is useful only if it helps an operator make a safe decision during an incident. For a customer-support service running on Node.js, the real constraint is evidence retention: after a bad deployment, can the team distinguish liveness from readiness, find the relevant 5xx errors and logs, and explain which customer requests failed before and after rollback? TL;DR: expose separate liveness and readiness endpoints in Express, keep both handlers cheap, and emit structured lifecycle and dependency-failure logs. Let a regional uptime service probe readiness from outside the cluster. Separately, run a scheduled poller that checks recent logs or error groups and routes notifications. A probe answers "can traffic reach this release now?"; retained evidence answers "what happened to customer requests?" You need both. This separation matters for rollback safety. Liveness should say that the Node.js process can still serve its event loop. Readiness should say that this instance may receive customer traffic. A deployment controller can remove an unready instance without turning a transient dependency problem into a restart loop, while an operator can compare evidence from the new and previous releases before rolling back. A single green response collapses several different states. The process may be running while its database connection is unavailable. Conversely, a downstream SMS provider can be degraded while the support application remains able to accept a ticket, persist it, and retry delivery. Those states deserve different operational actions. Use two small Express routes with deliberately narrow contracts. Liveness returns success when the process is responsive. Readiness returns success only when the dependencies required to accept new support work pass bounded checks. Include a release identifier and a timestamp in structured logs, not a dump of secrets or customer message bodies. The endpoints themselves should reveal as little
Designing SOAR Playbooks That Hold Up During a Real Incident Security orchestration, automation, and response platforms are sold on speed. What decides whether a deployment is still useful after a couple of years is whether its playbooks encode decisions a responder would genuinely make while tired, under pressure, and short on information. Most playbook projects begin with a clean flowchart. An alert arrives, enrichment runs, a verdict appears, containment executes. The diagram is clean because it omits the difficult cases: enrichment returns conflicting verdicts, the asset owner cannot be reached, or containment would take a revenue-generating system offline. NIST incident response guidance treats response as a continuous cycle, with lessons from each incident feeding back into preparation. A playbook that automates only the response leg leaves the rest of that cycle manual. A workable safety model sorts automated actions into four tiers and lets the tier decide whether a human must approve. Read-only queries against the SIEM, the EDR, the identity provider, or a threat intelligence service run without approval. Reversible annotation, such as tagging an alert or adjusting a severity score, also runs unapproved, but the action is logged against the incident. Reversible enforcement, such as isolating a host or revoking a session, takes a policy check plus human approval in most organisations. Destructive or irreversible actions, such as deleting a mailbox or wiping a device, take explicit approval and a written rollback plan. Tier assignments are easier to defend when they are tied to the adversary technique the alert represents. Isolating a host for a ransomware technique is a different decision from isolating a host for a credential misuse alert. Every automated step needs a failure branch. What happens if the interface call times out? What happens if the target no longer exists? What happens if this step already ran for this incident? The answers belong inside th
Episode 5 of the homelab build series. Terraform poured the foundation, Ansible and RKE2 framed the walls, Kyverno and friends wired the alarms, and Tekton and Harbor built the workshop out back. This one is about the floor everything else stands on: Rook-Ceph as the garage that holds whatever you throw at it, and CloudNativePG as the filing cabinets for the stuff that needs a proper label. The Ceph dashboard landing page: HEALTH_OK, 22 TiB raw, 6 OSDs up and in across three zones. SSO Login with keycloak and Oauth2-proxy using google and Github social login. signed in with google SSO and keycloak I was proud of a cluster that was lying to me For a few months I told anyone who'd listen that my data was safe. Six Ceph OSDs, three datacenters, every object stored three times. It sounded great when I said it out loud. Then I actually looked at where those OSDs lived. Each one was a 100 GiB slice of the same local disk that held the VM boot volumes on that host, etcd's included. I'd built three copies of my data on three copies of the same weak spot, and I'd been bragging about it. Ceph kept filling up, and I kept blaming Ceph. It wasn't Ceph. I'd put the garage, the filing cabinets and the house wiring on one shelf and hoped nobody leaned on it. So this episode is the fix, and the story of what the fix taught me. It's the least exciting room in the house. Nobody comes round to admire your PVCs. But every episode after this one (the MLOps stack, the lakehouse, Kubeflow) is a tenant that needs somewhere to put things, and tenants don't move into a building without floors. Two floors, in the end. Rook-Ceph at the bottom gives the cluster block, file and object storage from one system. CloudNativePG sits on top of it for the one kind of data that deserves its own filing system: relational state. Here's how both are built, what moving onto real NVMe took, and the traps that taught me the difference between "replicated" and "safe". If you've been following along, the cluster
My whole site went down on a green deploy. Every route, every API call, every cron job. The only clue in wrangler tail was this: n. One letter, in a method I had never touched. Next.js 16.3 added a second binding to a destructured declaration. The ast-grep patch OpenNext applies after the build was replacing that whole declaration and putting back only one of the names, while the code underneath kept reading the other one. In the minified chunks that serve real traffic, the first line of the method reads the deleted name and throws. In the unminified file it happened to work, because the name the patch put back was the name the guard read. That's why every build stayed green. The test snapshot had the orphaned variable in it the whole time. The test only compared strings, and a string can't throw a ReferenceError. I fixed it by replacing the whole method body instead of one declaration, and wrote tests that actually run the patched output. It merged into OpenNext, after a maintainer carried my PR into his. All I wanted was my site to be back up. https://aashikbaruwal.com.np/blog/nextjs-16-3-composable-cache-referenceerror-fix/
In part 1 I walked through the NATS building blocks one at a time: subjects, request-reply, JetStream streams, the Key-Value store, and the Object Store. That post answered "what can NATS replace?" This one builds a real backend with it. The system is the backend for an AI chat product. It has a GPU work queue, token streaming to the browser, conversation history, per-tenant usage metering, run timeouts, and worker ownership of conversations. In a typical stack that's Kafka or SQS for the queue, Redis for counters and locks, a cron service for timeouts, Postgres for history, and a WebSocket gateway for streaming. NATS has shipped four minor releases since part 1: 2.11, 2.12, 2.14, and 2.15 (2.13 was skipped). Several of the new features close gaps that used to push you toward one of those other systems. Each section below takes one problem, shows the feature that handles it, and shows code I ran against nats-server 2.15.0 with nats.js 3.4.0. The full scripts are in nats-backbone-examples. Release Feature What it handles 2.11 Per-message TTL (Nats-TTL) Expiring one message without a stream-wide MaxAge 2.11 Per-key TTL in KV Locks and leases that expire on their own 2.11 Priority groups: overflow, pinned_client Sending work to preferred workers first 2.11 Consumer pause Stopping delivery during a deploy without deleting the consumer 2.12 Atomic batch publish Writing several messages all-or-nothing 2.12 Distributed counters INCR across regions without double counting 2.12 Delayed messages (@at) Timeouts and reminders without a cron service 2.12 prioritized priority policy Failover that moves work sooner than overflow 2.14 Recurring schedules (@every, cron) and subject sampling Periodic jobs and downsampling 2.14 Atomic schedule cancel Clearing a timeout in the same publish that finishes the work 2.14 Fast-ingest batch publish High-throughput ingest with server-side flow control 2.14 Consumer reset Reprocessing from a sequence without recreating the consumer 2.14 Mirror
Here's a ticket that shows up on every store that adds the Conversions API "Meta now reports almost double our purchases. Last month it matched Shopify." Nothing is wrong with Meta. You sent each order twice, and Meta had no way to know they were the same order. This post covers how deduplication works, the fields that make it work, and a pattern for Shopify that survives retries, consent and ad blockers. Meta deduplicates a browser (Pixel) event and a server (CAPI) event when they share both: the same event_name (e.g. Purchase), and the same event_id Matching happens within a limited time window (Meta documents it as 48 hours, but check the current docs). Miss either field and you get two purchases. A different case (purchase vs Purchase) counts as a different name, so use Meta's standard event names exactly. The rule of thumb: generate the ID once, from something both sides already know, and use it on both sides. For purchases, the order is the natural source. event_id = "purchase_" + Don't use Date.now() or a random UUID unless you pass that same value to the server. A random ID generated separately on each side is the most common cause of double counting. Browser: Pixel → fbq('track','Purchase', data, { eventID }) Server: Order webhook → POST /{PIXEL_ID}/events (event_id = same value) Why run both? The Pixel carries browser context (cookies, fbp, fbc). The server path survives ad blockers and closed tabs. Together they give better coverage, but only if dedup works. On Shopify, add this in Settings → Customer events → Add custom pixel. Custom pixels run in a sandbox, so you subscribe to Shopify's events instead of reading the page. Check the current Web Pixels docs for the exact event schema and cookie access. // Load the Meta Pixel (standard snippet), then: fbq('init', 'YOUR_PIXEL_ID'); analytics.subscribe('checkout_completed', (event) => { const c = event.data.checkout; const orderId = String(c.order?.id ?? c.token); const eventID = `purchase_${orderId}`; fbq('
If everything lives in the store, nothing really lives in the store. I have watched senior engineers, people with a decade on their resume, answer "how do you structure state in a complex app" by describing one giant global store. Server data, form inputs, a sidebar toggle, a cached auth token, all of it swimming in the same tank like it is 2016 and we are still doing it for the aesthetic. It is the fastest way to turn an architecture interview, and your actual codebase, into a junk drawer. Here is the thing nobody says out loud: most of what you call "state" is not yours. Server state is someone else's database that you are temporarily babysitting. URL state is free deep-linking infrastructure you already own. Local UI state is just a variable that got ideas above its station. Once you see it that way, the architecture question answers itself: classify first, then pick the tool. The store is a destination you arrive at, not the place everything starts. This is the whole method, and it fits on an index card. For every piece of state in the app, ask: Did it come from a server? Then it is server state. It is a cache, not state you "manage". Give it a cache (query library with stale-while-revalidate), not a reducer. If you are writing setServerData by hand in 2026, you are doing the library's job badly. Would another person need it from a shared link? Then it belongs in the URL. Query params are the most underused store in frontend: free persistence across refreshes, free deep links, zero code. Search filters, selected tabs, pagination. If a page cannot be shared with a link, you have a bug, not a design choice. Is it only alive inside one component subtree? Local UI state. useState, colocated with the component that uses it. A modal open flag does not need to travel. If your store has a boolean called isOpen with no idea what it opens, I have questions. Must it survive a reload? Persisted state. localStorage or IndexedDB with a hydration plan and an expiry story. And
Teams argue for weeks about where a version number should live and spend almost no time on the two questions that actually protect consumers: which changes are genuinely breaking, and how an old version is retired. A versioning strategy is really a change-management strategy with a routing convention on top. Get the change classification and deprecation path right and the choice between paths and headers becomes a minor operational preference. Four mechanisms show up in practice, with different operational properties. Mechanism Example Tradeoff URI path /v1/orders Simplest to route, cache, log, and debug; visible in every tool. The default for public APIs. Custom header X-API-Version: 2 Keeps URIs clean; harder to test in a browser, easy to forget in logs, needs explicit cache keys. Content negotiation Accept: application/vnd.acme.v2+json "Pure REST" on paper; opaque in practice and poor ergonomics for quick calls. Query parameter /orders?api-version=2 Easy for clients; leaks into logs and bookmarks and is inconsistently cached. For an external API consumed by browsers, mobile apps, agents, and third-party backends, path versioning is usually the right default: it is unambiguous at the edge, survives redirects and shared caches without special Vary rules, and shows up in every access log and APM trace. Header or media-type versioning is a reasonable fit for tightly controlled internal services where a gateway enforces it consistently. Pick one and document it; supporting two versioning schemes at once is a permanent tax. Most versioning pain comes from misclassifying changes. Wire compatibility is the test. Generally non-breaking, safe to ship without a new major version: Adding a new endpoint. Adding an optional request parameter or an optional request field. Adding a new response field clients are told to ignore. Adding a new optional request header. Relaxing a validation rule, such as raising a maximum length. Adding a new response header. Generally breaking, req
Architecture of Modern Web Game Engines: Canvas Rendering, CSPRNG Fairness, and WebRTC Voice in Production For decades, digital implementations of classical tabletop games—from chess and draughts to backgammon—suffered from clunky, lag-ridden interfaces. Early web iterations relied on heavy Flash plugins, clumsy Java applets, or fragile DOM manipulation where every checker drag triggered expensive browser reflows and repaints. In this comprehensive technical review and architectural breakdown, we examine what it takes to engineer a modern, low-latency, cross-platform tabletop engine capable of delivering 60/120 fps tactile responsiveness, mathematically verifiable randomness, and instant peer-to-peer voice streaming directly inside the browser. A classic 24-point backgammon board or an 8x8 checkerboard involves dozens of interactive assets: checkers, pips, dice animations, doubling cubes, and tactical highlights. When developers represent each checker piece as an independent HTML or SVG element: Every touch or mouse drag fires continuous pointermove events that mutate style transforms (transform: translate3d(...)). In complex DOM trees, mutating multiple nodes can trigger recalculation of styles and composite layer thrashing, resulting in dropped frames (jank) on mobile browsers and lower-tier Android devices. Z-index stacking contexts often become chaotic when multiple pieces are borne off, hit to the bar, or re-entered into home boards. Modern high-performance engines bypass the DOM entirely by mounting a single hardware-accelerated element. Using custom 2D drawing routines (or WebGL/WebGPU shaders for dynamic lighting and physical shadows): // High-performance requestAnimationFrame tick with frame-rate independence function renderTick(timestamp) { const deltaTime = timestamp - lastFrameTime; lastFrameTime = timestamp; // 1. Process interpolated animations (dice rolls, checker slides) updateAnimations(deltaTime); // 2. Clear canvas with dirty rect or full clear ct
TL;DR The remove.bg standalone site — and its self-serve API — retires on 1 December 2026, 9:00 CET. The official landing spot for API users, Leonardo.Ai, is a capable platform but not a drop-in replacement: it means async jobs, polling loops, presigned S3 URLs and JSON image payloads where you currently have one synchronous function call. This post is the field-by-field audit I did while wiring up a drop-in endpoint, condensed into the two tables I wish someone had already published: which request parameters behave identically, which are silently ignored, and what your error handling actually depends on. Everything here is checkable in about five minutes with curl — including against my own endpoint. From remove.bg's own API page: "The standalone website will no longer be available from 1 December 2026 at 9:00am CET." The banner on the same page points self-serve API users to Leonardo.Ai (both are part of Canva). Enterprise customers are unaffected — their contracts hold. Unused prepaid credits expire that morning. So if you're on the self-serve API, you have a real decision to make before December 1, and the rest of this post is about making it with evidence instead of vibes. To be fair up front: Leonardo.Ai is a legitimate platform, and pointing existing users somewhere is more than many sunset notices offer. But "our API is moving" and "port your integration to our generation platform" are very different sentences. The Leonardo integration model looks like this: Leonardo.Ai (official path) Drop-in replacement (what this post audits) Call pattern Async: submit → job_id → write a polling loop Synchronous: one request, PNG bytes come back Image transfer Presigned S3 URLs, or JSON with base64 / image URL multipart file, base64 string, or image URL — as before Billing Token cost varies with output resolution, hard to pre-estimate One credit per image, disclosed in a response header Code changes Queueing, polling, a new error taxonomy Change the base URL Output Genera
Request Smuggling in the ASGI Stack: Starlette and LiteLLM Why framework-level parsing flaws travel far A web framework that parses requests incorrectly affects every application built on it, and the fix has to be applied in each of those deployments. Two 2026 CVEs make the point in the Python ecosystem. CVE-2026-48710 in the Kludex Starlette framework is described as HTTP request or response smuggling leading to authentication bypass, and CVE-2026-59822 in BerriAI LiteLLM is described as improper authentication. Both were added to CISA's Known Exploited Vulnerabilities catalog on 2 September 2026, with a federal remediation deadline of 16 September. Request smuggling exploits a disagreement about where one request ends and the next begins. If a front-end proxy and a back-end application parse the same bytes differently, an attacker can construct input that the proxy reads as one request and the application reads as two. The classic results are cache poisoning, where a response intended for one user is served to another, and authentication bypass, where a request is attributed to a session that did not originate it. LiteLLM is an AI gateway. It accepts requests from applications, holds provider API keys, enforces budgets and rate limits, and forwards to model providers. Improper authentication in a gateway that sits in front of credentialed upstream services is not only a data exposure, because the attacker operates with the gateway's identity. They can consume provider quota under the organisation's billing account, reach models the organisation restricts, and in some designs cause the gateway to forward requests to internal endpoints. ~/.ssh/authorized_keys, which suggests the exploitation path can end in persistence on the host rather than in the gateway configuration alone. For Starlette, the practical steps are upgrading to a fixed release and confirming that a reverse proxy in front of the application normalises request framing rather than passing ambiguous in
Never put the limit in the agent's prompt — enforce it outside the agent, at the payment layer. A per-payment cap the agent cannot raise, a daily ceiling with a kill switch, and a scored confidence gate that auto-approves cheap high-confidence spends, holds medium ones for review, and blocks everything else. Every decision logged. This is the week the question went from theoretical to personal. Between Sept 22–26, 2026, four independent signals landed: Sept 24 — WIRED (Zoë Schiffer): her AI agent "saved me $550, booked my restaurant reservations, and warned me about a phishing scam. It also wasted $64 and might be a security nightmare." A $64 mistake with no authorization step is a budget line; at scale it's a balance sheet. Sept 24 — Tony Siqueira, LinkedIn: "You ask for one specific result. They deliver something you expressly rejected, use your money to produce it, and then tell you to buy more credits." His question: What did I authorize? What will it cost? Who pays for a failed attempt that ignored a clear instruction? Sept 22 — six banks (BofA, Capital One, ING, NatWest, ASB, CBA): consumers are "concerned that AI agents may buy the wrong thing or spend too much." Sept 25 — three regulators at GFF 2026 (NPCI, SEBI, MAS): AI agents may determine intent but should not independently authorize payments. The pattern across all four: the agent's judgment about whether to spend is not the control. The control is what sits between the agent and the money. Identity is the budget. Coinbase's production pattern (Coinbase for Agents, stocks + x402 added Sept 22) runs the agent against an isolated portfolio — each x402 payment capped at 5 USDC. The agent can't spend what isn't in its wallet. A cap written in the agent's instructions is a suggestion the agent can talk itself out of. The cap must live in the layer the agent's model output cannot reach: the payment facilitator, the tool proxy, or the gateway. A rule in a system prompt is a request; a rule enforced at the gate
Fortinet is warning customers of a critical FortiMail vulnerability, tracked as CVE-2026-104286, that is being actively exploited in zero-day attacks to execute unauthorized code or commands on vulnerable devices. [...]
Every production frontend pipeline has the usual suspects: TypeScript in strict mode, ESLint, Prettier, maybe a Playwright smoke test, and a Lighthouse run to ensure Core Web Vitals are green. If the types check out and the bundle compiles, CI turns green and we ship. Yet, after deploying hundreds of static pages, we kept running into a class of subtle, catastrophic failures that no type system, bundler, or unit test could ever detect: Crawlers were silently dropping detail pages because they had become "orphan islands" despite rendering cleanly. The alphabetically first dirty file in our repo had its "Last Updated" timestamp frozen in time for months due to a single-character string slicing bug. Well-meaning contributors were accidentally leaking defensive, self-deprecating copy ("Why we don't know X yet") and raw backend enums (confidence: "unverified") directly into production headers. When building Valor Mortis Guide—a high-density, fully static reference wiki and boss database for an upcoming first-person Soulslike—we stopped treating static pages as isolated React components. Instead, we started treating our build output as a directed graph of content invariants. Here are three real-world, non-obvious engineering traps we hit in Next.js Static Site Generation (SSG), and how we built post-build graph linters to eradicate them. In content-heavy static sites, maintaining an accurate "Last updated" date is critical for both user trust and search engine freshness. Most developers do one of two things: The Lazy Way: new Date().toISOString(). This is fatal in production. Every time your CI runs a routine build, every single static HTML file gets stamped with today’s date. Search crawlers notice 100% of your URLs changing timestamps without a single byte of editorial diff, triggering freshness spam penalties. The Naive Git Way: Running git log -1 --format=%cs path/to/page.tsx. The Git approach sounds clean until you deploy locally or in preview environments. A develop
The question Amazon ECS just handed back to you is not how long your deployment takes, it is the point past which you accept having no automatic rollback. Since September 4, 2026, earlySuccessCriteria lets you close a rolling deployment once a fraction of tasks is healthy, and the documentation says out loud what that costs: after the deployment completes, the circuit breaker and alarm-based rollback no longer roll the service back. 90/100: healthy tasks to complete the deployment. With healthyPercent 90 and a desired count of 100. The remaining ten launch through regular service scaling, outside the deployment lifecycle. 2 semanas / 2 we: cleanup window in DEFERRED mode. ECS tries to drain source revision tasks for up to two weeks after success. A task protected beyond that is never cleaned up. 0: new deployment statuses. The lifecycle stays IN_PROGRESS → SUCCESSFUL. Nothing in EventBridge or CloudTrail tells an early success apart from a full one. Until now, an ECS rolling deployment only completed when four things were true at once: the target revision reached 100% of the desired count with every task running and healthy, neither the circuit breaker nor a CloudWatch alarm triggered a rollback, the alarm bake time elapsed, and the source revision tasks were cleaned up. That is an all-or-nothing contract, designed for a homogeneous fleet that launches in seconds. earlySuccessCriteria, available for the ROLLING strategy in all commercial Regions and GovCloud (US), splits that contract in two. You declare a healthyPercent, the fraction of the desired count that must be running and healthy on the target revision, and ECS completes the deployment there. With a desired count of 100 and healthyPercent 90, the deployment turns SUCCESSFUL at task 90; the remaining ten launch afterwards through regular service scaling. The motivating case is easy to recognize: GPU-accelerated inference. The tail of a fleet on specialized capacity does not launch at the speed of its head, th
The documentation for Amazon Bedrock Managed Knowledge Base's ServiceNow connector carries two sentences that look like implementation detail when read apart. The first tells you to grant knowledge_admin to the service account, and explains why: the role bypasses per-knowledge-base user criteria restrictions. The second warns that ServiceNow data sources don't support document-level ACLs, every authenticated user who can query the knowledge base sees every crawled document. Together they describe an enterprise assistant that answers anything for anyone. This is the retro of the pilot where I found that out the cheap way: in staging, four hours after the first sync. I stood the connector up the day it shipped, September 4, 2026, against a staging instance loaded with a real export: roughly 12,000 knowledge articles spread across six separate knowledge bases, and 40,000 active catalog items. The goal was to measure sync time and retrieval quality for an internal IT assistant, the exact use case AWS names in the announcement. I followed the documentation line by line. The glide.oauth.inbound.client.credential.grant_type.enabled property set to true. A service account flagged Web service access only, no interactive sign-in. The OAuth application registered through the interceptor page, not by inserting straight into oauth_entity, as the guide itself warns. An Inbound Authentication Profile wired to a REST API Access Policy over now/table, because without it the token is valid and the Table API still returns 401. Step 3 asks for exactly two roles: knowledge_admin and catalog_admin. I assigned both, and ServiceNow inherited around fourteen contained roles. The sync finished. Then I asked the question I ask of every enterprise RAG before anything ships: I queried the assistant about a subject I knew was restricted to one group on the source instance. The answer came back whole, citing the article, for an identity that held no role there at all. It wasn't a hallucination, i