test: normalize inline block comments in gatekeeper scanning - #2705
Conversation
Blank single-line block comments with index-preserving spaces so punctuation adjacency stays visible to position heuristics; document nested-suppressed-call attribution and multi-line block comments as parser-requiring out-of-scope patterns.
|
Codex review: needs changes before merge. Reviewed August 6, 2026, 4:14 AM ET / 08:14 UTC. ClawSweeper reviewWhat this changesThe PR blanks same-line block comments before provider-reference scanning, adds regression coverage for assignment and labeled-argument forms, and documents parser-level exclusions. Merge readinessKeep open: the normalization is narrowly scoped, but it stops at the first closing delimiter and can expose provider literals inside nested Swift block comments, producing false gatekeeper findings. Priority: P3 Review scores
Verification
How this fits togetherCodexBar’s provider-architecture gatekeeper lexically scans shipped Swift source for direct provider references that bypass the shared abstraction. Its normalized source lines feed position heuristics that produce test-enforced architecture findings. flowchart LR
A[Swift source lines] --> B[Comment normalization]
B --> C[Provider-reference scanner]
C --> D[Position heuristics]
D --> E[Gatekeeper findings]
E --> F[Architecture tests]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Preserve offset-stable blanking while tracking nested same-line block-comment depth, with a regression proving inner commented provider literals remain ignored and real literals after the comment remain visible. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows that a nested same-line Swift block comment causes the new loop to stop at the inner closing delimiter and scan the remaining commented text. Is this the best way to solve the issue? No. Index-preserving blanking is the right approach, but it must track nested comment depth to respect Swift block-comment syntax. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5cb69f0c106f. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Closing commit of the provider-architecture campaign. Fixes the round-nine audit's lexical-normalization gap — inline
/* ... */comments are blanked with index-preserving spaces before scanning, so punctuation adjacency stays visible (regression: assignment and labeled-argument forms) — and documents the two genuinely parser-requiring patterns (nested literals inside suppressed calls; multi-line block comments interleaved with expressions) as out of scope with reasons.Proof: gatekeeper 38/38 zero findings, make check 0 violations, full suite green (zero failed/timed-out/retried groups), autoreview clean.
🤖 Generated with Claude Code