<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Shipeasy]]></title><description><![CDATA[Shipeasy]]></description><link>https://shipeasy.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>Shipeasy</title><link>https://shipeasy.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sun, 30 Aug 2026 20:15:03 GMT</lastBuildDate><atom:link href="https://shipeasy.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Ops queue for agents — turning every failure into a fixable ticket]]></title><description><![CDATA[At Shipeasy, every production signal that matters becomes a ticket that an agent can act on — no human triage in between.
Not a log line. Not a Slack message that scrolls past. A first-class work item]]></description><link>https://shipeasy.hashnode.dev/ops-queue-for-agents-turning-every-failure-into-a-fixable-ticket</link><guid isPermaLink="true">https://shipeasy.hashnode.dev/ops-queue-for-agents-turning-every-failure-into-a-fixable-ticket</guid><category><![CDATA[Rails]]></category><category><![CDATA[Ruby]]></category><category><![CDATA[Devops]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[Shipeasy]]></dc:creator><pubDate>Thu, 20 Aug 2026 01:20:49 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a865548a1e0f4e59f9015e5/c838158e-cb26-42c7-b69a-7da277c4d3f2.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>At Shipeasy, every production signal that matters becomes a ticket that an agent can act on — no human triage in between.</p>
<p>Not a log line. Not a Slack message that scrolls past. A first-class work item in an ops queue that fans out to GitHub issue and Slack and is eligible for auto-fix.</p>
<p><strong>The problem — failures had no queue</strong></p>
<p>Builds broke, webhooks failed, checks flaked. The signal existed, but it had nowhere to go that an agent could pick up. Someone had to notice it in a console, copy the logs, write a bug, tag it, and hope the right person saw it hours later.</p>
<p>The cost wasn't the failure. It was the queue that didn't exist.</p>
<p><strong>The fix — one queue for everything that can fail</strong></p>
<p>Every external event hits one shape: a ticket. Same fields, same routing, same agent lifecycle.</p>
<p>A Cloud Build failure. A flaky E2E run. A customer report from the widget. A cron that missed its window. All of them land as <code>type: "bug"</code> via the admin API — title, repro steps, actual vs expected, priority, tags — and then the platform does the same thing every time: opens a GitHub issue, pings the right Slack channel, marks it eligible for an AI agent to investigate and open a PR.</p>
<p>Build on <code>main</code> breaks → ticket → agent PR is just one instance of the pattern. The pattern is what matters.</p>
<p><strong>Design — boring on purpose</strong></p>
<ul>
<li><p>Source → already on a bus (Pub/Sub, webhook, schedule) — no new infra</p>
</li>
<li><p>Push or POST to <code>/webhooks/&lt;source&gt;</code> — verify token, decode, dedupe by delivery ID</p>
</li>
<li><p>Client → <code>POST /api/admin/ops</code> with <code>type: "bug"</code> — title, stepsToReproduce, actualResult, expectedResult, priority, tags</p>
</li>
<li><p>Shipeasy ops queue → fans out to GitHub issue + Slack → agent investigates → PR</p>
</li>
</ul>
<p>What makes this cheap is what we didn't build: we use the delivery mechanism the cloud already provides and the service we already run. The glue is forty lines.</p>
<p><strong>Implementation — one thin client</strong></p>
<p>Same shape every time:</p>
<pre><code class="language-ruby">ShipeasyOps::Client.new.file_bug(
  title:               "Cloud Build FAILURE on #{branch} — #{sha}",
  steps_to_reproduce:  "Trigger \"#{trigger}\" reported FAILURE.",
  actual_result:       "Logs: #{log_url}\n\n#{failure_detail}",
  expected_result:     "Build completes and deploys.",
  priority:            "high",
  tags:                %w[cloud-build ci]
)
</code></pre>
<p>The method is a typed wrapper over one HTTP call:</p>
<pre><code class="language-ruby">def file_bug(title:, steps_to_reproduce:, actual_result:, expected_result:, priority:, tags:)
  post("/api/admin/ops", {
    type:             "bug",
    title:            title,
    stepsToReproduce: steps_to_reproduce,
    actualResult:     actual_result,
    expectedResult:   expected_result,
    priority:         priority,
    tags:             tags,
  })
end

