Painel de Notícias

Tecnologia

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

Filtros
dev.to

Rate-Limited Reminder Recovery: Idempotent Queues After Webhook and Email Send Failures

Short answer: put each user reminder on a queue, make the consumer idempotent, retry transient delivery failures with backoff, and move exhausted work to a dead-letter queue (DLQ) for deliberate redrive. For a rate-limited e-commerce worker pool, the best queue is the one whose recovery controls your team can operate at 02:00, not the one with the longest feature list. This choice starts with an evaluation constraint: a checkout follow-up may be delivered once, but it must never be intentionally sent twice just because a worker lost its lease. Email and webhook providers can time out or return HTTP 429. Queue delivery is at-least-once, so the awkward case is a worker that sends successfully and crashes before acknowledging the message. Retries are expected. Duplicate side effects aren't. The simple approach is to schedule a callback and call the provider directly. It looks fine in a notebook. In production, however, that design mixes timing, provider rate limits, retries, and recovery in one process. A queue between scheduling and delivery gives each concern a visible boundary: producers describe intent, workers spend the provider's rate budget, and operators inspect poison messages without stopping healthy reminders. Classify outcomes before choosing retry numbers. A timeout or HTTP 429 is usually a retry candidate; malformed destination data is not made healthier by ten identical attempts. Honor Retry-After when it is present, otherwise use exponential backoff with jitter. Keep the attempt count and the next eligible time with the job so a restarted worker doesn't forget where it was. A dead-letter queue is part of that state machine, not a graveyard. When attempts are exhausted, record enough context to answer three questions: which reminder failed, which destination was involved, and which error class made it terminal. Redrive only after the underlying cause or data has changed. Blind redrive can recreate the same rate spike that caused the backlog. Keep payload

DevInfra
Interesse
dev.to

LoreConvo: every session starts warm

Most AI sessions begin with a blank slate. You open Claude Code, pick up where you left off in a data pipeline, and spend the first few minutes re-explaining the schema decisions you made two days ago, the library you chose over an alternative, the edge case that came up in a review. That context existed somewhere -- in a previous conversation, in a comment you wrote, in your head -- but the model has none of it. Starting from zero is not a limitation of the models; it is a gap in the tools that sit around them. LoreConvo fills that gap. It ships several interlocking mechanisms for context restoration, each targeting a different layer of the problem. This post walks through how they work in practice. The most fundamental mechanism is the hook pair. When you start a new session on any supported surface -- Claude Code, Cowork, the Codex desktop app, Cursor IDE, or Hermes Agent -- the auto-load hook fires before your first message. It queries the local SQLite database for recent sessions tagged to your current project, ranks them by recency and relevance, and injects a compact summary into the session context. The session begins with prior decisions already in scope, not as an afterthought. At the end of the session, the auto-save hook fires without any user action. It extracts a heuristic summary covering what was discussed, the decisions made, the tech-stack facts surfaced, and open questions the model may signal during the conversation, captured opportunistically rather than guaranteed on every save. That record becomes input for the next auto-load. The loop is intentional: each session feeds the next, building a running record without any manual overhead. Both hooks ship on the free tier. You do not need a Pro subscription to start accumulating context. The hooks are also cross-surface, which means a session started in Claude Code produces a record that the auto-load hook can inject into a subsequent Cursor IDE session on the same project. The context follows the p

IADev
Interesse
dev.to

Addressing Uneven Kubernetes Knowledge: Deepening Critical Areas for Platform Engineering Strength

Bridging the Expertise Gap in Kubernetes and Platform Engineering Achieving mastery in Kubernetes and platform engineering demands more than broad familiarity—it requires a strategic focus on deepening understanding in critical areas. This article dissects the gap between superficial and profound expertise, outlining a structured approach to upskilling that prioritizes internals, networking, storage, and troubleshooting. Through causal analysis and practical examples, we demonstrate how targeted learning and hands-on practice transform fragile foundations into robust expertise. Consider a DevOps engineer with five years of experience spanning Kubernetes, cloud infrastructure, and backend systems. Despite proficiency with tools like Helm, Terraform, and ArgoCD, their knowledge remains superficial in areas such as Kubernetes internals, low-level networking, storage mechanisms, and troubleshooting. This uneven expertise creates a structural vulnerability akin to a building with a wide base but inadequate support beams—capable of standing under normal conditions but prone to collapse under stress. Kubernetes Internals and Control Plane: Without understanding components like the API server, etcd, or scheduler, practitioners cannot predict or mitigate failure modes. For instance, an overloaded API server triggers request throttling, delaying pod deployments. The causal chain: high request volume → API server overload → throttling → delayed pod scheduling → service latency. Low-Level Networking: Misconfigured CNI plugins or IPAM lead to network partitioning. For example, incorrect IP allocation in Calico causes packet drops due to misrouted traffic → network isolation → pod unreachability → application downtime. Storage and CSI: Inadequate grasp of PersistentVolume claims or CSI drivers risks data corruption. A misconfigured StorageClass initiates volume detachment → I/O errors → application crashes → data loss. Troubleshooting: Superficial troubleshooting skills leave iss

InfraDev
Interesse
dev.to

Telegram Stars payouts: the app-store cut hits the buyer, not you

Most guides on Telegram Stars monetization get one thing wrong, and it quietly wrecks your revenue planning: they treat the ~30% app-store fee as if it were deducted from the developer's Stars payout. It is not. It inflates the buyer's price. The developer's per-Star rate is fixed and flat. I built a free calculator to make this concrete, but here is the arithmetic first, taken from Telegram's own payments table. For purchases made inside the App Store or Google Play, Telegram assigns a fixed monetary value per Star to the developer: 50 Stars → buyer pays $0.99 → developer gets $0.65 500 Stars → $9.99 → $6.50 1000 Stars → $19.99 = $6.00 (Apple/Google 30%) + $0.99 (Telegram admin) + $13.00 (developer) 2500 Stars → $49.99 → $32.50 Read the 1000-Star row carefully. The buyer's $19.99 splits three ways, and the developer's share is $13.00. That is $0.013 per Star, and it stays $0.013 per Star across mobile purchases. The store cut lands on the buyer's price. It never touches what the developer receives. One popular guide says the iOS/Android fee "drops the effective payout to around $0.009 per Star." That is false. 1000 Stars pays the developer $13.00, which is $0.013 per Star. Another says you "lose ~32% on mobile." True only if you anchor to the buyer's price (the developer nets roughly 65% of what a mobile buyer pays). The stated cause is incomplete: the gap is the store fee plus Telegram's $0.99 admin slice, and the developer's per-Star rate itself never changes. Minimum withdrawal: 1,000 Stars (about $13). Below that, nothing moves. Rolling hold: 21 days from each payment before it becomes withdrawable. Payout route: Telegram's Fragment, triggered by the bot owner. Earned Stars can also be reinvested into Telegram Ads, which sidesteps the store cut entirely because the spend never leaves Telegram. Per-Star margin is small and fixed. Monetization works on volume, or on something buyers cannot get free. If you sell a subscription at 100 Stars/month, plan around rough

Mobile
Interesse
dev.to

What Redaction Means in Node.js — PDF Lease Overlays Still Expose Text

