Painel de Notícias

Tecnologia

7045 posts · 26 feeds · tópicos e interesse por Jev

Filtros
dev.to

SCIM Endpoint Security: How to Lock Down a Provisioning API Before It Leaks Your Directory

A SCIM endpoint is a REST API that can list, create, modify and disable every identity in your directory, and it is usually protected by one long-lived bearer token pasted into an admin console. That combination is why SCIM misconfigurations tend to be bulk-exposure incidents rather than single-account ones. If you are building the server side, this guide walks through the six controls that decide whether a stolen or misused provisioning token is a nuisance or a breach, with a test you can run against your own endpoint for each one. If you are new to the protocol, start with Implementing SCIM 2.0 for user provisioning and deprovisioning. For the client-side interoperability problems you hit with Microsoft Entra, see lessons learned implementing SCIM with Microsoft Entra and the SCIM validator. This article covers a different angle: assuming the integration works, how do you make sure it only does what it should? SCIM (RFC 7643 for schemas, RFC 7644 for the protocol) was designed for interoperability between a provisioning client, usually an IdP, and a service provider. The spec describes the wire format well and says comparatively little about authorization policy. RFC 7644 section 7 lists security considerations, but the practical decisions are left to implementers: what a token may read, how many results a query may return, which attributes are writable. Three properties make the endpoint attractive to attackers: It is a directory API. GET /Users with a filter or pagination is a documented way to enumerate every account, including emails, group membership and active status. The credential is static. Most connectors (Entra ID's provisioning secret token, Okta's HTTP header or Basic auth, many SaaS "SCIM API keys") are long-lived and rarely rotated. It is write-capable. A token that can POST /Users and PATCH group membership can create a persistent backdoor account without ever touching the login flow. You can see the read-side problem in a single request. Against a

SegurançaDev
Interesse
dev.to

Citrix NetScaler CVE-2026-88771 and CVE-2026-88772: two edge RCE flaws attacked before a fix existed

Citrix NetScaler CVE-2026-88771 and CVE-2026-88772: two edge RCE flaws attacked before a fix existed Citrix published fixes for two NetScaler flaws on 2026-09-27 after watchTowr reported unpatched remote code execution bugs under active exploitation. Both flaws are rated 9.5 under CVSS v4. CVE-2026-88771 is improper input validation that lets an unauthenticated attacker run arbitrary commands. Citrix states that it affects all NetScaler ADC and NetScaler Gateway deployments on the affected versions, with no additional feature required. watchTowr said on 2026-09-26 that it was responding to reports of unpatched NetScaler RCE issues and called the information credible. It later said the two flaws were found during forensic investigations. Citrix did not state whether its two flaws are the ones watchTowr described, but they match that account. Administrators on r/Citrix reported being told to shut down NetScalers immediately. Appliances on 14.1-73.32 and 13.1-63.21, the builds that fixed the August authentication bypass CVE-2026-19490, are inside the affected range and need the new update. Fixed releases are: NetScaler ADC and NetScaler Gateway 14.1-73.37 and later NetScaler ADC and NetScaler Gateway 13.1-64.23 and later 13.1 releases NetScaler ADC 14.1-FIPS 14.1-73.37 and later 14.1-FIPS releases NetScaler ADC 13.1-FIPS and 13.1-NDcPP 13.1-37.279 and later releases The 13.1 fix arrived after that branch reached End of Maintenance on 2026-09-15. NetScaler ADC and Gateway sit at the edge, handling VPN, remote access, load balancing, and authentication. The bulletin lists no workaround and no indicators of compromise for the two exploited flaws. Because exploitation preceded disclosure, patching restores safety but does not show whether an attacker already established access. Teams should preserve authentication and VPN logs before applying changes, then hunt for anomalous command execution and outbound connections. ZoomEye returned 239,277 matches for app="Citrix NetSca

SegurançaInfra
Interesse
dev.to

Node.js Fintech Metrics Dashboard: StatsD-Style API Comparison for Incident Reconstruction

TL;DR: Choose the dashboard shape by asking which evidence must survive an incident, not which chart looks cheapest on day one. For a Node.js fintech experiment split across tenant cohorts, keep operational counters separate from experiment events, attach a stable experiment revision and tenant pseudonym at collection time, and preserve enough raw evidence to recompute disputed aggregates. A StatsD-style API, Prometheus Pushgateway, Mixpanel dashboards, and Datadog can each occupy a boundary in that design; none removes the need to define identity, timing, and retention first. A conversion chart can say cohort B lost six percentage points while hiding the failure that matters: OTP attempts were accepted, retries crossed a deployment boundary, and completions were attributed to a different experiment revision. An operations dashboard may look healthy at the same moment. The useful question is not "Which tool draws the chart?" It is "Can the team reconstruct why one tenant cohort moved?" Start with the reconstruction packet. For every experiment observation, the packet needs an event name, event time, ingestion time, tenant pseudonym, experiment identifier, immutable revision, cohort assignment, outcome, and a correlation identifier that joins the observation to the operational trail. Do not put an email address, phone number, OTP, account number, or free-form error body into metric labels. Those values create compliance exposure and uncontrolled cardinality without improving the decision. This is the hard constraint: a counter is evidence that something happened, but it is usually not evidence of which user flow happened. A chart grouped by cohort=control|candidate can alert on divergence. It cannot, by itself, resolve a late event, a retry counted twice, or a tenant moved between cohorts. Keep the dimensions intentionally small on the operational side and retain a pseudonymous event record where case-level reconstruction is authorized. Three clocks matter. Event tim

DevInfra
Interesse
dev.to

How to size a rack PDU and UPS for your home lab

Most home lab builds get the compute right and the power wrong. You buy a nice used server, rack it, plug it into a random power strip, and only find out it's a problem when the breaker trips at 2am during a firmware update or your UPS dies six months in because it was never sized for the load. Sizing power correctly is boring, but it's the difference between a lab that runs for years and one that eats itself. This post walks through how to size a rack PDU and a UPS for a realistic home lab, with the math you actually need and the mistakes that bite people. Every server, switch, and NAS has a nameplate rating (often on a sticker on the back) that lists the maximum draw of the power supply, not what the device actually pulls under normal load. A Dell R630 with dual 750W PSUs doesn't draw 1500W — it might draw 120-180W idle and 250-350W under load, depending on CPUs and drive count. To size correctly: Use manufacturer power calculators when available. Dell, HPE, and Cisco all publish sizing tools for their gear (Dell's is particularly good and lets you configure the exact CPU/RAM/drive combo). If you can't find a calculator, measure it. A cheap inline power meter (Kill-A-Watt or similar) on an existing device of the same family gives you real numbers fast. When in doubt, budget for idle + 40% as a safe working estimate for a lab that isn't running sustained heavy compute. Rough real-world numbers for common used gear, per unit, under typical lab load: Device Typical draw 1U server (dual CPU, few drives) 90-180W 2U server (dual CPU, 8-12 drives) 150-300W 24-48 port managed switch (non-PoE) 15-40W 24-48 port PoE+ switch (budget for PoE separately) 30-60W + PoE budget Small NAS (4-8 bay) 40-90W Firewall appliance (desktop form factor) 15-40W Add these up for everything you plan to run simultaneously, not everything you own. A rack PDU's job is to distribute power safely, not to protect against outages — that's the UPS's job. Two things matter: circuit capacity and ou

Infra
Interesse
dev.to

Node.js Uptime Health Monitoring API Explained (with Rollback-Safe Status Evidence)

TL;DR: A green Node.js status response is not enough evidence for a safe customer-support rollback. Keep app and job health as logs and metrics, preserve the release and request identifiers that let support reconstruct an incident, and use an external heartbeat monitor for scheduled work. The practical design is two signals: queryable runtime evidence for what happened, plus a dead-man's switch for work that never happened. My decision rule is blunt: do not roll back because one chart turned red. Roll back when the evidence ties a customer-visible failure to a release, and retain the account and request context needed to explain that decision later. A status page answers "is it responding now?" Incident evidence answers "what changed, who was affected, and will reversal make things safer?" A health handler normally proves that one process can answer one request. It does not prove that yesterday's ticket importer ran, that a particular model response reached the customer, or that a rollback stopped the same failure from recurring. Green can be dangerously incomplete. Silence is different. For a support system, record a small set of stable facts on each meaningful operation: release ID, operation name, outcome, customer or tenant pseudonym, timestamp, and request ID. Logs carry event detail. Metrics carry bounded aggregates such as success counts and latency distributions. A trace_id and span_id can correlate related logs when they exist, but those fields do not create a distributed trace explorer or a span tree. The rollback rule has two independent inputs. Runtime evidence indicates whether the current release is causing a defined failure. A heartbeat service indicates whether a scheduled importer, escalation job, or transcript scrubber stopped reporting altogether. That separation matters because a job that never starts emits neither a failure log nor a failure metric. I would keep both. Privacy requirements can change the tool choice. If the incident record must s

InfraDev
Interesse
dev.to

How I built a time-travel debugger for LLM agents on Burr, and what "replay the unchanged branch and prove nothing changed" actually takes.