def post(path, body)
  req = Net::HTTP::Post.new(URI("#{BASE_URL}#{path}"))
  req["Authorization"] = "Bearer #{@admin_key}"
  req["X-Project-Id"]  = @project_id
  req["Content-Type"]  = "application/json"
  req.body = body.compact.to_json
  res = Net::HTTP.start(req.uri.host, req.uri.port, use_ssl: true) { |h| h.request(req) }
  JSON.parse(res.body)
end
</code></pre>
<p>Dedupe at the edge (write-if-not-exists on the delivery ID) so at-least-once delivery doesn't create duplicate tickets.</p>
<p><strong>Ways this could have gone</strong></p>
<ul>
<li><p>Log the error via standard flag evaluation: good for exceptions, not a tracked work item with priority and repro.</p>
</li>
<li><p>Public ticket path for in-app feedback: zero-auth, built for "report a problem" widgets — too heavy for an internal signal.</p>
</li>
<li><p><strong>File a proper bug via admin API (chosen):</strong> real work item, prioritized, tagged, routed, agent-ready.</p>
</li>
</ul>
<p><strong>Payoff — from red to green without paging anyone</strong></p>
<p>A typical failure now travels from a bus to a PR without waking anyone. The team sees a PR that already exists and merges it. The person who merges it doesn't need to know the failure mode.</p>
<p>The rule we use before building new plumbing: if the event is already on a bus you can subscribe to, and something you already run can catch it, file a ticket and let the ops queue do the rest.</p>
<hr />
<p>Originally published on dev.to at <a href="https://dev.to/shipeasy/ops-queue-for-agents-turning-every-failure-into-a-fixable-ticket-1jno">https://dev.to/shipeasy/ops-queue-for-agents-turning-every-failure-into-a-fixable-ticket-1jno</a></p>
<p>Built on Shipeasy — ops queue that delegates to agents. Supporting infra: flags, kill switches, dynamic configs. Core loop lives in the queue, not the flag.</p>
<p>Free tier, no card required; Team at $49/seat/mo removes limits.</p>
<p>→ <a href="https://shipeasy.ai">shipeasy.ai</a> · → <a href="https://docs.shipeasy.ai">docs.shipeasy.ai</a> · → <a href="https://github.com/shipeasy-ai/shipeasy">github.com/shipeasy-ai/shipeasy</a></p>
]]></content:encoded></item><item><title><![CDATA[When a build breaks, the bug fixes itself]]></title><description><![CDATA[We stopped babysitting CI failures. Now a red build files its own bug — and an AI agent picks it up and ships the fix.
PROBLEM — A failed build told no one
Our CI would fail, and then… nothing would h]]></description><link>https://shipeasy.hashnode.dev/when-a-build-breaks-the-bug-fixes-itself</link><guid isPermaLink="true">https://shipeasy.hashnode.dev/when-a-build-breaks-the-bug-fixes-itself</guid><category><![CDATA[Rails]]></category><category><![CDATA[Ruby]]></category><category><![CDATA[Devops]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[Shipeasy]]></dc:creator><pubDate>Thu, 20 Aug 2026 01:19:09 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a865548a1e0f4e59f9015e5/656a028c-1a65-410e-af6c-2c233398839e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We stopped babysitting CI failures. Now a red build files its own bug — and an AI agent picks it up and ships the fix.</p>
<p><strong>PROBLEM — A failed build told no one</strong></p>
<p>Our CI would fail, and then… nothing would happen. The failure sat quietly in a build console that nobody keeps open. Eventually someone would notice a change hadn't gone out, go digging, and realize the build had been red for hours.</p>
<p>And noticing was the easy part. Actually resolving it meant a whole code session: pull up the logs, find the failing step, reproduce it, and have an engineer sit down and personally shepherd the fix from broken to green. Every red build cost real human hours — plus the invisible tax of the delay before anyone even knew there was a problem.</p>
<p>The true cost of a broken build was never the build. It was a person having to find it, understand it, and hand-fix it.</p>
<p><strong>SOLUTION — The failure files its own ticket — and an agent takes it from there</strong></p>
<p>Now nobody watches a console and nobody triages. The moment a build fails, it automatically files a bug in Shipeasy — our ops platform — as a real, prioritized ticket with the failing step, the branch, and a link to the logs already attached.</p>
<p>From there it leaves human hands entirely. Shipeasy hands the bug to an AI agent, which investigates the failure, writes the patch, and opens a pull request against it. The loop that used to be "human notices → human reads logs → human fixes" is now "build fails → bug appears → agent fixes." The engineer's job shrank to reviewing a PR that already exists.</p>
<p><strong>DESIGN — How the whole thing hangs together</strong></p>
<p>The pipeline is deliberately boring — every hop is either something the cloud already does for free, or a service we already run:</p>
<ul>
<li><p>Cloud Build — build fails: a red deploy on <code>main</code> publishes automatically</p>
</li>
<li><p>Pub/Sub topic → push subscription: filters to FAILURE · TIMEOUT · INTERNAL_ERROR</p>
</li>
<li><p>HTTPS POST /webhooks/cloud_build</p>
</li>
<li><p>Webhooks::CloudBuildController: verify token · decode · dedupe by build id</p>
</li>
<li><p>ShipeasyOps::Client#file_bug: POST /api/admin/ops (type: "bug")</p>
</li>
<li><p>Shipeasy ops queue — bug filed: fans out to GitHub issue + Slack</p>
</li>
<li><p>✦ AI agent investigates → opens a PR</p>
</li>
</ul>
<p>What makes this cheap is the shape of it: we added no new infrastructure. The event was already on a bus (Pub/Sub). We already ran a service that could receive it. All we wrote was the glue in the middle.</p>
<p><strong>IMPLEMENTATION — How it worked out in Rails</strong></p>
<p>The build side needed no changes at all — Cloud Build publishes to the cloud-builds topic on its own. So the work was three small pieces: one gcloud command, one route, and one controller.</p>
<ol>
<li>Point a filtered push subscription at the app. Pub/Sub does the delivery; the filter means the endpoint only ever wakes for a real failure.</li>
</ol>
<pre><code class="language-bash">gcloud pubsub subscriptions create cloud-build-failures \
  --topic=cloud-builds \
  --push-endpoint="https://our-app/webhooks/cloud_build?token=$SECRET" \
  --message-filter='attributes.status = "FAILURE"
    OR attributes.status = "INTERNAL_ERROR"
    OR attributes.status = "TIMEOUT"'
</code></pre>
<ol>
<li>Add the route — it slots into the same webhook surface as our other providers.</li>
</ol>
<pre><code class="language-ruby">scope "/webhooks", module: :webhooks do
  post "cloud_build", to: "cloud_build#create"
end
</code></pre>
<ol>
<li>The controller. It authenticates the push, decodes the build payload (it arrives base64-encoded in message.data), throws away anything that isn't a real failure, dedupes — Pub/Sub delivers at-least-once, so a redelivery must not file a second bug — and files the ticket.</li>
</ol>
<pre><code class="language-ruby">class Webhooks::CloudBuildController &lt; Webhooks::ApplicationController
  before_action :verify_token

  FAILURE_STATUSES = %w[FAILURE INTERNAL_ERROR TIMEOUT]

  # POST /webhooks/cloud_build
  def create
    message = params[:message]
    return head(:bad_request) if message.blank?

    build  = decode_build_json(message[:data])   # base64 JSON → Hash
    status = (message.dig(:attributes, :status) || build["status"]).to_s
    return head(:ok) unless FAILURE_STATUSES.include?(status)

    return head(:ok) unless first_delivery?(build["id"])   # dedupe

    file_bug_for(build, status)
    head :ok
  end

  private

  # Compare-and-set on the build id: the first delivery wins, redeliveries no-op.
  def first_delivery?(build_id)
    Rails.cache.write("cloud_build:filed:#{build_id}", true,
                      unless_exist: true, expires_in: 7.days)
  end

  def verify_token
    expected = App::Secrets.cloud_build_webhook_secret
    provided = params[:token] || request.headers["X-CloudBuild-Token"]
    head :unauthorized unless
      ActiveSupport::SecurityUtils.secure_compare(provided.to_s, expected.to_s)
  end
