Painel de Notícias

Tecnologia

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

Filtros
BleepingComputer

Hackers hijack Google domains after breaching ccTLD registries

Hackers obtained unauthorized HTTPS certificates for several Google domains and hijacked domains in the country-code top-level domains (ccTLDs) for Ghana, American Samoa, and Sierra Leone after compromising third-party operators and modifying authoritative DNS records. [...]

Segurança
Interesse
dev.to

Two 32 MB tokenizers: hunting a memory floor in a Rust proxy

cliproxy-rs is a Rust rewrite of CLIProxyAPI. It's one local server that Codex CLI, Claude Code and other tools talk to, and it forwards to whatever you've configured: your own API keys, your own accounts. I run it on a small Linux box under real coding-agent traffic. On 0.2.0 that box showed something I didn't like. The resting memory, meaning what the process holds between requests, rose from 26 MB to 89 MB over about seven hours. Peaks were 300 to 400 MB. Nothing was failing, but a floor that only goes up is how a leak usually starts. My soak test only replayed Claude streams of 100 to 500 KB. The real traffic was different: Claude and Codex requests of 1 to 2 MB from long agent sessions, plus count_tokens calls. So I wrote a "field mix" replay with exactly that shape (four sessions, bodies averaging 1 MB) and ran 0.2.0 and the fix branch side by side on separate GitHub runners for an hour. 0.2.0 rested at 128 to 145 MB. That was clearly too much for a proxy that does no caching of its own. After two batches of 100 field-mix turns, heaptrack showed 67.1 MB still allocated at exit. 63.8 MB of that was two o200k_base tokenizer encoders, 31.9 MB each. They were identical. Claude count_tokens had built one, and Codex count_tokens had built the other. Five modules each kept their own lazily built tiktoken encoder in a static. Each was built the first time something needed a token count and never freed. On a server that counts tokens for both Claude and Codex models and streams Claude-format requests to Codex models, up to seven copies could exist, 164 MB of tables in total. One encoder is bigger than its 31.9 MB of live data suggests. It holds about 600,000 short token allocations, and at malloc's 32-byte minimum chunk that comes to 47 MB resident. I also checked whether glibc was just holding freed memory. It wasn't: after a trim, calling malloc_trim(0) again changed resident memory by 40 kB. The floor was live data. One shared encoder per encoding, still built only

DevIA
Interesse
dev.to

A Terminal-Bench task frontier agents could not pass

I wrote a task for Terminal-Bench, a public benchmark of hard command-line tasks for AI agents. The agent has to build a redactor for court-filing PDFs: black out every visible name and ID on a list, leave nothing recoverable in the file, and change nothing else on the page. I ran it three times each with Claude Opus 5.5 and GPT-6 Sol on their highest reasoning settings. All six runs failed, and so did two runs where the agent was told to cheat. Each agent wrote a tool of around 4,000 lines and tested it before stopping, and each one believed it had passed. This post is about how I built the task and why the agents stopped where they did. A task is a Docker environment, an instruction, a reference solution and a hidden test suite. The agent gets a shell and the instruction. When it says it’s done, the tests run against whatever it left behind, and the result is pass or fail. A good task is one a strong engineer could finish with the information given, and that current agents still get wrong. Getting both at once took most of the work. For each idea, I first asked a few models with no tools how they’d solve it. If their plan named the trick, the idea was dead. Most died there. The ones that survived got built and run against real agents with tools. A pump-monitoring task looked solid on paper. Opus solved it in 54 minutes by working the hidden behavior out of the residuals in the data. A sewer-overflow model went the same way, and Opus’s answer came in tighter than my own reference solution. A fire-hydrant flow task got passed by five agents out of five. Each failure came from the same place. For a task to be fair, the information that decides the answer has to be visible to the agent. If it’s visible, an agent with a shell will find structure in it. Opus usually did that in 7 to 30 minutes. I picked redaction because the rules are short and easy to state, and the difficulty is in how many ways content can sit inside a PDF. It’s also a real failure mode. Court filing

IADev
Interesse
dev.to

Designing a Scalable CI/CD Pipeline for Rails Apps on AWS

