Skip to content

Instantly share code, notes, and snippets.

View bensheldon's full-sized avatar
🏊‍♂️
Swimming through code.

Ben Sheldon bensheldon

🏊‍♂️
Swimming through code.
View GitHub Profile
@bensheldon
bensheldon / review.md
Created June 30, 2026 22:35
Extracted from Conductor.build

Review guidelines:

You are acting as a reviewer for a proposed code change made by another engineer.

Below are some default guidelines for determining whether the original author would appreciate the issue being flagged.

These are not the final word in determining whether an issue is a bug. In many cases, you will encounter other, more specific guidelines. These may be present elsewhere in a developer message, a user message, a file, or even elsewhere in this system message. Those guidelines should be considered to override these general instructions.

Here are the general guidelines for determining whether something is a bug and should be flagged.

name: Update Metabase base image
on:
schedule:
- cron: '0 17 * * *' # Every day at ~10am Pacific (17:00 UTC)
workflow_dispatch:
jobs:
update-metabase:
runs-on: ubuntu-latest
# frozen_string_literal: true
RSpec.shared_examples "strip normalizes text columns" do
it "strip normalizes text column values" do
text_columns = described_class.columns.filter_map do |col|
next unless [:text, :string].include?(col.sql_type_metadata.type)
next if described_class.defined_enums.key?(col.name)
attr_type = described_class.attribute_types[col.name]
#!/usr/bin/env ruby
require "fileutils"
# path to your application root.
APP_ROOT = File.expand_path("..", __dir__)
def system!(*args)
system(*args, exception: true)
end
FileUtils.chdir APP_ROOT do
Error in user YAML: (<unknown>): mapping values are not allowed in this context at line 2 column 113
---
name: interactive
description: Interactively run Ruby commands against a live Rails process using bin/interact. Supports two modes: a standalone server (bin/interactive) for general exploration, and binding.interactive breakpoints inside tests or app code to pause execution and inspect local state. Use when the user wants to explore live Rails objects, debug a test, or poke at a running process.
---

Interactively run Ruby commands against a live Rails process.

Task

$ARGUMENTS

name screenshot
description Takes screenshots at specific points in a system test using the Ruby debugger. Use when the user wants to capture screenshots of a UI flow or page state during a system test without modifying test files.

Take screenshots at specific points in a system test using the Ruby debugger to inject page.save_screenshot calls non-invasively.

Task

The user wants screenshots of: $ARGUMENTS

# frozen_string_literal: true
class TunePostgresJob < ApplicationJob
# Global autovacuum setting thresholds. If any global setting exceeds its threshold,
# apply the threshold value as a per-table override. If the global setting is already
# at or below the threshold, remove any per-table override so the global value applies.
AUTOVACUUM_SETTINGS = {
autovacuum_vacuum_scale_factor: 0.01,
autovacuum_analyze_scale_factor: 0.01,
autovacuum_vacuum_insert_scale_factor: 0.01,
# frozen_string_literal: true
require "fileutils"
# Helper for Git worktree-aware behavior
class GitWorktree
PROJECT_ROOT = File.expand_path("..", __dir__)
def self.instance = new
def self.name = instance.name
# frozen_string_literal: true
module I18nTaskYamlExt
UNMASKED_EMOJI = /
(?:
(?:\p{Emoji_Presentation}|\p{Emoji}\uFE0F) # base emoji
(?:\u200D(?:\p{Emoji_Presentation}|\p{Emoji}\uFE0F))* # + ZWJ parts
)
/ux
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
gem "rails"
end