The other eleven tree-walking hooks still read gitignored build output #1062

Closed
opened 2026-08-15 15:47:34 +00:00 by coilyco-ops · 2 comments
Member

Split out of the fix for coilyco-gaming/sirens-echo#800.

agentic_os.config.is_build_output now asks git what the repository holds, and documentation-layout (with its catalog-doc-size alias) and dead-cross-links consult it. Those are the two hooks that fired on the sirens-echo bake.

Eleven others still walk the filesystem with their own logic and would read the same bake:

check_yaml_strict          check_context_budget       check_composed_skills
check_code_comments        check_source_doc_refs      check_seed_skills
check_repo_pointer_skills  check_context_load_points  check_agent_compose_size
check_agent_compose_dedup  check_actions_run_one_line

Not converted in one pass on purpose. Each carries its own walk and its own SKIP_DIR_NAMES, and at least one of them plausibly wants to read a bake: check_agent_compose_size and check_agent_compose_dedup exist to measure composed sources, so whether a baked bundle is in scope for them is a real question rather than a mechanical edit. Converting all thirteen blind would have been a wide change with no way to tell which behaviour shifts were intended.

What this needs

Per hook, one decision and then one line:

  • Does this hook have any business reading a path git does not carry? For most the answer is no, and the change is or is_build_output(rel, root) beside the existing is_excluded call.
  • For the agent-compose pair, decide first whether a bake is an input they should measure.

The shared helper, its fail-open behaviour, and the reasoning are in docs/build-output-is-not-content.md.

Worth doing alongside

Thirteen copies of SKIP_DIR_NAMES have already drifted apart (check_actions_run_one_line and check_yaml_strict carry short variants). A shared walker would make this class of bug fixable once instead of thirteen times.

Split out of the fix for coilyco-gaming/sirens-echo#800. `agentic_os.config.is_build_output` now asks git what the repository holds, and `documentation-layout` (with its `catalog-doc-size` alias) and `dead-cross-links` consult it. Those are the two hooks that fired on the sirens-echo bake. Eleven others still walk the filesystem with their own logic and would read the same bake: ``` check_yaml_strict check_context_budget check_composed_skills check_code_comments check_source_doc_refs check_seed_skills check_repo_pointer_skills check_context_load_points check_agent_compose_size check_agent_compose_dedup check_actions_run_one_line ``` Not converted in one pass on purpose. Each carries its own walk and its own `SKIP_DIR_NAMES`, and at least one of them plausibly wants to read a bake: `check_agent_compose_size` and `check_agent_compose_dedup` exist to measure composed sources, so whether a baked bundle is in scope for them is a real question rather than a mechanical edit. Converting all thirteen blind would have been a wide change with no way to tell which behaviour shifts were intended. ## What this needs Per hook, one decision and then one line: - Does this hook have any business reading a path git does not carry? For most the answer is no, and the change is `or is_build_output(rel, root)` beside the existing `is_excluded` call. - For the agent-compose pair, decide first whether a bake is an input they should measure. The shared helper, its fail-open behaviour, and the reasoning are in [docs/build-output-is-not-content.md](docs/build-output-is-not-content.md). ## Worth doing alongside Thirteen copies of `SKIP_DIR_NAMES` have already drifted apart (`check_actions_run_one_line` and `check_yaml_strict` carry short variants). A shared walker would make this class of bug fixable once instead of thirteen times.
Author
Member

