Wave 2 polish: tests, clippy/fmt clean, CI#1
Merged
Merged
Conversation
- Add unit tests (8 -> 38) covering pure core logic: scope matching, subfinder/httpx/nuclei/dnsx output parsers, finding dedup + severity classification, and the LLM response parser - Fix all clippy warnings; repo now passes `cargo clippy --all-targets -D warnings` - Apply `cargo fmt` across the tree (formatting only, no logic change) - Add GitHub Actions CI: fmt --check, clippy -D warnings, build, test - Update README honest-state section (tests + CI now exist) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
Independent verification — VERDICT: solid, ready to mergeRe-built and re-ran everything from a clean clone of
Regression check
Overclaim checkNone found. The PR body is honest. Two notes (not blockers):
Approving. Merge as-is. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A polish-to-completion pass on the existing Phase 2.5/3 codebase. No behavior changes to the agent loop or tools — this hardens the core with tests, lint cleanliness, and CI.
Changes
scope:host_in_scope/normalize_host(scheme/port/path stripping, bare vs*.wildcard, apex matching, case handling, empty patterns).findings::parse:extract_hosts_from_subfinder,parse_httpx_output(URL/status/severity classification, host-derived-from-URL fallback, malformed-line skipping),parse_nuclei_output(severity/name/target,matched-at->hostfallback, graceful defaults).findings::models:Severityordering,from_str_loosealiases/unknowns,dedup_findings(kind+details folding, severity promotion, target dedup with insertion order, severity-desc sort, empty input).llm::parser:strip_think(balanced/multiple/unclosed blocks),parse_actionacross all four supported shapes ({tool,arguments},argsalias, OpenAItool_callswith stringified args,{action:done/stop/finish}), code-fence + think-block stripping, prose-surrounded JSON, and None on unparseable/unknown.tools::dnsx:parse_dnsx_output(bare hosts,host [record]pairs, trailing-dot + blank handling).single_char_add_strin the report generator,sort_by_keyin the ReAct loop). Repo now passescargo clippy --all-targets -- -D warnings.cargo fmtacross the tree. The diffs inconfig.rs,findings/mod.rs,preflight/pius.rs,tools/ffuf.rs,tools/nuclei.rsare formatting-only (no logic change)..github/workflows/ci.yml(stable Rust):cargo fmt --check,cargo clippy -D warnings, build, test, with cargo caching. No untrusted input is interpolated into anyrun:step.Verified on this machine (cargo 1.95.0, rustc 1.95.0)
cargo build— passes (baseline also passed before changes).cargo test— 38 passed, 0 failed.cargo clippy --all-targets -- -D warnings— clean.cargo fmt --check— clean.Unverified
exec_*) and the network LLM client remain manually-verified-only, as before.TODOs left
todo!/unimplemented!/FIXME/pass-only stubs: none found). Theexec_*tool wrappers andLlmClientare I/O boundaries left untested by design (they shell out / hit the network).🤖 Generated with Claude Code