fix(code-comments): track block-comment state instead of guessing on a leading star #963
No reviewers
Labels
No labels
burndown-2026-06
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agentic-os!963
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/issue-961-block-comment-state"
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?
Closes #961.
Problem
is_comment_lineclassified any line whose stripped text started with*as a block-comment continuation. A leading*is also the dereference operator, so every pointer-bearing language inBLOCK_COMMENT_EXTS(.rs,.c,.go,.cs,.java, and the rest) hit false positives. A long deref tripped the 90-char cap and three consecutive derefs tripped the contiguous-block cap.Fix
scan_linesnow threads real open/close state through the file rather than guessing per line. A newblock_state_afterwalks each line and skips double-quoted strings and line comments, so/*only opens a block where it actually opens one. A leading*counts as a comment only while that state is open. This is the state-tracking fix the issue names as correct, not the interim*-narrowing.Verification
*self.stock.entry(item).or_default() += n;(.rs),*ptr = 5;(.c), and*count += 1;(.go) are no longer comments, for both caps./* ... */continuation lines are still counted, and still obey the char cap.tests/test_check_code_comments.py. Seven of them fail against the old checker and pass against the new one. The continuation tests pass against both, guarding the other direction.ward test- 532 passed.ward pre-commit-all- clean, exit 0.No
docs/FEATURES.mdentry: this is validation hardening, not a capability change.