Skip to content

hugger/ script recording: enabled by default, mutates global state on attribute reads, unbounded log, reset always crashes #275

@rozyczko

Description

@rozyczko

Findings G-H3, G-H4, G-M13 in DEEP_ANALYSIS.md (parent #261).

  • G-H4: ScriptManager(enabled=True) is the default (hugger/hugger.py:41) and nothing in src/ or tests/ ever disables it (__init__.py disables only the stack). LoggedProperty.__get__ (hugger/property.py:54-77) therefore mutates the global map (change_type/add_vertex with type 'returned') and appends to the class-level Store.__log on every legacy-ObjBase property read — an unbounded memory leak in long-running sessions.
  • G-H3: Store.get_defaults() (hugger/hugger.py:15-34) reads Store.__create_list, __unique_args, __unique_rets — attributes that don't exist -> ScriptManager.reset_history() always raises AttributeError. PatcherFactory reads the same never-set attributes; the whole PropertyHugger machinery is non-functional.
  • G-M13: hugger/property.py:111 passes an object to reverse_route(end_vertex: str) — always returns [], result unused (# noqa: F841). PropertyHugger/PatcherFactory have no callers anywhere.

Recommendation: amputate hugger/ (or at minimum default enabled=False and fix Store). Today it costs every user memory and map churn by default, for a feature that cannot work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [area] global_objectAnything related to the global_object[priority] highShould be prioritized soon[scope] maintenanceCode/tooling cleanup, no feature or bugfix (major.minor.PATCH)
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions