Skip to content

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

Closed

Description

@squid-protocol

Symptom

Zero-dependency mode is one flag: zero_dependency_mode = not HAS_NETWORKX or not HAS_TIKTOKEN or not ML_AVAILABLE or not HAS_PYYAML (galaxyscope.py). The SQLite recorder keys its NULLing on that global flag, not on the package each value actually needs:

  • record_keeper.py (~L909-917): pagerank_score, normalized_blast_radius, betweenness_score, closeness_score, producer_ratio, ecosystem_role and ai_threat_score are all NULL whenever the flag is set.
  • record_keeper.py (~L1200-1205): the same for all five repo_data.network_* columns.

So a scan with networkx and xgboost installed but no pyyaml (or no tiktoken) throws away real, computed PageRank, centrality, topology and ML scores in the DB, while the other outputs keep them.

Two knock-ons:

  • Inconsistent within one mode. producer_ratio / ecosystem_role are NULLed, but popularity, internal_dependency_links and dependency_density, computed from the very same degree counts, are kept. As of internal_dependency_links / popularity count import statements in zero-dependency mode but distinct neighbours with networkx #3024 those degree values are exact in both modes, so there is no reason to NULL producer_ratio / ecosystem_role at all.
  • pandas / numpy are invisible. They share xgboost's try block (security_auditor.py L10-17), so any one missing sets ML_AVAILABLE=False. But missing_dependencies only carries an "xgboost" key, and the audit JSON / GPU JSON / SARIF report "xgboost" even when xgboost is installed and pandas isn't.

Ask

  1. NULL each column on the package it needs: networkx columns on HAS_NETWORKX, ai_threat_score on ML_AVAILABLE. Stop NULLing producer_ratio / ecosystem_role.
  2. Report pandas and numpy as separate missing_dependencies keys, detected individually.
  3. Consider recording per-package availability in repo_data (e.g. missing_dependencies JSON), so a history DB can tell which engines a snapshot lacked, not just that one was missing.

Documented as current behaviour in docs/zero_dependency_mode.md (added with #3024); update that page when this lands.

Activity

  1. added
    bug
    schema
    on Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugschema

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions