Docker permission denied: what the error is actually telling you A client messages me about this error almost every week. They run a command, see "permission denied", and assume Docker is broken. Docker is rarely broken. People just use one name for two completely different errors. The first happens before any container starts: your user cannot talk to the Docker daemon. The second happens inside a running container: the app cannot write a file. The fixes have nothing in common, so tell them apart first. Below are the four causes I see in client work. Docker permission denied means the process that tried to write a file (or talk to the daemon) is not the user that owns the file (or the socket), and it has no group or other rights to it either. The kernel does not care about names like www-data or hitesh. It compares numbers: the UID and GID of the process against the owner and mode bits of the file. Socket error File error What you see permission denied ... docker.sock Permission denied or EACCES in container logs Who actually failed Your shell user, running the docker CLI The app process inside the container Where to look /var/run/docker.sock and your groups Host path owner, container user, SELinux This is the one you see on a fresh server: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock The Docker daemon always runs as root and listens on /var/run/docker.sock, owned by root:docker with mode 660. If you are not root or in the docker group, the CLI cannot open it. Check both sides first: `ls -l /var/run/docker.sock id -nG Then the fix: `sudo groupadd docker # fine if it says the group already exists newgrp docker Group membership is read at login, so old shells lack it. newgrp docker fixes the current shell only. I once lost 20 minutes to a tmux pane that never got the change. If you ran sudo docker ... before fixing the group, you may see this: WARNING: Error loading config file: /home/hitesh/.docker/config.json
MCP in agentic AI wins against plain function calling for any team whose agents need to outlive a single model, framework or application. Function calling is a contract you re-implement inside every app you ship; the Model Context Protocol is a standard protocol layer, so one server integration works across the clients that already speak it, including Claude, Cursor, VS Code, Microsoft Copilot, Gemini and ChatGPT (Linux Foundation). The exception is narrow and real: if you are one developer connecting one model to one application, raw function calling has fewer moving parts and you should stay there. TL;DR Function calling solves per-app tool access. MCP solves the N×M problem of many tools across many clients. MCP is an open JSON-RPC protocol where servers expose tools, resources and prompts (spec). Anthropic donated MCP to the Agentic AI Foundation under the Linux Foundation on 9 December 2025, alongside Block's goose and OpenAI's AGENTS.md (Anthropic). The 2026-07-28 spec made the protocol core stateless, closing the load-balancing and gateway gap that used to favour bespoke function calling (MCP blog). MCP does not replace function calling. MCP tool calls still execute in your application code. Last verified: 2026-09-28. Function calling is the mechanism a model uses to ask your code to do something. In the OpenAI implementation it is a five-step loop: you send tool definitions with the request, the model returns a function call with JSON arguments, your application executes it, you send the output back, and the model answers (OpenAI docs). A definition is a name, a description, a JSON Schema for parameters and a strict flag. Anthropic's tool use works the same way for client tools: Claude returns a structured call and your application runs it (Anthropic docs). The model never executes anything itself. MCP sits one layer above that. It is an open JSON-RPC protocol that connects LLM applications to external systems, where a server exposes tools, resources and pro
How to Configure ViciDial Caller ID (CID) Settings Per Campaign Master per-campaign Caller ID configuration in ViciDial/Asterisk to control outbound number presentation, dynamic CID routing, and compliance-driven number assignment across multiple campaigns. Before you begin configuring ViciDial Caller ID settings per campaign, ensure the following: ViciDial 2.14+ installed and running (this tutorial covers 2.14-2.17) Asterisk 11+ compiled with ViciDial patches Direct database access (MySQL/MariaDB) to the asterisk database SSH access to the ViciDial server with sudo privileges Carrier/trunk configuration already established with available DID numbers Understanding of basic ViciDial campaign structure and dialplan concepts PHP web admin access (/vicidial/admin.php) Verify your ViciDial version: sudo -u asterisk cat /etc/asterisk/vici_domains.conf | head -20 Check Asterisk is running: sudo asterisk -rx "core show version" ViciDial handles Caller ID assignment through a hierarchical system with multiple fallback points. Understanding this chain is critical for proper configuration. When an agent dials a lead in ViciDial, the system determines which number to present in this order: Campaign-level CID (if configured in campaign settings) User/Agent-level CID (if assigned to the specific agent) Carrier CID (numbers assigned to the outbound carrier/trunk) Server default CID (fallback number configured at server level) Trunk/Channel default (last resort from Asterisk trunk config) This hierarchy allows fine-grained control. A campaign can override agent settings, but agents can still have their own CID if the campaign isn't strict. Three primary tables govern CID behavior: vicidial_campaigns — campaign-wide CID settings vicidial_users — agent-specific CID overrides vicidial_carrier_log — outbound carrier trunk configurations The quickest method for most ViciDial administrators is through the web interface. Log in to /vicidial/admin.php as a user with campaign edit permissio
Hey DEV community! I wanted to drop a quick hello to introduce myself. I’m Riya, an engineering student passionate about software, data, and building things from scratch. What I’m currently working on & learning: 🐍 Python & SQL: Focusing heavily on data analysis, dataset visualization, and database logic. ⚙️ Systems & Web: Building tools in C and interactive web graphics using JavaScript. 📦 Building in Public: Documenting my project builds and contributing to open-source events. I joined DEV to share what I’m building, learn from experienced developers, and track my progress as I transition deeper into Data Science. Looking forward to connecting! What projects or technologies are you currently excited about? 💻✨
WARN[0000] The "DB_PASSWORD" variable is not set. Defaulting to a blank string. Compose prints that, then starts the stack anyway. The database exits, or the app connects with an empty password, and you only find the yellow line by scrolling back up. The frustrating part: DB_PASSWORD is right there in app.env, which the service loads with env_file:. Interpolation happens on your machine when Compose reads the YAML. ${VAR} and $VAR are filled from your shell, --env-file, or the project .env next to the compose file. Nothing else. If a variable is missing and has no default, it becomes "" with a warning. Container environment comes later. env_file: and environment: decide what the process inside the container sees. app.env is read here, so it can never fill a ${...} in the compose file. Two more traps from the same root cause: environment: [DEBUG] with nothing set on the host is silently dropped, no warning. command: sh -c 'echo $CACHE_DIR' is interpolated from your laptop while the file loads. Quotes are just YAML text. Write $$CACHE_DIR if the container should expand it. The request to make this fail by default is years old: docker/compose#5505. # require it: Compose stops with an error instead of a blank POSTGRES_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD is required} Put interpolation variables in the project .env, escape container-side ones as $$, and never commit ${DB_PASSWORD:-hunter2}. docker compose config shows the result, but only when you run it, and it prints secrets in clear text. I built ComposeVars, a free VS Code extension that reads your compose files and the env files Compose would read (.env, include: env files, and --env-file / COMPOSE_ENV_FILES found in package.json, Makefile or justfile). Six rules, CV001 to CV006: unset variables, .env keys nothing uses, pass-through env that is not set, missing env_file paths, host-side $VAR in commands, and committed secret defaults. Quick Fixes add :?, :-, $$ or an .env.example entry, and hovering a variable shows
Disclosure: I built the Google Trends Actor used in this post and I earn money when people run it. I've tried to keep this useful even if you never use it: the first half explains the 429 problem and the free workarounds. If you've used pytrends, you've probably seen this: pytrends.exceptions.TooManyRequestsError: The request failed: Google returned a response with code 429 It usually works on your laptop for a few requests, then starts failing. It fails faster on Colab, AWS, GitHub Actions or any other cloud IP. This post explains why, what you can do for free, and how I now get Google Trends data from Python without managing proxies. Google Trends has no public API. pytrends calls the same internal endpoints the trends.google.com website uses (/explore, then /widgetdata/multiline, /comparedgeo and /relatedsearches). Google rate-limits those endpoints per IP and per session: Every keyword is several requests. One build_payload() plus interest_over_time(), interest_by_region() and related_queries() is four or more calls. A loop over 50 keywords is 200+ requests from one IP. Datacenter IPs are treated as bots. Cloud and shared IPs hit the limit far sooner than a home connection. The cookie/session matters. Requests without a warm Google session get rejected more often. pytrends is no longer maintained. The GitHub repo is archived and the last PyPI release (4.9.2) is from April 2023, so it won't adapt when Google changes things. For a handful of keywords now and then, these are often enough: time.sleep(60) between keywords. Slow, but it works more often than not. TrendReq(retries=3, backoff_factor=0.5) so transient 429s are retried. Run from your home connection instead of a cloud VM. Pass rotating proxies with TrendReq(proxies=[...]). This works, but now you're buying and managing proxies. If you need dozens or hundreds of keywords, on a schedule, from a server, these stop being fun. I wrote a Google Trends scraper that runs on Apify and handles the retries for you:
A person can take thirty photos of the same face and still produce a timelapse that looks like camera shake. On Monday they stand closer to the mirror. On Tuesday they tilt their phone. By Friday they frame their eyes near the top of the image. For fitness, skincare, and haircut timelines, viewers need to see the change in the person without chasing their face around the screen. In Phases, the useful visual reference is the eye line: keep both eyes at the same output coordinates across the sequence. This article develops the React Native and Expo architecture for that workflow: detect landmarks on the device, compute a two-point transform, retain originals in local storage, and render a reel without a rendering server. Implementation scope: the public Phases site currently describes a browser app that users can add to their home screen. It also describes consent-based analytics. The native Expo architecture and zero-telemetry policy below describe the reference design for this article, rather than a verified description of that deployed browser build. The project link is github.com/Ishannaik/phases; the implementation examples below stand on their own. A capture guide helps the user repeat their pose, but it cannot guarantee matching camera distance or roll. I would keep the original photo and store its alignment metadata beside it. That lets the user change the reel's framing without reshooting or accumulating JPEG compression from repeated edits. flowchart TD A[Camera capture] --> B[Normalize orientation and mirroring] B --> C[On-device facial landmark detection] C --> D{Usable eye anchors?} D -->|Yes| E[Compute affine matrix] D -->|No| F[Ask user to retake or mark anchors] B --> G[Original photo in app filesystem] E --> H[SQLite metadata and transform] G --> I[Local Canvas or WebGL composite] H --> I I --> J[On-device video encoder] J --> K[Timelapse reel on device] G -. Optional user-enabled backup .-> L[Cloud backup] The engineer should treat capture, detection
Earlier this week, I published an article here on DEV: "Why We Stopped Letting LLMs Do Raw Math: Building Pythos With Deterministic Verification". The response was humbling, but one particular comment from an enterprise AI engineer at IT Path Solutions stood out. They validated our core thesis—treat the LLM as a conversational interface, never the mathematical source of truth—and left a game-changing suggestion: "Make the verification result part of the data contract... each step could carry the expression evaluated, the verification method, the assumptions used, and the exact state that was checked." They were 100% right. In Pythos, our dual-engine verifier (in-process Math.js for exact arithmetic and a sandboxed SymPy CAS daemon for symbolic algebra/calculus) was already validating derivations step-by-step behind the scenes. But once the delivery decision gate passed, we were condensing all that rich telemetry into simple binary flags before shipping the text to the client. We decided to build what they suggested. Here is how we turned mathematical verification into an explicit, wire-level data contract, built a client-side derivation inspector, and—in a hilarious twist of real-world battle testing—fixed a production bug where Pearson homework boilerplate tricked our deterministic router into computing the area of a right triangle. VerificationStepAudit Data Contract Prior to v1.8.35, Pythos knew internally whether a claim was true or false, but the frontend only received markdown text with basic metadata. We formalized a new data contract: VerificationStepAudit. Every evaluated claim emitted over our streaming NDJSON and JSON endpoints now carries structured audit telemetry: interface VerificationStepAudit { stepIndex: number; expressionEvaluated: string; verificationMethod: 'SYMPY_CAS' | 'MATHJS_EXACT' | 'DETERMINISTIC_FASTPATH'; engine: 'sympy' | 'mathjs' | 'native'; assumptions: { domain?: 'real' | 'complex' | 'integer'; tolerance?: number; quadrant?: string;
I had the product definition, user stories, and backlog. Now it was time to design the system. I started with the main responsibilities of Second-Memory and came up with my first architecture draft: flowchart W[Web Client] --> G[API Gateway / BFF] M[Mobile Client] --> G G --> A[Auth] G --> MS[Memory Service] G --> AS[Ask Service] MS --> D[(Database)] MS --> V[(Vector DB)] AS --> L[LLM Provider] AS --> MS The diagram itself is fairly simple, but there were several design principles behind it. Both the web and mobile clients communicate through the API Gateway / BFF. I chose the Backend for Frontend (BFF) pattern so that the clients don't need to communicate directly with the internal services. The BFF provides a client-facing API while hiding the internal architecture. It also gives me a place to handle things such as authentication, routing, and client-specific requirements. This means the clients don't need to know whether a request is handled by the Memory Service, Ask Service, or something else. The internal architecture can evolve without making the clients aware of every change. One principle I wanted to follow was: Don't share databases between services. A service owns the data that belongs to its responsibility. In this architecture, the Memory Service owns both the database and vector database. If another service needs memory data, it doesn't connect directly to either database. Instead, it calls the Memory Service through an internal API. For example: flowchart AS[Ask Service] -->|Internal API| MS MS[Memory Service] --> D[(Database)] MS --> V[(Vector DB)] This keeps the data ownership clear and prevents other services from becoming coupled to the Memory Service's storage implementation. If the storage implementation changes later, the other service shouldn't need to know. Each component has a specific responsibility. The BFF deals with client-facing communication. The Memory Service deals with memory. The Ask Service deals with the AI interaction. The LLM g
I sent BookMyShow requests from an Oracle Cloud VPS and got 403. I changed the User-Agent, added Chrome headers, kept cookies, and forced HTTP/1.1. BookMyShow rejected those requests too. On the same VPS, node-tls-client with the safari_ios_18_0 profile returned 200. I kept the datacenter IP and dropped the proxy shopping. That experiment shaped SeatSniper, my self-hosted ticket watcher. Users submit a BookMyShow link through a Discord slash command. I store their watches in SQLite, share upstream requests across users, and send notifications when matching dates or cinemas appear. I run the bot with Bun 1.2, TypeScript, and Discord.js v14. SeatSniper observes listings. I do not automate purchases, hold seats, or fill carts. A notification means I found a matching listing during a poll, not that I reserved a ticket. A browser sends more than HTTP headers. During TLS negotiation, the client proposes cipher suites, extensions, supported groups, and application protocols through its ClientHello. Browser families produce recognizable combinations. A server can also inspect HTTP/2 settings after the handshake. Security teams use JA3 and JA4 to summarize aspects of those fingerprints. Neither fingerprint represents a complete browser identity, and neither tells an operator the entire reason for a Cloudflare decision. IP reputation, geography, request volume, and challenges can still affect access. For this deployment, I could isolate the client fingerprint as a practical blocker: I changed the client while keeping the VPS fixed. An apparent datacenter-IP ban can hide a TLS or HTTP/2 fingerprint problem. Buying a residential proxy would have changed another variable before I understood the first one. I recorded these results on July 27, 2026 in the repository's access findings: Environment Client Result Oracle VPS, datacenter IP Bare curl 403 Same VPS Curl with Chrome User-Agent and headers 403 Same VPS Bun fetch() 403 Same VPS node-tls-client, safari_ios_18_0 200 Same VPS
vue-select's stable release (3.20.4) is Vue 2 only. The Vue 3 version has been at 4.0.0-beta.6 since November 2022. If it's one of the things holding back your Vue 3 upgrade, you can replace it before the upgrade. Swap it while you're still on 2.7, then upgrade Vue later without touching your selects again. This walkthrough uses Vue Pick, which runs on both 2.7 and 3 with the same props. npm install vue-pick // main.js, in place of "vue-select/dist/vue-select.css" import "vue-pick/style.css" import { VPick } from "vue-pick/vue2" // while on Vue 2.7 import { VPick } from "vue-pick" // after the upgrade When you move to Vue 3, that import path is the only line that changes. This is the step that causes bugs if you skip it. vue-select puts the whole option object in v-model, unless you pass reduce. If you use reduce, name the field with value-key: c.id" /> If you don't, add value-format="object" so your data keeps the same shape: vue-select is searchable and clearable by default. Vue Pick isn't, which is why both examples above add searchable clearable. In multiple mode, Vue Pick also stays open after each pick. Add :close-on-select="true" if you want the old behavior. Plain string options like ["Apple", "Banana"] need to become objects once: const options = fruits.map((f) => ({ label: f, value: f })) v-model still holds the plain string. The full prop, event and slot mapping is in the vue-select migration guide. The page also has a prompt you can paste into Claude Code, Cursor or Copilot. It points the agent at a plain-text copy of the guide and leaves a TODO wherever there's no match, instead of guessing. If you wrap vue-select in your own component, migrate the wrapper first. Every page that uses it moves over at once.
A rain forecast for Mumbai can tell you to carry an umbrella while your street stays dry. During the monsoon, a useful next-two-hour prediction needs more local evidence than a global model alone can provide. I built Mumbai Rain, also called पाऊस, around that problem. I collect forecasts, compare them with observations at Mumbai airport, and train a small correction that visitors run in their browsers. First, a qualification about the title: I do not ingest airport radar. I use METAR surface-weather reports from station VABB, Chhatrapati Shivaji Maharaj International Airport. Airport observers and instruments report present weather; I convert their precipitation codes into hourly rain labels. Radar measures precipitation across an area. A METAR report describes conditions at a station. That distinction sets the limits of the entire experiment. The source repository contains the data diary, training code, browser arithmetic, and exported model. You can inspect the method and scoreboard without accepting a headline accuracy claim. Engineers who build global models such as ECMWF and GFS solve atmospheric dynamics over grids. A forecast grid cell cannot resolve each Mumbai street, coastal exposure, or passing monsoon shower. Asking for a coordinate does not create street-level observational coverage. For this project, I ask a narrower question: given the forecast inputs available now, how likely is an hourly rain observation at the airport? I use Open-Meteo as the delivery API for two forecast streams: best_match, the primary forecast feed, including precipitation and relative humidity. ecmwf_ifs025, an explicit ECMWF-IFS precipitation benchmark. I do not train a replacement for ECMWF. I train logistic regression to correct the relationship between forecast features and an independent binary observation. Visitors receive a local-coordinate forecast with a correction learned at VABB. They should not read that as a measured rain probability for every neighbourhood. The ho
I built PixaFind for the search you do when you remember a file's contents but have forgotten its name. You might remember a cat sitting in sunlight, a whiteboard from a meeting, or a paragraph about a budget. None of those memories give you a path to type into Explorer. On Windows, I use a Tauri 2 shell, a Rust backend, ONNX Runtime inference, and local SQLite vector storage. SigLIP2 handles text-to-image search. DINOv3 handles image-to-image similarity. For documents, I combine dense embeddings with a BM25 keyword index. The engineering cost sits in the indexing pipeline: decoding files, preparing model inputs, running inference, and keeping the index consistent as users edit their folders. I keep file access, inference, and retrieval in the Rust backend. Users interact with a floating search window through a global hotkey, Ctrl+Space, without switching away from their current application. The native Tauri shell weighs about 5 MB. That figure describes the executable, not the full installation. Users also need model weights, ONNX Runtime dependencies, and index storage. The release README describes a one-time model download of roughly 500 MB. Tauri uses the system webview on Windows. I avoid shipping a separate Chromium distribution, but I still have to account for webview memory, model memory, and GPU allocations. A small executable does not imply a 5 MB runtime footprint. This diagram shows the architecture at the component level, rather than private source-code interfaces: flowchart LR F["Selected folders"] --> W["Filesystem watcher"] W --> C["Rust: mtime and SHA-256 change detection"] C --> P["Decode images or extract document text"] P --> O["ONNX Runtime: DirectML, CUDA, or CPU"] O --> V["Vector DB: local SQLite storage"] P --> B["BM25 keyword index"] V --> R["Rust retrieval and ranking"] B --> R H["Global hotkey"] --> U["Spotlight UI: Tauri 2"] U --> Q["Query or selected image"] Q --> O R --> U I separate background indexing from interactive retrieval becaus
Beginning with the U.S. Grand Prix weekend on Friday, October 23, Apple TV will offer Formula 1 coverage in Dolby Atmos on supported devices. Here are the details. more…
If you have ever needed a quick voiceover for a demo video, a podcast intro, or a language-learning clip, you know the usual options: record it yourself, hire a voice actor, or wrestle with a robotic-sounding TTS engine. I wanted something faster and more expressive, so I have been using GeminiTTS, an online text-to-speech studio powered by Gemini 3.8 TTS. GeminiTTS is a browser-based tool: paste your script, choose a voice, and generate audio you can play back or download as WAV. There is nothing to install and no API key to manage. Key features: Two models – Gemini 3.8 Flash for expressive, natural delivery, and Flash Lite for faster drafts when you are iterating on a script. 30 preset voices – a wide range of tones, from calm narration to energetic promo reads. Single voice or two-speaker dialogue – write a conversation between two speakers and get one audio file back. Great for podcast-style explainers, interview mockups, or language lessons. Delivery controls – adjust accent, style, and pace, and add short vocal cues to shape how lines are read. Library + WAV download – every generation is saved to your library so you can replay or download it later. Most TTS tools give you one voice at a time. If you want a dialogue, you end up generating separate clips and stitching them in an audio editor. With Gemini 3.8 TTS in GeminiTTS, you write the dialogue once, assign speakers, and the model handles turn-taking and pacing. For quick prototypes of podcasts, explainer videos, or app onboarding flows, that saves a surprising amount of time. Open geminitts.app and sign in. Pick Flash Lite while drafting your script so iterations are quick. Choose a voice (or two, for dialogue) and tweak accent, style, and pace. Add short vocal cues where you want emphasis or a change of tone. Switch to Flash for the final take, then download the WAV. Voiceovers for product demos and side-project launch videos Podcast intros, outros, and two-host explainer segments Language-learning dialog
A tenant-cohort experiment is only reversible while the team can tell, quickly and unambiguously, that a scheduled task stopped completing. Short answer: use a deadline heartbeat as the rollback trigger for missed runs, and keep application metrics as the diagnostic layer. Choose metrics alone only when the scheduler itself can reliably emit an absence signal and the alert query preserves tenant, cohort, region, and experiment-revision boundaries. That split matters for an e-commerce SaaS rollout. A new recommendation model might look healthy at the HTTP layer while its nightly catalog-enrichment job never starts for the EU canary cohort. Request latency cannot report work that did not happen. A completion deadline can. This is a choice about rollback safety, not a contest for the largest dashboard. Missed means absent. A heartbeat is a statement about a deadline: job instance X completed before time Y. Application telemetry answers richer questions such as how many products were processed, how long inference took, how many model calls failed, and how much token usage the cohort accumulated. Those are different jobs. For rollback automation, the first statement is easier to make conservative. Give every expected run an identity containing the task, tenant cohort, region, experiment revision, and logical schedule time. Mark success only after the durable business write commits. If the deadline passes without that completion, hold or roll back the affected revision rather than treating the whole fleet as failed. The boundary is important. A heartbeat sent at process start proves that the scheduler launched something; it does not prove that catalog enrichment finished. A single global heartbeat is worse for experiments because a healthy US control run can hide a missing EU canary run. I would use application metrics alone only if all three conditions hold: the scheduling control plane emits its own expected-run record, the monitoring system evaluates missing time serie
Kyverno (do grego "governar") é um motor de políticas nativo do Kubernetes, projeto da CNCF, que permite validar, alterar e gerar recursos do cluster usando apenas YAML, sem aprender uma linguagem nova. Em clusters compartilhados, qualquer pessoa com acesso ao kubectl apply pode criar um Pod privilegiado, uma imagem sem tag ou um Service exposto sem querer. Revisão manual não escala, e documentação de boas práticas não impede ninguém de errar. O Kyverno resolve isso aplicando regras no momento em que o recurso chega à API do Kubernetes, antes de ele ser persistido no etcd. O diferencial frente a outras ferramentas é que as políticas são recursos Kubernetes comuns (ClusterPolicy, Policy), versionáveis em Git e entregues por GitOps. Quem já escreve manifests consegue escrever políticas no mesmo dia. O que o Kyverno faz, em resumo: Validar: bloquear ou apenas auditar recursos fora do padrão (por exemplo, containers rodando como root). Mutar: injetar valores padrão (labels, securityContext, imagePullPolicy) automaticamente. Gerar: criar recursos derivados, como NetworkPolicy e ResourceQuota em todo novo namespace. Verificar imagens: exigir assinaturas e atestações (Cosign/Sigstore) antes de rodar uma imagem. Limpar: remover recursos expirados por regras de TTL ou de agendamento. O Kyverno roda dentro do cluster como um conjunto de controladores, e o principal deles é um admission webhook registrado no API Server. [embedded content: fluxo de admissão e componentes do Kyverno] Quando uma requisição de criação ou atualização chega ao API Server, ele consulta o webhook do Kyverno, que avalia as políticas e devolve a decisão: aprovar, negar ou aprovar com alterações (patch). Só o que é aprovado é gravado no etcd. Os componentes: Admission controller: atende o webhook, aplicando as regras validate, mutate e verifyImages em tempo real. Background controller: processa regras generate e mutate sobre recursos existentes. Reports controller: consolida os resultados em PolicyReport
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
In part 1 I walked through the NATS building blocks one at a time: subjects, request-reply, JetStream streams, the Key-Value store, and the Object Store. That post answered "what can NATS replace?" This one builds a real backend with it. The system is the backend for an AI chat product. It has a GPU work queue, token streaming to the browser, conversation history, per-tenant usage metering, run timeouts, and worker ownership of conversations. In a typical stack that's Kafka or SQS for the queue, Redis for counters and locks, a cron service for timeouts, Postgres for history, and a WebSocket gateway for streaming. NATS has shipped four minor releases since part 1: 2.11, 2.12, 2.14, and 2.15 (2.13 was skipped). Several of the new features close gaps that used to push you toward one of those other systems. Each section below takes one problem, shows the feature that handles it, and shows code I ran against nats-server 2.15.0 with nats.js 3.4.0. The full scripts are in nats-backbone-examples. Release Feature What it handles 2.11 Per-message TTL (Nats-TTL) Expiring one message without a stream-wide MaxAge 2.11 Per-key TTL in KV Locks and leases that expire on their own 2.11 Priority groups: overflow, pinned_client Sending work to preferred workers first 2.11 Consumer pause Stopping delivery during a deploy without deleting the consumer 2.12 Atomic batch publish Writing several messages all-or-nothing 2.12 Distributed counters INCR across regions without double counting 2.12 Delayed messages (@at) Timeouts and reminders without a cron service 2.12 prioritized priority policy Failover that moves work sooner than overflow 2.14 Recurring schedules (@every, cron) and subject sampling Periodic jobs and downsampling 2.14 Atomic schedule cancel Clearing a timeout in the same publish that finishes the work 2.14 Fast-ingest batch publish High-throughput ingest with server-side flow control 2.14 Consumer reset Reprocessing from a sequence without recreating the consumer 2.14 Mirror
I built a Spider-Man swing effect that runs entirely in the browser, with no pre-rendered animation, no sprite sheets, and no video files. Instead, a small AI agent loop generates motion parameters in real time. Here’s how it works, with runnable Python code you can adapt. Animation is expensive. Traditional 2D or 3D animation requires keyframes, interpolation curves, and often a rendering pipeline. For a simple web demo, that’s overkill. I wanted Spider-Man to swing across a city skyline using only procedural motion driven by an agent. The agent doesn’t generate pixels; it generates physics parameters (rope length, swing angle, release timing) that a canvas renderer uses to draw a stick-figure Spider-Man. The result: a 60 FPS swing that feels dynamic, with zero pre-baked frames. The agent runs in Python (using a lightweight loop) and communicates with the browser via WebSocket. This post explains the problem, the solution, and the implementation. Swinging is a physics problem: a pendulum with a changing pivot point. You could hardcode a sine wave, but it looks robotic. You could use a full physics engine, but that adds dependencies and complexity. I wanted an agent that decides when to release the web and where to attach the next one, based on the current state. The agent must: Observe the current position and velocity. Choose an anchor point (a building) within range. Compute the swing arc. Decide when to release to maintain forward momentum. Repeat until the character reaches the right edge of the screen. This is a classic control loop. The challenge is making it robust and fast enough for real-time. I built a simple agent loop in Python that runs at 30 Hz. It uses a state machine with explicit termination conditions: Observe: Get current position (x, y) and velocity (vx, vy) from the browser. Decide: If no web is attached, find the nearest building anchor within a cone ahead. If a web is attached, compute the pendulum angle and check if the character is at the b
Every few weeks someone asks me why their bank, their food delivery app, their project management tool and their dating app all need a phone number. Most people shrug and type it in. This post is a calm look at why SaaS products keep copies of your number, what actually happens to it afterwards, and how to make a deliberate choice instead of a reflexive one. There are a handful of honest reasons, and a few less honest ones. 1. Account recovery. Email accounts get compromised or abandoned. A phone number gives support teams a second channel to confirm "is this really you?" when a password reset goes wrong. 2. Spam and abuse prevention. Creating a thousand email addresses is free. Getting a thousand working phone numbers is not. Many platforms use phone verification purely as a speed bump against bot signups and free-trial abuse. 3. Two-factor authentication. SMS one-time passwords are still the most widely understood second factor, even though authenticator apps and passkeys are stronger. 4. Marketing and identity matching. This is the part that rarely makes the signup screen. A phone number is a remarkably stable identifier. People change email addresses, devices and browsers, but many keep the same number for a decade. That makes it useful for linking records across datasets, ad platforms and partner integrations. From a developer's point of view, the number usually ends up in several places: The primary users table, often in plain text so support staff can search it. The SMS provider's logs (delivery receipts, message bodies, timestamps). Analytics or CRM tools, if someone wired up an "identify user" call with the phone field. Backups and data warehouse exports, which tend to live much longer than the production row. None of this is malicious by default. It's just how systems grow. But it means that when you delete your account, the number may well survive in logs, backups and third-party tools for months or years. And when any of those systems leak, your number t
Introduction Your API's newest users are agents. They don't read docs, they don't browse dashboards, and they don't file support tickets. They parse OpenAPI specs, call endpoints in loops, and expect deterministic, machine-readable responses. If your API was designed for humans clicking buttons, it's already failing this new class of client. In this post, I'll walk through a concrete example: building a small "tool API" that an LLM-based agent can call. We'll cover the problem, a solution, and a runnable Python implementation. No hand-waving about "agentic workflows" — just code you can run and a loop with explicit termination conditions. Human-facing APIs optimize for discoverability and forgiveness. Agents optimize for determinism and low token cost. Three specific failure modes show up when agents hit a human-designed API: Ambiguous errors. A 400 with {"error": "bad request"} forces the agent to guess. The agent will retry, hallucinate a fix, or give up. Unbounded responses. Returning 50KB of nested JSON burns context window and increases the chance the agent truncates the useful part. No idempotency. Agents retry on timeouts. Without idempotency keys, you get duplicate side effects. Here's a minimal example of the kind of handler that causes these problems: # bad_handler.py from flask import Flask, request, jsonify app = Flask(__name__) @app.route("/create_ticket", methods=["POST"]) def create_ticket_bad(): data = request.get_json(silent=True) or {} if "title" not in data: return jsonify({"error": "bad request"}), 400 # ... create ticket, no idempotency, returns everything return jsonify({"ticket": {"id": 1, "title": data["title"], "history": [...]}}) An agent calling this has no way to distinguish "missing field" from "malformed JSON" from "server error," and no safe retry path. Design the API for a client that is literal, stateless between calls, and token-budgeted. Concretely: Structured error codes. Every error response includes a stable code string the agen