Repository navigation
Feature/gemini support and cli ux - #7
Conversation
rng1995
left a comment
There was a problem hiding this comment.
Request changes — the CLI streaming rewrite itself is correct and the stdout/stderr split is a genuine improvement, but two concrete issues should be fixed before merge, and bundling several unrelated changes makes this harder to review/revert.
What's good ✅
- The non-verbose streaming path is functionally sound:
resultaccumulates exactly the keys the CLI consumes downstream —report_body/sarif_report(_write_result),temp_dir_for_cleanup(_cleanup_result), andrisk_score(exit code). It keys on output presence rather than node names, so it stays robust to graph changes.total_steps = 4 + len(ANALYZER_NODE_IDS)matches the actual non-analyzer nodes (resolve_input,build_context,meta_analyzer,report), andANALYZER_NODE_IDSis exported. Existingtests/unit/test_cli.pyruns the default (non-verbose) path, so output correctness is covered. - Routing the progress UI / file tree to a
stderrconsole sostdoutstays clean for--format jsonis the right call.
Please address (blocking)
.gitignore: report*is unanchored. A gitignore entry without a leading slash matches that basename at any depth, soreport*also matchessrc/skillspector/nodes/report.pyand will silently ignore any futurereport*source/test file. Please anchor to the generated artifacts, e.g./report*at repo root, or better, target the actual outputs (/report*.json,/report*.sarif).- Trailing whitespace fails
ruff check.pyproject.tomlselects theWruleset (onlyE501is ignored), and the new CLI block adds ~8 blank lines with trailing whitespace (W293). Please strip them so the change is lint-clean.
Non-blocking suggestions
- Scope/bundling: this PR mixes Gemini model-registry entries, the CLI UX rewrite, a
.gitignorechange, and an exception-logging tweak. Splitting them would make review and rollback safer. warnings.filterwarnings("ignore", category=UserWarning, module="pydantic")is a process-wide, persistent filter. Consider a scopedwith warnings.catch_warnings():around the graph run (or narrowing the message) so unrelated warnings aren't hidden.mcp_tool_poisoning.pyTP4 handler: switching fromexc_info=Trueto": %s"drops the traceback. For a security analyzer, keepingexc_info=True(optionally gated on debug level) preserves debuggability when the LLM check fails.nv_build/model_registry.yaml: addinggemini-3.5-flashto the nv_build provider registry reads as semantically off, since Gemini is reached via the OpenAI-compatible path; harmless for token budgeting but potentially misleading.- Minor: the
.gitignore(and a couple of the YAML files) end without a trailing newline; the inline imports in theelseblock could move to module top.
Thanks for the work here — happy to re-review once the gitignore pattern and the lint issues are addressed.
|
@rng1995 Thanks for the thorough review! I've addressed everything in two commits: Blocking issues (fixed):
Non-blocking suggestions (also fixed):
On scope/bundling: Good point — I'll keep this in mind for future PRs. For this one, the changes are already pushed as separate commits so they can be reverted independently if needed. Ready for re-review when you get a chance. |
3591d39 to
17883c1
Compare
rng1995
left a comment
There was a problem hiding this comment.
[Automated SkillSpector Review]
Re-review: both blockers resolved — approving.
.gitignoreis now anchored to repo root with specific extensions (/report*.md|json|sarif), sosrc/skillspector/nodes/report.pyis no longer matched.- The trailing-whitespace block in
cli.pyis cleaned (ruffW293).
All non-blocking items were also handled: the Pydantic warnings filter is now scoped via with warnings.catch_warnings() (no longer process-wide), the TP4 exc_info change was reverted (file no longer in the diff), and gemini-3.5-flash moved out of the nv_build registry into the OpenAI-compatible path. The non-verbose streaming path still accumulates exactly the keys the CLI consumes and routes UI to stderr. Minor cosmetic nit: .gitignore has no trailing newline. Approving.
|
@rng1995 It seems for some reason I have no access to Merge Button. Could you please do it? |
rng1995
left a comment
There was a problem hiding this comment.
Re-review — approving. Since my last review the substantive addition is the non-verbose streaming progress UI (graph.stream + Rich progress/file-tree), plus the Gemini-via-OpenAI-compat example and registry entry. The streaming path correctly accumulates the keys the CLI consumes downstream (report_body, sarif_report, risk_score, temp_dir_for_cleanup), and the pydantic warning suppression is scoped to the run.
Non-blocking nits:
import warningsis inserted beforeimport sysincli.py(not import-sorted) — likely trips the ruff format/lint check; runruff format/ruff check --fix..gitignoreis missing a trailing newline.- Consider a small test that the non-verbose path produces the same
resultkeys as theverbose(graph.invoke) path, so the two can't drift.
saeed-vayghan
left a comment
There was a problem hiding this comment.
Comments have been reviewed and implemented.
rng1995
left a comment
There was a problem hiding this comment.
[Automated SkillSpector Review]
Re-review: approved. The PR-authored change after the prior approval is the requested stream/invoke parity integration test plus import-order/newline cleanup. It exercises all four CLI-consumed result keys, and the current diff preserves the already-approved stderr streaming path and Gemini registry/docs behavior.
|
@rng1995 Thank you for review. Who else needs to approve and merge? |
|
@saeed-vayghan - I've approved the PR. Please fix CI issues, so we can merge the PR. |
eb07868 to
2b0bec9
Compare
Hi — I pushed a fix for the DCO sign-off and ruff lint failures on this branch. Could someone with write access approve the pending CI run? Thanks! |
rng1995
left a comment
There was a problem hiding this comment.
Re-review approved at the current head. The prior review feedback remains addressed and there are no unresolved review threads. Merge remains blocked: the merge-updated head fails formatting and nine unit tests around CLI JSON/exit-code behavior, plus DCO; the owner must repair CI before merge.
|
@saeed-vayghan Re-review is approved, but please fix the current CI regressions before merge. Ruff would reformat |
cee6013 to
b2197eb
Compare
5febbb3 to
f82d19e
Compare
|
@rng1995 It says you need to review again, every time this branch gets rebased some thing breaks. Hope this time would be working. |
f82d19e to
4f1b9e3
Compare
rng1995
left a comment
There was a problem hiding this comment.
[SkillSpector Review]
Re-review approved. The new corrective commit propagates execution_successful through the default streaming path, restores the incomplete-execution exit-code contract, and updates JSON assertions for Click 8.2's stdout/stderr behavior. Focused regressions and all required checks pass.
|
@saeed-vayghan - Thanks for your patience and contribution. CI looks good but merge conflicts need to be fixed. Please fix it in order to merge the PR. |
|
Powered by Codex: PR council review result. This is a triage signal, not a maintainer approval.
|
This commit adds 'gemini-3.5-flash' to the model registries across various providers to prevent token-limit warnings. It also updates the exception handling in mcp_tool_poisoning to gracefully catch non-fatal LLM check failures without printing noisy tracebacks. Signed-off-by: Saeed <[email protected]>
|
Thanks for the changes @saeed-vayghan ! Sorry for the prolonged delay. I've rebased all changes and will merge your PR. Thanks for your contributions! |
…overy - Swapped the synchronous graph invoke for a streamed execution when verbose mode is off. - Integrated rich.progress to provide immediate feedback to users during long-running security scans. - Added a file tree breakdown right after the context is built, so users know exactly which files are being picked up for analysis. - Explicitly suppressed Pydantic's serializer warnings that were cluttering the terminal output during structured LLM generation. - The UI now actively ticks off the analyzer rules as they finish, removing the guesswork when waiting on slower LLM checks. Signed-off-by: Saeed <[email protected]>
- Provided a clear snippet for using the Gemini API via the OpenAI compatibility layer. Signed-off-by: Saeed <[email protected]>
- Added `report*` to .gitignore to prevent accidentally committing local scan reports. Signed-off-by: Saeed <[email protected]>
…in cli.py - .gitignore: anchor report* to repo root with specific extensions (/report*.md, /report*.json, /report*.sarif) so source files like src/skillspector/nodes/report.py are no longer silently ignored - cli.py: strip trailing whitespace from blank lines to pass ruff W293 Signed-off-by: Saeed <[email protected]>
…mini entry - cli.py: replace process-wide warnings.filterwarnings() with scoped warnings.catch_warnings() so Pydantic suppression only lives during the graph run; move inline imports to module level (ruff I001 clean) - mcp_tool_poisoning.py: restore exc_info=True on TP4 exception handler to preserve full tracebacks when LLM check fails - nv_build/model_registry.yaml: remove gemini-3.5-flash — Gemini is accessed via OpenAI-compatible path, not NVIDIA build endpoints; entry remains in openai/ and root registries where it belongs Signed-off-by: Saeed <[email protected]>
… outputs and clean up imports in cli.py Signed-off-by: Saeed <[email protected]>
Signed-off-by: Saeed <[email protected]>
…output/stdout split in tests The default (non-verbose) scan path streams graph updates via graph.stream() and only copied a fixed set of scalar fields into the CLI result. execution_successful was missing from that set, so a failed execution could never trigger exit code 2 outside --verbose mode. Track it alongside the other accumulated fields. Click 8.2 changed CliRunner.Result.output to mix stdout and stderr instead of proxying stdout, breaking tests that parsed JSON from result.output for commands that also write progress/tree output to stderr. Switch those assertions to result.stdout, and update two tests that mocked graph.invoke/graph directly with a stream() implementation matching the CLI's actual non-verbose execution path. Signed-off-by: Saeed <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
3875661 to
3dd12b5
Compare
rng1995
left a comment
There was a problem hiding this comment.
Re-review after rebase onto current main: approved. Conflict resolution preserves current CLI, transitive-analysis, and completeness contracts; streamed scans retain the full graph state; terminal output is escaped and bounded; and all local regression gates plus fresh CI pass.
|
Thank you. |
Feature: Gemini Support & CLI UX Improvements
Overview
This PR adds support for
gemini-3.5-flashand significantly improves the CLI by adding real-time visual progress tracking for long scans.Key Changes
stderr, ensuringstdoutremains perfectly clean when using--format json.gemini-3.5-flashto prevent token limit errors and added a setup example to theREADME.md.report*to.gitignore.Testing
skillspector scan ./my-skill/to see the new progress bar.skillspector scan ./my-skill/ --format json > out.jsonto verify the JSON output remains uncorrupted.