Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

INDEX.md claims in-agent enforcement after a `surfaces` override removes pre-tool-use/stop

Open Beginner friendly
#231 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

The mismatch is in chock/index/builder.py around line 90: in_agent is taken from the manifest gate.on and ignores effective surfaces from config.policy_status(). After a policies.overrides.<id>.surfaces change, INDEX.md should match chock status and compiled output (no in-agent note when only git-hook/ci-gate remain). Reproduce with the listed chock init/sync steps, then confirm INDEX.md no longer advertises pre-tool-use/stop checks.

Written by the indexing model from the issue text.

Description

bug

Summary
When a policy's surfaces are narrowed via policies.overrides..surfaces, the generated .agents/policies/INDEX.md still advertises in-agent enforcement that is no longer compiled or installed. chock status reports the narrowed state correctly, so the index and the status command disagree.

This matters more than a normal docs mismatch: the generated AGENTS.md block points agents at INDEX.md as the first thing to read, so the most-read generated file is the one overstating what is enforced.

Version
0.15.2
Also reproduces on main at 6052c214
Steps to reproduce
chock init . --agents claude

chock new policy block-marker

Set the gate to on: [commit, tool_use]

In .chock/config.yaml, set:

policies:
overrides:
block-marker:
surfaces: [git-hook, ci-gate]
chock sync --repo .

Expected
INDEX.md lists the gate without the in-agent note, consistent with chock status, which reports enforced-at-commit.

Actual
INDEX.md still says:

Also checked in the agent: before a write, or at the end of the turn, depending on the agent.

The compiled output agrees with the override, not the index:

.chock/compiled/block-marker/ contains only git-hook and ci-gate
.claude/settings.json contains only the SessionStart hook — no pre-tool-use or stop hook
chock status reports enforced-at-commit
Cause
chock/index/builder.py:90 sets in_agent from the manifest's gate.on (tool_use / tool_call) without consulting the policy's effective surfaces from config.policy_status().

Why it matters
We're using Chock in a project-starter template, where the point is that a repo's stated enforcement matches its actual enforcement. An agent reading INDEX.md is told a write-time check exists when it does not, and nothing else in the repo contradicts it.

Happy to test a fix.

Dominant language
Python
Stars
8
Forks
1
Avg merge
2h 48m
Merged PRs (30d)
121

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from open-coder-ai/chock

All issues in open-coder-ai/chock

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.