bisect-regression

A guided Git bisect workflow for finding the commit that introduced a Test262 regression. Test262 is a JavaScript language test suite.

In plain words
What is it for?
Use it to compare good and bad test results, run automated checks during git bisect, and identify the regression-causing commit.
Why use it?
It narrows down when a test failure appeared instead of requiring you to inspect every commit manually.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/loopdive/js2/bisect-regression
Any agent
npx skills add loopdive/js2 --skill bisect-regression
Clone the repo
git clone --depth 1 https://github.com/loopdive/js2

Made for: Claude Code, Codex.

Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 833 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00023 $0.00833
Opus 5 $0.00012 $0.00417
Sonnet 5 $0.00005 $0.00167
Haiku 4.5 $0.00002 $0.00083

Measured 2d ago against content hash abaa56d041bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bisect-regression scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/bisect-regression/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bisect Regression

Find which commit introduced a regression using git bisect with an automated test script.

Prerequisites

  • Two archived test262 JSONL files: one "good" (higher pass count) and one "bad" (current/lower)
  • Or: a known good commit hash and the current HEAD

Step 1: Identify the regression

# Compare current vs archived results
python3 -c "
import json, os

current = {}
with open('benchmarks/results/test262-results.jsonl') as f:
    for line in f:
        r = json.loads(line)
        current[r['file']] = r['status']

# Find archived files
archives = sorted([f for f in os.listdir('benchmarks/results')
                   if f.startswith('test262-results-') and f.endswith('.jsonl')])
print('Available archives:', archives)

# Compare with most recent archive
if archives:
    prev = {}
    with open(f'benchmarks/results/{archives[-1]}') as f:
        for line in f:
            r = json.loads(line)
            prev[r['file']] = r['status']

    regressions = [t for t in prev if prev[t] == 'pass' and current.get(t) != 'pass']
    fixes = [t for t in current if current[t] == 'pass' and prev.get(t) != 'pass']
    print(f'Regressions: {len(regressions)}, Fixes: {len(fixes)}')

    # Pick a sample regression test for bisecting
    if regressions:
        print(f'Sample test for bisect: {regressions[0]}')
"

Step 2: Run git bisect with vitest filter

GOOD="<commit-hash-where-test-passed>"  # e.g., the baseline commit
BAD="HEAD"

git bisect start
git bisect bad $BAD
git bisect good $GOOD

# vitest exits 0 on pass, 1 on fail — perfect for bisect
git bisect run npx vitest run tests/test262-vitest.test.ts -t "<test-name-pattern>"

Example with a specific test file:

git bisect run npx vitest run tests/test262-vitest.test.ts -t "S7.9.2_A1_T6"

This binary-searches through commits (~7 steps for 90 commits) and reports the first bad commit.

Step 3: Analyze the result

# git bisect will print: "<hash> is the first bad commit"
git show <hash> --stat
git show <hash>

Read the full file on GitHub · 108 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 108 lines · 23 tokens per session scan A abaa56d041bb

Subscribe to this mod's changes

bisect-regression is a skill published in the GitHub repository loopdive/js2 (59 stars, last pushed 2d ago), licensed Apache-2.0. It adds 23 tokens to every session and 833 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.