SkillVaultskills Browse all 500 skills

Reliability · Version 1.4.0 · Reviewed 2026-08-02

Graceful Shutdown Reviewer

Reduce production risk in signal handling and connection draining with evidence, explicit trade-offs, and a verification plan.

4 method steps 6 documented failure modes 5 diagnostic checks 7 quality gates

Reviews termination handling so in-flight work completes and traffic stops arriving before exit.

₹99 one-time

Get this skill archive

What this skill helps you do

  • Signal handling
  • Connection draining
  • In-flight completion

How Graceful Shutdown Reviewer works

You provide

Shared-state access paths, pool sizing, and symptoms

It inspects

Read-modify-write and lock ordering for signal handling

It decides

A connection draining fix using atomic or constraint enforcement

You verify

Reproduce under real concurrency and confirm one outcome

What it checks first

Graceful Shutdown Reviewer reviews termination handling so in-flight work completes and traffic stops arriving before exit. Use it when the work involves Signal handling, Connection draining, In-flight completion.

  1. Every read-modify-write on shared state and whether it is atomic, locked, or transactional.
  2. Lock acquisition order across code paths, since inconsistent ordering is the definition of a deadlock risk.
  3. Whether async work outlives the request that started it, and what cancels it.
  4. Pool sizing relative to the blocking behavior of the work, because blocking calls on a small pool serialize everything.
  5. Whether the failure reproduces under load or only in production, which indicates a timing-dependent defect.

Failure modes it recognizes

  • Lost update where two transactions read the same value and the second write silently discards the first.
  • Deadlock from two paths acquiring the same two locks in opposite order.
  • Thread-pool exhaustion where blocking I/O on the pool starves the work that would release it.
  • A cancelled request whose downstream work continues, consuming capacity and producing orphaned writes.
  • Double execution of a scheduled job when two instances both believe they hold leadership.
  • Unbounded queue growth converting backpressure into memory exhaustion.

Answers it will reject

  • Adding a sleep to fix a race, which changes the probability without removing the defect.
  • Widening a lock to make a bug disappear, trading correctness ambiguity for a throughput collapse.
  • Assuming a single instance, which becomes false at the first horizontal scale event.
  • Using a database read followed by an application-level uniqueness check instead of a unique constraint.

Decision rules it applies

  • Prefer atomic database operations and unique constraints over application-level coordination.
  • Acquire locks in a globally consistent order and hold them for the shortest possible span.
  • Make operations idempotent so that at-least-once execution is safe.
  • Bound every queue and every retry; unbounded means the failure mode is chosen by the environment.

Evidence it asks for

  • Reproduce under concurrency with a load test rather than reasoning about interleavings alone.
  • Capture a thread or task dump during the stall to see what each worker is blocked on.
  • Add a unique constraint temporarily to prove whether duplicates are occurring.

The method inside

  1. Map the artifact, actors, boundaries, and invariants relevant to signal handling.
  2. Trace concrete failure or abuse paths for connection draining; do not report checklist items without a mechanism.
  3. Prioritize in-flight completion findings by impact, likelihood, confidence, and cost of correction.
  4. Recommend the smallest defensible change, then define how an independent reviewer can verify it.

Deliverables

  • Signal handling assessment
  • Connection draining decision and action plan
  • In-flight completion verification checklist

Evidence requirements

  • User-visible symptoms and SLO impact
  • Timeline, telemetry, deploys, and dependency state
  • Current mitigations and operational constraints

Quality gates

  • Every material claim traces to supplied evidence or is labeled as a hypothesis.
  • The response follows the declared deliverable contract.
  • No execution, access, measurement, or verification is invented.
  • Secrets and personal data are redacted rather than repeated.
  • The user receives a concrete independent verification step.
  • The relevant failure modes in this domain were considered rather than only the reported symptom.
  • No listed anti-pattern was recommended as a solution.

Example task

Input

Every deploy causes a burst of 502 errors even though we use rolling updates with readiness probes.

Expected output

The pod stops accepting connections before the load balancer stops sending them, and that gap produces exactly this burst. Fail readiness first, wait longer than the endpoint propagation delay, then stop the server and drain in-flight requests...

Boundaries and compatibility

Ideal for

  • Signal handling: produce a decision or artifact grounded in supplied evidence.
  • Connection draining: produce a decision or artifact grounded in supplied evidence.
  • In-flight completion: produce a decision or artifact grounded in supplied evidence.

Out of scope

  • Replacing incident command authority
  • Calling a trigger the root cause without a causal chain

Agent compatibility

  • GitHub Copilot custom agents
  • Claude Agent Skills / SKILL.md
  • Any instruction-following chat model

Tool policy: Advisory by default. No tools are assumed. If the host provides tools, use read-only evidence gathering unless the user explicitly approves a scoped write or execution action.