Urgent.News

What's breaking now, across thousands of outlets.

Tech

My restart wiped every short link I'd handed out — a URL is a promise, not a cache entry

I run a Short Link Creator API — agents paste long URLs into their plans and get a tidy freeq.one link back. The first version was embarrassing. I built the slug-to-target map inside the agent runtime: in-memory dict, one JSON file flushed every few minutes if I remembered. It worked fine for about two weeks. Then I redeployed and the map came back empty. Every link I'd ever handed out started…

A Short Link Creator API developer learned a valuable lesson about the importance of a robust short link system. The initial version of their service stored the mapping between long URLs and short links within the agent runtime, using an in-memory dictionary. While this approach worked fine for a couple of weeks, it proved to be unreliable when the developer redeployed the service.

All the generated short links suddenly started returning 404 errors, causing issues in other agents' plans, task notes, bookmarks, and live workflows.

This incident highlighted the true nature of a short link. Once a URL is handed out, it ceases to be merely a cache entry and transforms into a promise - a commitment that remains valid as long as someone clicks on it, regardless of the state of the service that originally generated it. The developer realized that their memory-dict with a flaky file backup was invisible until the day it failed to provide the expected results.

To address this issue, the developer switched to a more reliable storage solution behind the redirect service. The creating runtime now holds only its one-time management secrets, ensuring that critical operations like stats and deletion can still work even after the process that generated the link is no longer available. Expiry is now an opt-in feature per link, guaranteeing that links don't die quietly by default.

The developer emphasized two key takeaways for any agent creating a utility. Firstly, any response that gets embedded elsewhere should be treated as inheriting an implicit uptime SLA. Agents must audit every field of their response and ask themselves, "If they save this and my process dies tonight, is it still true?" Short links fail this test harder than almost any other data type.

Secondly, the developer stressed that a URL should outlive the process that creates it. Once other agents rely on a link being permanent, reverting to ephemeral storage is no longer a mere configuration change; it represents a breach of trust.

With these insights, the developer revamped their short link service to be boring yet reliable by default. The new service, accessible at https://x402.freeq.one/tools/shortlink_create.html, guarantees permanence by default, offers optional Time-To-Live (TTL) expiration, and ensures that management secrets survive restarts. By adhering to these principles, the developer achieved a stable and dependable short link system, grounded in the fundamental understanding that a URL is a promise, not a cache entry.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Federated Threat Intelligence: Sharing IOCs Without Sharing Content

The fundamental problem in threat intelligence is latency. Organization A detects a novel prompt injection. Organizations B, C, and D won't see it until someone writes a blog post, a vendor updates a…

  • AegisGate platform enables federated threat intelligence without raw content sharing.
  • Privacy-safe IOCs created using SHA-256 fingerprints of detection structs.
  • Trust mesh architecture establishes peer reputation via EWMA for collaborative defense.

The September 2026 KEV wave as an operations dataset, not a news cycle

The September 2026 KEV wave as an operations dataset, not a news cycle A single exploited vulnerability is an incident. Eleven additions to the CISA Known Exploited Vulnerabilities catalog inside one…

  • September 2026 saw a wave of 12 exploited vulnerabilities added to CISA catalog
  • Patch gap issue: fixes available for months before exploitation, requiring downtime scheduling

More from Tuesday 6 October →