Skip to content

fix(assail): blank // comments only where // is a comment - #305

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/cross-language-comment-aware-main
Nov 16, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
claude/cross-language-comment-aware-main

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

The gap

analyze_cross_language blanks C-style // line comments in every file before matching URLs. In shell scripts and Justfile recipes, that cuts curl http://host at the //, so an unquoted plain-HTTP URL is never reported by the InsecureProtocol check.

This was found while testing PA1 claim (c). That test on main has to quote its recipe URL to pass, and PROOF-NEEDS.adoc lists the gap as an open obligation.

The fix

  • src/assail/routing.rs gains slash_line_comments(Language) -> bool, an exhaustive match beside route. rustc forces every new language to be classified.
  • analyze_cross_language takes the language of the file, or of the embedded script, and blanks // comments only where // is a comment.
  • Languages whose comment syntax the table does not record keep the earlier blanking. These are the nextgen DSLs, Datalog (whose dialects differ) and Unknown.

Evidence

  • Claim (c)'s test now uses an unquoted recipe URL.
  • slash_comment_tests:
    • a shell script with an unquoted URL is reported;
    • a URL in a Rust doc comment is still ignored, which is the precision the blanking exists for.
  • Planted faults, re-run on this main-based branch:
    • "always blank" fails 2 tests;
    • "never blank" fails 1 test.
  • Checks:
    • cargo test --all-features: 888 passed, 0 failed.
    • cargo clippy --all-targets --all-features -D warnings: clean.
    • cargo fmt --check: clean.
  • Self-scan unchanged: the same 36 unsuppressed findings as main.
  • PROOF-NEEDS.adoc: the open "Unquoted http:// URLs" row is closed, and the routing row says how the gap was closed.

Independent of #304; either can merge first.


Generated by Claude Code

analyze_cross_language blanked C-style `//` line comments in every file
before matching URLs. In shell scripts and Justfile recipes that cut
`curl http://host` at the `//`, so an unquoted plain-HTTP URL was never
reported (found while testing PA1 claim (c), whose test had to quote
its URL).

routing.rs gains slash_line_comments(Language), an exhaustive match
beside `route`, and the cross-language pass takes the file's (or the
embedded script's) language. Languages whose comment syntax the table
does not record (nextgen DSLs, Datalog, Unknown) keep the old blanking.

Tests: claim (c) now uses an unquoted recipe URL; slash_comment_tests
checks a shell script (reported) and a Rust doc comment (ignored).
Planted faults "always blank" and "never blank" each fail them. Self-scan
findings are unchanged (36 before and after, on main). PROOF-NEEDS closes the
open recall-gap row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jma5ixtpeZyJRmfoSsC98u
Repository owner deleted a comment from coderabbitai Bot Nov 16, 2026
@hyperpolymath
hyperpolymath marked this pull request as ready for review November 16, 2026 19:54
Repository owner deleted a comment from coderabbitai Bot Nov 16, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Nov 16, 2026
@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 97c06eb2-8f14-4cf5-91e8-e9f72336cb34
Commits

Reviewing files that changed from the base of the PR and between 54da3aa and 7c11533.

Files selected for processing: 3

  • PROOF-NEEDS.adoc
  • src/assail/analyzer.rs
  • src/assail/routing.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 16, 2026 19:54
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 7b9f145 into main Nov 16, 2026
69 of 70 checks passed
@hyperpolymath
hyperpolymath deleted the claude/cross-language-comment-aware-main branch November 16, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants