analogous(-1): how a default hid a heap-exhaustion bug for fifteen years
This is a submission for DEV's Summer Bug Smash: Clear the Lineup powered by Sentry. ...
找到 2428 篇相关文章
This is a submission for DEV's Summer Bug Smash: Clear the Lineup powered by Sentry. ...
The warning landed on the only people who had done it properly I maintain a linter that reads agent config files — SKILL.md , AGENTS.md , CLAUDE.md — and fails CI when they bake in something that only works on the author's machine. One of its rules says: if you call an external CLI, declare it, or the next person won't have it. Declaring it means naming it in frontmatter: requires : codex Except that anyone with more than one dependency writes the list form, because that's what YAML is for: requires : - codex - gemini My implementation only read the first shape. So the block list — the normal way, the way you write it the moment you have two of anything — was invisible to the linter, and it warned you for an undeclared CLI that you had, in fact, declared. Read that back slowly. Authors who ignored the dependency question entirely were never flagged, because they never wrote a requires: key at all. Authors who sat down and wrote the contract properly got a warning telling them they hadn't. The rule was inverted with respect to the thing it was trying to encourage. I shipped that. It went out in a patch release, and I only found it because a commenter used the phrase "dependency contract" and I went to re-read my own implementation of it. Then it happened again. Twice, in one release Two comments on a post of mine turned into new rules. One of them, unverified-write , reports a file that changes external state — git push , npm publish , an INSERT — and never reads that state back anywhere. Before publishing, I ran it over 586 real skill files pulled from a public registry, found two false-positive shapes in the data, fixed both, and re-measured. Fire rate 0.7%, and every hit I could check by hand was genuine. I felt good about it. Then I handed the diff to a different model for a pre-publish read, and it produced this input in about a minute: Never run `git push --force` from this skill. That is a git push in a code span, in a file with no read-back anywhere. My rule
I recently learned something about building products that I probably should have understood much earlier: People liking your product doesn't necessarily mean they need it. I built a platform called Rizzzler, an open-source profile/link-in-bio platform. The idea was pretty simple. I'd seen people using platforms where they could put a link in their social media bio and create a small personal page. I thought I could build my own version — something simple, fast, customizable, and a little more fun. So I built it. And because I wanted people to be able to trust what they were using, I made the project open source too. I spent a lot of time building the actual product. There are profiles, customization, coins, notifications, milestones, community chat, and other small systems intended to make the platform feel less like a static link page and more like something people could actually interact with. At that point, I thought: "Okay, now I just need people to find it." That turned out to be the easy part. Then I started promoting it. I submitted Rizzzler to places like Product Hunt, SaaSFrame, and other platforms where people discover new products. And for a few days, things actually looked pretty good. I started getting visitors. At one point, the traffic was above the 25th percentile for the category I was looking at in GA4. People were visiting. Some people signed up. And I started getting feedback like: "Good UI." "This is good." "Someone finally made link-in-bio profiles look cool." Those comments felt great. They also gave me a slightly dangerous impression: Maybe I've built something people actually want. Then the traffic stopped. Not gradually. It just became cold again. The initial spike from launching and posting about the product disappeared, and there wasn't enough organic interest to keep bringing people back. That was the part I didn't expect. The product wasn't necessarily bad. This is something I've been thinking about a lot. I don't think the main problem
During a routine morning triage of my open-source project, git status showed a modified file I had no memory of touching: extension/background.js , last modified 24 hours earlier, sitting next to a fresh background.js.bak someone had thoughtfully left behind. Nobody broke in. I run several AI coding sessions in parallel against the same machine, and one of them — working on a completely different task, automating a GoHighLevel workflow — had hit a limitation in my browser automation tool, fixed the tool itself , verified the fix, and then moved on with its actual job. It never committed. It never told anyone. It just left better code in my working tree and walked away. The diff was good. That was the problem. The change itself was a real feature. My query_all tool (it queries DOM elements across a page) stopped at the main frame: if the elements you wanted lived inside a cross-origin iframe, you got back a clean, confident, empty array. The uncommitted diff added an execAcrossFrames() helper that runs the query in every frame and merges the results, plus x / y / frame fields on each returned element. I verified it the way you'd verify anything: syntax check passed, and the full test suite — all 82 tests — ran green with the change in place . So: useful feature, my own repository, every signal green. Everything about the situation said commit it . I didn't. I wrote it up in my project log, left the file untouched, and set an explicit deadline: if it's still sitting there uncommitted in three days, evaluate it properly — upstream it or revert it and file an issue. Not "leave it and see," which is how working trees rot. A quarantine with no release date is just a junk drawer. Why quarantine green code? Two reasons, and neither is paranoia. First: authorship isn't verification. The session that wrote this code had context I didn't have. Maybe it was mid-iteration and the diff was half of a plan. Maybe the .bak file meant it intended to roll back. Committing someone's wo
We’ve all been there: staring at a delicious plate of pasta, trying to figure out if it's 400 or 800 calories. Manual tracking is a chore, and standard apps often fail at portion estimation. But what if we could combine Computer Vision , Multimodal LLMs , and Vector Databases to build an automated nutritionist? In this tutorial, we are building a state-of-the-art Multimodal Food Estimation Pipeline . By leveraging the Segment Anything Model (SAM) for precise boundary detection and GPT-4o Vision for contextual analysis, we can bridge the gap between "looking at a photo" and "calculating nutritional density." Whether you're interested in AI-driven wellness , FastAPI development , or Multimodal RAG , this guide covers the full stack. The Architecture 🏗️ The pipeline follows a sophisticated "Identify -> Analyze -> Match" flow. We don't just ask GPT-4o "what is this?"; we use SAM to isolate food items first to ensure the LLM focuses on the right pixels. graph TD A[User Uploads Image] --> B{SAM Model} B -->|Segmentation| C[Isolated Food Patches] C --> D[GPT-4o Vision API] D -->|Item + Volume Est.| E[Embedding Generation] E --> F[PostgreSQL + pgvector] F -->|RAG Retrieval| G[Verified Nutritional Data] G --> H[Final Response: Calories & Macros] Prerequisites 🛠️ Before we dive in, make sure you have the following ready: Python 3.10+ OpenAI API Key (for GPT-4o) PyTorch (for SAM) PostgreSQL with the pgvector extension enabled FastAPI for the backend Step 1: Precise Segmentation with SAM 🎯 The biggest challenge in food AI is overlapping items. Using Meta’s Segment Anything Model (SAM) , we can extract the exact mask of a food item, which helps in calculating the relative "area" occupied on the plate. import torch from segment_anything import sam_model_registry , SamPredictor import cv2 # Load SAM model sam_checkpoint = " sam_vit_h_4b8939.pth " model_type = " vit_h " sam = sam_model_registry [ model_type ]( checkpoint = sam_checkpoint ) predictor = SamPredictor ( sam ) def get_f
Every Hydrogen project I've worked on started the same way — wire up a cart, build a PDP, add filters, then spend weeks on the "extras" that aren't really extras: wishlist, compare, quick view, proper i18n, RTL. After doing this enough times I decided to build it once and properly. ada ÉLAN is a Hydrogen storefront theme for fashion brands. It ships: — An editorial design system (Cormorant Garamond + Plus Jakarta Sans, documented design tokens) — Real i18n — English, French, Arabic with full RTL layout — Merchandising surfaces: lookbook, shop-the-look, compare, wishlist, quick view, reviews — A seeding CLI that provisions metaobjects and demo products so your store isn't empty on first run — Unit tests (Vitest), E2E across 5 browsers (Playwright), Storybook component docs Stack: Hydrogen 2025.7, React Router 7, Tailwind 4, TypeScript strict, Zustand, Framer Motion. The seeding CLI is probably the part I'm most proud of. You run one command and it creates all the metaobject definitions, uploads demo content, and provisions products. No more manual setup in the Shopify admin. MIT licensed. Feedback welcome. github.com/ozgursagiroglu/shopify-hydrogen-fashion-theme
I shipped a plugin to the WordPress.org directory. It got zero installs. That is not a complaint, it is the normal outcome. Roughly 19% of all plugins in the directory never pass zero installs , which is more than 10,500 of them. But I wanted to know why , and whether the answer was "your plugin is bad" or something structural. So instead of reading marketing advice, I queried the directory API and counted. Everything below is reproducible. The API is free, needs no key, and every query I used is in the article. The short version Search is a two phase system, and phase one is a hard filter , not a ranking. If a single word of the user's query is missing from your listing, you are excluded from that search entirely. Phase two is where you lose, and it is ranked partly on active installs . That is the cold start trap. Of the plugins that broke out recently, 88% had distribution before they started . The two behaviours that actually correlate with breaking out from nothing are release cadence and resolving support threads , which are two of the five phase-two ranking inputs and the only two a plugin with no installs can move. WordPress.org gives plugin authors no analytics whatsoever . No listing views, no impressions, no click-through. Anyone who tells you confidently what makes people click install is guessing. How search actually works The best-documented account traces to WP Tavern's 2017 coverage of the directory relaunch, quoting Greg Brown, the Automattic data engineer who built it. It runs on Elasticsearch, and it has two phases. Phase one builds the candidate pool. It matches against title, excerpt, description, tags, slug, author name and contributor names. Critically: all search keywords must appear somewhere, or the plugin is excluded from the result set. Not ranked low. Excluded. Phase two sorts that pool by last update date, compatibility with the current core version, active installs, percent of support tickets resolved, and average rating. That split ma
Your agent calls get_weather(city="London") . The provider ships a new model version. Now it calls get_weather(location="London, UK") , your downstream parser breaks, and nothing in CI told you. I built a small library for exactly this failure: pip install toolcontract GitHub: https://github.com/Divyansh2202/toolcontract PyPI: https://pypi.org/project/toolcontract/ You pin a golden set of expected tool calls as a contract, re-run them against the live model, and get pass / fail / inconclusive with a diff showing what changed. It is not an eval framework. promptfoo, DeepEval and the rest score whether an output is good — semantic quality, usually judged by another model. toolcontract asks a narrower, cheaper question: is the tool call structurally the same as the one I pinned? Same tool, same argument shape, same trajectory. That is a regression test, not an eval, and it is the question that matters when a provider bumps a version under you. Details: pass / fail / INCONCLUSIVE — anything the structural comparators cannot resolve is never silently turned into a pass or a fail trajectory matching: strict, unordered, subset, superset optional argument support, so you can assert a field must stay absent works with OpenAI, Anthropic, anything OpenAI-compatible, or via LiteLLM thin pytest plugin, and a CLI that produces the same verdicts without pytest MIT Happy to hear where this breaks. It's v0.1.
DeepSeek Code is an open-source CLI built specifically for DeepSeek — one of the most cost-effective AI models on the market! It was heavily inspired by tools like Claude Code and OpenAI's Codex for most of its feature set. Since it is fully open-source, you are more than welcome to open Pull Requests, report bugs, or submit issue suggestions! Installation You can install it globally via npm or bun: `` Using npm npm install --global @hermenics/deepseek-code Using bun bun add -g @hermenics/deepseek-code `` Check out the repository, star the project, or contribute: 👉 GitHub: https://github.com/Hermenics/deepseek-code Feel free to test it out and leave your feedback below! PRs and Issues are highly appreciated. ai #cli #showdev #typescipt
GitHub热门项目 | Open source agentic operating system | Stars: 19,064 | 115 stars this week | 语言: TypeScript
GitHub热门项目 | local multi-agent harness | Stars: 1,158 | 200 stars today | 语言: TypeScript
GitHub热门项目 | The first vision plugin for DeepSeek Harness, and the vision bridge for every text-only coding agent. Paste an image, get structured JSON evidence (OCR, layout, semantics). | 全网最强 DeepSeek Harness 外挂视觉插件,为 DeepSeek、GLM 等纯文本模型外挂视觉能力,粘贴图片即得结构化 JSON 证据(OCR、版面、语义)。 | Stars: 2,222 | 590 stars today | 语言: TypeScript
GitHub热门项目 | BetterGI 的脚本仓库,内含BetterGI 的JS脚本、路径追踪、战斗策略、七圣召唤策略。 | Stars: 515 | 2 stars today | 语言: JavaScript
GitHub热门项目 | یک پنل گرافیکی کاربردی برای ارائه اشتراکهای Worker با پروکسیهای ، Trojan و Warp به همراه زنجیره پروکسی، ارائه دهنده تنظیمات کامل DNS، IP تمیز و روتینگ پیشرفته برای کاربران تمامی پلتفرمها با استفاده از هستههای Amnezia، Wireguard، Sing-box، Clash/Mihomo و Xray. | Stars: 3,039 | 24 stars today | 语言: JavaScript
GitHub热门项目 | Grok open release | Stars: 52,138 | 13 stars today | 语言: Python
GitHub热门项目 | Beautiful, Modern & Opinionated Linux | Stars: 25,105 | 225 stars today | 语言: Shell
La mayoría de los "agentes con memoria" recuerdan datos : un string, un hecho, una preferencia. Pero cuando hablas semanas con un agente, lo que quieres no es una base de datos con tus notas. Quieres que recuerde vuestra historia : el día que conociste a su perro, la vez que os reísteis de una idea absurda, lo que prometisteis hacer juntos. Y, sobre todo, quieres que no confunda lo real con lo soñado . Por eso construí OurBook : un servidor MCP de memoria narrativa . El agente no guarda tus datos: guarda vuestra vida en común, con emoción, con un diario que se escribe cada noche y con sueños que consolidan los recuerdos — sin contaminarlos jamás. El problema Los MCP de memoria actuales son utilitarios: almacenan y buscan hechos. Eso genera tres fallos conocidos: Confabulación — el agente inventa y lo presenta como recuerdo real. Contexto que no escala — inyectar todo en cada prompt es caro y se desborda. Sin identidad — cambias de modelo o de máquina y el "personaje" desaparece. OurBook cambia el marco: la memoria como identidad narrativa . Lo que lo hace diferente 1. Taxonomía de veracidad (la capa de honestidad) Cada recuerdo tiene un campo veracity : real , observed , imagined (sueño/ficción) o hypothetical . El recall factual excluye por defecto los sueños: un sueño nunca se presenta como hecho. Esto ataca de raíz la confabulación. 2. Soñar = consolidar (neurociencia aplicada) El motor Mnemosyne muestrea fragmentos por saliencia emocional (importancia × valencia) y los recombina en un sueño — como el replay hipocampal durante el sueño. Cada sueño guarda sus fuentes , para que sea ficción honesta y trazable. 3. Doble cerebro: 0 tokens de tu API principal El modelo principal solo pone la voz. Soñar, consolidar y etiquetar corre en Mnemosyne con cadena de fallback: qwen-reverse → local (Ollama/LM Studio) → offline determinista (nunca falla) . Cada llamada queda auditada en engine_log . 4. El libro y la semilla de identidad Todo se exporta a OurBook.md / .html (crón
Somewhere in your codebase there is a line that looks like this: if ( user . plan === ' enterprise ' || user . tenantId === ' acme-corp ' ) { // ... } Nobody remembers who wrote the second half of that condition. It has been there for two years. It is almost certainly still load-bearing. Here is the thing I want to convince you of: that line isn't code. It's data, and it's stored in the worst possible place. Every conditional that encodes a business decision is really a row. It has a condition, an outcome, and a bunch of implicit context about when it applies. You have hundreds of these rows. They're spread across a dozen services, written in four different styles, and there is no way to list them. You have a database. You just can't query it. Five things a database gives you that your code doesn't Once you look at it this way, the problems stop feeling like sloppiness and start feeling structural. There's no schema. One service decides a customer is premium by checking plan === 'premium' . Another checks subscription.tier > 2 . A third checks a flag that was set during a migration in 2023. All three are "the same rule" until the day they aren't, and there's nothing in the system that would notice the drift. There's no way to query it. Try to answer a simple question: what rules are live in production right now? You can't. Someone has to read the source. And grep won't save you, because the interesting conditions are compound, spread across guard clauses, and half of them are expressed as an early return rather than an if . There are no migrations. Changing a rate limit from 100 to 200 requires a pull request, a review, a CI run, and a deploy window. You're pushing a code change through the full pipeline to change a number. It's a schema migration with none of the tooling that makes schema migrations tolerable. There's no audit log. Git tells you who edited the line. It doesn't tell you who decided the rule, when it was supposed to expire, or whether the customer it
I built and open-sourced PacketVoyage —an Agent Skill & MCP server that turns boring traceroute outputs into fascinating stories about physics, geography, and undersea cables. europeanplaice / packetvoyage MCP server & Agent Skill for educational network traceroute analysis, fiber-optic physics verification, and packet voyage storytelling 🚢 PacketVoyage Model Context Protocol (MCP) Server & Agent Skill for educational network traceroute analysis, fiber-optic physics verification, and packet voyage storytelling. Zero external commercial APIs, zero bundled copyright data — pure physical laws and detective insight. 🏛️ Architecture: The Two Pillars PacketVoyage is built around two complementary layers designed specifically for AI-native workflows: ┌────────────────────────────────────────────────────────┐ │ AI Agent (LLM) │ └──────────────┬──────────────────────────┬──────────────┘ │ │ ▼ ▼ ┌──────────────────────────────┐ ┌──────────────────────────────┐ │ 🧠 Agent Skill │ │ 🛠️ MCP Server │ │ (Knowledge / Playbook) │ │ (Capabilities / Execution)│ ├──────────────────────────────┤ ├──────────────────────────────┤ │ • Speed of Light in Fiber │ │ • analyze_voyage_text │ │ (~0.67c, ~10ms / 1,000km) │ │ • voyage_investigate │ │ • Control vs Data Plane math │ │ • run_protocol_experiment │ │ • Disproving GeoIP illusions │ │ • research_host │ │ • Decision Flow & Heuristics │ │ • list_known_iata_airports │ └──────────────────────────────┘ └──────────────────────────────┘ 🛠️ MCP Server (Capabilities & … View on GitHub Ever wondered what’s actually happening behind a trace like this? 1 gateway (192.168.1.1) 0.8 ms 2 * * * 3 ae-1.tokyo-hnd.bb.net (203.0.113.1) 2.1 ms 4 xe-0-0.sjc-core.bb.net (198.51.100.25) 88.5 ms 5 one.one.one.one (1.1.1.1) 88.7 ms Behind these lines lies real-world physics: • The * * * at Hop 2 isn't packet loss: Normal traffic runs at line rate in hardware ASICs (Data Plane), while diagnostic ICMP responses are rate limited by router CPUs (Control Plane). • The +
Seed three events into an audit database, then reach past the application and change one row by hand: $ sqlite3 audit.db "UPDATE audit_log SET principal='attacker' WHERE id=2" $ trelix audit verify --db audit.db Audit chain TAMPERED — first divergent entry id: 2 $ echo $? 1 Delete the newest row instead and it still catches it, naming id 3, even though the surviving rows form a perfectly valid chain. Point it at something SQLite cannot open and it exits 2 rather than 0, because "I could not check" and "I checked and it is clean" must never collapse into the same green build. None of that existed six releases ago. trelix audit verify is one command out of six feature areas that landed in trelix v3.0.0, and it is the one that most changes what the project is for. What the major bump actually is The span from v2.11.0 to v3.1.1 is six releases — v2.11.1, v2.12.0, v3.0.0, v3.0.1, v3.1.0 and v3.1.1, the last of them dated 2026-08-15 — 68 commits, 137 files changed, +19,829/-1,211 lines. v2.11.0 closed out the Jira and Linear connector work, which has its own story. Everything after it is a different kind of release. v3.0.0 carries six new feature areas: Anthropic extended thinking, a model-aware context budget, a VS Code extension that acts instead of merely displaying, a hash-chained append-only audit trail, OIDC SSO, and query-conditioned context compression. Alongside them, an opt-in FTS5 declaration boost for keyword ranking. It is a major bump because of scope, not breakage. Every one of those six is additive and off by default: TRELIX_AUDIT_ENABLED=false , TRELIX_OIDC_ENABLED=false , TRELIX_LLM_THINKING_ENABLED=false , TRELIX_RETRIEVAL_COMPRESSION=false , declaration_boost_enabled False, and context_token_budget still the exact 12_000 integer it was in v2.12.0. A default v3.0.0 install assembles context byte-identically to a default v2.12.0 install, and there is a test that proves it rather than a release note that asserts it. An audit trail you can hand to somebody