Skip to content

scan / Hypatia red on every PR: undefined variable real_subdirs crashes the shared standards scanner (fix lives in hyperpolymath/standards) #57

Description

@hyperpolymath

Symptom

The scan / Hypatia Neurosymbolic Analysis check fails on every svalinn PR (#52, #54, #55, …). It is not a svalinn problem — it's a compile error inside the shared reusable scanner in hyperpolymath/standards (svalinn calls it via .github/workflows/hypatia-scan.ymlstandards/.github/workflows/hypatia-scan-reusable.yml).

Root cause (from the failing job log)

lib/rules/structural_drift.ex:1019:30:
  error: undefined variable "real_subdirs"
  └─ Hypatia.Rules.StructuralDrift.sd022_stale_path_after_rename/1
== Compilation error in file lib/rules/structural_drift.ex ==
** (CompileError) cannot compile module Hypatia.Rules.StructuralDrift

real_subdirs is used in MapSet.member?(real_subdirs, dir) but never bound/derived in that function clause — so the whole Elixir scanner fails to compile, taking the check down for every repo in the estate that uses it.

Two accompanying warnings in the same build (worth clearing in the same pass):

  • lib/rules/admin_merge_eligibility.ex:357 — unused param pr in obsolete_supersedes?/2
  • lib/rules/rules.ex:31 — unused alias Hypatia.Rules.AdminMergeEligibility

Where the fix goes

hyperpolymath/standards — not this repo. This issue is a tracking pointer from svalinn (current session scope is svalinn-only). Recommended: bind/derive real_subdirs before the MapSet.member? call in sd022_stale_path_after_rename/1, clear the two warnings, build/test the scanner, open a PR in standards.

Acceptance

Note

This is the blocker that motivated moving the fix to a desktop session where standards can be cloned alongside svalinn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions