Repository navigation
fix(#3028): per-package optional dependencies; AI columns follow inference - #3082
Merged
Merged
Conversation
…on inference - security_auditor: numpy, pandas and xgboost are detected separately (HAS_NUMPY/HAS_PANDAS/HAS_XGBOOST); ML_AVAILABLE is their conjunction. - galaxyscope: missing_dependencies() is the single source for the banner, session_meta["missing_dependencies"] (now with numpy/pandas keys) and zero_dependency_mode. - SecurityAuditor.inference_ran -> session_meta["ml_inference_ran"]; record_keeper NULLs ai_threat_class/confidence/score and is_malware when inference did not run, instead of on the global mode flag. A scan missing only pyyaml/tiktoken keeps real scores; a full-precision scan with no model file no longer stores "Safe"/0.0 placeholders. - repo_data.missing_dependencies: JSON per-package map, auto-healed onto existing databases. - Golden masters: only the two new Missing Dependencies keys changed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Contributor
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.
What
Zero-dependency mode was one global flag. The SQLite recorder used it to NULL
ai_threat_score, so a scan missing onlypyyamlortiktokenthrew away real ML scores. numpy and pandas were also reported under thexgboostname. This PR tracks each optional package separately.security_auditor.pydetects numpy, pandas and xgboost individually.galaxyscope.missing_dependencies()is now the only source for the start banner,session_meta["missing_dependencies"]andzero_dependency_mode. The audit, GPU, SARIF and LLM outputs gainnumpy/pandaskeys automatically.SecurityAuditor.inference_ranbecomessession_meta["ml_inference_ran"]. When it is false,ai_threat_class,ai_threat_confidence,ai_threat_scoreandis_malwareare NULL.'Safe'/0.0/0placeholders.repo_data.missing_dependencies: a JSON map of package to missing. Existing databases get the column added automatically, so history can tell which engine a snapshot lacked.docs/zero_dependency_mode.mdis updated. The Zero-dependency mode: DB NULLs network + ML columns on the global flag, not per package (a missing pyyaml discards real PageRank); pandas/numpy never reported #3028 caveats moved to "older snapshots".The network half of #3028 was already fixed by #3027 and #3041.
Golden masters
Both fixtures were re-blessed. The full uncapped diff is exactly 2 keys per fixture:
Missing Dependencies/numpyandMissing Dependencies/pandas(false in full precision, true in zero-dependency). Nothing else moved, apart from run metadata that the comparator strips.Verification
tests/core_engine/test_per_package_dependencies.pyhas 12 tests.audit_check.py: all clear. The baseline changes are line shifts only.Closes #3028
🤖 Generated with Claude Code