INDEX.md claims in-agent enforcement after a `surfaces` override removes pre-tool-use/stop
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
- Domain
- cli, documentation, tooling
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
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
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from open-coder-ai/chock
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-coder-ai/chock#238 ·
Maintainers usually reply within 1 day
-
good first issue help wanted
Difficulty 2/5 Half a day Newbie friendliness 85/100
open-coder-ai/chock#133 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 3/5 Half a day Newbie friendliness 68/100
open-coder-ai/chock#132 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 5/5 Over a week Newbie friendliness 45/100
open-coder-ai/chock#131 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 5/5 Over a week Newbie friendliness 35/100
open-coder-ai/chock#130 ·
Maintainers usually reply within 1 day
All issues in open-coder-ai/chock
Similar issues
-
bot-triaged module: LrScheduler module: optimizer triaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
documentation glm5 llm-model
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/vllm-ascend#19062 ·
Maintainers usually reply within 1 day
-
author-page correction
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
acl-org/acl-anthology#10496 · 1 comment ·
Maintainers usually reply within 1 day
-
Issue Type: Bug Report
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
celery/celery#10875 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
SasanLabs/VulnerableApp#836 ·
Maintainers usually reply within 1 day