Investigate lint_changed hook edits to unplanned files #1387
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1387
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The os-sdlc lint_changed PostToolUse hook changes files that the agent did not plan to change. Builders must work around it, and the diff grows with unrelated edits.
Observed
The hook runs rubocop -a after Write and after ast-grep -U.
It wraps lines and adds MethodLength offenses in files the agent did not plan to change.
Builders worked around it with Bash edits.
Reproduce
n/a: the exact command is not recorded; see finding memos under docs/crc/os-sdlc/fast-batch-15/ on branch fast-batch-15.
Approach
Find which edits the hook rewrites, which cops cause the wrapped lines and MethodLength offenses, and whether the hook should autocorrect at all. State a decision.
Origin
Occurrence: Stop the lint_changed hook from autocorrecting files the builder did not plan to change
Seen: plugins/os-sdlc hooks lint_changed
Run: Session 6c6b6eae-4ebd-4ac4-9b32-535875a6b39b, fast-batch-15 ruling R22
Adds: in fast-batch-15 the stranger review flagged the churn (teardown order, assert_path_exists in plugins/os-aidd-lint/tests) as spec creep; ruling R22 accepted it as hook output. Each batch review now spends a row on it.