.claude-plugin/skills/git-rebase-over-deletion/SKILL.md
# Skill: git-rebase-over-deletion ## Overview | Field | Value | |-------|-------| | Date | 2026-02-21 | | Issue | N/A (CI fix) | | PR | #882 | | Objective | Fix CI failure caused by git rebase/merge replaying commits in wrong order, resulting in over-deletion of active classes | | Outcome | Success — 2350 tests pass, all pre-commit hooks green | | Category | debugging | ## When to Use Trigger this skill when: - CI `Test` workflow on `main` starts failing after a deprecation-removal commit -
npx skillsauth add homericintelligence/projectscylla .claude-plugin/skills/git-rebase-over-deletionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Field | Value | |-------|-------| | Date | 2026-02-21 | | Issue | N/A (CI fix) | | PR | #882 | | Objective | Fix CI failure caused by git rebase/merge replaying commits in wrong order, resulting in over-deletion of active classes | | Outcome | Success — 2350 tests pass, all pre-commit hooks green | | Category | debugging |
Trigger this skill when:
Test workflow on main starts failing after a deprecation-removal commitImportError for symbols that should exist (not deprecated)git log shows a fix commit followed later by a removal commit — wrong replay orderImportError)Trigger phrases:
This failure pattern has a specific shape:
JudgmentInfoBase + MetricsInfoBase (PR #788, commit 2784fae)BaseRunMetrics (a deprecated class) — but the removal commit adbd49d was authored against a state before the fix, so it also removes the newly added classespre-commit auto-fixes commit follows, cementing the broken stateDiagnostic signal: The broken commit message says "remove deprecated BaseRunMetrics dataclass" but the file also lost JudgmentInfoBase and MetricsInfoBase.
pixi run python -c "from scylla.core.results import JudgmentInfoBase, MetricsInfoBase; print('OK')"
# Expected (broken): ImportError: cannot import name 'JudgmentInfoBase'
# Read scylla/core/results.py — look for:
# - Missing JudgmentInfoBase / MetricsInfoBase classes
# - Stale @dataclass on GradingInfoBase (Pydantic BaseModel)
# - Duplicate field declarations in RunMetricsBase with a __post_init__
# - Unused imports: warnings, dataclasses
Add both classes to scylla/core/results.py, placed after ExecutionInfoBase and before GradingInfoBase:
class JudgmentInfoBase(BaseModel):
"""Base judgment information type for all evaluation results."""
model_config = ConfigDict(frozen=True)
passed: bool = Field(..., description="Whether the run passed evaluation")
impl_rate: float = Field(default=0.0, description="Implementation rate (0.0-1.0)")
class MetricsInfoBase(BaseModel):
"""Base token and cost metrics for result persistence."""
model_config = ConfigDict(frozen=True)
tokens_input: int = Field(..., description="Number of input tokens consumed")
tokens_output: int = Field(..., description="Number of output tokens generated")
cost_usd: float = Field(default=0.0, description="Total cost in USD")
Critical: cost_usd must have default=0.0 — existing tests construct MetricsInfoBase without it.
Critical: impl_rate must have default=0.0 — existing tests construct JudgmentInfoBase without it.
@dataclass decoratorThe removal commit left @dataclass on GradingInfoBase (a Pydantic BaseModel):
# WRONG (stale artifact):
@dataclass
class GradingInfoBase(BaseModel):
# CORRECT:
class GradingInfoBase(BaseModel):
The deleted BaseRunMetrics.__post_init__ and its duplicate field declarations merged into RunMetricsBase during the bad replay. Remove the trailing blob:
# DELETE this entire trailing block from RunMetricsBase:
"""Base metrics shared across run result types.
...
"""
tokens_input: int
tokens_output: int
cost_usd: float
def __post_init__(self) -> None:
"""Emit a DeprecationWarning on instantiation."""
warnings.warn(...)
# DELETE both of these (no longer needed):
import warnings
from dataclasses import dataclass
scylla/core/__init__.pyfrom scylla.core.results import (
ExecutionInfoBase,
GradingInfoBase,
JudgmentInfoBase, # Add
MetricsInfoBase, # Add
RunMetricsBase,
)
__all__ = [
"ExecutionInfoBase",
"GradingInfoBase",
"JudgmentInfoBase", # Add
"MetricsInfoBase", # Add
"RunMetricsBase",
]
Replace the "Legacy dataclasses (deprecated)" block with the hierarchy entries for the restored classes:
JudgmentInfo inheritance hierarchy:
- JudgmentInfoBase (this module) - Base Pydantic model with judgment fields
└── JudgmentInfo (reporting/result.py) - Reporting persistence
MetricsInfo inheritance hierarchy:
- MetricsInfoBase (this module) - Base Pydantic model with token/cost fields
└── MetricsInfo (reporting/result.py) - Reporting persistence
# Quick import check
pixi run python -c "from scylla.core.results import JudgmentInfoBase, MetricsInfoBase; print('OK')"
# Specific test file (36 tests)
pixi run python -m pytest tests/unit/core/test_metrics_judgment.py -v
# Full unit suite
pixi run python -m pytest tests/unit/ --no-cov
# Pre-commit
pre-commit run --files scylla/core/results.py scylla/core/__init__.py
None — the fix was clean and first-try once the root cause was identified from the plan.
The main diagnostic challenge was understanding why the removal commit (adbd49d) over-deleted:
it was authored against a pre-fix state of the file, then replayed after the fix commit via rebase,
effectively reverting the fix. The commit message ("Remove deprecated BaseRunMetrics dataclass") was
misleading because it also silently removed JudgmentInfoBase and MetricsInfoBase.
| File | Change |
|------|--------|
| scylla/core/results.py | Added JudgmentInfoBase, MetricsInfoBase; removed @dataclass from GradingInfoBase; removed duplicate fields + __post_init__ from RunMetricsBase; removed warnings + dataclasses imports |
| scylla/core/__init__.py | Added JudgmentInfoBase, MetricsInfoBase to imports and __all__ |
tests/unit/core/test_metrics_judgment.py — 36 tests, all passing
tests/unit/ — 2350 tests, all passing (excluding pre-existing unrelated failure in test_validation.py)
Pre-commit hooks: all passed (ruff-format, ruff-check, mypy, etc.)
tests/unit/config/test_validation.py fails with ImportError: cannot import name 'extract_model_family'
— this is not caused by this fix and existed before this session.
grep before committing@dataclass decorator on a Pydantic BaseModel is a signal of bad merge — Pydantic models never have @dataclassimport warnings + import dataclasses are canaries — if neither is used, something was deleted that left them behindcost_usd and impl_rate must default to 0.0 — see pydantic-type-consolidation-metrics-judgment skill for the reasoningpydantic-type-consolidation-metrics-judgment — Original creation of JudgmentInfoBase + MetricsInfoBase (#729, PR #788)pydantic-base-class-hierarchy — Adding GradingInfoBase (#796, PR #841)backward-compat-removal — The removal pattern that caused this issue if applied incorrectly (#784, PR #832)adbd49d ("Remove deprecated BaseRunMetrics dataclass")2784faepydantic-type-consolidation-metrics-judgmentdevelopment
# Skill: docs-status-fix ## Overview | Field | Value | |------------|----------------------------------------------------| | Date | 2026-02-19 | | Category | documentation | | Objective | Fix stale "Current Status" in CLAUDE.md | | Issue | #753 | | PR | #810
tools
# Skill: preflight-closing-issues-fix ## Overview | Field | Value | |-------|-------| | Date | 2026-02-21 | | Issue | #802 | | PR | #912 | | Category | tooling | | Objective | Fix `preflight_check.sh` Check 3 false positives caused by free-text PR search matching issue numbers in unrelated PR titles/bodies | | Outcome | Success — 6 bash tests pass, all pre-commit hooks green, PR created with auto-merge | ## When to Use Trigger this skill when: - A preflight/guard script uses `gh pr list --s
tools
# Preflight Check Skill Propagation ## Overview | Field | Value | |-------|-------| | Date | 2026-02-21 | | Issue | #803 | | Objective | Add preflight check to `worktree-create` skill so developers bypassing `gh-implement-issue` still run the 6-check safety gate | | Outcome | Success — PR #917 created, auto-merge enabled | | Files Changed | `tests/claude-code/shared/skills/worktree/worktree-create/SKILL.md` | ## When to Use Use this pattern when: - A safety/quality gate exists in one entry-
tools
# Orphan Config Detection ## Overview | Field | Value | |------------|-----------------------------------------------------------------| | Date | 2026-02-20 | | Issue | #777 | | PR | #824 | | Objective | Warn when a `config/models/*.yaml` file