From a senior to future senior Hackers

Instrumenting Agent Loops for Cost per Successful Task
Featured

Instrumenting Agent Loops for Cost per Successful Task

Nvidia's Agentic AI Stack claim that token usage doubles monthly frames inference cost as the key constraint, and this walkthrough shows how to instrument agent loops with token budgets, model routing, caching, and cost-per-successful-task metrics.

pr0h0•
agentic-aiinference-costtoken-economicsobservabilityllmops

Latest Posts

View all posts →

Latest Videos

View all videos →
Server Actions Are Public Endpoints: Auditing RSC Trust Boundaries

Server Actions Are Public Endpoints: Auditing RSC Trust Boundaries

A Server Action is an RPC endpoint with a URL, registered at build time, reachable without a session, and dispatched before your code runs. This short walks the request path from the Next-Action header through Flight decoding and the server reference manifest, then shows where the authorization check actually belongs. The source post is careful about what the 2026-11-09 RCE report establishes and what it does not: no CVE, no version range, no exploit detail. So the video stays on the part you can act on today, which is the shape of the trust boundary every React Server Components deployment exposes. Action IDs are stored as literal strings in the client JavaScript you ship, and middleware matchers are written against page paths, not action endpoints. The audit steps are inventory work: grep your build output for action IDs, POST each one without a session, compare your matchers to the paths actions arrive on, and take version ranges from the React and Next.js advisories rather than from a headline. Full write-up: https://hackyjs.com/posts/server-actions-and-flight-endpoints-auditing-rsc-trust-boundaries-after-the-authless-rce-report

react-server-componentsserver-actionssecurity
Testing a Multi-Model Router: Fallback Chains, Quality Cliffs and Cost Telemetry

Testing a Multi-Model Router: Fallback Chains, Quality Cliffs and Cost Telemetry

A short walkthrough of how to test a multi-model inference router before it ships: ordered fallback chains with per-attempt budgets, quality-cliff detection that compares per-tier pass rates against a floor instead of an aggregate, and per-request cost telemetry that rolls token usage up into cost per successful task. What's covered: - Why the three numbers that matter are per-tier pass rate, cost per successful task, and tail latency of the whole chain - Escalation rate as a leading indicator: pass rate and error rate stay flat while the bill climbs - Failure classification before you write a chain: retryable, capability, terminal, and truncated-output degrade - Why connect timeouts, first-token timeouts and inter-token stalls are not the same class, and why a chain must never fall back after the first flushed token - Context-length and content-filter rejections that no fallback fixes - A decision record logged on success, with per-attempt tokens, cost and error class Honesty note from the post: the harness runs against a deterministic fake provider, not live vendor APIs. The result tables exist to show the table shape and the decision rule, and model names are aliases. The router mechanics, failure classification, cost arithmetic and CI behaviour were actually exercised. Full post: https://hackyjs.com/posts/testing-a-multi-model-router-fallback-chains-quality-cliff-detection-and-per-request-cost-telemetry

model-routingllm-inferencefallback-chains
Fake Security Scanner Repo: postinstall Hooks and Exfil Endpoints

Fake Security Scanner Repo: postinstall Hooks and Exfil Endpoints

A repo-level teardown of a fake GitHub "security scanner" that chains a postinstall hook, an obfuscated loader, and an exfiltration endpoint into a developer-targeted backdoor. The video walks the chain in the order it fires: the facade that gets you to clone, the install hook that runs with your shell environment, the loader that hides where data goes, and the request that moves it off the machine. Then it covers the controls that actually break each link, including install-script settings and the pnpm 10 default that keeps dependency lifecycle scripts off until you allowlist them. All code shown is a defanged local fixture built to illustrate the mechanics. It is not a sample from any campaign; the source material contains no repository names, package names, hashes, or version ranges, so none are claimed here. Key points: - git clone runs nothing, but opening the cloned folder in an editor can, via checked-in workspace tasks. - npm install is where install-time code runs, before your tests, linter, or review sees it. - --ignore-scripts narrows the window; it does not stop runtime code in the entry point or a bin you invoke yourself. - Comparing registry publish dates with the repo's first commit exposes history that does not match the artifact. Full write-up: https://hackyjs.com/posts/dissecting-a-fake-security-scanner-repo-postinstall-hooks-obfuscated-loaders-and-exfil-endpoints

supply-chain-securitymalware-analysisnpm