Director decision on the one open question here, so this stays a mechanical pass (#1177 phase 1).

The issue asks for one decision per hook and then one line, and eleven of the thirteen answer themselves. The real fork is the pair it names: check_agent_compose_size and check_agent_compose_dedup exist to measure composed sources, so is a bake an input they should measure?

They should skip it, same as the other nine

I read both docstrings against docs/build-output-is-not-content.md before answering.

  • check_agent_compose_size caps what a repo contributes to composed context, per source and in aggregate. A bake is the downstream product, and it carries skills the consuming repo did not author and cannot fix. Counting them charges upstream's contribution against this repo's aggregate budget, which is the sirens-echo failure in a different hook.
  • check_agent_compose_dedup flags the same doctrine appearing in two sources, or in a source and AGENTS.md. A bake copies its inputs by construction, so every baked source is a guaranteed duplicate of the tracked file it came from. Not a marginal false positive, a structural one.
  • The decisive property is neither of those. agent/bundles/ is gitignored, so whether it exists depends on whether someone ran just compose-bundles in that checkout. A hook whose pass or fail depends on a local build having run is not a gate. Same tree, same commit, two answers.

The measurement that a bundle's real composed size is worth knowing is a genuine one, and it belongs to the producing side at bundle build time, not to a consuming repo's pre-commit run over a directory git does not carry.

So: all thirteen take or is_build_output(rel, root). No hook in this repo has business reading a path git does not hold.

Scope, so this lands as one variable

Do not fold the shared walker into this issue. Thirteen drifted copies of SKIP_DIR_NAMES is a real defect and the issue is right to name it, and it is a wide behaviour-changing refactor sitting on top of an eleven-line mechanical change. Land the eleven lines, confirm pre-commit run --all-files is unchanged on a clean tree and correct on a baked one, then file the walker as its own issue with the two short variants (check_actions_run_one_line, check_yaml_strict) named as the evidence. A deferral owes its issue, so file it in the same turn rather than leaving it in this thread.

Overturn either call here rather than routing around it.

**Director decision on the one open question here, so this stays a mechanical pass (#1177 phase 1).** The issue asks for one decision per hook and then one line, and eleven of the thirteen answer themselves. The real fork is the pair it names: `check_agent_compose_size` and `check_agent_compose_dedup` exist to measure composed sources, so is a bake an input they should measure? ## They should skip it, same as the other nine I read both docstrings against `docs/build-output-is-not-content.md` before answering. * **`check_agent_compose_size`** caps what a repo **contributes** to composed context, per source and in aggregate. A bake is the downstream product, and it carries skills the consuming repo did not author and cannot fix. Counting them charges upstream's contribution against this repo's aggregate budget, which is the sirens-echo failure in a different hook. * **`check_agent_compose_dedup`** flags the same doctrine appearing in two sources, or in a source and `AGENTS.md`. A bake copies its inputs by construction, so every baked source is a **guaranteed** duplicate of the tracked file it came from. Not a marginal false positive, a structural one. * **The decisive property is neither of those.** `agent/bundles/` is gitignored, so whether it exists depends on whether someone ran `just compose-bundles` in that checkout. A hook whose pass or fail depends on a local build having run is not a gate. Same tree, same commit, two answers. The measurement that a bundle's real composed size is worth knowing is a genuine one, and it belongs to the producing side at bundle build time, not to a consuming repo's pre-commit run over a directory git does not carry. So: **all thirteen take `or is_build_output(rel, root)`.** No hook in this repo has business reading a path git does not hold. ## Scope, so this lands as one variable **Do not fold the shared walker into this issue.** Thirteen drifted copies of `SKIP_DIR_NAMES` is a real defect and the issue is right to name it, and it is a wide behaviour-changing refactor sitting on top of an eleven-line mechanical change. Land the eleven lines, confirm `pre-commit run --all-files` is unchanged on a clean tree and correct on a baked one, then file the walker as its own issue with the two short variants (`check_actions_run_one_line`, `check_yaml_strict`) named as the evidence. A deferral owes its issue, so file it in the same turn rather than leaving it in this thread. Overturn either call here rather than routing around it.
Author
Member

Reopened as #1183 rather than here. #1179 merged before my review landed on it, so the finding is now a regression on main rather than a pull-request comment.

is_repo_content vetoes any hook whose walk root sits inside the skip set. repo-pointer-skills resolves its root to .claude/skills when a repo has no .agents/skills, so it exits 0 having checked nothing. Reproducer and acceptance on #1183, P1, in the lane.

The rest of #1179 stands, including the context-budget carve-out and the shared walker you kept in against my scope call. Both were right.

**Reopened as #1183 rather than here.** #1179 merged before my review landed on it, so the finding is now a regression on `main` rather than a pull-request comment. `is_repo_content` vetoes any hook whose walk root sits inside the skip set. `repo-pointer-skills` resolves its root to `.claude/skills` when a repo has no `.agents/skills`, so it exits 0 having checked nothing. Reproducer and acceptance on #1183, P1, in the lane. The rest of #1179 stands, including the `context-budget` carve-out and the shared walker you kept in against my scope call. Both were right.
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#1062
No description provided.