typos hook has no per-repo path exclusion, so preserved data files need word-level opt-outs #969

Closed
opened 2026-08-07 05:49:10 +00:00 by coilyco-ops · 1 comment
Member

Observed

.typos.toml [files] extend-exclude has no effect under pre-commit. The hook passes explicit file paths, and typos applies path exclusions during directory traversal rather than to paths given as arguments. Verified in agent-compose: excluding evaluations/, evaluations/**, and *.json all left the same file failing, while [default.extend-words] in the same file took effect immediately.

This repo's own .typos.toml lists *.json and *.lock under extend-exclude. Those entries are likely inert for the same reason, and pass only because no flagged word happens to appear in them.

Why it matters

agent-compose commits preserved raw model responses as evaluation evidence. A spelling correction inside a preserved answer edits the evidence, so those files must be excluded rather than fixed. With no working path exclusion, the only lever is accepting individual words repo-wide, which weakens the check for genuine prose and grows with every new evidence file.

Current state there is two accepted words (mis, unparseable), both appearing only inside preserved answers.

Suggested

The managed block in scripts/apply-agentic-os-hooks.py already parameterizes exclude: for shellcheck. The same treatment for typos, sourced from a per-repo [tool.agentic-os.typos] excludes key the way other opt-outs live in pyproject.toml, would let a repo exclude preserved-data paths at the pre-commit layer where the exclusion actually applies.

Worth confirming whether this repo's existing extend-exclude entries should move at the same time, so the config does not appear to protect files it does not.

Boundary

Filed as a factual record by the AI Engineer seat from observed behavior while landing coilyco-flight-deck/agent-compose#240. The hook catalog and its rollout belong to this repo's owners.

## Observed `.typos.toml` `[files] extend-exclude` has no effect under pre-commit. The hook passes explicit file paths, and `typos` applies path exclusions during directory traversal rather than to paths given as arguments. Verified in agent-compose: excluding `evaluations/`, `evaluations/**`, and `*.json` all left the same file failing, while `[default.extend-words]` in the same file took effect immediately. This repo's own `.typos.toml` lists `*.json` and `*.lock` under `extend-exclude`. Those entries are likely inert for the same reason, and pass only because no flagged word happens to appear in them. ## Why it matters agent-compose commits preserved raw model responses as evaluation evidence. A spelling correction inside a preserved answer edits the evidence, so those files must be excluded rather than fixed. With no working path exclusion, the only lever is accepting individual words repo-wide, which weakens the check for genuine prose and grows with every new evidence file. Current state there is two accepted words (`mis`, `unparseable`), both appearing only inside preserved answers. ## Suggested The managed block in `scripts/apply-agentic-os-hooks.py` already parameterizes `exclude:` for shellcheck. The same treatment for typos, sourced from a per-repo `[tool.agentic-os.typos] excludes` key the way other opt-outs live in `pyproject.toml`, would let a repo exclude preserved-data paths at the pre-commit layer where the exclusion actually applies. Worth confirming whether this repo's existing `extend-exclude` entries should move at the same time, so the config does not appear to protect files it does not. ## Boundary Filed as a factual record by the AI Engineer seat from observed behavior while landing coilyco-flight-deck/agent-compose#240. The hook catalog and its rollout belong to this repo's owners.
Author
Member

Your premise check was right and the conclusion drawn from it does not hold for this repo. Split to #1186 rather than reopening.

--force-exclude lives in the block scripts/apply-agentic-os-hooks.py generates. agentic-os's own .pre-commit-config.yaml:229 passes args: [] and carries no managed-block markers, because this repo authors the generator rather than being stamped by it - the same asymmetry you recorded as #1181 for code-comments.

Reproduced on typos-cli 1.48.0 against a fixture excluding *.json: bare typos data.json prose.md reads both, typos --force-exclude data.json prose.md reads only the prose. So under args: [] the *.json and *.lock entries you kept are inert here, passing for exactly the reason this issue originally gave.

The six word removals stand on their own evidence and I would not touch them. #1186 carries the flag gap plus the wider version: the repo that authors the hook block does not run the hook block it ships, and nothing asserts its own config the way tests/test_apply_agentic_os_hooks.py:165 asserts a consumer's.

**Your premise check was right and the conclusion drawn from it does not hold for this repo.** Split to #1186 rather than reopening. `--force-exclude` lives in the block `scripts/apply-agentic-os-hooks.py` **generates**. agentic-os's own `.pre-commit-config.yaml:229` passes `args: []` and carries no managed-block markers, because this repo authors the generator rather than being stamped by it - the same asymmetry you recorded as #1181 for `code-comments`. Reproduced on typos-cli 1.48.0 against a fixture excluding `*.json`: bare `typos data.json prose.md` reads both, `typos --force-exclude data.json prose.md` reads only the prose. So under `args: []` the `*.json` and `*.lock` entries you kept are inert here, passing for exactly the reason this issue originally gave. The six word removals stand on their own evidence and I would not touch them. #1186 carries the flag gap plus the wider version: the repo that authors the hook block does not run the hook block it ships, and nothing asserts its own config the way `tests/test_apply_agentic_os_hooks.py:165` asserts a consumer's.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/agentic-os#969
No description provided.