TL;DR: Redaction removes sensitive content from a PDF. A black rectangle only covers that content on the page; the original text can remain selectable, searchable, and extractable underneath. For OCR'd property records, treat successful extraction of a protected value as a failed redaction, even when the rendered page looks perfect. That distinction changes the build. The output of a redaction job is not “a PDF with black boxes.” It is a PDF from which the protected content can no longer be recovered by text extraction. Visual review still matters, but it is not the release gate. A PDF can retain text and drawing as separate layers. Painting an opaque shape over a tenant name changes what a person sees; it does not necessarily change the text object below it. Copy and paste, search, or a parser can expose the supposedly hidden value. Redaction means removing that content from the file. Explained in operational terms: an overlay changes appearance, while redaction changes what remains recoverable. This gets especially easy to miss in a property-management pipeline. A scanned lease begins as page images. OCR adds searchable text. Someone later places rectangles over names, signatures, account numbers, or access codes and sees a clean preview. The OCR text can still be there. Looks safe. Isn't. The useful engineering definition is stricter: redaction is content removal, not visual concealment. The verification target follows directly. Extract text from the produced file and search for the protected values. If any value survives, stop publication. The page preview tests appearance. Extraction tests disclosure. Those are two separate assertions because the PDF format permits the visible drawing and searchable text to diverge. The awkward constraint is that OCR and redaction pull in opposite directions. OCR exists to make a scan searchable. Redaction must make selected material unrecoverable while leaving the rest searchable. If a team optimizes only for visual fidelity,

SegurançaDev
Interesse
dev.to

Node.js Avatar Derivatives — Durable IDs Across Three Resize Targets

An avatar pipeline fails operationally when it treats a generated URL as identity. TL;DR: in an Express service, upload the original once, resize from the returned asset ID into a fixed set of three render sizes, store every derivative ID with the user, and resolve delivery URLs only when rendering. This preserves image quality where it is visible without making every client download the largest file, and it keeps a future URL or delivery-policy change out of the user table. For a gaming profile, I would use three semantic slots such as avatar, roster, and thumbnail, not a matrix built from every screen and pixel density. The exact dimensions are a product decision; the invariant is the fixed set. A request succeeds only after the database record points to the complete new set. Until then, readers keep seeing the previous set. The useful alert is not "image endpoint returned an error." It is "user avatar generation did not reach a complete terminal state," tied to the user ID and the uploaded source asset ID. A dashboard full of request counts cannot tell an incident responder whether a player sees an old avatar, a missing image, or three mismatched generations. The stored state can. That is the page. Here is the bounded failure scenario: the source upload returns an ID, the first two resize operations succeed, and the third does not. If the handler updates users.avatar_url after each operation, the user record becomes a diary of partial progress. A retry can also create another generation whose results are mixed with the first. The visible symptom may be limited to one surface, so aggregate success rates remain reassuring while the roster view is wrong. The invariant is stricter: one user record names one complete generation of derivatives. Generate outside the user-row transaction, validate that all required slots exist, then replace the stored ID set in one database write. Keep the prior generation readable until that write commits. This is a postmortem-shaped ru

Dev
Interesse
dev.to

