code-comments: skip the apply-agentic-os-hooks managed marker region #993

Closed
opened 2026-08-11 08:09:54 +00:00 by coilyco-ops · 0 comments
Member

The problem

check_code_comments.scan_yaml flags every YAML comment below the first content line. Three such comments in .pre-commit-config.yaml are emitted by scripts/apply-agentic-os-hooks.py itself, at fixed positions:

  • BEGIN_MARKER (apply-agentic-os-hooks.py:103)
  • END_MARKER (apply-agentic-os-hooks.py:104)
  • the actionlint note (apply-agentic-os-hooks.py:262)

None can move to a top header without breaking the block delimiters the rollout script parses, and any in-repo edit is overwritten on the next rollout. So the hook flags output its own sibling generator produces.

Current state

Every consumer works around it with the same exclude, including agentic-os for its own copy:

  • coilyco-flight-deck/agentic-os - pyproject.toml
  • coilyco-flight-deck/infrastructure - pyproject.toml
  • coilyco-bridge/deploy - pyproject.toml
  • coilyco-bridge/agentic-os-kai - pyproject.toml
  • coilyco-gaming/sirens-echo - pyproject.toml, re-confirmed in coilyco-gaming/sirens-echo#103

A fleet-wide identical exclude is the signal the rule has a gap, not that five repos are dirty. It also over-excludes: the whole file goes unchecked, so a genuinely misplaced hand-written comment elsewhere in .pre-commit-config.yaml is invisible.

Proposed fix

Teach scan_yaml to skip comment lines inside a # BEGIN managed by ... / # END managed by ... region. The markers already exist as a recognized shape in the rollout script's LEGACY_BLOCKS list, so the convention is established. That keeps the rest of each file enforced and lets all five repos drop the exclude.

Wants a new aos-precommit-v* tag and a repin sweep once landed.

## The problem `check_code_comments.scan_yaml` flags every YAML comment below the first content line. Three such comments in `.pre-commit-config.yaml` are emitted by `scripts/apply-agentic-os-hooks.py` itself, at fixed positions: * `BEGIN_MARKER` (`apply-agentic-os-hooks.py:103`) * `END_MARKER` (`apply-agentic-os-hooks.py:104`) * the actionlint note (`apply-agentic-os-hooks.py:262`) None can move to a top header without breaking the block delimiters the rollout script parses, and any in-repo edit is overwritten on the next rollout. So the hook flags output its own sibling generator produces. ## Current state Every consumer works around it with the same exclude, including agentic-os for its own copy: * `coilyco-flight-deck/agentic-os` - `pyproject.toml` * `coilyco-flight-deck/infrastructure` - `pyproject.toml` * `coilyco-bridge/deploy` - `pyproject.toml` * `coilyco-bridge/agentic-os-kai` - `pyproject.toml` * `coilyco-gaming/sirens-echo` - `pyproject.toml`, re-confirmed in coilyco-gaming/sirens-echo#103 A fleet-wide identical exclude is the signal the rule has a gap, not that five repos are dirty. It also over-excludes: the whole file goes unchecked, so a genuinely misplaced hand-written comment elsewhere in `.pre-commit-config.yaml` is invisible. ## Proposed fix Teach `scan_yaml` to skip comment lines inside a `# BEGIN managed by ...` / `# END managed by ...` region. The markers already exist as a recognized shape in the rollout script's `LEGACY_BLOCKS` list, so the convention is established. That keeps the rest of each file enforced and lets all five repos drop the exclude. Wants a new `aos-precommit-v*` tag and a repin sweep once landed.
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#993
No description provided.