Painel de Notícias

Tecnologia

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

Filtros
BleepingComputer

How to keep AI agents within their permissions

AI agents can use valid credentials to perform actions beyond their assigned permissions, creating risks that traditional access controls may not prevent. Token Security explains how organizations can enforce agent-specific policies without sacrificing autonomy. [...]

SegurançaIA
Interesse
dev.to

Why a 200 OK Doesn't Mean Your Website Is Healthy

I used to think that checking whether a website worked was fairly straightforward: send a request, get a successful response, and move on. The more I work on web tooling, the less useful that definition feels. An HTTP 200 OK response answers one narrow question: did the server successfully handle this particular HTTP request? It does not tell you whether the website is secure, accessible, fast, searchable, or even useful to a visitor. That distinction is part of what interests me about building Zenith, a project focused on monitoring and improving websites. A meaningful website check needs to look beyond a green status indicator. Here are five layers I would examine, and how I'd begin testing them. Try: curl -I https://example.com The response can tell you about status codes and headers. It cannot tell you whether a sign-in button works, whether a critical API fails after the page loads, or whether a JavaScript error prevents users from completing an action. In fact, curl -I makes a HEAD request. Some servers handle HEAD differently from GET, so it's useful as a quick inspection tool, not as complete proof of normal page behaviour. For a more realistic picture, check more than one endpoint and include an actual browser journey. For example: Can the homepage load? Can a visitor navigate to an important page? Can a non-destructive form validation flow complete? Does the browser report failed requests or JavaScript errors? An uptime check is a starting point, not a quality score. A padlock indicates that a connection is protected by TLS under the browser's trust rules. That's important. It isn't a certificate of application security. Look at response headers: curl -sSI https://example.com Things worth reviewing include: Strict-Transport-Security: helps instruct browsers to use HTTPS for future connections. Content-Security-Policy: can reduce the impact of certain injection attacks when configured carefully. X-Content-Type-Options: with nosniff, can prevent some MIME-ty

InfraDev
Interesse
dev.to

Hướng dẫn triển khai Docker cho ứng dụng Node.js (Cho người mới bắt đầu)

Docker đã trở thành một công cụ không thể thiếu giúp chuẩn hóa môi trường phát triển và triển khai ứng dụng. Đối với các lập trình viên Node.js, việc đưa ứng dụng vào container giúp tránh được lỗi "chạy được trên máy tôi nhưng lỗi trên server". Trong bài viết này, chúng ta sẽ từng bước xây dựng một Dockerfile cơ bản, build image, chạy container và cấu hình các biến môi trường một cách an toàn. Giả sử bạn có một ứng dụng Node.js cơ bản sử dụng Express. File package.json: { "name": "node-docker-demo", "version": "1.0.0", "main": "index.js", "scripts": { "start": "node index.js" }, "dependencies": { "express": "^4.18.2" } } File index.js: const express = require('express'); const app = express(); const PORT = process.env.PORT || 3000; app.get('/', (req, res) => { res.send(`Hello World từ Docker! Môi trường: ${process.env.NODE_ENV || 'development'}`); }); app.listen(PORT, () => { console.log(`Ứng dụng đang chạy trên cổng ${PORT}`); }); .dockerignore Trước khi viết Dockerfile, bạn cần tạo một file .dockerignore ở thư mục gốc của dự án. File này ngăn không cho các thư mục không cần thiết (như node_modules hoặc file log) bị copy vào trong Docker image, giúp giảm dung lượng image và tăng tốc độ build. node_modules npm-debug.log Dockerfile .dockerignore .git Tạo một file tên là Dockerfile (không có phần mở rộng) tại thư mục gốc của dự án: # Bước 1: Chọn base image chính thức của Node.js (sử dụng phiên bản LTS và bản rút gọn alpine để tối ưu dung lượng) FROM node:18-alpine # Bước 2: Thiết lập thư mục làm việc bên trong container WORKDIR /usr/src/app # Bước 3: Sao chép package.json và package-lock.json (nếu có) trước # Điều này giúp tận dụng Docker layer cache khi không có thay đổi về dependency COPY package*.json ./ # Bước 4: Cài đặt các dependencies RUN npm install --only=production # Bước 5: Sao chép toàn bộ mã nguồn vào container COPY . . # Bước 6: Khai báo port mà container sẽ lắng nghe khi chạy EXPOSE 3000 # Bước 7: Lệnh để khởi chạy ứng dụng CMD [ "npm", "start" ] Mở te

DevInfra
Interesse
dev.to

Yield Strategy Optimization Report: Robinhood