Why Your WordPress Site Is Slow (It's Probably Not Your Host)

Everyone blames the host. "I need to upgrade my plan." Nine times out of ten, the host is fine — the site is just carrying dead weight. Here's how I find it. Don't guess. Run your URL through PageSpeed Insights and write down three numbers: LCP (Largest Contentful Paint), INP (Interaction to Next Paint), and TTFB (Time to First Byte). These are your before numbers. Everything below is about moving them. If TTFB is over 600ms on a cached page, then you can blame the host. Under that, keep reading. 1. No page caching. This is the big one. Every uncached WordPress request boots PHP, hits MySQL, renders the theme — hundreds of milliseconds you don't need to spend. A caching plugin serving static HTML cuts that to near zero. This alone fixes most "slow WordPress" complaints. 2. Unoptimized images. I still find 4MB PNGs as hero images. Convert to WebP, resize to the actual display size, and lazy-load everything below the fold. A single oversized image can blow your entire LCP budget. 3. Plugin bloat. Deactivate everything, then reactivate one at a time while watching TTFB. Page builders, slider plugins, and "all-in-one" packs are the usual offenders. If a plugin adds 200ms and you barely use it, it's gone. 4. No database cleanup. Years of post revisions, expired transients, and orphaned metadata slow down every query. Back up first, then clean house. 5. Old PHP. PHP 7.4 to 8.x is a free 20-30% performance gain. Most hosts let you switch in the control panel. Check plugin compatibility first, then flip it. Do caching first — it masks a multitude of sins and gives you the biggest immediate win. Then images, then plugins, then database, then PHP. Each step builds on the last, and you re-measure after each one so you know what actually moved the needle. LCP under 2.5 seconds INP under 200ms TTFB under 600ms (under 200ms cached) Hit those and you're in Google's good graces for Core Web Vitals, which is a ranking factor. The full process — 40 checkpoints covering caching, datab

Dev
Interesse
dev.to

Rebuilding Shopify's Finances summary from the Admin GraphQL API, line by line

In May 2025 Shopify's admin replaced the printed Financial Summary with an on-screen Finances summary. So I built a page that reproduces it from the Admin GraphQL API. Matching Shopify's figures turned out to be mostly a question of definitions and dates, not arithmetic. Every amount comes back as shopMoney.amount, a string. scalars/Decimal describes it as "A signed decimal number, which supports arbitrary precision and is serialized as a string." I never add those strings as floats. I parse each one into integer minor units, sum integers, and only format at the end. The precision comes from Intl: 2 for USD, 0 for JPY, 3 for KWD. The second rule is about signs. Every reduction is stored as a negative number: discounts, returns, shipping discounts, reversed tax, refunded payments. Then every formula adds its parts. Net sales is gross sales + discounts + returns. Each figure is posted to the day of the event that produced it, read in the store's time zone from Shop.ianaTimezone: Event Dated by Fallback Sale Order.processedAt createdAt Refund (return, cancellation, refunded shipping, tax, duties, adjustment) Refund.processedAt Refund.createdAt Units removed with no refund Order.cancelledAt the sale's date Payment OrderTransaction.processedAt createdAt An order sold before the range still brings its refunds and payments inside it. Shopify's Finances report defines gross sales as "product selling price x ordered quantity. Gross sales does not include discounts, sales reversals, taxes, shipping, or fees." I sum LineItem.originalTotalSet over product lines, on the sale date. The reference says it is "the total price of the line item when the order was created. This value doesn't include discounts." Discounts, in the same report, are "product discount + the product's proportional share of a cart-wide discount." I take them from each product line's discountAllocations. Whether they always carry the line's share of an order-level discount is not confirmed. Returns are where t

Dev
Interesse
The Verge

Gemini Call for Me might tell your mom you’re running late

Google may be expanding its "Call for Me" AI feature beyond business calls so you can use it to send messages to friends and family. Android Authority reports finding a "Gemini Calling" introductory screen in an APK teardown with examples that include "Call Mom and tell her I will be 15 minutes late" and "Call John and ask if he is coming for dinner." Based on those examples, even with this expansion, Gemini would likely be limited to basic, text message-like calls. While Google's AI might not automate an entire catch-up phone call with your relatives, it could deliver quick messages to people who prefer a phone call, miss texts often, or … Read the full story at The Verge.

IAMobile
Interesse
Hacker News

Ephemeral Testing

Article URL: https://lemire.me/blog/2026/10/05/ephemeral-testing/ Comments URL: https://news.ycombinator.com/item?id=49972008 Points: 10 # Comments: 0

Dev
Interesse
Hacker News

Worth Building

Article URL: https://armstr.ng/writing/worth-building Comments URL: https://news.ycombinator.com/item?id=49971952 Points: 17 # Comments: 5

Geral
Interesse
dev.to

Five Stop Conditions Every Production Claude Tool Loop Needs

A demo agent loop runs until the model says it is done. A production loop cannot work that way. Each tool call is a request to change something, and your code, not the model, decides when the loop stops. Claude returns a structured tool-use block: a tool name and arguments. Before anything runs, the application checks five things: Schema: the arguments have the right shape. A strict schema catches malformed calls. Identity and permission: the caller may use this tool for this task. Business rules: the live record is in the right state, amounts match, limits hold. Approval: actions above a threshold wait for a person. Idempotency: a retry cannot create a second payment, order or message. Valid JSON that asks for an invalid action is still invalid. The schema checks shape; business validation checks meaning. Send back a typed success or error, with fields the model can use safely. Separate two kinds of error: Recoverable: for example AMOUNT_MISMATCH with the recorded amount. Claude may repair the request once. Terminal: a permission failure, policy denial or unsafe content. Stop immediately. A loop that returns free-text errors invites blind retries and invented fixes. Write these in code: Done: the defined business outcome is complete. Waiting: a required human approval is missing. Pause; do not guess. Refused: a permission failure, policy denial or unsafe content. Retries used up: a small, fixed number of retries for transient or repairable errors. Budget exhausted: the maximum turns, tool calls, elapsed time, tokens or cost. The simplest control is the tool you never give the agent. An accounts-payable agent that may request invoice approval does not need a payment tool. If payment is not on the allowlist, no prompt can make the loop release one. Record the model version, inputs, tool calls, results and approvals for each run. When someone asks why the agent did something, the trace is the answer. The full guide, with a worked invoice example and a controls table:

IADev
Interesse
dev.to

Claude Message Batches: What to Do With Each Result State

The Message Batches API processes independent Messages API requests asynchronously. Submitting a batch is easy. The design work is in what happens after the results come back, especially when some succeed and some do not. Use a batch for independent work that can wait: evaluations, document classification, data analysis. Use an interactive request when a person or service needs the answer before it can continue. A batch can take up to 24 hours, so check the current limits in the documentation before building anything time sensitive. Results can come back in a different order from the requests you sent. Give each request a custom_id taken from your own record, such as ticket_8831, and store the mapping before you submit. When results arrive, write each outcome next to its source record, with the prompt version, submission time and status. State What it means Next step succeeded The model returned a message Validate the message and its business meaning before any action errored The request failed Read the error. Fix invalid input; retry only errors that are eligible canceled The batch was canceled Check each request. A canceled batch can still contain completed results expired The request was not sent before the batch expired Decide which requests are still useful, then resubmit those succeeded is the state people misread. It means a message exists, not that the message is right for the decision. When a few records fail, the tempting fix is to resubmit everything. That can create duplicate tasks or overwrite decisions a person already made. Instead: Keep successful and unresolved records separate. Retry only eligible records, with their original IDs. Preserve completed outcomes and human decisions. For refunds, notices, account changes or payments, separate the model's output from execution: Mark a record approved_for_action only after validation and any required review. Let the action service enforce an idempotency key, so a retry cannot run the action twice. custom_

IADev
Interesse
dev.to

Field Break: an open-weight AI that tells you to close the screen

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass. I built Field Break, a deliberately small AI tool whose success condition is that you stop using it. You tell it four things: how many minutes you have; your energy level; what kind of outdoor space is nearby; one constraint, such as “stay close to home” or “no car”. It returns one micro-adventure that can start almost immediately, plus a final instruction telling you when to lock the screen. That last part is the product idea. Most AI apps optimize for more conversation. Field Break optimizes for the shortest useful interaction possible. The 36-second demo is here: https://raw.githubusercontent.com/ondmindmanagement-hub/field-break/main/demo/field-break-demo.mp4 A live Apertus 1.5 70B test was also captured during the challenge. Given 20 minutes, medium energy, neighbourhood streets and a small park, the model produced a “Neighbourhood Pocket Adventure” and ended with: Turn off phone and let adventure unfold offline The exact prompt and result are preserved in the repository so the model evidence is inspectable rather than described from memory. / field-break Field Break Hacktoberfest Open-Source AI Challenge — Week 1: Touch Grass Field Break turns a small amount of free time into one simple outdoor micro-adventure, then explicitly tells the user to put the screen away. Open-source AI core The app is designed for the open-weight Apertus 1.5 model through an OpenAI-compatible endpoint. The provider/model are environment-configurable, so the project can switch to another open-weight deployment without changing the UI. Run with real model inference by setting: OPEN_MODEL_API_KEY OPEN_MODEL_API_URL=https://api.publicai.co/v1/chat/completions OPEN_MODEL_NAME=swiss-ai/apertus-v1.5-8b Without a key, the prototype runs a clearly labelled deterministic demo-policy; it never pretends that fallback output is model inference. Why open innovation matters The planning layer is not locked to

IAMobile
Interesse
dev.to

PreToolUse or PostToolUse? Where to Put a Check in the Claude Agent SDK

If an agent can trigger a business action, the most important design question is where each check runs. In the Claude Agent SDK, hooks give you two points around every tool call. Only one of them can stop the action. A check that must prevent a side effect belongs in PreToolUse. It runs before the tool executes and returns a decision. PostToolUse runs after execution. It can add context, replace the result the agent sees, or record an event, but it cannot undo what the tool already did. Decision Use it when What happens deny Required data is missing or a business rule fails The tool does not run. Return a reason the agent and the operator can act on ask The request is valid but needs a person's approval Your approval handler (canUseTool in TypeScript, can_use_tool in Python) gets the decision. Returning ask alone does not create an approval screen allow The request meets the hook's policy The call continues to the tool service A PreToolUse hook can also return changed input. Use that sparingly and log it, because the tool then runs something the agent did not ask for. Async hooks cannot gate. A callback that returns async: true (async_: True in Python) cannot block the tool or change its input. A hook that gates an action must return its decision before execution. The hook is not the last line. The hook does not own the business record. The tool service must repeat authorization and business validation, and use an idempotency key so a retry cannot create a duplicate. Passing the hook shows the request looked acceptable, not that the action is correct. The event names overlap, but the owners differ. Agent SDK hooks are registered by the application running the agent, through ClaudeAgentOptions in Python or the SDK options in TypeScript. Claude Code hooks are configured in the Claude Code environment. Exam questions and real incidents both turn on this difference. Send a valid, below-limit request. Confirm the tool receives unchanged input. Remove a required field, ch

IADev
Interesse
dev.to

5 Reasons Claude Code Seems to Ignore Your CLAUDE.md

When Claude Code skips a rule you wrote in CLAUDE.md, the file is rarely broken. Usually the rule never loaded, lost to a conflicting rule, or was never something a context file could enforce. These are the five causes to check, in order. Claude Code loads CLAUDE.md and CLAUDE.local.md from the directory where the session starts and from every parent directory. A file in a sibling package does not apply just because it exists in the repository. Start in services/billing/ and the billing guidance is relevant. Start in apps/web/ and it is not. Files below the working directory are not loaded at startup. They load when Claude reads files in that directory. If you start at the repository root and ask a question before Claude has opened anything in apps/web/, the web guidance is not in context yet. Run /context to see which memory files Claude Code reports as loaded. Loaded files are combined in order, from the root down to the working directory. A closer file adds more specific guidance, but it does not automatically win a contradiction. If the root says "update the lockfile" and a package file says "never change the lockfile", Claude has two instructions, not a rule. Give each rule one owner and write exceptions out in full. A CLAUDE.md can pull in other documents. A stale rule in a referenced file behaves exactly like a stale rule in the main file, but it is harder to spot. Check every imported document and the .claude/rules/ folder in each relevant directory, not only the top-level file. CLAUDE.md is context that guides Claude. It is not a control layer. "Never read the secrets folder" written in CLAUDE.md is a request. If an action must be blocked whatever Claude decides, use a permission rule or a hook. Before relying on a new set of instructions, run three harmless tasks: A change inside one package: does Claude name that package's rules and the right test command? A change inside a second package: does it switch to that package's rules? A change that touches both

IADev
Interesse
dev.to

Claude Code MCP: Connected but Not Working? Check These Three Gates

An MCP server can appear in claude mcp list and still fail the first real request. In most cases the connection is fine and one of three separate gates is closed. Checking them in order saves a lot of configuration churn. Every MCP request from Claude Code passes three independent checks: Gate Question it answers Who controls it 1. Project-server approval May Claude Code load this connection in this project? You, in an interactive session, plus any organisation restrictions 2. Tool permission May Claude call this specific tool now? Claude Code permission rules in personal, project and organisation settings 3. Data access Does the credential behind the server allow this read or write? The external system, for example GitHub, using the token's permissions Passing one gate says nothing about the next. Approving a tool call in Claude Code cannot grant a repository permission your token lacks, and a token with full access does not help if the project server was never approved. What you see Check first The server does not appear at all Configuration: project directory, JSON syntax, server name Approval is pending Gate 1: review the project-server request in an interactive session Every call asks for permission, or the call is refused Gate 2: the permission rule, written against the actual tool name Authentication or "not found" errors from the service Gate 3: token expiry, selected repositories, organisation approval Labels vary by Claude Code version. What matters is which stage failed. Use /mcp inside a session to inspect the connection before you change any files. One detail catches many people at gate 2. Permission rules can target a whole server or a single tool, and the server sets the tool names. Inspect the real name before writing the rule. A name guessed from your own server label may not match. Claude Code stores an MCP connection at one of three scopes: Local (the default): you, in the current project. Project: everyone who receives the project's .mcp.json. Us

IADev
Interesse
dev.to

How to stop hand-maintaining monorepo CI path filters!

Monorepo CI has one recurring chore: every workflow carries a paths: list that someone has to keep in sync with the code. Add a shared library, forget to add it to three filters, and a breaking change sails through CI untested. dynamic-monorepo is a GitHub Action that works out which projects a push or pull request affects, including projects that depend on what changed. It reads the manifests you already have (package.json workspaces, go.mod, Cargo.toml, pyproject, pom.xml, Gradle, .csproj, Dockerfile, Helm), so most repos need no config at all! Example 1: All separate workflows into one rajadilipkolli/spring-boot-microservices-series-v2 is a Spring Boot microservices showcase with eight services. Each service had its own near-identical workflow and its own paths: filter jobs: plan: runs-on: ubuntu-latest outputs: services: ${{ steps.plan.outputs.build }} has_services: ${{ steps.plan.outputs.has_build }} steps: - uses: actions/checkout@v4 - uses: Continuous-Actions/dynamic-monorepo@v1 id: plan build: needs: plan if: needs.plan.outputs.has_services == 'true' strategy: matrix: service: ${{ fromJSON(needs.plan.outputs.services) }} # ...same build steps as before, written once The result: • 9 files changed, +73 / −467 lines. • Adding a service is one entry in config, not a copied workflow. • Docs-only changes build nothing. • A dependency bump in one service builds just that service. Example 2: Keep your workflows, add a safety net Not every team wants to restructure CI. uni-helper/create-uni kept its existing per-package workflows. Running the audit on main found 11 problems across 4 workflows. For example, packages/core depends on the workspace packages @create-uni/shared and @create-uni/config, but its test workflows only watched packages/core/**. A PR that touched only the shared package never ran the core tests. • fixed the filters, with 12 lines, all inside on.*.paths • added a small audit workflow so the filters can't drift again The audit compares every workflo

DevInfra
Interesse
dev.to

I Built VitaRecall: A Health AI Companion That Remembers Without Pretending to Be a Doctor

Health is too serious for an AI to pretend to be a doctor. That is why I think health-related AI should start with a more careful role: helping people prepare for care, not diagnosing them, prescribing medication, or replacing emergency services. I built VitaRecall, an AI care-preparation companion that helps patients: prepare questions before an appointment organise notes and care preferences keep track of follow-up tasks continue a conversation without repeating what matters to them VitaRecall is built with Gemini and uses Walrus Memory on mainnet for patient-controlled continuity across new chats, browsers, devices, the web app, and Telegram. A user can share a preference such as: “Use short, plain-language answers and remind me to write down questions for my appointment.” VitaRecall archives that context automatically by default. When the user returns in a fresh conversation, the app searches that user’s own memory namespace, retrieves relevant saved context, and uses it to make the response more helpful. The interface distinguishes a pending save from a confirmed Walrus receipt. Users can review storage receipts, open confirmed blob IDs in Walrus Scan, and pause future saving if they choose. So far, VitaRecall has generated 35 unique confirmed Walrus mainnet blob IDs across its live app records. VitaRecall is not a medical professional, diagnosis tool, prescription service, or emergency service. It is designed to support care preparation and continuity—not make clinical decisions. The current public demo uses fictional information only. A key design goal is making memory useful while giving users a clear view of what is being saved and when it is recalled. Persistent memory changes the usefulness of a chatbot. The challenge is not merely storing text—it is making recall relevant, visible, user-controlled, and safe enough for a sensitive context. I would genuinely value developer feedback: How would you design patient-controlled AI memory? What should a user be

IAMobile
Interesse
dev.to

Building ResilienceLab: retries, circuit breakers, and tracing in .NET 10

I wanted to build something useful and ended up creating ResilienceLab 0.5.0, an experimental resilience library for .NET 10 with its own API and an MIT license. I developed it with coding agents, reviewing the contracts and checking the results. It includes retries for exceptions and generic results, cooperative timeouts, circuit breakers, fallback, rate limiting, hedging, and an HTTP adapter integrated with IHttpClientFactory. Optional observability uses logs, metrics, and ActivitySource traces. In the catalog API, I composed these layers from outside to inside: Fallback → Circuit breaker → Retry → Timeout → HTTP The circuit counts one failed call after its retries are exhausted, while each attempt has its own timeout. Two additional retries allow up to three HTTP requests. The HTTP adapter has its retry budget disabled to avoid multiplying attempts. Fallback returns only the last valid catalog snapshot, within a bounded age. If the upstream service fails and there is no usable cache, the API returns 503. It does not invent a successful response. The library has 194 passing Release tests. The consumer API adds 12 reproducible HTTP scenarios, covering recovery, timeouts, circuit opening and recovery, cold and expired caches, and consumer cancellation without pending upstream handlers. I also made a real external request and verified that an OpenTelemetry Collector received traces and metrics over OTLP. These are bounded checks, not proof of production performance or long-term stability. A cooperative timeout requests cancellation and waits for the operation to finish. Hedging cancels and awaits losing attempts, which can delay completion if they ignore cancellation and can increase upstream load. The library is experimental and does not offer Polly API compatibility. dotnet add package ResilienceLab --version 0.5.0 dotnet add package ResilienceLab.Http --version 0.5.0 Create a .NET 10 console app, install the core package, and replace Program.cs with this example:

Dev
Interesse
dev.to

Secure SMS OTP Login: Rate Limits, Lockouts, and Replay Defense

An SMS provider can deliver and verify a code, but it cannot see enough of your application to decide whether a request is abusive. Short answer: design a secure SMS OTP login flow with per-user, per-IP, and per-device limits in front of every send; give each challenge a short expiry and an attempt ceiling; consume it exactly once; temporarily lock repeated failures; and enforce country policy before spending a send. Provider selection comes after those controls, not before them. For a healthtech marketplace notifying a seller about a new order, keep that notification outside the login challenge. An order event may justify a message, but it must never create, extend, or implicitly verify an authentication challenge. The operational invariant is blunt: no unauthenticated caller gets an unmetered path from an HTTP request to a billable SMS. Start the incident review with a bounded exercise: one account receives repeated OTP requests from rotating IP addresses, then the correct code is submitted twice. No invented outage or benchmark is needed to expose the design error. If the only alert is a provider dashboard showing message volume, it arrives after the application has already surrendered control. I distrust that dashboard as the primary signal because it cannot answer the useful questions. Which user, device, IP, and destination country crossed policy? Did suppression prevent a send? Was a challenge accepted after it had already been consumed? The page should fire on an application-owned decision, such as a sharp rise in denied sends or locked challenges, with dimensions that let the responder distinguish a broken client release from a distributed attack. Provider delivery status is supporting evidence. The postmortem invariant is therefore narrower than “add rate limiting.” Every state transition must be attributable and atomic: requested, denied, issued, failed, locked, expired, or consumed. Count denied requests as well as successful sends. Otherwise an attacker

SegurançaDev
Interesse