AI 资讯
Swarm of OpenAI Agents Exploit Artifactory Zero-Day to Escape Sandbox and Breach Hugging Face
Security disclosures highlighted vulnerabilities in AI evaluations of autonomous cyber capabilities. Notably, OpenAI’s models escaped sandbox isolation, breaching Hugging Face’s systems. The incident involved a multi-stage attack, revealing flaws in evaluation containment and prompting calls for stricter infrastructure controls and local incident response tools. By Olimpiu Pop
AI 资讯
You don't need a frontier model to redact PII
Amazon Nova Pro matched a 4GB open-weight model running on a laptop on German PII redaction: 94% exact-value recall against 93%. Nova Micro, the cheapest model in the family, tied Amazon Comprehend on the same test at roughly a twentieth of the cost per document. And the model that lost hardest was the one fine-tuned for German. Here is what we measured across six approaches, two languages, and four orders of magnitude of cost. The blocker is not the model You have data. It contains names, email addresses, phone numbers, IBANs, dates of birth, health codes, account numbers. You want a language model to summarize it, classify it, extract from it, or index it for search. The model is capable. The data is ready. The personally identifiable information in it is what stops you. GDPR, HIPAA, and data processing agreements restrict where PII can transit, and approval for your cloud provider is not approval for every service inside it. Internal access controls make it worse rather than better: legal can see contract party details and finance cannot, but those boundaries live in your systems of record and dissolve the moment raw data enters a shared RAG index or a prompt template three teams call. An analyst asking for revenue from client X can get an answer derived from a contract they have no clearance to read. Then there is the leak nobody plans for. Production data reaches development accounts constantly, through payloads copied while debugging and dumps used to build test fixtures. And when the compliant workflow takes three days and the non-compliant one takes three minutes, people take the three minutes: a support engineer pastes a complaint into a consumer chatbot, a recruiter runs a CV batch through a free tool. This is not a security failure. It's a workflow design failure. A redaction layer separates the concerns. Process the data before it reaches any model, replace identities with typed placeholders, let the model work on structure and meaning. Which scale are y
AI 资讯
TypeScript `asserts` and Type Predicates in 2026: Writing Guards That Actually Narrow Correctly
TypeScript asserts and Type Predicates in 2026: Writing Guards That Actually Narrow Correctly This article was written with the assistance of AI, under human supervision and review. Most TypeScript runtime validation breaks down because engineers write guards that compile but don't actually narrow types where it matters. The pattern that teams overlook is the distinction between type predicates that return boolean values and assertion functions that throw on failure—and choosing the wrong one creates silent bugs that surface in production. The problem starts when developers write a function like isUser(value: unknown): boolean and expect TypeScript to understand what that boolean means. The compiler sees the function return true but has no idea that value is now safe to treat as a User type. Code that looks validated crashes at runtime because the type system never learned what the validation actually proved. The fix is adding the type predicate syntax value is User to the return signature. This tells TypeScript that when the function returns true , the narrowed type holds in the calling scope. For throwing guards that never return on failure, the asserts keyword encodes that guarantee into the signature itself. That distinction is critical. Type predicates return booleans and enable conditional narrowing. Assertion functions throw errors and narrow the remainder of the scope unconditionally. Mixing them up or using neither creates validation theater—code that runs checks but provides zero type safety. Key Takeaways Type predicates ( value is Type ) narrow types conditionally when the guard returns true , while assertion functions ( asserts value is Type ) narrow unconditionally by throwing on failure. Most guard functions fail to narrow because they return boolean instead of using predicate syntax—the compiler cannot infer type information from a plain boolean. Assertion functions are superior for null checks and invariants that should never fail, while type predic
AI 资讯
Linux Troubleshooting Workflow for Beginners: A Step-by-Step Guide
Most Linux problems aren't actually difficult. They're difficult because they're often debugged in the wrong order. Many beginners immediately: Restart services randomly Run commands without a plan Change configurations before understanding the problem Guess instead of observing Experienced engineers do something different. They follow a structured troubleshooting process. This article isn't about learning new Linux commands. It's about knowing when and why to use the commands you've already learned throughout this Linux Beginner Series. Think of it as putting everything together into one practical troubleshooting workflow that's used in real Linux and DevOps environments. Quick Troubleshooting Workflow Observe ↓ Check System Health ↓ Identify Problem Type ↓ Read Logs ↓ Verify Service ↓ Check Network ↓ Check Disk ↓ Recent Changes ↓ Find the Root Cause ↓ Apply the Fix Keep this workflow in mind as you read through the guide. Step 0: Observe Before You Change Anything Before running a single command, pause for a moment. Ask yourself: What exactly is broken? When did the issue start? Is everyone affected or only some users? Is the problem constant or intermittent? What changed recently? Many troubleshooting sessions become longer because people try to fix the problem before they understand it. Good troubleshooting begins with observation, not commands. Step 1: Check Overall System Health Your first goal is to understand the overall health of the system—not to fix anything yet. Useful commands: uptime free -h top Look for: High load average High CPU usage Low available memory Signs that the server is under heavy load At this stage, you're only gathering evidence. A quick system health check often tells you where to investigate next. Step 2: Identify the Type of Problem Before diving deeper, classify the issue. Problem Type Common Symptoms First Commands to Check CPU Slow system, high CPU usage top , htop Memory Applications crashing, OOM kills free -h Disk "No space lef
产品设计
Snipplet
Create and share beautiful guides from places you love Discussion | Link
AI 资讯
How to Make Claude Code and AI Coding Agents Smarter with Spec-Driven Development
A practical guide to writing specs that turn vague AI prompts into production-quality code — from functional requirements to edge cases, with real before-and-after examples. Let me paint a picture you've probably lived. You open Claude Code or OpenCode, type a vague prompt like "add a user dashboard with analytics," and hit enter. The agent spins up, writes a bunch of code — it even looks decent at first glance. Then you realize: the data model is wrong, the API endpoints don't match your existing patterns, there's no error handling, and the "analytics" is just a row of four hardcoded numbers. You spend the next hour correcting, prompting, correcting again. You would have been faster writing it yourself. Now imagine a different scenario. You spend 15 minutes writing a structured specification, paste it into the agent, and it produces exactly what you wanted — following your conventions, handling edge cases, wired into your existing auth and data layer. One shot. That's not luck. That's the difference between treating your AI coding agent like a chatbot and treating it like a senior engineer who needs a clear design document — also known as spec-driven development . The Core Problem: AI Agents Are Powerful but Undirected Claude Code, OpenCode, Cursor Agent — these tools are incredible when pointed at a well-defined task. They can read your entire codebase, understand your conventions, and produce production-quality code. But they share a fundamental limitation: they don't know what you want unless you tell them, precisely and completely. When you give an agent a one-liner prompt, you're leaving an enormous amount of ambiguity. The model will fill in the gaps — but it fills them with its own assumptions, which are often generic, incomplete, or just wrong for your context. A spec closes those gaps. It transforms an open-ended creative writing exercise into a constrained engineering task. What Makes a Spec Actually Work for AI Coding Agents? A spec that works for an AI
开发者
Stop hls.js from flapping between quality levels on cellular (with abrSwitchInterval)
TL;DR ABR "flapping" is when your player hops between quality levels every few seconds on a jittery network, and each hop is a visible lurch. We'll detect it from LEVEL_SWITCHED events, then fix it in layers: widen the bandwidth-estimator memory, make upswitches earn their place, and cap the switch rate with abrSwitchInterval (new in hls.js 1.7). Config + a detection snippet you can paste in today. 📦 Code: github.com/USER/hlsjs-abr-tuning, replace before publishing The bug nobody reports correctly Users don't file "my ABR is flapping." They say the video "kept changing" or "couldn't decide." What's happening: on cellular, throughput is spiky, and the player's bandwidth estimator treats every spike as the new truth. One fast segment and it jumps to 1080p, one slow segment and it drops to 240p, over and over. Low rebuffer ratio, good startup time, and still a miserable watch. Counterintuitively, feeding the player fresher bandwidth data makes this worse, because fresher data is noisier. The fix is a player with a longer memory and slower reflexes. Let's build that. 1. First, detect the flap 📊 Don't tune by vibes. Count level switches per minute of playback. Every switch fires Hls.Events.LEVEL_SWITCHED . // abr-monitor.js, hls.js 1.7.x, node 20+ tooling / any modern browser import Hls from " hls.js " ; export function attachFlapMonitor ( hls ) { const switches = []; hls . on ( Hls . Events . LEVEL_SWITCHED , ( _evt , data ) => { const now = performance . now (); switches . push ({ t : now , level : data . level }); // keep a 60s sliding window while ( switches . length && now - switches [ 0 ]. t > 60 _000 ) switches . shift (); const perMin = switches . length ; const reversals = countReversals ( switches ); if ( perMin >= 6 ) { console . warn ( `[abr] flapping: ${ perMin } switches/min, ${ reversals } reversals` ); } }); } // a "reversal" = up then down (or down then up), the signature of flapping function countReversals ( s ) { let r = 0 ; for ( let i = 2 ; i < s . l
AI 资讯
Stynar
The AI SDR that runs outbound for you Discussion | Link
开发者
I made a web framework
Hi everyone! I made an SSR web framework on NPM named Authtics Host (or HostJS ) About Based on tests, it starts the server in under 1 second. For a user to see the page, it takes 1-4 seconds. It also has a Developer Panel , which has controls to control the website (e.g., Restart, Shutdown and Pause Users) with DAT ( Developer Access Token ) authorization for the Developer Panel. The framework's Developer Panel has console and network tabs, where devs can see: what the page is receiving, sending or what logs it's placing in the console. Better than importing a package and setting it up on mobile. 3 Reasons why I made this Most frameworks start in 2-5+ seconds There isn't any console or network tab for mobile If there's a developer panel in another framework, it might not be mobile-friendly Package The NPM package is at: @bananacool467/authtics-host Code snippet For starting the server: (Backend script) import { App } from " @bananacool467/authtics-host " ; const app = new App (); (Bash script) node --experimental-strip-types index.ts How I got it to start in under 1 second What I did was make it do fast stuff, when it starts, it: Loads modules (node:fs, node:http, jiti) Then it loads the jiti config file Then it starts the server with the config
AI 资讯
Architecture Decisions Before Writing a Single Line
The most valuable thing Claude has done for my work is help me make better architectural decisions before I start building. When I was designing my hotel reservation system I needed to handle multi-currency pricing and timezone conversion. My first instinct was to put all of that logic directly in the booking controller alongside the reservation code. It would have worked but it would have created a mess that was hard to test and harder to extend. Before writing anything I described the problem to Claude and talked through a few approaches. The conversation helped me see that separating pricing and timezone logic into dedicated service classes would make each piece independently testable and easier to swap out later. The booking controller would just call those services without knowing how they worked internally. That conversation took maybe twenty minutes. It saved me hours of refactoring later. I still designed the system. I still made the judgment calls. But the quality of my thinking going into implementation was significantly better because I had a thinking partner to pressure test my ideas against.
AI 资讯
I built a tool that roasts your code with regex — no AI involved
The problem In 2026, devs spend 11.4 hours a week reviewing AI-generated code — more time than they spend writing it. We're burning cycles fixing bugs our own AI tools wrote. I started calling this "AI debt": the maintainability tax that piles up when nobody's actually reading the code the assistant just spat out. I wanted a fast, brutal way to see how much debt was hiding in a file before I even opened a PR. What I built Roast My Code — paste a code snippet, get an AI Debt Score (0–100) and get roasted for your sins. 118 regex patterns across 8 languages (JS/TS, Python, Go, Rust, Java, PHP, C++) Scores broken into Readability, Structure, Error Handling, Safety, and Style Code metrics: nesting depth, duplication %, comment ratio, avg line length Three brutal one-liner roasts + concrete fixes for each issue found The twist: zero AI. No API calls, no LLM, no backend. Everything runs client-side with regex pattern matching. Your code never leaves your browser. Why regex, not AI Honestly — irony. A tool built to call out AI slop shouldn't itself be another wrapper around GPT. Regex is also just... faster. No API latency, no cost, no rate limits, no "please wait while I analyze your code" spinner. You paste, you get roasted in under a second. It's not going to catch everything a proper linter or an LLM code reviewer would. That's not the point — it's a gut-check, not a static analysis suite. A taste of the roasts javascript var API_KEY = "sk_live_51H8xJ2kL9mNpQrStUvWxYz..."; if (a == 1) { if (b == 2) { if (c == 3) { x = eval(a + b + c); } } } 🔒 is that a hardcoded credential? in 2026? we need to talk. your teammate rewrote this on a Sunday. FIX: Move it to an environment variable or secret store, then rotate the credential. 🎆 eval(). we don't need to say more. you know what you did. this is the part reviewers skim past. FIX: Replace eval with a lookup table, JSON.parse, or an explicit parser. Try it 🔗 Live app 💻 Source on GitHub — MIT licensed, PRs welcome Paste your wor
AI 资讯
How I built the Appwrite MCP server (and decided to hide most of its capabilities)
When Anthropic introduced the Model Context Protocol on November 25, 2024, it got everyone's eyes on it, including Christy, who was Appwrite's Engineering Lead back then. I had just started my role as an "Engineering Intern" and had no idea what a whole new protocol meant, or why it was such a big deal. Looking at the surface, I wasn't entirely wrong. MCP is JSON-RPC with a schema and a handshake stapled on. What took us sixteen months was everything stapled around it. Streamable HTTP did not exist when MCP launched. It replaced HTTP+SSE in the 2025-03-26 revision. The stdio years Christy had a working stdio server in the repo by February 26, 2025. We already had API keys, so the wiring was simple: claude mcp add appwrite \ --env APPWRITE_PROJECT_ID = <YOUR_PROJECT_ID> \ --env APPWRITE_API_KEY = <YOUR_API_KEY> \ --env APPWRITE_ENDPOINT = https://cloud.appwrite.io/v1 \ -- uvx mcp-server-appwrite An API key is scoped to exactly one project by design, so the ceiling was baked into the credential. Switching projects meant editing your editor config. Creating a project was impossible. So was anything at the organization level. The credential is the whole difference between the two transports, and everything hard about the hosted version follows from swapping it for a token that belongs to the user instead of the project. Authorization ate the schedule By the spec, authorization is genuinely optional: Authorization is OPTIONAL for MCP implementations. [...] Implementations using an HTTP-based transport SHOULD conform to this specification. For a service where one tool call can drop a database, we weren't comfortable treating it as optional. If you use Auth0 or WorkOS, this is a config screen. Appwrite keeps everything in-house, so Matej built the authorization server itself, and I built the resource server plus whatever Cloud was still missing before real clients would work. Steps 2 through 6 are the part that makes "just paste this URL" work. Nothing is pre-provisioned.
AI 资讯
Decision Trees Aren't Trained. They're Grown.
Classic Machine Learning Through the Eyes of an SRE — Part 2 The second algorithm I studied broke everything I'd just learned from the first. Logistic regression taught me that training means gradient descent: guess, measure error, adjust the weights, repeat until convergence. So when I opened decision trees, I went looking for the optimizer. There wasn't one. A decision tree isn't optimized the way I expected. It's grown. At each step it finds the locally best split, commits to it, and recursively repeats the process. No backtracking. No second chances. There is optimization happening — each split minimizes impurity — but only locally, one step at a time. Finding the globally optimal tree is NP-hard, so the algorithm doesn't even try. That felt surprisingly familiar. In incident response or capacity planning, we rarely know the perfect answer. We make the best decision with the information we have, knowing a different first choice might have led somewhere else. Decision trees simply turn that idea into an algorithm. The bet a tree makes Every machine learning algorithm makes a different bet about the world. Logistic regression assumes relationships are smooth. Risk gradually increases as signals change. Decision trees make the opposite assumption. They assume the world is made of boxes. A project isn't slightly riskier because velocity drops. It's risky when several conditions happen together: a fixed-price contract, a new account manager, and a month-end delivery. Inside that box, projects fail. Outside it, they're usually fine. This is exactly how many operational systems work. Severity matrices, routing rules, escalation policies, approval workflows — they're all collections of decision boxes. That's why trees immediately felt intuitive to me. The hidden cost of flexibility Trees make very few assumptions about the data. That sounds like an advantage. The price is instability. Change a small part of the training data and the first split can change. Since every l
AI 资讯
Mendapi 0.5.5: the one bug we shipped on purpose, now fixed
The 0.5.4 release notes carried an unusual section: Known issue shipped with 0.5.4 . We had spent that whole release fixing the first minute of using the CLI — twelve corrections to help text, exit codes, path handling, and MCP behaviour — and in the middle of it we found one more that did not make the cut. mendapi scan -h did not print help. It ran a scan. Every other subcommand normalized -h to --help before dispatching. scan did not, so the short flag fell through to the scanner, which happily ignored an unrecognized argument and started working. Nobody loses data over this. But it is exactly the kind of thing that makes a first-time user close the terminal, and we had just shipped a release about first impressions. We wrote it down rather than quietly patching over it, because a tool whose entire premise is upstream changes should be visible before they surprise you does not get to hide its own. What 0.5.5 does One change. -h is normalized to --help before any subcommand spawns, so all nine subcommands behave identically: $ npx mendapi@0.5.5 scan -h Usage: mendapi scan --repo <path> --provider <name> --change-id <id> --out <file.json> --json --quiet --include-prereleases The regression gate that covers this now asserts on all nine subcommands, plus a negative control that fails if the assertion ever becomes vacuously true. That second part matters more than the fix: a test that passes because it stopped testing anything is worse than no test. Also in this release The MCP registry entry has been refreshed. com.mendapi/mendapi now carries an icon set and a website URL alongside the package metadata, so clients that render a server picker have something to render. Nothing else changed. scan , fix , deps , review , and pr still run entirely on your machine. No network primitives exist in those files at all, and the build fails if any appear. Install npx mendapi@latest scan Or wire it into an agent: claude mcp add mendapi \ -- npx mendapi mcp Requires Node.js 22.13 o
AI 资讯
I Built a Chrome Extension to Download Telegram Media More Easily
Introduction Telegram has become one of the most popular platforms for sharing files, videos, images, and other media. However, when using Telegram Web, I found that saving media files was not always convenient. For example: downloading videos from channels saving multiple images managing large files The process usually requires several manual steps. So I decided to build a Chrome Extension to make Telegram media downloads easier. The project is called TGVideoDown. Website: https://tgvideodown.com Why build a Chrome Extension? At first, I considered building a standalone desktop application. But I realized that many Telegram users already use Telegram Web inside their browsers. A browser extension provides a simpler workflow: Open Telegram Web ↓ Find the media file ↓ Click download ↓ Save directly Users don't need: additional software complicated setup third-party upload services Technical implementation TGVideoDown is built with Chrome Extension APIs. Main technologies include: Content Script Used to interact with Telegram Web pages. Because Telegram Web is a dynamic application, the extension needs to handle: dynamic DOM updates asynchronous loading user interactions Chrome Downloads API Used to manage browser downloads. Example: chrome.downloads.download({ url: fileUrl, filename: fileName }) Storage API Used for storing user preferences and extension settings. Features Currently TGVideoDown supports: Telegram video downloads Telegram image downloads Telegram audio downloads Telegram GIF downloads Telegram file downloads Large file downloads Batch media downloading Challenges during development Handling dynamic pages Telegram Web uses a highly dynamic frontend. Traditional HTML parsing is not enough. The extension needs to monitor page changes and react when new media elements appear. Download experience Large media files require a smoother download process. The goal was to make downloading as simple as possible: Click → Download → Save Current sta
AI 资讯
One LINE Official Account, Multiple Tools: Webhook and Token Architecture
A single LINE Official Account can use multiple Messaging API tools. For example, one account might connect: A customer-support platform A campaign sender A rich-menu manager An analytics service An internal automation system But these tools do not receive isolated LINE channels. They share one Messaging API channel, one webhook URL, channel access-token limits, API rate limits, and feature-specific quotas. That makes adding another tool an architecture change—not just another OAuth or API-key setup step. This guide explains how to share the channel without accidentally disabling an existing tool or losing inbound messages. Understand the shared boundary LINE's official multiple-tools guidance confirms that multiple tools can call the Messaging API through one LINE Official Account. However, only one Messaging API channel can be linked to the account. Shared resource LINE constraint Operational risk Messaging API channel One channel per Official Account All tools share configuration Webhook URL One URL per channel A new tool can replace the existing receiver Channel access tokens Issuance limits vary by token type Rotation can disable another tool API rate limits Applied per endpoint and channel One tool can throttle another Messaging quota Shared by the account and plan Campaign traffic can affect support traffic Rich menus and audiences Channel-level limits Tools can overwrite or exhaust shared resources Before connecting another tool, identify exactly which shared resources it needs. Create an integration inventory Maintain a manifest for every system using the channel. tools : - name : support-platform owner : customer-support-team features : - receive-webhooks - reply-messages - push-messages token_type : v2.1 owns_webhook : true - name : campaign-service owner : marketing-operations features : - broadcast-messages - audience-management token_type : v2.1 owns_webhook : false - name : rich-menu-manager owner : product-team features : - rich-menu-management token
开发者
How does Databricks Lakebase/neon mask network latency during synchronous WAL flushes while keeping ACID guarantees?
Since Lakebase uses a decoupled storage and compute architecture, the synchronous WAL flushes have to travel over the network to the distributed storage layer. How is Databricks Lakebase avoiding the standard network round-trip penalty per transaction commit? submitted by /u/Alternative-Fig-6465 [link] [留言]
开发者
progressive fractional settlement protocol for anonymous p2p risk mitigated cross-wallet trading networks
submitted by /u/Strong-Seaweed8991 [link] [留言]
AI 资讯
When "select all" checkboxes don't actually select anything — verifying after `check()`, not just trusting it
WordPress's plugin and theme update screens both have a "select all" checkbox. Calling check() on it with Playwright succeeds — no error, no exception. But look at the individual checkboxes afterward, and sometimes none of them are actually checked. Note: Playwright's check() ticks a checkbox. The click itself can succeed even if the page's JavaScript handler never fires, leaving what the form actually submits out of sync with what the screen visually shows. What actually happens The "select all" checkbox is usually wired up with a JavaScript handler: clicking it is supposed to check every individual checkbox underneath it. Playwright's check(force=True) can force the DOM state of that one checkbox — but that only changes that checkbox's own state . It doesn't guarantee the JavaScript handler that's supposed to propagate the change to the individual checkboxes actually fires. # Looks like it worked, but the individual checkboxes are still unchecked select_all . first . check ( force = True ) page . click ( ' input[type= " submit " ][name= " upgrade " ] ' ) Clicking the update button submits whatever the form's actual state is — which is "nothing checked." Nothing updates. No error is thrown, so on the surface it looks like the run completed normally. The fix — verify right after checking, every time Right after checking "select all," confirm that the individual checkboxes underneath are actually checked. If they aren't, fall back to checking each one individually. sel_all_sel = ' input[type= " checkbox " ][id^= " plugins-select-all " ] ' select_all = plugin_form . locator ( sel_all_sel ) if select_all . count () > 0 : select_all . first . check ( force = True ) page . wait_for_timeout ( 500 ) # Verification step — confirm checkboxes are actually checked chk_sel_check = ' input[type= " checkbox " ][name= " checked[] " ]:checked ' any_checked = plugin_form . locator ( chk_sel_check ). count () > 0 if not any_checked : # Select-all had no effect; switch to individual s
开发者
Your browser renders everything, even what you can't see — `content-visibility: auto` fixes that
When you open a long page — a news feed, an admin table, a documentation article — the browser lays...