Yield Strategy Optimization Report: Robinhood Target Protocol: Robinhood (TVL: $14856.5M) Yield Strategy Optimization Report – Robinhood (DeFi Yield‑Aggregator) TVL: ≈ $14.86 B (Ethereum + L2) – Prepared 2024‑10‑09 Robinhood is a high‑throughput yield‑aggregation platform that routes user deposits to a portfolio of on‑chain strategies (e.g., lending, liquidity provision, staking, and synthetic exposure) across Ethereum L1 and multiple Layer‑2 roll‑ups. The protocol’s core value proposition is dynamic re‑balancing driven by a proprietary “Strategy Engine” that continuously evaluates APR, risk metrics, and gas‑efficiency to maximise net yields for users while preserving capital. Our audit focused on the smart‑contract stack (core vault, strategy adapters, governance, upgradeability, and cross‑chain bridge modules) and the off‑chain components that feed data to the Strategy Engine (price oracles, gas‑price oracles, and risk‑parameter feeds). Key Findings Area Criticality Summary Upgradeability & Governance High Centralised ProxyAdmin owned by a single multisig (3‑of‑5) with no time‑lock on upgrades. Potential for malicious or accidental upgrade that could freeze funds or redirect withdrawals. Oracle Dependency High Strategy Engine relies on a single on‑chain price oracle (Chainlink) for asset valuation and a custom gas‑price oracle for L2 fee estimation. No fallback or median‑price aggregation, exposing the system to price‑feed manipulation and gas‑price attacks. Strategy Adapter Re‑entrancy Medium Certain adapters (e.g., Curve‑3Pool, Uniswap V3) call external contracts before updating internal accounting, creating a narrow re‑entrancy window. Cross‑Chain Bridge Medium The L2‑to‑L1 bridge uses a “optimistic” proof model with a 7‑day challenge period. No on‑chain verification of L2 state roots, increasing risk of fraudulent withdrawals. Flash‑Loan Exploits Medium The rebalance() function can be called by any address and performs multiple external calls in a single trans

Segurança
Interesse
dev.to

How I verified prompt-cache reads in a generation-repair workflow

The cache was receiving writes without delivering reuse I found the caching problem in Launcherry's production usage records: repeated generation calls wrote prompt tokens to cache but read nothing back within the run. The Google Search copy bank and analysis records showed the same pattern. I needed to verify what later calls reused through the application, rather than rely on the fact that caching was configured. I treated that as an operating question that needed evidence. The relevant outcome was whether later calls actually reused suitable context. A cache setting, a successful response or a lower estimate in a spreadsheet could not establish that behaviour. The September 17 verification records the investigation and correction. In each of two later generation-repair calls, 3,879 of 3,932 input tokens were read from cache. That is 98.65%, rounded to 99%. The result describes prompt-token reuse in those measured calls, not a product-wide reuse rate or a 99% cost saving. Generation and repair have a useful relationship for this investigation. They concern the same underlying work, while a repair asks for a specific correction. Some context can remain relevant across those calls; other parts need to change. The request design has to preserve the distinction. I examined the behaviour through the application’s own adapter and the production provider path. The recorded probe compared requests that held relevant conditions steady with requests that changed them. That helped establish which changes interfered with reuse, rather than treating every cache miss as the same problem. My starting point is the request the product actually sends. Two prompts that seem similar to a human can differ in ways that matter to the provider’s cache. The model, request configuration and surrounding adapter behaviour belong in the investigation alongside the written instructions. Provider conditions also differ. OpenRouter’s prompt-caching documentation distinguishes cached-token reads

IADev
Interesse
dev.to

REST API Interview Questions (With Model Answers)

These are the REST API questions that actually come up in backend and full-stack interviews — grouped by topic, each with a short model answer and a note on what the interviewer is really checking. API questions reward clarity: they tell an interviewer whether you've designed one or just consumed one. The giveaway on API questions is whether you reach for the HTTP mechanism or hand-wave. "You'd use a POST" is weaker than "POST, because creating a resource isn't idempotent and shouldn't be cached." For each answer below, notice the pattern: name the mechanism, give the one rule that matters, then stop. They map to intent. GET reads (and must have no side effects). POST creates a new resource or triggers an action. PUT replaces a resource entirely. PATCH updates part of one. DELETE removes it. The property that matters is idempotency: GET, PUT and DELETE are idempotent (calling them twice leaves the same state), POST is not (two POSTs create two resources). That's why a retried POST can double-create and a retried PUT can't. What they're testing: that you pick a verb by its semantics and idempotency, not habit. The families first: 2xx success, 4xx the client's fault, 5xx the server's fault. The ones you should name without thinking: 200 OK, 201 Created (with the new resource), 204 No Content (a successful DELETE), 400 Bad Request (malformed), 401 Unauthorized (not authenticated), 403 Forbidden (authenticated but not allowed), 404 Not Found, 409 Conflict, 422 Unprocessable (validation failed), 429 Too Many Requests, and 500 for an unhandled server error. The classic mistake is returning 200 with an error in the body — the status code is the result. What they're testing: that you use the status line to carry meaning, especially the 401-vs-403 distinction. REST is a set of constraints, and the ones interviewers care about are: resources identified by URLs, standard HTTP verbs for actions on them, and — the big one — statelessness: every request carries everything the ser

