Welcome, Guest | Browse

Software Factory Archive

← Previous Work All Works Next Work →

Rate Limits

Rating:
General Audiences
Fandom:
StrongDM Software Factory
Characters:
Navan Chauhan
Tags:
Rate Limits Slack Digital Twin Universe Late Night Infrastructure
Words:
504
Published:
2025-08-19

The Slack API returned its first 429 at 4:17 PM on a Wednesday. By 4:23, the factory's agents had hit the rate limit forty-six more times, because agents don't read HTTP status codes the way humans read warning signs. Humans see a "slow down" and slow down. Agents see a failed request and retry. Immediately. In parallel.

Navan killed the agent processes, stared at the error logs, and said a word that would not have been appropriate in a professional Slack channel, which was ironic given the circumstances.

The factory's Slack integration was crucial. Scenarios that modeled team communication, notification workflows, and alert routing all depended on it. The Slack twin existed, but it was incomplete—a rough behavioral model that handled basic messaging and channel operations but didn't yet support the full range of Slack's API surface: threads, reactions, file uploads, app mentions, the elaborate permission model that determined who could post where and when.

Navan had been meaning to improve it. "Meaning to" was the operational phrase. It had been on his list, somewhere between "improve Google Sheets twin formula evaluation" and "add OAuth token refresh to the Okta twin." The kind of task that lived permanently in the priority queue's middle, never urgent enough to surface, never unimportant enough to delete.

The rate limit made it urgent.

He started at 7 PM with a fresh cup of chai and the Slack API documentation open in four browser tabs. The goal wasn't to replicate every endpoint—that was a multi-week project. The goal was to replicate every endpoint the factory's scenarios actually used, with enough behavioral fidelity that the agents couldn't tell the difference between the twin and the real API.

By 10 PM, he had messaging and channels solid. The twin could create channels, post messages, thread replies, and return realistic-looking timestamps and message IDs. He tested it against three scenarios. They passed.

By 1 AM, he'd added reactions, file upload stubs, and the user presence API. The presence model was tricky—Slack's real presence detection used a combination of activity signals and explicit status settings, and scenarios that tested notification routing depended on presence being accurate. He built a state machine that tracked simulated user activity and decayed presence over time, the way real Slack did.

By 3 AM, he was deep in Slack's permission model, implementing channel-level posting permissions and workspace-level app scopes. His chai had gone cold twice. He'd reheated it twice. The third time, he just drank it cold.

By 5:30 AM, he ran the full scenario suite against the Slack twin instead of the real API. Forty-one scenarios. Thirty-nine passed. The two failures were in file upload handling—edge cases involving file types the twin didn't recognize. He filed them as known gaps and switched the factory's configuration to use the twin as the primary Slack backend.

When Jay arrived at 8:30, Navan was asleep at his desk, his laptop still open, the Slack twin's health dashboard showing a steady green line.

"Did you sleep here?" Jay asked.

"The Slack twin is done," Navan mumbled into his arm.

"The rate limit thing?"

"We'll never need the real API again."

Jay looked at the dashboard. Forty-one scenarios. Thirty-nine green. Two yellow. Zero calls to the real Slack API.

"Go home, Navan."

"In a minute." He didn't move. Jay put a fresh cup of chai on his desk and left him to it.

Kudos: 371

dtu_stan 2025-08-20

Navan drinking cold chai at 3 AM while implementing a Slack presence state machine is the most relatable thing I've ever read. I feel SEEN.

token_burner 2025-08-21

Jay silently putting fresh chai on his desk and walking away is the factory's love language and I won't hear otherwise.

← Previous Work All Works Next Work →