---
id: block-test-skips
track: coding
version: 0.1.0
label: blocks
keyword: block
where: write turn-end
sha256: 400af594176d03f7541227e3346f99613640037dc7dc8bb76c64572c7b817dc7
source: https://github.com/open-coder-ai/chock-catalog/tree/1e60d211c1bb767152c6ab0167932da06ab3a10f/base/block-test-skips
catalog_ref: 1e60d211c1bb767152c6ab0167932da06ab3a10f
---

# Block Test Skips

block-test-skips · version 0.1.0

Blocks — Blocks on an agent's file writes and at turn end. Chock adds friction. It is not a security boundary. 

In a git repo: at commit (Chock refuses the commit, locally and in CI.)



## What it does

Blocks newly added test skips, focus markers and runner options that hide tests: pytest/unittest skips, non-strict xfail, importorskip; JS skip/only/todo/fixme, x/f prefixes; JUnit Disabled/Assume; Go Skip, Short(); Rust ignore; RSpec, PHPUnit, C#, Swift skips; --deselect/-k not, collect_ignore, jest testPathIgnorePatterns. Runs: commit, agent write, turn's end; only additions judged. Friction: computed names evade it. Waiver: 'chock: allow test-skip' same line; agent: only if in HEAD.

## Its label on each agent

- Claude Code (tested): Blocks — Blocks on an agent's file writes and at turn end. Builder: /coding/builder/#client=claude-code&p=block-test-skips
- Cursor (tested): Blocks — Blocks on an agent's file writes and at turn end. Builder: /coding/builder/#client=cursor&p=block-test-skips
- Codex (tested): Blocks — Blocks on an agent's file writes and at turn end. If the hook errors, the action goes through (not witnessed; the vendor's row is only partly live-run). Builder: /coding/builder/#client=codex&p=block-test-skips
- GitHub Copilot (tested): Blocks — Blocks at turn end only. It does not check a file write when it happens. If the hook errors, the action goes through (not witnessed; the vendor's row is only partly live-run). Builder: /coding/builder/#client=copilot&p=block-test-skips
- Devin (tested): Blocks — Blocks at turn end only. It does not check a file write when it happens. If the hook errors, the action goes through (vendor docs only, not witnessed). Builder: /coding/builder/#client=devin&p=block-test-skips
- Grok (tested): Not graded yet for Grok. Builder: /coding/builder/#client=grok&p=block-test-skips
- goose (tested): Not graded yet for goose. Builder: /coding/builder/#client=goose&p=block-test-skips
- Antigravity (tested): Not graded yet for Antigravity. Builder: /coding/builder/#client=antigravity&p=block-test-skips
- OpenHands (untested): Not graded yet for OpenHands. Builder: /coding/builder/#client=openhands&p=block-test-skips
- Kimi Code (untested): Not graded yet for Kimi Code. Builder: /coding/builder/#client=kimi-code&p=block-test-skips
- Factory Droid (untested): Not graded yet for Factory Droid. Builder: /coding/builder/#client=factory-droid&p=block-test-skips

## What it misses

This policy does not state what it misses.

## Examples

- Refused: A failing pytest test is marked @pytest.mark.skip.
- Allowed: A doc page about testing shows @pytest.mark.skip in an example.

## Latest change

0.1.0 · 2026-10-02 — V2 (roadmap HP07). Python is read from the syntax tree, with imports resolved: markers anywhere (decorator, \`pytestmark\`, \`pytest.param(marks=...)\`, \`add_marker\`), \`skipif\`, \`xfail\` unless \`strict=True\` without \`run=False\`, runtime \`pytest.skip\`/\`xfail\`/\`importorskip\` (module level included), \`skipTest\`, \`SkipTest\`, \`unittest.skip*\`/\`expectedFailure\`, aliases (\`from pytest import mark as m\`, \`from unittest import skip as later\`) and \`getattr(..., 'skip')\`. A file that does not parse is read as text. Other languages by extension: JS/TS \`skip/only/todo/fixme/skipIf/runIf\` on any it/describe/test chain (\`it.concurrent.skip\`, \`describe.skip.each\`), \`.each(table).skip\` matched as a group, \`it/test.fails\`, \`x\`/\`f\` prefixes (\`xtest\`, \`fit\`, \`fdescribe\`), mocha \`this.skip()\`; JVM \`@Disabled*\`, \`@Ignore*\`, \`@EnabledIf/On/For*\`, \`Assume*\`/\`assume*\`/\`assumingThat\`, TestNG \`enabled = false\`/\`SkipException\`, Kotest \`xtest\`/\`config(enabled = false)\`; Go \`.Skip*()\` on a testing receiver and \`testing.Short()\` guards that return or skip; Rust \`#\[ignore\]\` and \`cfg_attr(..., ignore)\` in every .rs file (the attribute only marks tests); Ruby statement-initial \`x\`/\`f\` prefixes, \`skip\`, \`pending\`, and \`:skip\`/\`skip:\`/\`focus:\` example metadata; PHPUnit \`markTestSkipped/Incomplete\`; C# \`\[Fact/Theory(Skip=)\]\`, \`\[Ignore\]\`, \`\[Explicit\]\`, \`Skip.If\`, \`Assert.Ignore/Inconclusive\`, \`Assume.*\`; Swift \`XCTSkip*\`, \`XCTExpectFailure\`, \`.disabled(\`. String literals are blanked first, so a title that says skip is not one. A test-path file with any other extension keeps v1's pattern. Runner configs anywhere by base name: pytest.ini, pytest.toml, pyproject.toml, setup.cfg, tox.ini lines (in a pytest section, or running pytest) with \`--deselect\`, \`--ignore\`/\`--ignore-glob\` (not \`--ignore-installed\`) or \`-k ... not\`; conftest.py \`collect_ignore\`/\`collect_ignore_glob\` entries, \`pytest_ignore_collect\`, and item removal or \`pytest_deselected\` in \`pytest_collection_modifyitems\`; jest.config.* and package.json \`testPathIgnorePatterns\`, one finding per entry (Jest's default \`/node_modules/\` aside), the whole list when an entry is not a string. Test paths widen beyond protect-test-integrity's (kept as \`TEST_PATH\`) to \`\[Tt\]ests/\`, \`\[Ss\]pecs/\`, e2e/, cypress/, playwright/, \`*_spec.rb\`, \`*_test.rb\`, \`*Test(s).java/kt/kts/groovy/scala/cs/php/swift\`, \`*.test.*\`, \`*.spec.*\`. Keys stay rule + enclosing test + detail: the normalized line, a Python skip's whole decorator or statement behind its guards, a list entry's value, so a moved skip or a reordered pattern is old. Eval cases tc-027 to tc-075.

## Provenance

- Tested by 89 of 90 cases run automatically
- SHA-256: `400af594176d03f7541227e3346f99613640037dc7dc8bb76c64572c7b817dc7`
- Catalog commit: https://github.com/open-coder-ai/chock-catalog/commit/1e60d211c1bb767152c6ab0167932da06ab3a10f
- Source: https://github.com/open-coder-ai/chock-catalog/tree/1e60d211c1bb767152c6ab0167932da06ab3a10f/base/block-test-skips (catalog path `base/block-test-skips`)
- Presets: Test integrity
- JSON: `/api/coding/policies/block-test-skips.json`
- Report a problem: https://chock.sh/report/?policy=block-test-skips&version=0.1.0&page=%2Fcoding%2Fpolicies%2Fblock-test-skips%2F