Dev
Interesse
dev.to

Quovex Blocks: A Post Grid, Featured Posts and Announcement Bar Built on the Interactivity API

Most WordPress sites end up needing the same few things: a grid of recent posts, a featured section on the homepage, and a banner for announcements. The usual answer is a page builder or a stack of separate plugins, each bringing its own UI and its own frontend scripts. Quovex Blocks is a free WordPress plugin that does all three as native Gutenberg blocks, with the frontend interactivity running on the WordPress Interactivity API instead of jQuery. Here's a quick demo: The three blocks Query Grid A filterable, paginated grid that works with any public post type: Posts, Pages, WooCommerce products or your own custom post types. Grid, List, Masonry and Carousel layouts Search bar and taxonomy filter pills (multi-select within a taxonomy), optionally in a left or right sidebar Numbered pagination or a "Load more" button, plus a "Show all posts" toggle Responsive column counts, plus color and typography controls that use your theme's fonts A magazine-style section for up to three posts. Magazine, Split, Overlay and Two-Thirds/One-Third layouts Automatic mode (latest posts, optionally filtered by taxonomy) or manual mode (hand-pick a post for each slot) Image hotspots: pins you place on a post's image, each opening a popover with its own title, text and link A dismissible announcement bar or inline alert. Announcement, Info, Success and Warning presets, with five style variations Emoji, dashicon or SVG icon picker, and an optional call-to-action button Dismissal is remembered in the visitor's browser, so a closed banner stays hidden on their next visit Query Grid and Content Showcase are dynamic blocks rendered in PHP through render.php, so the first paint is plain server-rendered HTML. Frontend behavior (search, filters, pagination, the carousel and hotspots) is attached with the Interactivity API through a viewScriptModule, so it ships as a script module and no jQuery or other framework is loaded. Here's the relevant part of Query Grid's block.json: { "apiVersion": 3,

Dev
Interesse
dev.to

Third Parties in the Incident Path: The Response Plan Gap CISA Documented

Third Parties in the Incident Path: The Response Plan Gap CISA Documented Of the three lessons in CISA advisory AA25-266A, the third-party one is the easiest to skim past. The agency's incident response plan did not enable it to engage third parties promptly, nor to grant those third parties access to the resources they needed, and that omission delayed elements of the response. The timeline recorded in the advisory runs from the discovery of suspicious activity on a public-facing application, through the exploitation of CVE-2024-36401 on two hosts, lateral movement to a web server and a SQL server, and finally detection via endpoint alerts on the database server roughly three weeks later. Readiness has a measurable component too. An organisation cannot pre-agree access for a vendor to systems nobody has documented. Exposure records give a concrete way to test whether the asset register underlying the response plan is complete. app="GeoServer" | 57,663 | app="GeoServer" && service="http" | 47,664 | app="GeoServer" && port="8080" | 9,770 | app="GeoServer" && port="8443" | 625 | The advisory's recommendations imply a short list of pre-work. Name the third parties and the circumstances for engaging them. Contracts and legal review take longer than the incident. Pre-provision access paths. Know in advance how an external responder obtains read-only access to endpoint telemetry, web logs and the relevant cloud or on-premises consoles. Define what the third party may and may not touch, in writing, so that access can be granted quickly rather than negotiated live. Exercise the arrangement. An access path that has never been tested is an assumption, and the advisory's wording about the plan not enabling prompt engagement suggests exactly that gap. Keep the escalations current. Contacts, on-call rotations and authorisation levels change, and a plan that is not reviewed drifts out of date. The three lessons in this advisory reinforce each other. An unpatched public service cr

Segurança
Interesse
dev.to

Stream decoded Solana DEX swaps in ~20 lines of Python

If you have tried to watch Solana DEX trades directly, you know the shape of the problem. Every venue is its own program with its own instruction layout. A swap routed through an aggregator shows up as an inner instruction three levels deep. pump.fun, PumpSwap, Raydium (three different AMMs), Orca, Meteora (four programs) and the launchpads all describe a trade differently, and some report amounts only in logs that the runtime truncates on busy transactions. Before you can ask "what was just bought, how much, at what price", you need a decoder per program. This post skips all of that. We'll connect to a WebSocket that already does the decoding and print every swap on 12 Solana venues as one normalized JSON object. Python 3.9+ and pip install "websockets>=13" An API key for the Lunar Shadow Labs feed (3-day free trial, then $49/month). Your key is on your account page. export LSL_KEY= import asyncio, json, os from websockets.asyncio.client import connect URL = "wss://feed.lunarshadowlabs.com/ws?kinds=swap" def ui(amount, decimals): """Amounts are strings of raw integer units; scale them with the matching *_decimals field.""" return int(amount) / 10**decimals if decimals is not None else None async def main(): headers = {"Authorization": f"Bearer {os.environ['LSL_KEY']}"} async with connect(URL, additional_headers=headers, compression=None, max_size=None) as ws: async for raw in ws: m = json.loads(raw) if m["kind"] == "swap": side = "buy " if m["is_buy"] else "sell" size = ui(m["base_amount"], m["base_decimals"]) print(f"{m['venue']: # follow specific addresses; a wallet matches every event it is the actor of Other kinds: curve_complete, migration, pool_create, liquidity, mint_update. Every message has a seq. If your connection drops, reconnect with ?since= : (the epoch comes from the hello message on connect) and the server replays what you missed from its buffer. If it can't, you get a gap message saying exactly which range is gone. Data never goes missing silently:

Dev
Interesse
dev.to

Heap & Priority Queue: The Sorting Hat's Secret Weapon

The Quest Begins (The "Why") I was grinding through a mock interview when the interviewer tossed me a problem: “Given an unsorted array, return the k‑th largest element.” My first instinct? Sort the whole thing and pick the element at index len‑k. Easy, right? But then I felt that nagging voice in the back of my head — “What if the array is huge? Sorting is O(n log n) and we only need one element.” I remembered a late‑night debugging session where I spent three hours staring at a timeout error, wishing I had a smarter way to keep track of just the top k items while I scanned the data once. That moment felt like facing a boss level in Dark Souls — you know you can win, but you need the right weapon. The real question wasn’t how to code a heap; it was why a heap lets us grab the k‑th largest without looking at every possible ordering. If you can convince yourself of the why, the code almost writes itself. A heap is a binary tree that obeys a simple heap property: in a min‑heap, every parent is ≤ its children; in a max‑heap, every parent is ≥ its children. The beauty is that the smallest (or largest) element always sits at the root, ready to be ripped out in O(1) time. After you remove it, you can restore the heap property by “bubbling down” the replacement — an operation that touches at most the height of the tree, i.e., O(log n). But here’s the kicker: building a heap from an unsorted array can be done in O(n), not O(n log n). Why? Because you don’t need to insert elements one by one; you can start from the last internal node and heapify downwards. Most of those nodes are near the leaves, where the subtree is tiny, so the total work sums to linear time. Think of it like the Sorting Hat in Harry Potter: it doesn’t examine every student’s entire history; it glances at a few key traits and instantly knows which house fits. The heap does the same — it looks at just enough comparisons to guarantee the root is the extreme value. When we need the k‑th largest, we keep a min

Dev
Interesse
dev.to

Qlik Embed: The Replacement for Capability APIs That Still Isn’t Ready

I want qlik-embed to work. A simpler integration, modern authentication and less code to maintain should make moving away from the Capability APIs an easy decision. I am using it now. OAuth integration was the deciding factor, with the push towards embedded AI adding another reason to switch. If I could have integrated OAuth as easily with the Capability APIs, I would have stayed with them without thinking twice. Qlik calls it its primary embedding framework. For a straightforward chart, I can see why. For an application with extensions, maps, custom styling and its own error handling, the migration comes with compromises that are difficult to accept. My first attempts appeared to load the same scripts across multiple charts. The overhead was enough for me to shelve the switch. Performance has improved massively since then, and Qlik deserves credit for that. But the improvement feels uneven once I need iframe="true". Legacy extensions still take me back to iframe rendering through classic/chart. Qlik documents experimental preview="true" support for extensions and more chart types in analytics/chart. UI documentation In my testing, that preview behaves as read-only. I cannot make selections, and it adds an unnecessary outline around the charts. I couldn't find either behaviour explained in the documentation. Broader chart support is of limited use when I lose the interaction that makes Qlik useful in the first place. The iframe fallback brings back the performance cost I was trying to escape. Maps are my clearest example. They are native Qlik charts, so I expected them to work through the modern chart component. The current compatibility table explicitly excludes maps from standard analytics/chart support. Its classic/chart path requires an iframe. Qlik explains that tenant resources such as map tiles and uploaded images cannot currently be authenticated outside that mode. Chart compatibility That helps explain the image failures I've encountered. It doesn't make th

Dev
Interesse
dev.to

I Built a Python Rust Compiler: Inside Tarvos

I built Tarvos, an open-source compiler that takes a defined, statically analyzable subset of Python and compiles it into standalone native executables using Rust. The basic pipeline looks like this: Python The interesting part isn't simply converting Python syntax into Rust syntax. The real challenge is preserving Python semantics while moving execution into a native compilation pipeline. Why Tarvos? Python is incredibly productive, but executing Python normally means relying on the Python runtime and its dynamic semantics. I wanted to explore a different question: How much of Python can be compiled into a real native executable when the compiler knows enough about the program? That led to Tarvos. It is not a replacement for CPython, and it doesn't attempt to compile every Python program. Instead, Tarvos deliberately targets a defined subset that can be analyzed and lowered safely. The Supported Subset Tarvos currently supports things such as: int, float, bool, str, lists and tuples The compiler also handles cases where Python semantics differ from straightforward native operations. For example, Python's / and // don't mean the same thing, especially when negative values are involved. These details matter when the goal is compilation rather than simply producing code that looks similar. From AST to IR The compiler does not directly translate Python syntax into Rust. Python source is parsed first and represented internally using Tarvos's own structures. The program is then lowered into an intermediate representation. That gives the compiler a place to perform transformations before code generation. For example: Python Source This separation is important because optimization and code generation shouldn't have to understand every detail of the original Python syntax. Optimization Tarvos already has compiler-level optimization passes including: Constant propagation The goal is not to make Python "look like Rust." The goal is to generate better native code from the info

Dev
Interesse
dev.to

07 - From Knowledge Base to Long-Term Memory: How I Understand an Agent Memory System

After researching along the DSH and TencentDB Agent Memory line, my understanding of 'agent memory' has changed. Initially, I mostly cared about whether things could be connected: whether conversations could be retained, and whether a new session could still find earlier content. Later, as I kept using Hermes and studied projects such as Mem0 and Hindsight, the question gradually became: how should knowledge bases, conversation history, and long-term memory divide responsibilities? They can all store information and potentially feed it to the model. But in an agent that keeps working over time, what is stored, when it is retrieved, who uses it, and how stale conclusions are corrected directly affect the next task. Earlier, Part 05 discussed how a project continues. Part 06 investigated the memory retrieval path. This article moves one level up and puts those studies together into my current understanding of a memory system. I now look at four things. Current context is the information the model actually receives for this inference. The current question, recent conversation, tool results, and selected memories may all be inside it. No matter how long the context window is, someone still has to decide what goes into it. Conversation history keeps 'what was said and done at the time.' It is useful for retracing the process, but it also contains temporary guesses, failed attempts, and abandoned plans. Keeping the full history does not guarantee that the next session will retrieve a useful conclusion. Knowledge base mainly stores material that can be checked against the original text: docs, tutorials, code, and study notes. It helps the agent answer 'what is the basis for this?' Long-term memory is more concerned with preferences, agreements, experience, and related facts formed over continued interaction. It helps the agent understand 'how is this task related to the past?' These types of information can use similar retrieval techniques, and their boundaries overlap. I

IADev
Interesse
dev.to

I Built a 188M Mixture-of-Experts LLM From Scratch on a Free GPU

By Shivam Kumar, founder of VisionQuantech. This is the honest version — what's proven, what's measured, and what's still running. Most mixture-of-experts research happens at billion-parameter scale. DeepSeekMoE, Mixtral, GLaM — all brilliant, all far beyond what a single free Colab GPU can touch. But the core idea of MoE is beautifully simple: only a fraction of the model needs to be awake for each token. A dense 188M model fires all 188M parameters on every word. A sparse one can carry 188M worth of knowledge while only spending ~51M of compute per token. That's the bet I made: get big-model capacity at small-model cost, on a free Tesla T4, for $0. Not to beat billion-parameter models — that would be absurd — but to prove you can design a credible tiny MoE architecture principally, not by vibes. I have a methodology I call the Main Researcher System v4 — recursive pattern-combination for discovering new algorithms. Instead of hand-tuning an architecture by intuition, I ran the process: Pattern extraction. I pulled 12 MoE primitives from the literature (fine-grained segmentation, shared experts, token-choice vs expert-choice routing, aux-loss balancing, router z-loss, SwiGLU experts, dropless training...) and 11 meta-patterns (TRIZ, morphological analysis, MAP-Elites, DreamCoder abstraction, and more). TRIZ contradiction resolution. The central contradiction: more experts = more capacity BUT more routing cost, imbalance risk, and data dilution; tiny model BUT wants excellence in every category. The resolution was structural, not a compromise: Segmentation (split coarse experts into 64 micro-experts — capacity without extra per-token compute), Taking Out (extract common knowledge into a shared expert), Local Quality (specialization emerges from the router, never hard-coded). Combinatorial engine. A morphological Zwicky box over 8 parameters screened out inconsistent combos (expert-choice routing leaks causally in decoder LMs — out; top-1 with no aux loss — guarantee

IA
Interesse
dev.to

Security Audit Report: Reentrancy & Access Control Review: Portal

Security Audit Report: Reentrancy & Access Control Review: Portal Target Protocol: Portal (TVL: $1947.2M) Protocol: Portal Scope: Core Smart Contracts (Ethereum Mainnet & L2s) TVL Context: $1,947.2M Date: October 26, 2023 Auditor: Senior DeFi Security Research Team This report presents the findings of a targeted security audit focusing on Reentrancy Vulnerabilities and Access Control Mechanisms within the Portal protocol’s core smart contract suite. Given the protocol’s significant Total Value Locked (TVL) of $1.947B, the integrity of state management and permissioned functions is critical to preventing catastrophic fund loss. The audit involved static analysis, symbolic execution, and manual code review of the primary vault, router, and governance modules. The primary objective was to identify potential vectors where external calls could lead to state inconsistency (reentrancy) or where unauthorized actors could manipulate protocol parameters (access control). Key Findings: Critical: A potential cross-function reentrancy vector was identified in the withdraw and rebalance functions due to the lack of a global reentrancy guard on the main vault contract. High: Inconsistent use of onlyOwner and onlyRole modifiers across administrative functions, creating a risk of privilege escalation if role management is compromised. Medium: Lack of explicit checks for msg.sender in certain internal helper functions that modify critical state variables, relying solely on caller context. The protocol demonstrates a generally robust architecture, but the identified gaps in reentrancy protection and granular access control pose significant risks at this scale of TVL. Immediate remediation is recommended before further scaling or integration with new L2s. Severity: Critical Location: PortalVault.sol – withdraw() and rebalance() functions Description: The PortalVault contract interacts with external protocols (e.g., lending markets, DEXs) during the rebalance() process. The current impl

SegurançaDev
Interesse
dev.to

What we're building for TAP on Telara

We've open sourced TAP at Telara so agents can build reusable internal tools. A primitive puts useful execution behind defined inputs, outputs and required access. Engineers can review, change or author that code as they would other internal tooling. Within a company, reuse raises some familiar engineering questions. Which version did we review? What assumptions does it make about the systems it calls? What happens if it gets only half the records? What may this particular caller do? Consider a customer-review primitive that resolves an account across CRM, support and billing, collects the records for a date range, and calculates agreed measures. These are steps you could package. The agent can then interpret the returned data and prepare the review. For another team to reuse that procedure, its interface needs to preserve the details that made the result trustworthy: The account and date range supplied as inputs. The source records behind each calculation. Missing data, unmatched identifiers and failed calls. The systems and actions required to collect the data. The version of the procedure that produced the result. An empty page, a denied request and an account with no support incidents mean different things. A useful tool should keep those distinctions in its output so the agent can decide what to do next. We want those expectations to become part of how a primitive is reviewed and maintained. A reviewed package still runs on behalf of a particular person or service. A colleague using the same code may be entitled to a different set of accounts. Required access belongs in the package declaration; the host and company policy determine whether the caller has it. The review of a procedure for shared use and the approval of a change during execution are separate decisions. A company might approve a version for its teams while still requiring someone to approve a billing change requested by that version. The package's declared requirements do not grant new authority.

IADev
Interesse
dev.to

A tiny DOM check for broken aria-describedby references

An input can have a visible hint and still fail to expose that hint as a programmatic description. One cause is a stale aria-describedby ID: the attribute names an element that is no longer on the page. This can happen when a component changes its error state or a template duplicates a form. The W3C forms tutorial shows aria-describedby connecting a field to additional instructions. Its value is a space-separated list of IDs in the same document. That gives us a narrow check: every named ID should resolve to an element. It does not tell us whether the text is helpful, whether the field has a proper label, or whether a screen reader announces the right thing. function missingDescriptions(root = document) { return [...root.querySelectorAll("[aria-describedby]")].flatMap((control) => { const ids = (control.getAttribute("aria-describedby") || "") .trim().split(/\s+/).filter(Boolean); return ids.filter((id) => !control.ownerDocument.getElementById(id)) .map((id) => ({ control, missingId: id })); }); } console.table(missingDescriptions().map(({ control, missingId }) => ({ field: control.name || control.id || control.tagName.toLowerCase(), missingId, }))); Run this in the browser console on a page with a form. Enter an invalid value and run it again. Some forms add an error description only after validation, so the initial page and error state deserve separate checks. Repeat after fixing the value: the description should still make sense when the state changes. Here is a simple, working relationship to compare against: Email address We will send a receipt to this address. If a validation error appears, connect the field to a clear message and expose its invalid state. W3C user-notification guidance demonstrates field-specific messages; its aria-invalid technique describes the error state. The message must be available where the user needs it, not just rendered as red text elsewhere. Email address We will send a receipt to this address. Enter an email address in the name@ex

Dev
Interesse
dev.to

Node.js OCR: What One Key Buys Across Images, Storage, and Moderation

Use one application credential to simplify control-plane ownership, but keep a traceable identity for every support photo as it moves through upload, moderation, storage, and OCR. The deciding constraint is observability: a single key can consolidate access and billing administration, yet it cannot tell an operator which image produced a bad extraction or why retained bytes are growing. TL;DR: one key buys a smaller secret-management surface and a clearer owner for aggregate usage. It does not buy end-to-end correctness. Preserve one opaque mediaId, attach a trace context to each stage, and record stage-level byte counts, decisions, and retention outcomes. That turns one bill into evidence the support team can act on. Picture the pipeline in words: customer photo enters, safety policy returns a decision, the accepted original lands in object storage, a normalized derivative feeds OCR, and extracted text joins the support ticket. One application credential may authenticate those capabilities through a common boundary. The useful change is administrative. There is one secret to rotate, one place to attribute aggregate consumption, and one account boundary to audit. The data plane remains plural. An upload receipt is not an OCR result. A moderation decision is not a retention policy. A storage object name is not a trace identifier. Treating those concepts as interchangeable makes incident review painfully vague: “the image call succeeded” says nothing about which stage succeeded. That is the trap. Before, teams often correlate provider request IDs, bucket keys, ticket IDs, and OCR job IDs after an alert. After, the application assigns mediaId before any remote work and carries it through every event. The credential identifies the application. The media ID identifies the work. Trace context connects the operations. Keep those jobs separate. This distinction also contains blast radius. A credential should stay in a server-side secret store, never in browser code or mobil

DevInfra
Interesse
dev.to

Modeling missed appointments as field operations data

A technician slot is perishable. Once a crew, vehicle, and arrival window are committed, a failed appointment can turn paid capacity into travel, waiting, calls, rescheduling, repeat dispatch, and route changes. For developers building field operations tools, that makes a missed appointment more than a status value. It is a chain of operational events that should be modeled clearly. The article breaks truck roll cost into three practical buckets: Bucket What it represents Planned productive visit The job the customer expected and the business intended to complete Failed visit The appointment that did not happen as planned Recovery work Calls, rescheduling, repeat dispatch, and route changes required to make the customer whole That structure matters because the direct cost is only the first layer. Fuel, technician time, office time, and vehicle wear are visible. Opportunity cost is harder to see: a crew driving to a no-access job cannot also complete a profitable replacement job across town. The useful data is not only whether the visit failed. The article lists recurring causes such as parts delays, job overruns, traffic, unclear arrival windows, weak reminders, bad handoffs, and optimistic scheduling. A field-service system should help separate customer-caused misses from internal misses, record why visits fail, and make repeat truck rolls visible enough to review weekly. Without that context, the schedule can look full while producing less completed work than expected. The article is careful about conditions. Software helps only when it changes confirmation, scheduling, dispatch, route visibility, and recovery behavior. Automated reminders do not fix impossible route plans. Better dispatch boards do not fix missing job notes. AI-assisted scheduling does not fix treating every appointment as the same length. That is a useful product test. A tool should expose which misses are preventable, which are structural, and which should change how capacity is sold. The payof

Dev
Interesse
dev.to

CH-Ops Access Control and App-Data Backup

CH-Ops access control provides a dedicated permission layer for managing who can use the CH-Ops application and what they can do inside it. Managing a ClickHouse® cluster is only one part of running a database platform. Once a team starts using a shared administration tool, another question becomes important: who is allowed to use the tool, and what happens to the tool's own configuration if the application is lost? CH-Ops addresses both concerns with application-level access control and app-data backup capabilities. The application maintains its own configuration separately from the ClickHouse® data it manages. This includes information such as users, dashboards, alerts, and cluster definitions. That creates an important distinction: A ClickHouse® backup protects ClickHouse® data. An app-data backup protects the state of CH-Ops itself. In this article, we'll look at both capabilities and how they fit into a self-hosted ClickHouse® environment. There are two permission systems to consider when operating ClickHouse® through CH-Ops. The first is ClickHouse® access control, which determines what a ClickHouse® user can do inside the database. The second is CH-Ops application access control, which determines what someone can do inside the CH-Ops application. These systems serve different purposes. For example, several engineers might need access to the same production cluster to monitor queries and investigate issues. That doesn't necessarily mean everyone should be able to modify application configuration or manage other CH-Ops users. CH-Ops provides four application-level roles so access can be assigned according to the responsibilities of each user. The important part is that these roles apply to CH-Ops itself, rather than replacing ClickHouse®'s own RBAC system. It is easy to confuse these two concepts. A ClickHouse® deployment may contain database users such as: ClickHouse® ├── analyst ├── data_engineer ├── reporting_user └── admin These accounts are managed by Clic

InfraDev
Interesse
dev.to

[Spanish] Un sitio de 996 páginas sin servidor ni base de datos: Astro + Claude Code

Hace unos meses empecé a ordenar los resultados de gateball en el Perú. Los datos estaban repartidos en más de diez años de entradas del blog Kantokeando: torneos, equipos, jugadores y puestos. Los fui pasando a un Excel a mano y me pregunté si se podía convertir en algo útil para la comunidad, que busca saber quién ganó, cuántos títulos tiene un equipo o cómo le fue a un jugador. Así nació Gate-Datos: un archivo de consulta con 189 torneos, 203 equipos, 538 jugadores y más de mil resultados, de 2014 a 2026. Es solo de lectura, sin login, sin formularios y sin base de datos en el camino. La portada: un buscador y el último torneo. Todo es HTML generado de antemano. Los datos cambian poco. Se agregan unos 4 a 8 registros cada dos semanas, así que no hace falta consultar nada en tiempo real. Eso me llevó a esta arquitectura: El Excel es la única fuente de verdad. Un pipeline en Python (pandas, rapidfuzz) lo valida, normaliza los nombres y exporta JSON. Astro lee esos JSON y genera el sitio entero como HTML estático. Cloudflare sirve los archivos. No hay servidor de aplicación, API ni consultas en cada visita. Cada página ya está construida antes de que alguien la pida. Cada torneo tiene su página con los podios por categoría. Una página más de las 996 que genera el build. Con los datos actuales, un solo build genera 996 páginas (una por torneo, jugador, equipo, año, tabla de posiciones y más) en unos 11 a 13 segundos. El sitio completo pesa unos 51 MB. Reconstruirlo entero en cada actualización me sale gratis en la práctica, y por eso lo hago a propósito: la normalización de nombres es global, y un registro nuevo puede cambiar datos que ya existían. Un build completo siempre es coherente. Lo que le ganamos al usuario: Velocidad: cada página es HTML listo, sin esperar a un servidor ni a que un framework "arme" la pantalla en el navegador. Poco JavaScript: Astro no envía JS que no pidas. En mi caso solo viaja un índice de búsqueda de unos 90 KB. Los JSON grandes (el de

Dev
Interesse
dev.to

Next.js Admin Panel: 4 Feature Flag CRUD Safeguards for Paywall Rates

A Next.js admin panel makes feature flag management CRUD approachable, but a media pricing toggle changes which offer a reader sees and can become evidence in a revenue dispute. The provider's current value is not enough. TL;DR: Put create, list, toggle, rollout, and delete controls behind a narrow server-side adapter, but keep the actor, reason, request ID, and before/after state in your own application database. Require typed confirmation for deletion because there is no recycle bin. Treat rollout percentage as configuration, not proof of exposure, because this flag surface has no evaluation statistics and clients only poll. This is a practical console for a small team shipping a pricing rule without a redeploy; it is not an enterprise approval system. The useful boundary is an internal contract owned by the media application. The page and audit records speak that contract while an adapter speaks to the flag provider, so swapping the capability behind it does not force a UI rewrite. Infrai is one reasonable fit when a team wants a plain REST interface plus one key, one wallet, and one bill across 295 routes in 20 modules instead of managing dozens of credentials and invoices. Its genuinely self-describing API has a public discovery surface that needs no key and returns request and response schemas, billing details, and runnable examples. Every documented capability has examples in 10 languages. There is a second, operational advantage: single-key access and consolidated billing. One key covers 295 routes across 20 modules through a single API, and one bill replaces the credential and invoice sprawl created by separate backend vendors. For a pricing launch, that reduces credential rotation and reconciliation work around the admin workflow. The broad capability surface and consistent conventions also let the internal contract stay fixed when the vendor behind a capability changes. None of this replaces the application's business audit trail. A toggle answers one que

Dev
Interesse