Skip to content

GuideStar documentation-coverage ignore filter always empty -- reads IGNORED_DIRECTORIES from the wrong config dict #311

Closed

Description

@squid-protocol

File: gitgalaxy/core/guidestar_lens.py
Labels: bug, performance, priority: high

Description

_calculate_documentation_coverage's ignore-directory pruning (fixed in #256 to correctly mutate dirs[:] in place) reads its exclusion set from the wrong config object:

ignored_directories_lower = {d.lower() for d in self._gs_config.get("IGNORED_DIRECTORIES", set())}

self._gs_config is a class attribute bound to GUIDESTAR_CONFIG (gitgalaxy/standards/gitgalaxy_config.py), which only defines MANIFEST_MAP, INTENT_BIASED_SECTORS, and EXEC_PREFIX_MAP -- it has no IGNORED_DIRECTORIES key at all. That key only exists on the separate APERTURE_CONFIG dict. .get("IGNORED_DIRECTORIES", set()) therefore always falls back to an empty set, in every environment, regardless of what #256 fixed.

Confirmed: grep -n "IGNORED_DIRECTORIES" gitgalaxy/standards/gitgalaxy_config.py only matches inside APERTURE_CONFIG (line 156), never inside GUIDESTAR_CONFIG (line 417+). And _gs_config is never overridden with a merged/aperture-aware config anywhere GuideStarLens is constructed (galaxyscope.py:153,602 both just pass (root, priority_whitelist, parent_logger=...), no config argument).

Impact

The documentation-coverage "shield strength" scan (README/ARCHITECTURE.md density mapping) walks and stats every file inside node_modules, .git, vendor, build, etc. on every scan -- both the original bug from #256 (unpruned os.walk) AND its fix are moot in production, since the ignore-check they both gate on is silently a no-op.

Fix

Give GuideStarLens access to the real IGNORED_DIRECTORIES set -- e.g. add "IGNORED_DIRECTORIES": APERTURE_CONFIG["IGNORED_DIRECTORIES"] to GUIDESTAR_CONFIG's definition in gitgalaxy_config.py (APERTURE_CONFIG is defined earlier in the same module), so there's a single source of truth rather than a second copy that can drift.

Activity

  1. added
    bug
    core-engine
    priority: high
    on Jul 23, 2026
  2. added a commit that references this issue on Aug 4, 2026
    25f8a35
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

    bugcore-enginepriority: high

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions