abhigyanpatwari/GitNexus · error · ValueError

skill fingerprint input exceeds the bounded evidence limit

Error message

skill fingerprint input exceeds the bounded evidence limit

What it means

In the same skill_fingerprint walk, the cumulative byte size of all regular files is capped at MAX_SKILL_FINGERPRINT_BYTES (4 MiB). Exceeding it raises ValueError. The bound keeps fingerprinting fast and the proposer evidence payload bounded, so a single oversized skill cannot dominate a generation.

Source

Thrown at eval/workflow_bench/evolution.py:473

            Path(".claude") / "skills" / skill_name,
            label="skill fingerprint root",
        )

    entries = sorted(
        (path for skill_name in skill_names for path in (worktree / ".claude" / "skills" / skill_name).rglob("*")),
        key=lambda path: path.relative_to(worktree).as_posix(),
    )
    files: list[Path] = []
    total = 0
    for path in entries:
        metadata = path.lstat()
        if stat.S_ISDIR(metadata.st_mode):
            continue
        if stat.S_ISLNK(metadata.st_mode) or not stat.S_ISREG(metadata.st_mode):
            raise ValueError(f"skill fingerprint input must be a regular non-symlink file: {path}")
        total += metadata.st_size
        if total > MAX_SKILL_FINGERPRINT_BYTES:
            raise ValueError("skill fingerprint input exceeds the bounded evidence limit")
        files.append(path)
    return fingerprint_files(worktree, files)


def evaluate_candidate(
    results: dict[str, dict[str, dict[str, Any]]],
    *,
    incumbent_arm: str,
    candidate_arm: str,
    model: str | None,
    metric: str = "cost_usd",
    min_runs: int = 3,
    min_improvement_pct: float = 5.0,
    max_task_regression_pct: float = 20.0,
) -> dict[str, Any]:
    """Deterministically decide whether a prompt candidate is promotable.

    Resolution is lexicographically primary: a cheaper candidate that fails

View on GitHub (pinned to d540b00184)

Solutions

  1. Measure first: `du -sh .claude/skills/<skill>` and `find .claude/skills/<skill> -type f -printf '%s %p\n' | sort -nr | head`.
  2. Move bulk data (fixtures, samples) out of the skills dir into a non-fingerprinted location.
  3. Split an oversized skill, or trim embedded examples to the essentials.

Example fix

# before: skill ships a 6 MiB example corpus inline
.claude/skills/my-skill/examples/large_corpus.jsonl  # 6 MiB

# after: reference it by path and keep only a trimmed sample under the limit
cp examples/large_corpus.jsonl /tmp/assets/
# in the skill: "see /tmp/assets/large_corpus.jsonl"
# keep .claude/skills/my-skill/examples/sample.jsonl under ~100 KiB
Defensive patterns

Strategy: validation

Validate before calling

import stat
from pathlib import Path
from eval.workflow_bench.evolution import MAX_SKILL_FINGERPRINT_BYTES, EVALUATED_ARM_SKILLS

def arm_skill_bytes_within(clone: Path, arm: str) -> bool:
    names = EVALUATED_ARM_SKILLS.get(arm, [])
    total = 0
    for name in names:
        for p in (clone / ".claude" / "skills" / name).rglob("*"):
            m = p.lstat().st_mode
            if not stat.S_ISREG(m) or stat.S_ISLNK(m):
                continue
            total += m  # placeholder; use p.lstat().st_size
    # correct size sum:
    total = sum(p.lstat().st_size for name in names for p in (clone/".claude"/"skills"/name).rglob("*") if stat.S_ISREG(p.lstat().st_mode))
    return total <= MAX_SKILL_FINGERPRINT_BYTES

Prevention

When it happens

Trigger: The arm's evaluated skills together exceed 4 MiB — e.g. large embedded JSON/JSONL examples, vendored grammars, or full file trees accidentally placed under `.claude/skills/`.

Common situations: A skill that bundles sample output, a long corpus, or a vendored library; skills directory used as a general asset store rather than prompt text.

Related errors


AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12). Data as JSON: /api/errors/422929a7bf93c044. Report an issue: GitHub.