Skip to content

Instantly share code, notes, and snippets.

View jordangarcia's full-sized avatar

Jordan Garcia jordangarcia

View GitHub Profile
@jordangarcia
jordangarcia / import-service-cpu-investigation.md
Created May 11, 2026 20:01
Import service CPU spike investigation (May 9, 2026)

Import Service CPU Spike Investigation (May 9, 2026)

Summary

On May 9, import-prod avg request duration jumped from ~10s to 3,240s (54 minutes), autoscaling kicked in from 2 to 7 tasks, and 500 errors spiked 20x. No code was deployed to the import service. The root cause was a Transloadit outage that exposed the fact that the import service has no enforceable request-level timeout anywhere in the stack.

Agentic import was ruled out — its CPU was ~0.5%, and import-prod request volume was flat across the incident window.

Timeline (May 9 UTC)

@jordangarcia
jordangarcia / README.md
Created April 23, 2026 16:26
Claude Code skill: Graphite stacked PRs workflow

Graphite Stacked PRs Skill for Claude Code

A Claude Code skill that teaches Claude the Graphite CLI workflow for stacked PRs.

Package Structure

~/.claude/skills/graphite/
├── SKILL.md                          # Main skill definition + trigger config
└── references/
@jordangarcia
jordangarcia / slow-ramp-gap-analysis.md
Created April 22, 2026 17:55
Why the slow ramp didn't catch the flux-2-klein outage

Why the slow ramp didn't catch the flux-2-klein outage

The problem

On 2026-04-21, Black Forest Labs' API endpoint api.bfl.ai/v1/flux-2-klein-9b-private started returning 404 Not Found on every request. This has been going on for 24+ hours. Every image generation request that targets flux-2-klein fails immediately (~49ms), the ImageModelFallback catches the error, and the system falls back to flux-1-quick or qwen-image-fast.

The fallback chain is working, so users still get images. But we're making ~300-500 wasted API calls per hour (spiking to 18k+ during peak) to an endpoint that's been dead for over a day. No automated system detected or responded to this.

What we wanted slow ramp to do

@jordangarcia
jordangarcia / pr-18856-review.md
Created April 22, 2026 16:42
PR #18856 review notes: Buddy-E Redux→BuddyAgent migration

PR #18856 Review Notes

Follow-up items

1. saveFn as constructor param

BuddyAgent takes a saveFn callback and wires debounce + flush-chaining inside its constructor:

// BuddyAgent.ts:91,103-121

Unprocessed Card HTML Emitter

What changed

Added a typed EventEmitter to the deck generation pipeline so we can tap into raw card HTML before post-processing (layout formatting, image injection, etc.).

New file: packages/server/src/common/event-emitter.ts

Generic, typesafe EventEmitter<EventPayloads> class. Supports:

  • Typed on/off/emit keyed by an event map
@jordangarcia
jordangarcia / interview-laptop-provisioning.md
Created April 15, 2026 17:47
Interview Laptop Provisioning Plan — Kandji + Git + SOPS

Interview Laptop Provisioning

Problem

Laptops are unreliable for interviews — passwords missing, software not installed, candidate artifacts visible from previous interviews, no clear ownership, interviewers scrambling to use personal machines.

Architecture

Split responsibility between Kandji (IT-managed, slow-changing) and a git repo (eng-managed, fast-changing).

@jordangarcia
jordangarcia / greview
Created April 15, 2026 05:34
greview - PR code review in worktrees with Claude
#!/usr/bin/env bun
const USAGE = `greview - PR code review in worktrees with Claude
Usage:
greview <github-url|graphite-url|pr-number>
Examples:
greview https://github.com/gamma-app/gamma/pull/4521
greview https://app.graphite.com/github/pr/gamma-app/gamma/4521

PR #19026 — Suggested simplification

The polymorphism win (no any casts, cleaner component API) can be achieved without the abstract class hierarchy. Here's the alternative.

Types — plain objects, no classes

Keep the original discriminated union types unchanged:

type BaseQuestion = {
@jordangarcia
jordangarcia / datadog-renewal-2026-overview.html
Last active April 15, 2026 00:12
Datadog Renewal 2026 - Contract Overview & Recommendations
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Datadog Renewal 2026 — Contract Overview & Recommendations</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
@jordangarcia
jordangarcia / body-tag-early-stop-investigation.html
Created April 8, 2026 22:32
GenerateDeckContinuous: Body Tag Early Stop Bug Investigation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GenerateDeckContinuous: Body Tag Early Stop Bug</title>
<style>
:root {
--bg: #0d1117;
--surface: #161b22;