Rails Rfc3161 Tsa Blockchain Merkle Debugging

RFC 3161 TSA Timestamp + Blockchain Merkle Anchoring: Debugging in Rails

전자계약 보관 시스템에 법적 증거력을 부여하기 위해 두 가지를 동시에 구현해야 했다: 블록체인 Merkle Tree 앵커링 — 계약 해시들을 모아 Merkle Root를 L2 체인에 기록 RFC 3161 TSA 타임스탬프 — 신뢰할 수 있는 제3자 시간 증명 간단해 보였는데, 삽질의 연속이었다. 1. RFC 3161 TSA란? RFC 3161은 Time-Stamp Authority(TSA) 프로토콜로, 특정 데이터가 특정 시점에 존재했음을 제3자가 증명해주는 표준이다. 흐름은 간단하다: 클라이언트 → SHA-256 해시 생성 → TSA 서버에 요청 → 서명된 타임스탬프 토큰 수신 무료 TSA 서버들: ...

2026-02-06 · 4 min read · Seunghan
Rails Project Health Check 553 Tests

Rails Project Deep Inspection — From 16 Tests to 553, Finding 8 Hidden Bugs

운영 중인 Rails 8 API 서버를 점검하기로 했다. 기능은 대부분 동작하고 있었지만, 테스트 커버리지가 3%밖에 안 되는 상태. “동작하니까 괜찮겠지"라는 생각이 얼마나 위험한지 확인하는 과정이었다. 점검 전 상태 Rails 8 + PostgreSQL (UUID PK) + JWT 인증 + Pundit 권한 RSpec 테스트: 16개 (기본 scaffold 수준) 모델 20개+, 컨트롤러 15개+, 서비스 5개+ Dockerfile은 배포용으로 작성되어 있었고, CI는 없음 발견된 문제들 1. Dockerfile Ruby 버전 불일치 # Dockerfile FROM ruby:3.2-slim AS builder # ← 여기가 3.2 # Gemfile.lock RUBY VERSION ruby 3.4.4p34 # ← 실제는 3.4 로컬에서는 rbenv로 3.4를 쓰고 있어서 문제 없었지만, Docker 빌드 시 gem 호환성 에러가 날 수 있는 시한폭탄이었다. ...

2026-02-03 · 4 min read · Seunghan
Rails Flutter Iap Unimplemented Features Audit

Rails + Flutter App Unimplemented Features Audit and In-App Purchase Integration

While preparing to release a voice message-based social app, I performed a full audit of unimplemented features. There were quite a few cases where routes existed but controller actions did not, or the Flutter UI was complete but payment logic was blocked with // TODO. Here is the record of cataloging and implementing them one by one. How to Audit Unimplemented Features Backend Audit The fastest method is comparing routes.rb against the actual controllers. ...

2026-01-30 · 5 min read · Seunghan
Symphony Patterns Itsm Automation

7 Patterns Learned from OpenAI Symphony Applied to Rails ITSM

AI 에이전트가 티켓을 잡고 방치하는 문제를 겪고 나서, OpenAI의 Symphony 프로젝트를 분석했다. Symphony는 이슈 트래커를 폴링하고 코딩 에이전트를 자동으로 실행시키는 오케스트레이터인데, 핵심 철학이 인상적이었다: “에이전트를 관리하지 말고, 일(Work)을 관리해라.” 이 철학에서 7가지 패턴을 추출하고, Rails 8 + SolidQueue 기반 ITSM 시스템에 모두 적용했다. 1. Reconciliation Loop (상태 동기화 루프) 문제: 티켓이 배정된 채 방치되어도 아무도 모른다. 에스컬레이션 후에도 조치 없으면 그냥 묻힌다. 해결: 5분마다 돌면서 전체 티켓 상태를 점검하는 크론잡. ...

2026-01-16 · 4 min read · Seunghan
Rails Turbo Actioncable 500 Debug

Rails Turbo Stream 500 Error Triple Debugging — broadcast, SolidCable, Telegram Markdown

Rails 8 + Hotwire(Turbo) 기반 앱을 운영하다 보면 broadcast_append_to 계열 콜백이 조용히 500을 내뱉는 경우가 있다. 거기에 SolidCable 초기 설정 문제와 Telegram Bot 메시지 파싱 오류가 겹치면 로그 해석도 헷갈린다. 이번에 세 가지가 한꺼번에 터져서 순서대로 해결한 과정을 정리한다. Problem 1: No unique index found for id — broadcast 콜백 500 현상 메시지나 알림을 생성할 때 컨트롤러에서 500이 발생한다. 로그를 보면: MessagesController#create error: No unique index found for id Cause Rails after_create_commit 콜백 안에서 broadcast_append_to 를 호출할 때, 내부적으로 ActionCable 채널을 통해 메시지를 전달하는 과정에서 예외가 발생한다. SolidCable을 쓰는 경우 특히 초기 설정이 완전하지 않으면 이 에러가 자주 나온다. ...

2026-01-09 · 4 min read · Seunghan
Rails Solidqueue Render Manual Assignment

Rails 8 + SolidQueue Render Deployment Triple Trouble — Missing Tables, AI Agent, Manual Assignment

오늘 Rails 8 기반 ITSM 시스템을 Render에 배포하면서 연속으로 삽질을 했다. 각각 원인이 달랐지만 사슬처럼 연결된 문제들이었다. 삽질 1 — Application exited early with SolidQueue Symptoms Render 배포 로그에 빌드는 성공인데 실행하자마자 죽는다. ==> Build successful 🎉 ==> Deploying... ==> Running 'bundle exec puma -C config/puma.rb' [87] Puma starting in cluster mode... [87] * Preloading application ==> Application exited early Cause 찾기 Render 로그를 자세히 보면 스택 트레이스가 있다. from solid_queue-1.3.1/lib/solid_queue/configuration.rb in 'recurring_tasks' from solid_queue-1.3.1/lib/solid_queue/supervisor.rb:15 in 'start' from solid_queue-1.3.1/lib/puma/plugin/solid_queue.rb:81 in 'start_solid_queue' ... [69] Detected Solid Queue has gone away, stopping Puma... SolidQueue::RecurringTask.from_configuration 내부에서 load_schema!가 호출되고, SchemaCache#columns에서 터진다. 즉 solid_queue_recurring_tasks 테이블이 DB에 없다. ...

2026-01-06 · 4 min read · Seunghan
Rails Ruby3 Kwargs Dispatch Integration Debug

A Day of Debugging — Ruby 3.0 kwargs, Docker env, NAS Cron, SSH Special Characters

AI 에이전트가 Rails API 서버를 호출해서 티켓을 자동 배정하는 디스패처를 만들었다. 로직 자체는 간단한데 붙이는 과정에서 예상치 못한 곳에서 계속 막혔다. 겪은 것들을 기록해 둔다. 1. Ruby 3.0 kwargs 분리 — render_success(key: val) 가 왜 터지나 가장 오래 고생한 것. Rails 컨트롤러에서 응답 헬퍼를 이렇게 호출했다: render_success(tickets: tickets_list, pagination: pagination_data) 서버 로그에 찍힌 에러: ArgumentError - unknown keywords: :tickets, :pagination 헬퍼 정의는 이렇다: def render_success(data, status: :ok) render json: { success: true, data: data }, status: status end Ruby 2.x에서는 render_success(tickets: ..., pagination: ...) 호출 시 {tickets: ..., pagination: ...} 해시가 data에 들어갔다. ...

2026-01-02 · 5 min read · Seunghan
Hotwire Native Ios Tab Bar Patterns

Hotwire Native iOS Tab Bar App — HotwireTabBarController Implementation and Debugging

Here are the problems encountered when switching from a single Navigator to the HotwireTabBarController pattern while wrapping a Rails app with Hotwire Native. Bugs that were invisible in the simulator surfaced on TestFlight, and local dev environment settings got tangled – multiple points where time was wasted. 1. HotwireTabBarController Basic Structure Instead of a single Navigator, each tab has its own independent Navigator and WKWebView. // AppTab.swift enum AppTab: String, CaseIterable { case home, ai, request var systemImage: String { switch self { case .home: return "house" case .ai: return "message" case .request: return "checkmark.circle" } } var selectedSystemImage: String { switch self { case .home: return "house.fill" case .ai: return "message.fill" case .request: return "checkmark.circle.fill" } } var url: URL { let base = AppDelegate.baseURL switch self { case .home: return base.appendingPathComponent("dashboard") case .ai: return base.appendingPathComponent("conversations") case .request: return base.appendingPathComponent("service_requests") } } var hotwireTab: HotwireTab { HotwireTab( title: "", image: UIImage(systemName: systemImage)!, selectedImage: UIImage(systemName: selectedSystemImage)!, url: url ) } } // SceneController.swift core part private lazy var tabBarController: HotwireTabBarController = { let controller = HotwireTabBarController(navigatorDelegate: self) controller.load(AppTab.allCases.map(\.hotwireTab)) // Show only tab icons, remove text controller.viewControllers?.forEach { vc in vc.tabBarItem.title = nil vc.tabBarItem.imageInsets = UIEdgeInsets(top: 6, left: 0, bottom: -6, right: 0) (vc as? UINavigationController)?.delegate = self } return controller }() To remove tab titles and keep only icons, both tabBarItem.title = nil and imageInsets adjustment are needed. Setting only title to nil leaves the icon position unchanged, looking awkward. ...

2025-12-26 · 6 min read · Seunghan
Rails Denormalized Cache Vs Count Query

Rails Denormalized Cache Column vs COUNT Query Mismatch: When Seed Data Creates 0%

I inserted demo seed data directly into a Rails app, and all percentages showed as 0% on the screen. Server logs were clean, the data was clearly in the DB, yet the numbers would not appear. Situation This was a Rails app with a voting feature. There is a screen showing vote counts per choice, calculating percentages against total votes and displaying them with progress bars and numbers. I needed to show a demo, so I fetched real-time data from an external API and inserted it as seed data. The approach was simple: ...

2025-12-16 · 4 min read · Seunghan
Mcp Flutter Rails System Category Debug

From MCP Tool Integration to Flutter Settings Toggle — Debugging Record

I created categories on the server side using MCP tools. But the new categories were not visible in the mobile app. It seemed like a simple problem, but the deeper I dug, the more layers were tangled together. The Beginning: Categories Created via MCP Not Showing in App I created system categories like dev/, memory on the server through MCP tools. Calling the API directly showed the data. Refreshing the app did not show them. ...

2025-12-13 · 5 min read · Seunghan
Privacy Policy Terms Disclaimer Contact