end
</code></pre>
<p>The one line that files the ticket. The controller hands the build context to a thin Shipeasy client. This is the exact call — it turns a red build into a first-class bug that opens a GitHub issue, pings Slack, and becomes eligible for the auto-fix agent:</p>
<pre><code class="language-ruby">def file_bug_for(build, status)
    subs = build["substitutions"] || {}

    ShipeasyOps::Client.new.file_bug(
      title:              "Cloud Build #{status.downcase} on #{subs["BRANCH_NAME"]} — #{subs["SHORT_SHA"]}",
      steps_to_reproduce: "Cloud Build trigger \"#{subs["TRIGGER_NAME"]}\" reported #{status}.",
      actual_result:      "Logs: #{build["logUrl"]}\n\n#{build.dig("failureInfo", "detail")}",
      expected_result:    "The build completes and deploys.",
      priority:           "high",
      tags:               %w[cloud-build ci],
    )
  end
</code></pre>
<p>And the client itself is just a typed wrapper over one HTTP call — no new gems, no framework. This is all it takes to create a bug on the platform:</p>
<pre><code class="language-ruby">def file_bug(title:, steps_to_reproduce:, actual_result:, expected_result:, priority:, tags:)
    post("/api/admin/ops", {
      type:             "bug",
      title:            title,
      stepsToReproduce: steps_to_reproduce,
      actualResult:     actual_result,
      expectedResult:   expected_result,
      priority:         priority,
      tags:             tags,
    })
  end

  def post(path, body)
    req = Net::HTTP::Post.new(URI("#{BASE_URL}#{path}"))
    req["Authorization"] = "Bearer #{@admin_key}"   # sdk_admin_… key
    req["X-Project-Id"]  = @project_id
    req["Content-Type"]  = "application/json"
    req.body = body.compact.to_json

    res = Net::HTTP.start(req.uri.host, req.uri.port, use_ssl: true) { |h| h.request(req) }
    JSON.parse(res.body)
  end
</code></pre>
<p>That's the whole integration. The failure travels from Cloud Build to a filed, prioritized bug through two managed hops and about forty lines of Ruby — and the moment it lands, it's the platform's problem, not a person's.</p>
<p><strong>SHIPEASY — One problem, several ways to solve it</strong></p>
<ul>
<li><p>Report it as an error via see(): Dead simple and already everywhere in our code — but it produces an auto-filed error, not a first-class bug with repro steps and priority. Great for exceptions; not quite the tracked work item we wanted.</p>
</li>
<li><p>Public feedback ticket: The zero-auth path meant for in-app "report a problem" widgets. Perfect for user feedback, heavier than we needed for an internal signal.</p>
</li>
<li><p><strong>File a real bug via the admin API (chosen):</strong> A proper bug — title, repro, priority, tags — that immediately opens a GitHub issue, pings Slack, and is eligible for the auto-fix agent. Exactly the lifecycle a broken build deserves.</p>
</li>
</ul>
<p><strong>THE PAYOFF — The last red build nobody had to fix</strong></p>
<p>A build died with <code>FATAL ERROR: Reached heap limit — JavaScript heap out of memory</code>. The bundle outgrew its memory ceiling. The agent recognized the OOM pattern and opened a PR with the entire fix:</p>
<pre><code class="language-diff">- NODE_OPTIONS="--max-old-space-size=4096"
+ NODE_OPTIONS="--max-old-space-size=8192"
</code></pre>
<p>A teammate who doesn't write backend merged it. The person who "fixed" it never had to know what a heap limit is.</p>
<p>The failure notices itself, files itself, fixes itself, and asks a human for nothing more than a nod.</p>
<p>Before standing up new infrastructure to react to an event, check whether the event is already on a bus you can subscribe to — and whether something you already run can catch it.</p>
<hr />
<p>Originally published on dev.to at <a href="https://dev.to/shipeasy/when-a-build-breaks-the-bug-fixes-itself-3nmm">https://dev.to/shipeasy/when-a-build-breaks-the-bug-fixes-itself-3nmm</a></p>
<p>The ops side of this runs on Shipeasy — the ticket, the agent, the rollout. Core product is the ops queue that delegates to agents. Free tier, no card required; Team at $49/seat/mo removes limits.</p>
<p>→ <a href="https://shipeasy.ai">shipeasy.ai</a> · → <a href="https://docs.shipeasy.ai/sdks/ruby">docs.shipeasy.ai/sdks/ruby</a> · → <a href="https://github.com/shipeasy-ai/shipeasy">github.com/shipeasy-ai/shipeasy</a></p>
]]></content:encoded></item></channel></rss>