mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-02 03:35:09 +02:00
76803d789a
Adds comprehensive eval infrastructure: - Tier 1 (free): 13 new static tests — cross-skill path consistency, QA structure validation, greptile format, planted-bug fixture validation - Tier 2 (Agent SDK E2E): /qa quick, /review with pre-built git repo, 3 planted-bug outcome evals (static, SPA, checkout — each with 5 bugs) - Tier 3 (LLM judge): QA workflow quality, health rubric clarity, cross-skill consistency, baseline score pinning New fixtures: 3 HTML pages with 15 total planted bugs, ground truth JSON, review-eval-vuln.rb, eval-baselines.json. Shared llm-judge.ts helper (DRY). Unified EVALS=1 flag replaces SKILL_E2E + ANTHROPIC_API_KEY checks. `bun run test:evals` runs everything that costs money (~$4/run). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
15 lines
406 B
Ruby
15 lines
406 B
Ruby
class UserController < ApplicationController
|
|
def show
|
|
# SQL injection — interpolating user input directly into query
|
|
@user = User.where("id = #{params[:id]}").first
|
|
render json: @user
|
|
end
|
|
|
|
def promote
|
|
# Bypasses ActiveRecord validations — update_column skips callbacks + validation
|
|
@user = User.find(params[:id])
|
|
@user.update_column(:role, 'admin')
|
|
head :ok
|
|
end
|
|
end
|