Designing a Scalable CI/CD Pipeline for Rails Apps on AWS Introduction Continuous integration and delivery are essential for shipping reliable Rails applications quickly. This article walks through a production-grade pipeline built on AWS services, focusing on reproducibility, security, and low latency deployments. The pipeline uses AWS CodeCommit for source control, CodeBuild for building Docker images, and CodePipeline to orchestrate the stages. Deployments target an Elastic Beanstalk environment that runs the Rails app behind an Application Load Balancer. Monitoring is provided by CloudWatch and X-Ray. Create a repository in CodeCommit and push your Rails code. Enable branch protection on main to require pull-request reviews before merges. aws codecommit create-repository --repository-name my-rails-app Define a buildspec.yml that installs Ruby, runs bundle install, runs tests, and builds a Docker image. version: 0.2 phases: install: runtime-versions: ruby: 3.2 pre_build: commands: - bundle install --jobs=4 --retry=3 build: commands: - bundle exec rspec - docker build -t $REPOSITORY_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION. post_build: commands: - docker push $REPOSITORY_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION artifacts: files: [] Create a pipeline with three stages: Source, Build, and Deploy. The Deploy stage invokes Elastic Beanstalk to roll out the new Docker image. { "pipeline": { "name": "RailsDeployPipeline", "stages": [ {"name": "Source", "actions": [{"name": "Source", "actionTypeId": {"category": "Source", "owner": "AWS", "provider": "CodeCommit", "version": "1"}, "outputArtifacts": [{"name": "SourceOutput"}]}]}, {"name": "Build", "actions": [{"name": "Build", "actionTypeId": {"category": "Build", "owner": "AWS", "provider": "CodeBuild", "version": "1"}, "inputArtifacts": [{"name": "SourceOutput"}], "outputArtifacts": [{"name": "BuildOutput"}]}]}, {"name": "Deploy", "actions": [{"name": "Deploy", "actionTypeId": {"category": "Deploy", "owner": "AWS", "provide

InfraDev
Interesse
dev.to

How to get multiple AI agents working together on one task: a WorkSwarm walkthrough

Most multi-agent demos fall apart at the handoff. One agent returns a paragraph when the next one expects a list. A subtask stalls, and nothing notices. Before long, you are writing dispatch loops and retry logic around every model call. This tutorial shows a better way. You will build a Cluster-mode Swarm in WorkSwarm (formerly JiuwenSwarm), where a Leader hands a product-analysis task to three specialist Teammates. Every step's output is checked against a JSON schema (an agreed output format), so the next agent always gets the shape it expects. You can even test the whole pipeline offline with pytest before it touches a paid model. Along the way, you will write the SwarmFlow script that defines the pipeline configure the models your Teammates use run the smoke tests offline watch a live run from the Web UI The complete code is in the companion repository. You will need: Python 3.11, 3.12, or 3.13 API credentials for at least one supported LLM provider WorkSwarm is published on PyPI as workswarm, and installing it also pulls in Agent Core and the SwarmFlow engine. The companion repository pins version 0.2.6 in requirements.txt. Clone it and install its dependencies: git clone https://github.com/manishh/openjiuwen-how-to-get-multiple-ai-agents-actually-working-together cd openjiuwen-how-to-get-multiple-ai-agents-actually-working-together pip install -r requirements.txt Next, copy the companion repository's example config into the WorkSwarm config directory: mkdir -p ~/.jiuwenswarm/config/ cp config/config.yaml ~/.jiuwenswarm/config/config.yaml Then initialize the workspace and start the services. The command-line tools kept their original names after the rename, so they still start with jiuwenswarm: jiuwenswarm-init jiuwenswarm-start jiuwenswarm-init creates the ~/.jiuwenswarm/ workspace on first run. Because you’ve already copied config.yaml into that directory, init merges it with the default version, so none of your settings are lost. jiuwenswarm-start launches t

IADev
Interesse
dev.to

How did I automate a VS Code Marketplace release without a PAT?

Question: How can I publish a VS Code extension from a Git tag without storing a long-lived Marketplace token, and what should I check when the build passes but publishing fails? Answer: I split the problem into packaging, federation, publisher access and Marketplace readback. Treating those as separate steps made today's 0.0.2 release straightforward to diagnose. The 0.0.2 listing update also included the new logo, official website and documentation, instructions for the required CLI, and a contact for problems. The CLI requirement matters: the editor plugin reads generated project files; it does not install the icon library by itself. Step 1: Prove that the extension package is good. My workflow ran TypeScript compilation, 39 tests, a build, release metadata validation and vsce package in a job that had no cloud credentials. It completed successfully before the publish request failed. That told me to investigate identity rather than alter the source code or rebuild the VSIX. Step 2: Check the Marketplace authentication path. Direct vsce publish --oidc first failed because the client request did not match the current protocol. After a narrowly guarded client fix, the Marketplace still replied that trusted publishing was not supported. I switched to a GitHub Actions OIDC token exchanged through Microsoft Entra and passed the resulting Entra identity to vsce publish --azure-credential. This avoids putting a client secret or PAT in the repository. Step 3: Make the federation subject match the workflow. My federated credential trusts main, but a tag-triggered GitHub workflow has a tag subject. Rather than weakening the credential, the tag job dispatches a second workflow on main. That workflow validates the stable tag, checks that it matches package.json, confirms the tag commit is on main, and builds from the tag. Step 4: Authorize the identity in the publisher. A successful Entra login only proves that GitHub can sign into the Entra application. My next check still f

DevInfra
Interesse
dev.to

How to get an email when a Windows scheduled task fails (without babysitting Task Scheduler)

Your backup job runs at 3 a.m. At 9 a.m. your manager asks why last night's export is missing. Last Run Result: 0x1. The task failed hours ago and Windows used to tell you. Task Scheduler had built-in email alerts - then they were removed The typical Google result is a script that loops over tasks, calls Get-ScheduledTaskInfo, and mails you when LastTaskResult -ne 0. Roughly: Get-ScheduledTask | Where-Object { $_.TaskPath -notlike '\Microsoft\Windows*' } | ForEach-Object { $info = $_ | Get-ScheduledTaskInfo if ($info.LastRunTime -gt (Get-Date).AddHours(-24) -and $info.LastTaskResult -ne 0) { Send-MailMessage -To me@example.com -From taskwatch@example.com ` -Subject "Task failed: $($_.TaskName)" -SmtpServer smtp.example.com } } It works once. Then it burns you in one of three ways. LastRunTime seconds quirk Get-ScheduledTaskInfo.LastRunTime has a long-standing bug where the seconds value can The fix is boring and reliable: do age math at minute granularity and give yourself a $ageMin = ((Get-Date) - $info.LastRunTime).TotalMinutes if ($ageMin -gt ($maxAgeHours * 60) + 2) { # stale } A rounding quirk can never wake you up at 3 a.m. The naive script has no memory. It runs every 5 minutes, the task is still broken, and you new incident. The correct model is a tiny state file keyed per watched item: new problem -> alert, store a signature of the problem same problem, within the re-alert window (24h) -> stay quiet same problem, past the window -> one reminder problem gone -> clear the state, so the next incident alerts like new Signatures must describe the problem, not the moment. Do not include the timestamp of Half the jobs that "run themselves" are not scheduled tasks - they are SQL Agent jobs, The trick that covers everything is a heartbeat file: one line appended by the job on # at the end of ANY job, scheduled or not: Add-Content -Path C:\Scripts\hb.txt -Value (Get-Date -Format o) If the file is missing or older than N minutes, alert. That converts "is my job alive?

InfraDev
Interesse
dev.to

Panduan API Rate‑Limit: Membangun Local Proxy dengan Token Bucket

Panduan API Rate‑Limit: Membangun Local Proxy dengan Token Bucket Banyak layanan API menerapkan rate limit untuk melindungi server dari overload. Ketika aplikasi Anda melebihi batas, respons 429 Too Many Requests muncul dan proses terhenti. Solusi klasik adalah retry dengan exponential backoff, tetapi pendekatan itu masih membiarkan burst request sampai ke upstream. Pendekatan yang lebih baik: local proxy yang menampung request, mengatur keluar secara ritmis, dan menyimpan cache respons. Artikel ini menunjukkan arsitektur dan implementasi minimal menggunakan Python (FastAPI + httpx). Client Local Proxy Token Bucket Request Queue Retry Manager Cache Store Upstream API Penjelasan alur: Client mengirim request ke Local Proxy (bukan langsung ke upstream). Proxy memeriksa Token Bucket: apakah token tersedia? Jika ya, request dilepaskan ke upstream; jika tidak, request masuk Request Queue. Retry Manager menangani respons 429 dari upstream dengan membaca header Retry-After dan menambahkan jitter. Cache Store menyimpan respons GET yang berhasil; request identik berikutnya disajikan dari cache tanpa menghitung ke bucket. # proxy.py import asyncio, time, hashlib, json from collections import deque from fastapi import FastAPI, Request, Response, HTTPException import httpx app = FastAPI() UPSTREAM = "https://api.example.com" RATE = 10 # request per second BURST = 20 # bucket capacity CACHE_TTL = 300 # seconds class TokenBucket: def __init__(self, rate, burst): self.rate = rate self.burst = burst self.tokens = burst self.last = time.monotonic() self.lock = asyncio.Lock() async def take(self): async with self.lock: now = time.monotonic() self.tokens = min(self.burst, self.tokens + (now - self.last) * self.rate) self.last = now if self.tokens >= 1: self.tokens -= 1 return True return False bucket = TokenBucket(RATE, BURST) queue = deque() cache = {} async def forward(req: Request): key = f"{req.method}:{req.url.path}:{req.query_params}" if req.method == "GET" and key in cache: cac

Dev
Interesse
+2 fontes
dev.to

Push notifications on iOS without Firebase: talking to APNs directly from Laravel

Most push tutorials for iOS start with "add the Firebase SDK to your app". It works, but it means shipping Google's SDK inside your iOS binary just to forward a message to Apple, and keeping a second service configured for every app. Your Laravel backend can talk to Apple Push Notification service (APNs) directly. All it takes is a .p8 key, a short-lived JWT and one HTTP/2 request. This post walks through the whole thing, including the two mistakes that cost the most time: the wrong token type and the wrong environment. An Apple Developer account Your app's bundle ID (for example com.acme.app) An APNs .p8 key, its Key ID and your Team ID The raw APNs device token from the iOS app (a hex string, more on that below) .p8 key In the Apple Developer portal, go to Certificates, Identifiers & Profiles → Keys, click +, give the key a name and enable Apple Push Notifications service (APNs). Register it and download the .p8 file. You can only download it once, so store it somewhere safe. Write down: the Key ID shown on the key page your Team ID (top right of the portal, or under Membership) Unlike the old .p12 certificates, the key does not expire every year. If the portal asks which environment the key is for, pick Sandbox & Production so the same key works for development builds and the App Store. Keep the file out of public/ and out of git, for example in storage/app/private/apns/AuthKey.p8. // config/services.php 'apns' => [ 'key_id' => env('APNS_KEY_ID'), 'team_id' => env('APNS_TEAM_ID'), 'bundle_id' => env('APNS_BUNDLE_ID'), 'key_path' => env('APNS_KEY_PATH', storage_path('app/private/apns/AuthKey.p8')), 'production' => env('APNS_PRODUCTION', false), ], APNS_KEY_ID=ABC123DEFG APNS_TEAM_ID=TEAM123456 APNS_BUNDLE_ID=com.acme.app APNS_PRODUCTION=false The JWT is signed with ES256. Instead of converting OpenSSL's DER signature by hand, use firebase/php-jwt (just the JWT library, nothing to do with Firebase itself): composer require firebase/php-jwt 2.0]) ->withHeaders([ 'au

DevInfraMobile
Interesse
dev.to

We Tested 80 Residential Proxy Providers Across 115,192 Real-World Requests: September 2026 Report

Last month we published our first monthly proxy benchmark: 50 providers, six real-world targets. The September 2026 edition is out, and the test cohort is much larger: 80 residential proxy providers and 115,192 requests, all sent through the same scenarios, timeouts and classification rules. Here is what the data shows, plus a short pandas script so you can check every number yourself. Metric September 2026 vs August Providers tested 80 +31 new, 6 exited Total requests 115,192 +131.1% Avg success rate 87.4% +6.9 pp Avg latency 1.36s +0.06s Overall block rate 10.0% −6.4 pp One caveat before reading anything into the month-over-month column: 31 providers joined the test cohort in September. The August and September cohorts are not the same set of providers, so these deltas are not a like-for-like comparison. Same providers, same rules, six targets: Scenario Requests Success rate Avg latency P95 latency Block rate ipify (generic HTTPS) 19,191 98.1% 0.61s 1.97s 0.0% Nike 19,271 97.9% 1.99s 4.17s 0.0% Instagram 19,421 96.7% 1.28s 3.20s 0.5% TikTok 18,451 95.9% 1.13s 2.70s 0.1% Google 19,436 76.4% 0.80s 1.24s 21.9% Amazon 19,422 60.1% 2.78s 4.81s 37.1% That is a 38-percentage-point spread between the easiest and the hardest target. Any benchmark that only measures a generic HTTPS endpoint will report something close to 98% for nearly everyone, and that number tells you very little about Amazon or Google. If your workload hits high-friction targets, treat the generic connectivity number as a smoke test, not a performance metric. A reader on our August post made a good point: rate limits and timeouts need different fixes. A 429 usually means you should back off, not buy more capacity or retry harder. So we split the failures in the September dataset: Scenario Success Block rate Timeout rate Amazon 60.1% 37.1% 0.2% Google 76.4% 21.9% 0.1% Instagram 96.7% 0.5% 0.1% On Amazon and Google, almost every failed request was a block-like response, not a network problem. The proxies

Infra
Interesse
dev.to

A voice notebook that can not phone home: on-device Whisper on Android

Most voice notes apps are recorders. You press a button, you get a file, and you never listen to it again. I wanted the opposite: something that listens quietly, decides what was worth keeping, and writes it down. One file per session. No setup. So I set one constraint before anything else: the app never gets the INTERNET permission. Not "we promise we don't upload." The manifest does not include it. If I want words out of it, they have to be made on the phone. A foreground service keeps the mic hot, using Android's own microphone service type with an ongoing notification. A small energy VAD runs over 16 kHz mono frames: a pre-roll so it catches the start of a sentence, a short hangover so it doesn't clip the end. Silence is never stored, and never leaves. Speech segments go to whisper.cpp (base.en, q5_1, ~57 MB, bundled as an uncompressed asset, arm64). A rules judge drops noise: fewer than four words, filler-only lines, near-duplicates by token overlap. Kept lines append to one session- .txt, and START/STOP produces a short local digest. No cloud. No API key. No account. Works in airplane mode. There is also a browser version with zero install if you just want the idea in ten seconds: https://tinyurl.com/22wmqo7q (that one uses the browser's speech engine, so it does need a network for the words). The first build used the system SpeechRecognizer. On Android 11+ the app cannot see the speech service unless the manifest declares a entry for android.speech.RecognitionService. Without it the recognizer never connects. It fails silently: no error, no exception, just nothing. Distribution, not code, was the wall. A raw APK link on Android does not reliably open in a browser. It hands off to whichever app owns the link, and those apps cannot fetch a file. I ended up hosting a one-page site with a real button. That is not engineering, but it was the difference between "won't download" and "installed." Speech models on a phone got good enough that the network stopped being

MobileDevIA
Interesse
dev.to

Two-Factor Authentication: How to Observe SMS and Trigger Backup Email

The page says that a marketplace seller cannot open a new property order because the login code never arrived. Support sees an impatient seller. On-call sees an authentication attempt, one accepted SMS request, and no trustworthy evidence of delivery. TL;DR: model SMS and backup email as one expiring challenge with separate delivery attempts. Poll delivery status only as evidence, never as permission to authenticate. After a bounded SMS wait, offer an explicit email fallback, reuse the challenge, hash every code, and make the fallback transition idempotent. This is the least complex design that keeps login correctness inside the application while still exposing enough state to operate delivery. Do not automatically send both channels. A surprise email expands the disclosure surface and can train users to accept codes they did not request. For a seller trying to acknowledge a new order, the useful promise is narrower: one visible path forward, even when a carrier receipt is late or absent. Work backward from the page. The seller reports “no code,” but that phrase collapses several states: the application may not have submitted the message, the delivery service may have rejected it, a carrier may still be processing it, or the handset may not have displayed it. A provider acceptance response is not proof that a person received anything. This distinction should shape both the UI and the alert. The signal that should fire earlier is a growing age of unresolved delivery attempts combined with user impact. Count challenges that remain usable but have neither a confirmed delivery outcome nor a successful verification. Split that count by channel and destination region, then correlate it with fallback requests and completed logins. A single delayed receipt is noise; a cohort of sellers repeatedly asking for fallback is a service symptom. Receipts lag. For each challenge, persist a stable challenge ID, purpose, account ID, expiry, consumed time, and code hash. For each chann

SegurançaDev
Interesse
dev.to

Application-Owned Two Factor Authentication Beats Provider SMS Backup Email in 2026

TL;DR: Keep the fallback email template, code lifecycle, and channel decision in the application. Use managed SMS OTP first, poll delivery state, and issue a separately generated email code only after a timeout or failed delivery check. For a media platform that emails generated reports as attachments, this 2026 design produces the audit record needed to explain why a recipient moved from SMS to email before a report was released. Provider-owned SMS verification remains useful. Provider-owned cross-channel orchestration does not win here, because the application must already control report entitlement, attachment generation, code expiry, hashing, attempt limits, and final release. Template ownership is policy ownership. A generated audience report may contain embargoed circulation figures or licensed research, so the system needs durable answers to four questions: which report was requested, which identity was challenged, why SMS was abandoned, and which code authorized the email attachment. An email provider can render and deliver a transactional template, but it should not become the authority for those decisions. This distinction prevents an exactly-once error. Delivery is an external side effect, while successful verification is a ledger transition. The former can be retried; the latter must be accepted once. Store a random code only as a hash, give it an explicit expiry, bind it to the user, report, channel, and challenge ID, then consume it with a conditional state transition. A repeated verification request returns the recorded result rather than releasing the report twice. The SMS-first path has a slower failure boundary than many diagrams imply. SMS status and events are polled, not pushed by webhook, and email events are pull-based too. A timeout is evidence to poll, not evidence of failure. After the deadline, re-read SMS state before creating fallback; otherwise two workers can observe the same stale timeout and send two valid codes. Poll first. Verify t

SegurançaDev
Interesse
dev.to

Self-Hosting an AI Assistant on CasaOS: A Step-by-Step OpenMuse Install Guide (Pitfalls Included)

How to deploy OpenMuse — a self-hosted AI chat assistant that can also manage your CasaOS server — using SSH and Docker Compose. Every step below exists because we did it the wrong way first. A home server running CasaOS (this guide was tested on v0.4.9) gets a conversational AI assistant living on the same box — one that doesn't just chat, but can list your apps, read logs, and start/stop containers with your approval. Three containers do the work: api — the Node API server + agent brain (port 8787) web — the chat UI, a static site on nginx (port 8081) browser-worker — sandboxed browser for web tasks (port 8790, loopback only) OpenMuse ships no official Dockerfiles and no CasaOS guide, so this post provides both. We'll deploy the casaos-manager-v3 branch, which adds a CasaOS control layer, a document library, and OCR on top of upstream OpenMuse. A CasaOS box with Docker and Docker Compose installed (any CasaOS install has both) SSH access to the box from your own machine (Mac/Linux/Windows terminal) An OpenRouter API key (or any OpenAI-compatible endpoint) A CopilotKit Intelligence project key — required in every mode (npx copilotkit@latest login, then npx copilotkit@latest project select) About 30 minutes, most of it waiting for the build The CasaOS dashboard has a built-in terminal, and it will betray you: its xterm.js input silently mangles keystrokes mid-session (typed text arrives as - characters, commands never execute, and retrying doesn't fix it). Do all of the following over SSH from your own machine. If you must use the web terminal, paste whole command blocks — never type long commands by hand. ssh @ Everything below runs on the server. A previous install attempt (or a half-dead tsx dev server) can leave a stale process holding port 8787. docker compose down does not kill host processes or containers from a different compose project, so check before you start: ss -tlnp | grep -E '8787|8081|8790' docker ps -a --format '{{.Names}} {{.Status}}' | grep -i -E

IAInfraDevLinux
Interesse
dev.to

Boundary Contract: Make Every Agent Tool Fail Boring

Cross-post of Insights #8 — canonical: https://sheikhwasim.com/insights/boundary-contract-tools-fail-boring/ Most agent failures I see in production don't start in the model. They start at the edge of a tool. A call times out. An API returns an empty list. A search gives back three results out of thirty. The model gets something shaped like data, so it does what models do: it writes a fluent, confident answer on top of it. The transcript reads fine. The customer gets the wrong answer. Nobody notices until a human asks why. I call the missing control a Boundary Contract: every tool the agent can call returns a typed outcome, not just a payload. Ok, empty, partial, timeout, rejected. The agent has to handle each one by name. It can't turn a broken call into the truth. Clever prose can wait. The boundary has to be boring first. Situation. A field-service company shipped a scheduling agent. A customer asks for a repair visit. The agent checks the technician calendar, offers the next open slot, and books it. Staging looked sharp. What broke. On a busy Monday the calendar service started timing out under load. The tool wrapper caught the timeout and returned an empty list, because that's what the original developer thought "safe" meant. The agent read "no slots" and told customers the next opening was three weeks out. Some cancelled. Some called a competitor. The logs showed a successful tool call, a polite reply, and no error anywhere. The dashboard stayed green all morning. The fix (Boundary Contract). Typed outcomes on every tool. The calendar tool now returns ok, empty, partial, timeout, or rejected, plus the payload. "Empty" and "timed out" stopped looking the same. Input checked before the call. A bad zip code or a missing service type gets rejected with a reason, before it reaches the calendar API and comes back as a mystery. A named policy per outcome. timeout means retry once, then tell the customer "I can't see the calendar right now" and offer a callback. Never

IADev
Interesse
dev.to

Native Quantization: Let OpenSearch Service Compress Your Vectors

Send FP32, get 2x to 32x compression, and leave your ingestion pipeline untouched. The engine does the work. The previous article in this series put the quantization work on you. You convert vectors to a reduced precision before indexing, and Amazon OpenSearch Service stores exactly what you send. That gives you full control, and it gives you a standing job: pick a method, run the conversion in your pipeline, and re-check accuracy every time your embedding model changes. There is another way. OpenSearch Service can compress at index time. You send the full-precision FP32 vectors your embedding model already produces, and the engine converts each one to a lower-bit representation during ingestion and stores the compressed vectors in the index. Both the Faiss and Lucene engines offer native quantization, each with its own methods. Your ingestion pipeline does not change. The control over the accuracy tradeoff moves out of your code and into index configuration. The baseline is the same one from the previous article. At 100 million vectors of 1,536 dimensions, full-precision FP32 needs about 643 GB for one copy, roughly 1.3 TB with a replica. That figure is the best-latency deployment, holding every vector in memory; with memory-optimized loading you can serve the same index in less RAM and page from disk at some latency cost. Every option here reduces the footprint while leaving ingestion identical. This is the second of three articles on the quantization spectrum in OpenSearch Service. The first covered pre-quantized vectors. The third covers on-disk mode and cost stacking. Faiss scalar quantization is the native path you reach for first. You set the encoder on the knn_vector field to sq and give it a bits value, and OpenSearch Service converts each FP32 dimension to the target precision during ingestion, storing the quantized vectors in the index. Valid bit widths are 16, 4, 2, and 1, spanning the range from near-lossless to aggressive compression. At 16 bits, scala

IAInfraDev
Interesse
dev.to

Reading a lending protocol's whole loan book straight from Cardano's ledger

We wanted one number: how far does ADA have to fall before a real share of Indigo's loans gets liquidated? Indigo is a Cardano protocol where you lock ADA and mint synthetic assets (iUSD, iBTC, iETH…) against it. Each position is a CDP, a collateralized debt position. The protocol's own API was the obvious place to start. When we started (September 9) it listed only the v3 positions: 50 CDPs holding about 6,300 ADA. The real book was about 3,000 times bigger, and it was sitting in plain sight on chain. This post shows how we read it from a local cardano-db-sync Postgres database, and how we check that the decode is complete. That check matters more than the decode itself. On Cardano, a smart contract's funds are UTxOs locked at a script address. Every CDP is one UTxO at Indigo's v2 CDP validator, and that address's payment credential is ff0b10bff20e4b68b491492e5ba6c8048a704763b0a45ce2995da0be. We found it by working backwards: take recent transactions that mint iUSD and look at which script output each one creates. Every one of them lands on that credential. db-sync ships a utxo_view of unspent outputs. Every CDP carries its state as an inline datum, and db-sync stores those already decoded to JSON in the datum table: SELECT u.value::numeric AS lovelace, d.value::text AS datum_json FROM utxo_view u LEFT JOIN datum d ON d.id = u.inline_datum_id WHERE u.payment_cred = decode('ff0b10bff20e4b68b491492e5ba6c8048a704763b0a45ce2995da0be', 'hex'); On 2026-10-06 that returned 314 UTxOs. 311 decode as CDPs; the 3 that don't are reported as undecoded. The v2 CDP datum is nested Plutus constructors. Stripped down: con0[ con0[ con0[ bytes owner_pkh ], bytes iasset_name_hex, -- "iUSD", "iBTC", ... con0[ bytes policy, bytes name ], -- collateral; ("", "") = ADA int minted_raw, -- the debt, 6 decimals con0[ int updated_ms, int interest_acc ] ] ] In Python: import json def decode_cdp(lovelace, datum_json): f = json.loads(datum_json)["fields"][0]["fields"] asset = bytes.fromhex(f[1][

Dev
Interesse
dev.to

Live Captions vs Post-Session Transcripts: How Python Users Should Choose

Ship the post-session transcript first unless accessibility requirements make live captions mandatory; then build captions as a separate realtime system whose delivery contract is explicit. TL;DR: A transcript is a file and captures most of the durable value after a customer-support session. Live captions help during the session, but even a few seconds of latency is noticeable, and every viewer introduces fan-out, ordering, reconnect, and duplicate-delivery questions. Check accessibility requirements before choosing. If captions are required, use application-level sequence numbers, idempotent consumption, and bounded replay rather than pretending a successful publish proves that every agent saw every line. This architecture decision covers a shared support workspace where agents need to see who is online and, during a call, read captions. Presence and captions may share transport plumbing, but they do not share consequences: a stale green dot is inconvenient, while a missing or reordered sentence can change what an agent thinks the customer said. The decision axis is therefore delivery at fan-out, not a vendor's feature count or a transcription model's headline accuracy. Write the product promise before selecting the transport. “Realtime” is too vague to test. For this workspace, I would record four invariants: Each caption segment has a session-scoped sequence number and stable event ID. A consumer can receive the same segment more than once without rendering it twice. A reconnecting consumer can identify a gap and request replay from durable session state. Presence is explicitly ephemeral; the transcript is durable and is finalized only after the session ends. Those statements deliberately avoid promising exactly-once delivery. A broker can acknowledge a publish while a browser disconnects, and a reconnect can race an in-flight event. Exactly-once wording tends to move those failures out of sight rather than remove them. The UI needs an honest state model: connect

Dev
Interesse
dev.to

Building Bulletproof Laravel APIs using Schema-First Contract Validation

Most Laravel APIs I review have the same shape. There is a controller, there is a FormRequest, and somewhere in a folder nobody has opened in four months there is an OpenAPI file that stopped being true around the third sprint. The validation rules and the documentation describe two different APIs, and the only way to find out which one is real is to send a request and see what comes back. That gap is not a documentation problem. It is an architecture problem. We treat the contract as an output of the code, something we generate afterwards to keep consumers happy, when the contract is the one part of an API that consumers actually depend on. They do not depend on your Eloquent models. They do not depend on your Action classes. They depend on the shape of what they send you and the shape of what you send back. Schema-first flips that relationship. You write the contract first, and everything else in the request response lifecycle is derived from it or checked against it. The schema validates the incoming payload, the schema shapes the response, and the schema is what your test suite asserts against. One source of truth, three consumers. I want to be clear that I like FormRequests. They are a good boundary. The issue is what they do not do. Take a fairly ordinary request class: final class StoreLeadRequest extends FormRequest { public function rules(): array { return [ 'email' => ['required', 'email', 'max:255'], 'company' => ['required', 'string', 'max:255'], 'source' => ['required', 'string', 'in:web,referral,event'], ]; } } Now send this body: { "email": "steve@example.com", "company": "Example Ltd", "source": "web", "is_admin": true, "score": 100, "internal_notes": "ignore this" } That request passes validation. Laravel does not care about the extra keys, because rules describe what must be present, not what is permitted. If a later refactor introduces a mass assignment path, or someone reaches for $request->all() instead of $request->validated(), those extra keys

Dev
Interesse
dev.to

Build a Slack Bot That Investigates Any IP You Paste

A Slack bot that investigates a pasted IP needs three things in one reply: a threat score, the provider behind the address, and the abuse contact to report it to. The first two are one API call. The third is the one everyone skips. That skip is why a lot of abuse never reaches the network that could actually stop it. Finding an abuse address means a WHOIS query, reading an RIR record, and guessing which of four email addresses is the live one. Nobody does that at 4pm on a Friday. Most IP lookup bots stop at the score. This one ends at a sendable report, and it handles corporate gateways, known-good bots, and bogons separately so a raw score does not become the whole verdict. TL;DR One slash command, two API calls, three credits per investigation. Returns threat score, VPN and proxy provider names, bot type, and the abuse contact email in a single Block Kit reply. Uses a slash command rather than a message listener, so the bot only spends credits when someone asks. Refuses to score three address types that break naive triage: corporate gateways, declared good bots, and bogons. Full Bolt for Python code, with the ack() timing gotcha that breaks this on Lambda. You'll end up with a /ip command that takes an address, returns a structured verdict in about a second, and tells you exactly who to email if the answer is bad. The triage thresholds are mine, not a vendor's, and I'll show you where to move them. The output contract is four lines: a score with a band, the flags that explain the score, the provider name where one exists, and an abuse email. Anything else is noise in a channel. The design decision worth arguing about is the trigger. The obvious build listens for message events and auto-replies whenever an IP appears in text. One of the few existing open-source versions does exactly that. I think that's the wrong call, for three reasons. It spends credits uninvited. Someone pastes a log excerpt with forty addresses in it and you've just burned 120 credits on data n

SegurançaInfraDev
Interesse
dev.to

Ouroboros: A Recursive Dev Loop Where AI Improves Code — Safely

Ouroboros — the recursive dev loop, a walkthrough Built by Daniel Krydynski, with Kiko. A harness that lets AI agents github.com/danielKrydynski/ouroboros. One attribution up front, because it matters: **Hermes is Nous Research's * I run my own local AI setup on top of Most "AI writes code" setups are a single prompt: you ask, it answers, you system that The loop has five stages: Scout — an LLM role that audits the repo and proposes tickets (bugs, refactors, missing tests, docs). It doesn't write code. It writes work orders. Ticket — a small markdown file describing one unit of work: what, why, acceptance criteria. You curate these. Nothing enters the loop without a ticket. Implementer — an LLM role that works the ticket inside a disposable git worktree on a throwaway branch. It proposes file changes; the harness applies them; the test suite runs; failures go back to the implementer. It iterates until tests pass or it exhausts its budget. Reviewer — a separate LLM role that reads the diff and votes APPROVE or REJECT, with reasons. A second pair of eyes that isn't the author. Merge — only if tests are green and the reviewer approves, the harness asks you (the human) for merge approval. Then it merges to main, marks the ticket done, and logs the cycle. The core design principle: the harness never trusts the agent. main, never your secrets, never Three things stay deliberately separate: Harness (harness/, prompts/) — the loop controller. Lives in its own folder, outside the product repo. Agents never edit it. Backlog (tickets/) — the task queue. The scout proposes, you curate. Workers — the LLM roles, which only ever touch the disposable worktree. Two more things that changed since the first draft of this idea: the loop {{PROJECT_NAME}} and {{PROJECT_DESCRIPTION}}, filled from config, so the same harness drives a any repository. And it's public now: Ouroboros v0.2.0, on Why this matters beyond one repo: this is a concrete, runnable sketch of standard. harness/orchestra

IADev
Interesse
dev.to

Flutter + NVIDIA Physical AI: Performance Architecture for AI Robot Interfaces

Flutter + NVIDIA Physical AI: Performance Architecture for AI Robot Interfaces This tutorial focuses on practical performance engineering for Flutter applications connected to smart glasses, NVIDIA Jetson, ROS 2, and Physical AI systems. Start by deciding which data needs real-time treatment and which data can be delayed. A useful mobile target is roughly 16 ms per frame for a 60 Hz display. High-frequency robot telemetry should not automatically trigger a full widget-tree rebuild. Use separate budgets for: UI rendering network messages camera frames AI results robot commands diagnostic logs A scalable design is: Smart Glasses / Robot | v Native Android / Jetson / ROS 2 | v Transport Layer (WebSocket / MQTT / gRPC / REST) | v Flutter Repository | v State Controller | v Lightweight Widgets Keep transport, state, and presentation separate. class RobotTelemetry { final double battery; final double cpu; final double temperature; const RobotTelemetry({ required this.battery, required this.cpu, required this.temperature, }); } The UI should consume application-level models instead of raw ROS 2 or wearable messages. Avoid putting all telemetry into one large setState(). Prefer independently updating sections: Column( children: [ BatteryCard(), CpuCard(), TemperatureCard(), CameraPreview(), RobotLogPanel(), ], ) Use granular state subscriptions so a battery change does not rebuild the camera preview. If ROS 2 or a wearable SDK produces 100 messages per second, the UI normally does not need 100 complete rebuilds per second. Keep the newest value and publish it to the UI at a controlled interval: Timer? _uiTimer; RobotTelemetry? _latest; void onTelemetry(RobotTelemetry value) { _latest = value; } void startUiUpdates() { _uiTimer = Timer.periodic( const Duration(milliseconds: 100), (_) { final value = _latest; if (value != null) { updateVisibleTelemetry(value); } }, ); } This separates high-frequency acquisition from UI refresh. For smart-glasses cameras and robot vision, an o

DevMobile
Interesse
+1 fonte
Phoronix

NVIDIA Vera HPC Performance Benchmarks Take On AMD EPYC, Intel Xeon

While most everyone understandably likes to talk about AI these days, one of the areas of NVIDIA's Vera CPU I have been most eager to test has been for conventional high performance computing (HPC) workloads. HPC was talked up as one of Vera's strengths thanks to its 1.2TB/s LPDDR5x memory bandwidth and custom Olympus cores. Vera is seeing deployments at HPC labs like Los Alamos. With recently having unfettered remote access to a dual NVIDIA Vera server, I ran through a variety of HPC workloads and similar performance benchmarks. Here is a look at how NVIDIA Vera performs against AMD EPYC and Intel Xeon, including with CPU power and frequency metrics.

Infra
Interesse
dev.to

We Built a Microstructure-Gated Hedger for Polymarket: Here is What 250+ Real Market Backtests Taught Us

📚 The Quantitative Microstructure & Cross-Market Series by FollowSM Part 1: Detecting Orderbook Toxicity & Polymarket Divergence: Building a Microstructure Circuit Breaker Packages: Python (PyPI): pip install followsm-sdk Node.js (npm): npm install @followsm/sdk We built an open-source hedger that delta-hedges Polymarket BTC positions with Binance perpetual futures and scales the hedge with order-flow toxicity. The logic: stay unhedged while the flow is calm, hedge half when VPIN climbs, go fully neutral when it spikes or a liquidity sweep hits. Then we backtested it on 256 real daily Polymarket markets covering nine months, and it mostly didn't work. 📊 TL;DR Gating on VPIN rebuilt from public 1-minute data added nothing. A placebo, with the same hedges at randomly shifted times, did as well. On P&L spread it did as well or better in 19 of 20 seeds. High VPIN did not warn of big moves. The top-5% VPIN regime was followed by a tail-sized BTC move less often than average: 0.54–0.61× the base rate. Most of the tail is the jump at expiry. A binary option's delta explodes in its final hour, and no perp hedge keeps up. What worked was constant delta neutrality plus an exit one hour before resolution. With a wider rebalance band, that cut the 5% expected shortfall roughly in half, from −$742 to −$385 per 1,000-share position. Hedging cost fell to $36. Everything below is reproducible from public data: / dynamic-inventory-hedger Dynamic Inventory Hedger This tool delta-hedges Polymarket crypto positions with Binance USDⓈ-M perpetual futures. How hard it hedges depends on FollowSM microstructure toxicity: VPIN percentile, orderbook imbalance, liquidity sweeps and smart-money flow. A Polymarket "Bitcoin above $84,000 on Friday" position is really a digital option on BTC. When informed flow hits the market, that position moves before any stop-loss can react. The hedger turns each position into an equivalent perp exposure and then: stays unhedged while the flow is normal; bui

GeralDev
Interesse
dev.to

Integration Testing for APIs, Microservices and Event-Driven Systems

Modern applications rarely run as one tightly connected system. They depend on APIs, databases, microservices, message queues and third-party services. That makes integration testing more important because many failures happen between components rather than inside them. A practical integration testing guide should therefore cover how these modern systems communicate, fail and recover. API integration testing checks whether connected services exchange the right data and handle responses correctly. Important checks include: Request and response schemas Status codes Authentication Headers Required fields Invalid input Timeouts Duplicate requests For example, an order service might send payment information to a payment API. The test should confirm that the correct amount, currency and customer details are sent, and that the application handles approved, declined and failed responses properly. A successful 200 response is not always enough. The test should also verify whether the expected data was saved and whether the correct downstream actions happened. Microservices create additional risk because different services can be developed and deployed independently. One service might update its response format while another still expects the old version. Both services may work correctly on their own, but the integration between them breaks. Integration tests for microservices should check: Service-to-service communication API compatibility Authentication Dependency availability Timeouts Partial failures Version changes Contract testing can also help by checking whether a service still follows the interface expected by its consumers. Event-driven systems work differently because the result may not appear immediately. A typical flow might be: Order Service → Message Queue → Inventory Service The test should not simply wait for a fixed number of seconds. It should wait for the expected condition or event. Important scenarios include: Delayed messages Duplicate events Events arr

Dev
Interesse
dev.to

The 12 kubectl Queries We Run Before Every Cloud Cost Review

Originally published on the Professional IT Services blog. Twelve queries show what a Kubernetes cluster costs and where it wastes money: nodes and taints, requests and limits, real usage, top pods, QoS classes, idle requests, pods over their requests, volumes, orphans, leftovers, load balancers and restarts. They need only kubectl, jq and the hcloud CLI, and the output below comes from our production K3s cluster. That is the most direct route to reducing Kubernetes operational overhead: before changing anything, measure what is requested, what is used and what is billed. Our earlier post covers what we changed. This one is the checklist we run first, and the same queries run on client clusters before their cost reviews. All results were measured read-only on 1 October 2026 on pits-prod-fsn1-cluster-01: K3s on Hetzner Cloud, five nodes, 98 running pods, 135 containers. Client namespaces are anonymised (client-a, client-b, shop-wp), pod-hash suffixes are trimmed, and long outputs are cut to the rows that matter. # Query Question it answers Our result 1 kubectl get nodes -o custom-columns What are we paying for, and what is tainted? 5 nodes, 42 vCPU, 4 of 5 with an empty instance-type label 2 kubectl describe nodes How much is requested and limited per node? CPU limits 124% of capacity, 204% on one node 3 kubectl top nodes What is actually used? 4.7% CPU, one node at 14% 4 kubectl top pods -A --sort-by=memory Who uses the memory? One database pod at 4,290 Mi 5 QoS census with jq Who is evicted first? 0 Guaranteed, 77 Burstable, 21 BestEffort 6 Requests against usage per pod Where are requests idle? About 2.7 GiB idle on two database replicas 7 Pods above their requests Where is the other side of the problem? 12 pods above a request 8 Volume capacity against use Which volumes are empty? 14 of 16 10-GB volumes under 1% used 9 Orphaned volumes What do we pay for with no pod attached? None 10 Zero-replica workloads, leftover jobs What was left behind? 1 StatefulSet at 0,

InfraDev
Interesse
dev.to

Build a masonry grid in Angular

Masonry layouts are useful anywhere you have items with different heights but still want a compact, flowing grid. Common examples include: Photo and image galleries — images naturally have different aspect ratios. Dashboards — KPI cards, charts, tables, and widgets rarely have the same height. Product and catalog pages — product descriptions and images can vary in size. Blog and content feeds — cards often contain different amounts of text. Portfolio and project grids — projects can have very different visual dimensions. Search and discovery pages — results can vary significantly in height. Admin and analytics interfaces — widgets often have dynamic content and dimensions. A normal CSS grid lays items out in rows. If one item is taller than the others, the entire row has to accommodate it, leaving empty space underneath shorter items. Masonry solves that by placing each item into the column with the least available height. In this guide, we'll build a masonry grid in Angular and gradually add responsive columns, dynamic content, spanning, SSR support, and native CSS masonry. By the end, you'll have a grid that: responds to any screen size supports items spanning multiple columns automatically reacts to added, removed, or resized items avoids layout jumps when images load works with Angular SSR can use native CSS masonry where available has zero runtime dependencies If you want to see the finished result first, check out the live demo. Before writing JavaScript, it is worth asking whether CSS can already solve the problem. There are two common approaches. column-count gives you a masonry-like appearance with very little CSS: .gallery { column-count: 3; } But it fills columns from top to bottom: 1 4 7 2 5 8 3 6 9 That can be problematic when the order of your content matters. A list sorted by date or search relevance no longer reads naturally across the page. CSS Grid preserves the expected DOM order: .gallery { display: grid; grid-template-columns: repeat(3, 1fr); }

Dev
Interesse
dev.to

Realtime Testing for Shared Kanban Poll Recovery: Four Gates Beyond Timing

Realtime Testing for Shared Kanban Poll Recovery: Four Gates Beyond Timing A customer-support team running a live poll during a session has a nasty constraint: an agent can lose a connection while the poll is changing, then reconnect after several updates have already happened. The test must prove the recovered board is correct without waiting for wall-clock timing. Short answer: model connection drain as an explicit state transition, persist an ordered event cursor, and assert the post-reconnect snapshot plus backfill contents; use virtual time only for deadlines, never as evidence that a message arrived. For a support poll, the useful invariant is simple: every participant sees one valid projection of the same ordered poll history. A card can move from “open” to “pending,” and a vote can change from “yes” to “no,” but a reconnect must not create a second move or erase an earlier vote. The transport is an implementation detail below that invariant. I write the test around four values: an event sequence, a durable cursor, a projection version, and a connection state. The sequence is monotonic per board. The cursor is the last sequence included in the client projection. The version identifies the schema used to build that projection. Connection state is deliberately boring: connected, draining, disconnected, or catching_up. That naming matters. “Wait 200 ms and expect three messages” describes a scheduler, not a contract. A busy CI worker can deliver the messages in 20 ms or 2 seconds while the contract remains identical. No clocks. Here is a small in-memory model for a poll board. It has no sleeps, network calls, or test-only branches. from dataclasses import dataclass @dataclass(frozen=True) class Event: seq: int kind: str card_id: str value: str class BoardLog: def __init__(self): self.events = [] def append(self, kind, card_id, value): seq = len(self.events) + 1 event = Event(seq, kind, card_id, value) self.events.append(event) return event def after(self, cursor

Dev
Interesse
dev.to

Taming BLAS Threads in Scheduled Python Jobs

Scheduled Python jobs on a shared box have a nasty habit of fighting each other. You write a script that runs in four seconds on your laptop, deploy it to a Windows Server with eight cores, and now it takes forty — but only when the nightly batch is also running. The culprit is usually not your code. It is the BLAS thread pool underneath numpy. When you import numpy, the wheel you installed is linked against a BLAS implementation: OpenBLAS for the standard numpy wheels on PyPI, MKL for numpy built against Intel's math library (common with conda, or pip install mkl setups). Both ship multithreaded kernels for dgemm, sgemm, and friends. By default they read the machine's core count and spin up a pool of that size. So import numpy on an 8-core server means eight OpenBLAS worker threads, plus the OpenMP runtime underneath, plus whatever your own concurrent.futures pool does. Matrix multiply is fast. Everything else pays for it. The problem shows up when jobs overlap. Suppose Task Scheduler fires three jobs at 02:00: Job A does a rolling regression over 200k rows. Job B builds a covariance matrix. Job C just reads a CSV with pandas and writes a parquet file. Each one imports numpy, each one gets eight BLAS threads. That is 24 threads on 8 cores. The OS context-switches between them, cache lines bounce between cores, and the memory allocator thrashes. Job C, which does almost no math, is now slow because it is competing for scheduler time with two BLAS pools it never asked for. The fix is boring and effective: pin every job to one BLAS thread and let the OS schedule your jobs in parallel instead of your math kernels. Read by OpenBLAS at initialization. Controls the size of its internal thread pool. This is the one that matters for stock PyPI numpy wheels. The equivalent knob for Intel MKL. If your numpy is MKL-linked, this is the one that counts. MKL also honors MKL_DYNAMIC and MKL_THREADING_LAYER, but for our purposes MKL_NUM_THREADS=1 is enough. Read by the OpenMP runti

Dev
Interesse