Rewind: counterfactual replay for agent pipelines Every agent trace tool I've used has the same ceiling. It shows me a waterfall of steps, I spot that step six produced something stupid, and then I'm stuck. To find out why — or whether it was the model, the retrieval, or the prompt — I have to re-run the whole pipeline and hope it lands in the same place. With a non-deterministic model it doesn't, so I can never separate my change from model jitter. So I built the other thing: fork a completed run at any step, change exactly one input, replay only the downstream steps, and diff the two trajectories. Rewind does that, and — this is the part that took real care — when you replay a branch you didn't change, every output hash comes back identical and the replay costs zero tokens. That's the difference between a diff you can trust and a diff that's just noise. Here's the whole thing: the architecture, the four design rules that make determinism provable, and the handful of traps I walked into so you don't have to. browser (Vite + React 18 + TS + Tailwind) Graph · NodeEditor · DiffPanel · CostBar · RawJSON · Settings │ /api (Vite proxy) ▼ FastAPI ──── spawns a daemon thread per run; client polls /graph for live nodes │ ▼ Burr application ── plan → research → analyse → critique → revise → compose → verify → publish │ (llm) (tool) (tool) (llm) (llm) (llm) (tool) (tool) ├── SQLitePersister("burr_state") ← state after every node; what forking reads └── NodeTelemetryHook(PostRunStepHook) ← inputs/outputs/latency/tokens/content-hash per node │ ▼ rewind.db (SQLite, WAL): runs · nodes · edges · cache · tool_cache · burr_state data/*.csv, data/*.json → artifacts/*.md Eight nodes, four real model calls, four real local computations over a real dataset file. The graph is deliberately boring — a linear chain — because the interesting axis is time, not topology. I expected to hand-roll "resume from step N". Burr 0.42 has it natively: builder.initialize_from( persister, resume_at_next_

IADev
Interesse
dev.to

My own worst user

I use the things I build. Not the way you use something to test it — open it, click around, confirm it works, close the tab. I use them to do the actual work, more than anyone else does, for as long as I own them. It isn't discipline. I don't have the temperament for discipline. It's that I can't stand a tool I have to fight, and the tools I end up fighting hardest are always my own. That's the whole method, if it even is one. I'm my own worst user. Here is the thing I noticed once and can't un-notice. The first time I sit down and actually use a screen to get something done, its shape stops being a decision I make. It decides itself. Take a usage screen — the kind that tells you how much of something got used, by whom, over what window. The first time I use it, I want a total, so "everything" has to be a state the screen can show. The next time, I want one customer, so I narrow. I don't sit and reason about any of this. The friction of trying to get an answer drags the shape out of me. Whatever stands between me and the number gets filed down, because I'm the one standing there waiting for the number. That's the part most "use your own software" advice skips over. It isn't that using the thing reminds you to care. It's that using the thing changes what you're able to think. In front of a table, you can think in tables — rows, columns, keys, joins. In front of a task, you can't, because the table was never the thing you wanted. The answer was. You can't keep thinking in records once you've had to do the job. Because I use it, the tenant was never a constant. When I write the query behind that usage screen, I have to write the part that scopes it — which groups this person is allowed to see. And the moment I've written that, the operator's view is already sitting in front of me. It's the same query with the limit taken off. I didn't design two screens, one for the customer and one for whoever runs the place. I wrote one line about who's asking, and the second screen

Dev
Interesse
dev.to

Giving every agent the full context is why your reasoning degrades — the context engineering pattern that fixes it — Context Engineering

I spent two months convinced my agents had a reasoning problem. They contradicted each other, repeated work, and confidently cited facts that nobody had established. I upgraded models. I rewrote prompts. I added a knowledge graph because the research said graphs were the future. Each fix bought me a week of calm before the same failures crept back. The turning point came when I stopped asking "why are my agents wrong?" and started asking a harder question: "what are they actually seeing?" That's when I found it. My agents weren't bad at reasoning. They were reasoning over polluted contexts, and I had been the one polluting them. I'd built a research pipeline with five agents: scout, analyst, synthesizer, fact-checker, and writer. Each agent received the full accumulated context of everything that had come before. Sources read. Conclusions drawn. Draft sections. Intermediate tool outputs. The entire history, passed forward in one growing blob because that's what the tutorials showed. The first sign was subtle. The analyst would repeat a conclusion the scout had already established, phrasing it as a new discovery. The second sign was louder. The writer would confidently assert a fact that appeared nowhere in the source material—but which had been hinted at in an intermediate note the fact-checker had already flagged as unverified. I kept looking for a reasoning bug. What I found was a context bug. The research had already named what I was experiencing. Context rot — the measurable degradation in LLM output quality as input length increases — was formalized by Chroma's 2025 research, which tested 18 frontier models and found that every single one gets worse as input grows. Not some. Not most. All of them. Even when the context window isn't close to full. The numbers are brutal. Chroma found 20–50% performance drops as input length grew from 10k to 100k+ tokens, with coherent documents paradoxically degrading performance more than shuffled ones. Reasoning-capable models

IADev
Interesse
dev.to

Stop Hand-Rolling Service Accounts: Practical systemd-sysusers on Linux

Most Linux packages still ship shell that looks like this: getent group myapp >/dev/null || groupadd --system myapp getent passwd myapp >/dev/null || useradd --system --gid myapp --home-dir /var/lib/myapp --shell /usr/sbin/nologin myapp It works until someone races the script, a container image rebuild forgets the accounts, an admin overrides /etc/login.defs, or you need the same identity on a chroot, a DDI, and a live host without copy-pasting three different useradd dialects. systemd-sysusers is the declarative fix. Drop one line per account under sysusers.d/, run it at package install or early boot, and the system users appear the same way every time — without inventing human logins, and without touching NIS/LDAP databases. systemd-sysusers reads sysusers.d fragments and creates system users and groups by writing /etc/passwd and /etc/group directly. That is intentional: It is for daemon identities and privilege separation, not for people. It bypasses complex remote user databases (NIS, LDAP, and friends). System users must resolve without the network, including early boot and initrd paths. If you need portable encrypted human homes, that is systemd-homed. If you want a throwaway UID for one unit with no persistent name, that is DynamicUser=. sysusers sits in the middle: named, persistent, local system accounts that packages and images can declare. The boot unit is systemd-sysusers.service. You can also invoke the tool by hand. Search paths (highest override wins on the same basename): Path Role /etc/sysusers.d/*.conf Local administrator /run/sysusers.d/*.conf Runtime /usr/local/lib/sysusers.d/*.conf Local software installs /usr/lib/sysusers.d/*.conf Vendor / package Rules from sysusers.d(5): Packages ship files under /usr/lib/sysusers.d/. Admins override by placing the same filename under /etc/sysusers.d/. All files are sorted lexicographically by filename, regardless of directory. If multiple files define the same user/group name, the lexicographically earliest

InfraDevLinux
Interesse
dev.to

The Network Bill Nobody Owned: Finding Hidden AWS Data Transfer Cost with eBPF

On a typical Kubernetes-on-AWS bill, 15–20% of the cost is network: cross-AZ data transfer, VPC peering, cross-region transfer and NAT Gateway bytes. On a $1M monthly AWS bill, that's $150–200k every month. It's serious money, and it's almost always hidden. It sits on a few line items that everybody sees and nobody owns, and every review ends the same way: "it's network, it's the platform's problem". This post is about how we turned those lines into a list of named workloads with a cost next to each, and what we found once we could see it. The short version: within days of having per-app network data, we had more concrete savings opportunities than in months of looking at Cost Explorer. The pain: you can see the bill, but not the cause The approach: count bytes where the pod still has a name What we found How FinOps and OBI solved it together Why network-level observability matters Takeaways Cost Explorer tells you what you pay for, never who caused it. DataTransfer-Regional-Bytes is one number per account. It doesn't know about pods, deployments or teams. Tag-based showback gets network cost wrong. Most FinOps reports assign cost by the EC2 instance's team tag. That works for compute. For network, it charges every byte leaving a node to whoever owns the node, including bytes sent by shared DaemonSets like log shippers and agents. VPC Flow Logs see IPs, not workloads. Pods churn, IPs get reused, and NAT and peering traffic is often SNATed to the node IP before Flow Logs see it. Joining Flow Logs to Kubernetes metadata after the fact is a project of its own, and keeping them on for a large cluster isn't cheap. So the conversation goes nowhere. "Your team's network cost went up." "We don't do anything network-heavy." Nobody can prove otherwise, so nothing changes. The missing piece wasn't another dashboard of totals. It was attribution: this workload talks to that workload, across this billable path, costing this much. We used OBI (OpenTelemetry eBPF Instrumentation).

InfraDev
Interesse
dev.to

Why Cloud-First Event Check-ins Fail at 10k Scale And How We Built an Edge-First Alternative

If you have ever built an event registration or ticketing app, the default architecture usually looks clean on paper: Attendee shows a QR code on their phone. A scanner app hits a cloud REST API (POST /api/v1/checkin). An auth token is verified, PostgreSQL flips checked_in = true, and a 200 OK returns. Total round-trip time: ~180ms. In staging, this works flawlessly. Even with synthetic loads of 500 req/sec across a few load balancers, everything stays green. Then production happens at an enterprise expo center in Riyadh. Within 40 minutes, 8,000 attendees arrive at once. Local cellular towers saturate instantly. The venue’s commercial fiber drops from 300 Mbps down to intermittent 2 Mbps bursts. Latency shoots from 180ms to 9 seconds, gateways start returning 504 Gateway Timeout, turnstiles stop opening, and the physical line stretches out the entrance. Here is an architectural post-mortem on why cloud-first check-in fails under burst concurrency, and how we redesigned the physical gate stack around local edge nodes, SQLite WAL journaling, and passive UHF radio telemetry. When physical gate hardware waits on a network handshake before actuating a barrier or firing a thermal print head, network latency dictates your physical throughput. Consider the math: At 200ms per scan, a single lane processes ~5 delegates per minute (ignoring human movement). At 3,000ms latency (common when 4G/5G degrades under crowd density), that lane drops to fewer than 1.5 delegates per minute. With 20 lanes and 6,000 delegates arriving between 8:15 AM and 8:45 AM, a queue of 2,000+ people forms within 12 minutes. To guarantee zero wait time, the gate controller must never make a blocking remote network call during the transaction. The admission decision must happen strictly on local hardware in under 10 milliseconds. Instead of thin clients polling a central DB, each gate lane runs a hardened Linux edge controller (e.g., an industrial SBC or embedded mini-PC) connected directly via RS-232/

InfraDevMobile
Interesse
dev.to

Password Reset Email Deliverability Explained: Custom Domain Setup Through Template Ownership

Short answer: the best password-reset email setup is the one in which your team owns the message contract, your sending system owns authentication and delivery, and neither side can silently change the other. For a marketplace seller, keep reset-token creation and template meaning in the application; give the delivery layer rendered content plus stable metadata; authenticate a custom sending domain with DKIM; and feed bounces and suppressions back into your own account state and telemetry. Apply the same contract in the US and EU, while keeping region routing and data handling explicit. That boundary matters more than a long feature checklist. A reset email is a security transaction. It may also be the only route back to the dashboard where a seller sees a new order. Treat its template, delivery evidence, and failure policy as production code. The fragile version sounds convenient: an application asks a provider to send template reset-v4, and the provider dashboard contains the subject, HTML, variables, and active revision. Product copy lives outside review. A dashboard edit can alter the message without an application deployment. Logs may say that reset-v4 was accepted, but they do not prove which wording the seller received. The cleaner version is a small chain with named owners. Picture it left to right: account service -> reviewed template -> delivery adapter -> mailbox provider -> delivery events. Then draw a return arrow from bounce or suppression events to an internal event consumer. That is the whole operational diagram. In this model, the account service owns token purpose, expiry, recipient, locale, and request correlation. The repository owns subject and body revisions. The adapter owns the translation into a provider request. The sending service owns queueing and delivery attempts. Your event consumer owns the durable interpretation of results. This split gives you a useful deployment property. Copy and code that rely on each other ship together. Authent

InfraDev
Interesse
dev.to

Microfrontends + Microservices: How the Architecture Works, Why It Matters, and How Each Part Deploys on Its Own

The whole system on one page. Keep it open; we'll walk through every box. Picture a typical web shop. One team owns the product catalog, another owns orders, a third owns user profiles. In the beginning, everyone works in one frontend and one backend. It's simple, and that's fine. Then the company grows. Ten developers become fifty. Every release needs everyone to agree. A small bug on the profile page blocks the orders team from shipping. A routine library upgrade turns into a three-week, all-hands project. This is the problem microfrontends and microservices solve: each team builds, tests and deploys its own part of the product, on its own schedule, while users still see one seamless application. In this article we'll look at an architecture that does exactly that: how it works, why each piece exists, and above all how deployment works. The headline is this: when one part of the UI changes, you deploy only that part, and the main application doesn't need to be touched at all. A complete, runnable example is on GitHub: github.com/it-nilesh/slice-platform-starter (React + Module Federation on the frontend, .NET 10 microservices on the backend, NGINX in front). / slice-platform-starter MicroFrontend PoC A small, production-shaped proof of concept for microfrontends + microservices behind a single NGINX gateway, packaged as a framework: Manifest-driven dynamic remotes: adding a microfrontend never requires rebuilding or redeploying the shell. Vertical slices (one API + one MFE + one pipeline per team), generated and managed by the ./slice CLI. Independent CI/CD per slice: test, scan, sign and push only what changed; release each slice with its own tags. Frontend: React 19 + Vite 8 + Module Federation (@module-federation/vite + @module-federation/runtime), TypeScript Backend: .NET 10 Minimal APIs, one service per business capability Gateway: NGINX, the only public entry point Architecture The diagram above shows the moving parts. In text form: Browser (http://localhost

Dev
Interesse
dev.to

The Best Instruction You Can Give an AI Coding Agent: 'When Uncertain, Do Less'

Ask a human teammate to fix a typo and you get a fixed typo. Ask an AI coding agent the same thing and you might get the typo fixed, the surrounding function "cleaned up", two variables renamed, and a note about how it also improved the error handling. Each change might be defensible on its own. Together they turn a ten-second review into a twenty-minute one, and you now own a diff you didn't ask for. The agent isn't being malicious. It is being helpful with no idea where "helpful" stops. UNIVERSAL-AGENTS.md ends with one line: When uncertain, do less, not more. Everything else in the file is an elaboration of it. Here is what it looks like in practice. Section 25 has my favorite sentence in the whole file: A change being beneficial does not make it in scope. That sentence is aimed squarely at the agent's strongest instinct. Most unwanted changes are good ideas: a cleaner name, a modern syntax, a dependency that's two versions behind. The rule acknowledges they might be improvements and still says no, because the request defines the work. Section 8 backs it up with a list of reasons that don't justify touching a file: it could be improved, its formatting could be modernized, its naming could be clearer, its dependencies could be newer, its tests could be expanded. A possible improvement is not automatically part of the requested work. This is the interesting case. While working, the agent spots an unrelated problem. Sections 8 and 14 give a narrow path: Fix it only if it directly prevents the requested change from working, or you explicitly authorize the fix. Otherwise: Don't fix it silently. Don't redesign the surrounding code. Mention it only when it materially affects the requested work. It's a deliberate trade-off. The agent doesn't smuggle in changes you'll discover during review, and it still flags problems that matter. Doing less also means not guessing. Section 2 says that if a request is ambiguous, incomplete, contradictory, or in conflict with the project,

IADev
Interesse
dev.to

Roteamento multi-LLM na prática: 16 modelos, escada de complexidade e FinOps que dispara

TL;DR (English). geo-orchestrator routes each task of a natural-language request across 16 LLMs from 5 providers by task type, complexity, cost and provider health. Every task type keeps a fallback chain whose top two slots come from different vendors; the two frontier models (US$ 10/50 per million tokens) sit behind a declarative policy with a 35% per-session share cap; and FinOps enforces per-run, per-day and per-provider ceilings with alerts that actually fire. State as of Oct 7, 2026: 23 task types, 962 passing tests. Este artigo mostra, com pseudocódigo, as decisões de roteamento e de custo de um orquestrador multi-LLM em produção. O sistema é o geo-orchestrator, que construí para a pesquisa e a produção de conteúdo da Brasil GEO. O repositório é privado; os fluxos interativos estão em https://alexandrecaramaschi.com/geo-orchestrator. Estado descrito: 07/10/2026, Sprint 33, parque v5.3. São 16 modelos da Anthropic, OpenAI, Google, Perplexity e xAI, 23 tipos de tarefa e 962 testes aprovados. Uma demanda em linguagem natural vira um plano de tarefas tipadas com dependências. Cada tarefa precisa de um modelo. As restrições que o roteador respeita, em ordem de força: orçamento (limite por execução e tetos diários); provedor apto (disjuntor fechado, com crédito, abaixo do limite de taxa); teto de concentração por provedor no run; qualidade histórica, custo e latência. Pense numa central de despacho de táxi: o despachante sabe o destino (tipo de tarefa), a urgência (complexidade), quais carros estão na rua (saúde do provedor) e quanto já gastou no dia. Ele não manda o carro executivo buscar uma pizza. Cada tipo de tarefa tem uma cadeia ordenada. Três contratos são presos por teste: o primário e a primeira reserva vêm de provedores diferentes (exceção: o par Fable 5.1 e Opus 5.5 nas rotas frontier); toda cadeia tem pelo menos três degraus; as cadeias de redação (writing, copywriting, seo) não aceitam modelos econômicos. Alguns exemplos do parque vigente: Tipo Primário

IADev
Interesse
dev.to

Chunking — Why How You Split Documents Decides Retrieval Quality

The previous article explained how embeddings convert text into vectors so similar meanings land close together in vector space. Before you can embed a document, though, you have to decide how to cut it up. That decision — chunk size, chunk strategy, chunk overlap — has more impact on retrieval quality than almost anything else in a RAG system. And it fails silently. You won't get an error. You'll just get bad answers. An embedding model converts a piece of text into a single vector. That vector represents the overall meaning of the entire input. If you embed a 2,000-word document as one piece, you get one vector that represents the average meaning of all 2,000 words. When a user asks a specific question, the retrieved vector is the right document — but the 2,000 words contain dozens of topics, and the specific answer is buried somewhere in the middle. The model receives 2,000 words of context to search through and often glosses over the detail it needs. If you split that same document into 300-word pieces and embed each piece separately, each vector represents a focused slice of meaning. When a user asks a specific question, the retrieved chunk contains mostly relevant content — and the model can extract the answer cleanly. Chunking is how you control what unit of meaning gets embedded and retrieved. The simplest strategy: split text every N characters, regardless of where sentences or paragraphs end. // Spring AI: TokenTextSplitter with fixed token count TokenTextSplitter splitter = new TokenTextSplitter( 400, // target chunk size in tokens 50, // minimum chunk size 10, // number of sentences to use for estimation 10000, // max number of characters per chunk true // keep separator ); List chunks = splitter.split(document); What it does well: Simple. Fast. Predictable chunk sizes. Good for structured content like product listings or short FAQ entries where every item is roughly self-contained. What it does poorly: It cuts mid-sentence. A sentence that starts near t

IADev
Interesse
dev.to

Filtering a 2 GB CSV in the browser without uploading it: streams, a Web Worker and a 64-bit hash set

Excel stops at 1,048,576 rows. Most online CSV tools want you to upload the file first, which is a non-starter for a customer list or an accounting export. I wanted something in between: open a multi-gigabyte CSV in a normal browser tab, filter it, remove duplicates, split it into Excel-sized files, and never send a byte of it anywhere. The result is CSV Géant, a static site with no framework and no runtime dependency. The UI is in French by default (there's an EN button in the header). This post covers the architecture, the actual code, and numbers I measured on my own machine, including the parts that don't stream. Main thread: UI only. It sends the File object to a module Web Worker with postMessage. A File is a handle, so this doesn't copy the content. Worker: reads the file in 8 MB slices, decodes, parses, filters, deduplicates and writes the output. Progress messages go back to the UI. Output sinks: either an in-memory Blob that becomes a download, or, in Chrome/Edge, files written directly into a folder the user picks (File System Access API). Server: one Cloudflare Pages Function with three routes: anonymous counters, license check, and the price/purchase link. No CSV content, row or column name goes through it. The CSP has connect-src 'self', and once the page is loaded the tool keeps working offline. The core (csv.js and traitement.js) has no DOM dependency, so the same code runs in Node for the tests (fs.openAsBlob gives a Blob-like file). slice() plus a streaming TextDecoder The whole read loop is short. Identifiers are in French; parcourir means "walk through": export const TAILLE_BLOC = 8 surEnregistrement(champs, index++)); for (let o = 0; o LONGUEUR_MAX_ENREGISTREMENT) { throw new Error("ENREGISTREMENT_TROP_LONG"); } } LONGUEUR_MAX_ENREGISTREMENT is 16 MB. Without it, a single unclosed quote (or a wrong delimiter/encoding choice) would make reste grow until the tab runs out of memory. With it, the user gets an error message that points at the likely

Dev
Interesse
dev.to

The Hash You Pick Matters: MD5, SHA-1, SHA-256, and What Each Is Still Good For

You download a 2 GB ISO from a mirror you have never heard of, the page shows a long checksum, and you skip it. Six months later, that same image is implicated in a supply-chain incident and your team spends a weekend rebuilding machines. Checksums exist precisely to catch this. But the first question is not "how do I verify a hash" — it is "which hash am I supposed to be looking at, and is that hash still trustworthy?" A hash function takes any input — a text string, a firmware image, a password — and produces a fixed-size fingerprint. Same input, same fingerprint. Change one bit of input and the fingerprint changes completely (or it should). MD5 always outputs 128 bits, SHA-256 always outputs 256 bits, regardless of input size. The properties that matter: Deterministic: the same bytes always produce the same digest. Preimage resistant: given a digest, you cannot reconstruct the input. Collision resistant: you cannot find two different inputs with the same digest (this is the one that has been broken for old algorithms). Algorithm Output Status Use today MD5 128-bit / 32 hex Collision-broken (since 2004–2008) Legacy checksums, dedup, cache keys — never security SHA-1 160-bit / 40 hex Collision-broken (2017 SHAttered) Deprecated; avoid for anything new SHA-256 256-bit / 64 hex Secure Default choice: downloads, TLS, Git, certificates SHA-384 / SHA-512 384/512-bit Secure High-security contexts, longer hashes for HMAC The nuance that surprises people: MD5 is not "useless" — it is useless for security. It is still perfectly fine for spotting accidental corruption, deduplicating files, or as a cache key. The breakage is about deliberately constructing a collision, which is an attack, not an accident. Meanwhile SHA-1's collision break (two different PDFs with the same hash, demonstrated in 2017) means it is now publicly deprecated: browsers, Git, and operating systems have been migrating away from it for years. 1. Download integrity — the one you should do every time. # O

Segurança
Interesse
dev.to

Hybrid Search and Reranking: What Each One Actually Buys You

Enterprise RAG Engineering — Part 2 of 3 Part 1 argued that most enterprise RAG systems fail at the ingestion layer, before a single query is ever issued — and that the fix is layout-aware parsing rather than a better model. We built that stage. Docling with HeadingHierarchyOptions enabled to recover section structure, generate_parsed_pages on so the font-style signal survives, HybridChunker to split at structural boundaries rather than fixed token counts, and metadata carried through to every chunk: page number, filename, and the heading breadcrumb the chunk sits under. The result is an index where structure survived. Tables did not get flattened into a single text stream. Headings stayed attached to the content they govern. Chunks mean something on their own. That was the write path. This article is about the read path — what happens when the first query arrives. Because a corpus can be indexed perfectly and still fail to return the right chunk. The default retrieval pattern in almost every RAG tutorial is three lines long. Embed the question, run a nearest-neighbour search, return the top k. It works well enough in a proof of concept that most teams ship it. Then a user searches for WH-1000XM5. The system returns wireless headphones. All of them. Not that one. This is not a tuning problem, and no amount of prompt engineering fixes it. It is a property of how embeddings work. An embedding model compresses a span of text into a fixed-width vector that encodes what the text is about. A model number is not about anything. It is an opaque string with no distributional meaning, and whatever position it occupies in vector space is determined almost entirely by the words around it. Two chunks that both discuss wireless headphones sit close together regardless of which specific model each one names. The same failure appears with any exact identifier: a part number, an error code, a control reference, a contract clause, an internal project name. Enterprise corpora are full

IADev
Interesse
dev.to

Prove SRT survives packet loss and RTMP doesn't: MediaMTX, ffmpeg, and tc netem on one laptop

TL;DR We'll run MediaMTX locally, publish a test pattern to it over RTMP and over SRT, pull both back out, then add packet loss to the network path with tc netem. RTMP stalls and reconnects; SRT retransmits inside its latency window and keeps going. Then we'll size that window properly from a real RTT and push it to a relay. RTMP rides on TCP, so one lost packet blocks everything behind it until it's retransmitted. SRT rides on UDP with its own selective retransmission and a latency budget you choose. Everyone says this; almost nobody has watched it happen. Let's watch it happen. You need Linux (netem is a Linux qdisc; on macOS run this inside a Linux VM or container with NET_ADMIN), ffmpeg 7.x or 8.x built with libsrt (check with ffmpeg -protocols | grep srt), and MediaMTX. We'll do everything on loopback so there's nothing to deploy. MediaMTX is a single static binary that speaks SRT, RTMP, RTSP, WebRTC, HLS and more, with no dependencies. Grab the latest release for your platform from the GitHub releases page (1.19.x at the time of writing) and run it: mkdir srt-lab && cd srt-lab # download + extract mediamtx for your platform, then: ./mediamtx 2026/10/05 10:02:11 INF MediaMTX v1.19.0 2026/10/05 10:02:11 INF configuration loaded from /home/me/srt-lab/mediamtx.yml 2026/10/05 10:02:11 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP) 2026/10/05 10:02:11 INF [RTMP] listener opened on :1935 2026/10/05 10:02:11 INF [HLS] listener opened on :8888 2026/10/05 10:02:11 INF [WebRTC] listener opened on :8889 (HTTP), :8189 (ICE/UDP) 2026/10/05 10:02:11 INF [SRT] listener opened on :8890 (UDP) The shipped mediamtx.yml enables both RTMP (:1935) and SRT (:8890) by default. Leave it alone for now. 💡 Tip: with Docker, docker run --rm --network host bluenviron/mediamtx does the same thing. Host networking matters later, because we'll shape the host's loopback interface. We'll use a synthetic source so the test is repeatable and nobody has to find a samp

InfraDevLinux
Interesse
dev.to

Stop letting examples lie: make your OpenAPI spec the single source of truth for docs, mocks, and agents

Every API team says the spec is the source of truth, then maintains five copies of what a response actually looks like: one in the docs, one in a mock server, one in a shared collection, one in test fixtures, and one in the prompt context given to an AI assistant. Within a quarter they disagree. The docs show a field the API no longer returns, the mock invents an envelope the real service never wraps in, and the agent confidently calls a shape that 404s. The fix is not better discipline around copying; it is having one place where examples live and generating every other surface from it. A schema says a field is a string; an example shows that order ids look like ord_8f3a2c, that money is returned as a decimal string, and that a status enum actually serializes to lowercase. OpenAPI lets you attach named examples at the media type and parameter level, which is more useful than a single inline example because you can show the cases a consumer must handle: paths: /orders: post: requestBody: required: true content: application/json: schema: { $ref: "#/components/schemas/CreateOrderRequest" } examples: minimal: summary: One item, no note value: items: [{ sku: "sku-001", quantity: 1 }] currency: "USD" full: summary: Multiple items with a note value: items: - { sku: "sku-001", quantity: 2 } - { sku: "sku-014", quantity: 1 } currency: "USD" note: "Leave at the front desk" responses: "201": description: Order created content: application/json: schema: { $ref: "#/components/schemas/Order" } examples: created: value: id: "ord_8f3a2c" status: "pending" total: { amount: "129.00", currency: "USD" } "422": description: Validation failed content: application/problem+json: examples: invalidCurrency: value: type: "https://api.example.com/problems/invalid-input" status: 422 title: "Unprocessable Entity" errors: - { field: "currency", code: "unsupported_currency" } Parameters carry examples too, which is where realistic filter and pagination values belong. Do not forget the empty state

Dev
Interesse
dev.to

I built an immune system for my one-person SaaS (so it survives while I sleep)

I run two production sites as a one-person operation. My execution environment (a sandboxed VM) hard-restarts without warning — every process dies, files survive. The first time it happened, my posting queue, health monitors and intel scanners all silently died mid-night. I found out hours later. Never again. Here's the immune system I built, layer by layer. Daemons never run from /tmp — all state lives in a persistent artifact directory. A restart wipes processes, not state, so every daemon is designed to resume from its state file (queue position, dedup sets, cooldown timestamps). A watchdog loops every 10 minutes: for each registered daemon, check if alive; if dead, relaunch with setsid nohup. The nasty bug: I checked aliveness with pgrep -f pattern. Classic. Except when my own agent shell ran a command containing the daemon's name (e.g. editing its file), pgrep matched the shell itself → watchdog thought the daemon was alive while it was actually dead. The fix: daemons are launched via setsid, so they're session leaders where SID == PID. Phantom matches (my shell) have SID != PID. The aliveness check became: def alive(pattern): r = subprocess.run(["pgrep", "-f", pattern], capture_output=True, text=True) for pid in r.stdout.split(): s = subprocess.run(["ps", "-o", "sid=", "-p", pid], capture_output=True, text=True) if s.stdout.strip() == pid: return True return False Bonus trap I hit twice in one night: never pkill -f X from a shell whose own command line contains X. You will kill your own shell. Use the bracket trick: pkill -f "[w]atchdog.py". Every 30 minutes the watchdog GETs every public URL of both sites. Three consecutive homepage failures → auto-redeploy from the known-good static build (wrangler pages deploy), with a 6-hour cooldown so a broken build can't flap. The deploy config is data-driven (a JSON registry). Lesson learned the hard way: audit the config too — mine pointed at .next instead of the exported out/ for one site, which would have made the a

InfraDevLinux
Interesse
dev.to

Postgres is Crying: A Zero-Downtime, 15TB Migration to BigQuery with Python & Arrow

The PagerDuty alert screamed at 2:17 AM. It wasn't a gentle nudge; it was the digital equivalent of a fire alarm in a munitions factory. Host high disk I/O wait. I didn't even need to open Grafana. I could feel it. The sickly green line for iowait would be pegged at 99%, our primary PostgreSQL replica would be lagging by 45 minutes, and our analytics team, bless their hearts, would be running a monster GROUP BY on a 3-billion-row table, effectively DDOSing our production database. PostgreSQL is a masterpiece of engineering. For transactional workloads (OLTP), it's a reliable, acid-washed Swiss Army knife. But we had pushed our 15TB instance past its breaking point. It was now serving as a data warehouse, and it was choking. Queries that once took seconds were now timing out after 30 minutes. The business needed faster insights, and engineering needed to sleep through the night. The diagnosis was clear: we were using a screwdriver to hammer a nail. We needed a real hammer. We needed a columnar data warehouse. We needed Google BigQuery. But how do you move a 15-terabyte, fire-breathing dragon from one cage to another while it's still breathing fire, without anyone noticing? This is that story. Before we dive into the code, let's build a mental model. Why was Postgres struggling? Because it's a row-oriented database. Imagine your data is a massive, disorganized dresser full of receipts. Postgres (Row-Oriented): To find the total amount spent on "coffee" last year, Postgres has to pull out every single drawer, open every receipt (row), look at all its details (date, vendor, items, amount), and only keep the "amount" if the vendor is "coffee shop". It's incredibly inefficient for analytics. BigQuery (Columnar): BigQuery organizes the dresser differently. It has one drawer just for "vendors," another just for "amounts," and another for "dates." To get the total coffee spend, it just opens the "vendors" drawer to find all the "coffee shop" entries, notes their positions, a

InfraDev
Interesse
dev.to

Building an AI Chatbot That Doesn't Make Things Up

Most AI chatbot projects don't fail because of the model. They fail because of everything around it: what it knows, what it's allowed to do, and what happens when it's wrong. Here is the architecture and the decisions that matter, whether you build it yourself or hire a team. Write down what the bot owns and what it must hand off. A narrow scope (tier-1 support, lead qualification, appointment booking) beats a general assistant every time. Escalation rules are part of the spec, not an afterthought. A raw LLM will answer confidently from general training data. For business use, answers should come from your content: FAQs, policy documents, product or course material. The usual pattern is retrieval-augmented generation (RAG): Split your documents into chunks and index them Retrieve the most relevant chunks for each user question Pass them to the model with instructions to answer only from that context Return "I don't know, here's a person who can help" when nothing relevant is found Step 4 is the one most projects skip, and it is what separates a trustworthy bot from a liability. Decide in advance what the bot must refuse: off-topic requests, legal or medical advice, anything outside its knowledge base. Combine a clear system prompt with output checks, and test with adversarial questions before launch, not after. A chatbot becomes useful when it can act: Create or update a lead in your CRM Book a slot in a calendar Look up an order or record via API Open a ticket and attach the conversation Workflow tools such as n8n are a common way to wire this up without writing every integration by hand. Multi-channel deployment (website, WhatsApp, an LMS, internal tools) is mostly a matter of putting one backend behind several front ends. When the bot escalates, pass the full conversation history to the agent. Making a customer repeat themselves defeats the purpose of automating in the first place. Store conversations, and track: Resolution rate Escalation rate Questions the bot

IA
Interesse
dev.to

Your sampleRate won't save you from an error flood. Here's what does

I wrote a flood test for the error tracker I'm building: one bug thrown 997 times in a retry loop, plus three rare bugs thrown once each. In the run that looked most like production, all three rare bugs vanished before they left the Node process. Then I tried the fix everyone reaches for, sampleRate: 0.1. Across five runs, 2 of the 15 rare errors made it. The loop that caused the mess was still the biggest thing on the screen. sampleRate drops errors at random. It cuts the noisy loop by 90% and your one-off bugs by the same 90%, so the error you needed is the one most likely to disappear. The SDK drops events before sampling even runs: Dedupe eats exact repeats, and a tight burst overflows the 64-slot transport buffer. What worked: send everything, then rate limit stored bodies per fingerprint on the server. Count 100% of hits, keep the first 100 stack traces per bug per minute, let every new bug through. Because it doesn't know which error is the flood. sampleRate is a per-event coin flip in the SDK. At 0.1, every error has a 10% chance of being sent, whether it's the 900th copy of the same TypeError or the only RangeError you'll see all week. That's fine for volume and bad for signal. A bug that fires once has a 90% chance of never reaching you. The count you do see is off by about 10x, because the server gets roughly 100 events and nothing in them says "multiply me". Client reports tell the server how many events were dropped and why (sample_rate, queue_overflow), but not which bug they belonged to. You can reproduce this in a few minutes with Node 20.19 or newer. No Docker, no account. ingest.js is a fake endpoint that parses just enough of the Sentry envelope format to count errors per fingerprint. flood.js uses the real @sentry/node SDK. mkdir flood-lab && cd flood-lab npm init -y >/dev/null npm i @sentry/node@11.5.0 --save-exact ingest.js. The fingerprint is the exception type plus the top in-app frame (file, function, line). The valve is a token bucket per f

Dev
Interesse
dev.to

How AI Agents Remember: A Practical Guide to Agent Memory

Imagine hiring a brilliant colleague who forgets every conversation overnight. Each morning you re-explain the project, your preferences, and what you decided yesterday. They are capable, but they never get better at working with you. That is an AI agent without memory. The underlying language model starts every conversation from a blank page, so anything the agent should "know" has to be stored somewhere else and handed back to it. In this guide, you'll learn: What agent memory is, and why a bigger context window doesn't replace it The kinds of memory an agent can have, each with an analogy and a diagram The two main ways memory gets updated, and what can go wrong How LangGraph, Claude, and CrewAI implement memory today How the pieces fit together in one architecture Agent memory is a mechanism that lets an agent store, recall, and use information across multiple interactions. Before each model call, the system looks up relevant memories and places them into the model's context window (the text the model can see at one time). The key point is that a large language model (LLM) cannot remember on its own. Memory is a component you add around it. Think of the context window as your desk. Everything on the desk is easy to reach, but the desk is small and gets cleared at the end of the day. Memory is the filing cabinet: bigger, permanent, and only useful if someone fetches the right folder and puts it on the desk. Consider a simple contrast. A basic thermostat reads the temperature and reacts. A smart thermostat with memory learns your usage patterns and anticipates what you'll want. Both are agents, but only one improves with experience. Memory gives an agent four things: Context that carries across a conversation Personalization that lasts across sessions Pattern recognition over past events Adaptation based on what worked before There is a real cost, though. Store too much and retrieval slows down and gets noisy. The hard part of memory design is keeping what is rele

IADev
Interesse
dev.to

I re-ran 152 versions of popular MCP servers. Nearly half the updates changed what the tools tell your agent.

mcpgawk is live on Product Hunt — see the launch and leave your take You approve an MCP server once. Your agent trusts it from then on. But the server is an npm package, and most install lines are unpinned. The next launch after a release runs the new version. Nobody asks you again. So I wanted to know a boring, measurable thing: how often does an update actually change what the tools say? I took the 30 most-downloaded MCP server packages on npm. For each one I pulled every stable version published between March and September 2026 (up to 12 per package), and launched each version the same way: npx -y @ in a throwaway home directory no API keys in the environment initialize + tools/list only — never a tool call Then I stored each version's tool surface (name, description, input schema, annotations) and diffed every version against the one before it. Packages probed 23 of 30 (the disk filled twice; 7 still to run) Started without a key at least once 14 Versions launched 152 Version-to-version updates compared 86 Updates that changed the tool surface 40 (47%) An independent researcher, using her own setup on nine servers, measured 48% across 96 releases. Two methods, two machines, the same answer: roughly every second update changes what your agent is told. I expected new tools. That's not where the churn lives. Tools added / removed: 12 / 4 Updates with an input-schema change: 33 Parameter descriptions rewritten: 92 — the biggest category by far Parameter types changed: 5 — the rarest One package kept the same two tools for six months, while their descriptions and schemas moved three times. If you only diff tool names, you see nothing. That matters because the description is the part your model reads and obeys. A rewritten parameter description is a new instruction, delivered silently. Every MCP client I've used asks for consent on the first connect. None of them asks again when the server changes underneath you. A real one from my own machine: one server changed its

IADev
Interesse
dev.to

Why "Agent Said Done" and "System Actually Did It" Are Not the Same Thing

Your AI agent just published a support ticket. HTTP 200. The agent said "ticket created." But when you check the ticketing system, nothing is there. This is the gap most monitoring misses. When you run an LLM agent that takes real-world actions—publishing content, filing tickets, transferring money, updating a CRM record—you're making two separate bets: Did the agent produce valid output? (Did it generate coherent, well-formed text or instructions?) Did the consequence actually happen in the real system? (Did the ticket actually land? Did the money move?) Most monitoring—including most of what the framework itself tells you—only watches the first bet. An agent framework calls an external API (create ticket, publish post, transfer funds), gets an HTTP 200 response, and reports success. Your logs show it. Your alerts stay quiet. The agent moves on. But the API's success response only means the API accepted the request. It does not mean the operation took real effect. A ticket API might accept a request and queue it for later processing, then silently fail at processing time. A publish API might return 200 then encounter a validation error downstream. A money-transfer API might accept the transfer but hit a compliance block before actually moving funds. The agent never sees the failure—it only ever saw the HTTP 200. The agent is not lying. It's working from incomplete information. In low-volume, hands-on deployments, this gap is annoying. You catch it when a user reports "I never got the ticket." You debug it. You fix it. At scale—a hundred agents running daily, thousands of executions per day—you don't catch it. A 1% silent-failure rate on real-world consequences means one in a hundred operations silently fail to execute while the agent reports success. That's 10 missed updates per thousand runs. Over a month, it's hundreds of invisible broken promises. The agent is not malicious. The framework is not broken. But the contract between agent and system is incomplete. Th

IADev
Interesse