Skip to content

Recursion flags still false-positive on store/delegation calls after #599 (soil.get, _default.check) #876

Description

@rudi193-cmd

Summary

On v0.8.1, unguarded_recursion / self_recursive / recursive still flag functions that do not call themselves when the body calls a same-named method on another receiver (store delegation, module singleton delegation).

#599 (closed) addressed super().method() and axios.get-style cases. Store wrappers and _default.foo() delegation still false-positive.

Environment

  • Binary: codebase-memory-mcp 0.8.1
  • Project: home-sean-campbell-github-willow-2.0 — 14 nodes with unguarded_recursion=true

Reproduction

core.soil.get — flagged, not recursive

def get(collection: str, record_id: str) -> dict | None:
    rec = _get_store().get(collection, record_id)  # store.get, not self.get
    ...

Graph properties: unguarded_recursion=true, self_recursive=true, loop_count=0.

Same pattern on core.soil.put, delete, stats (_get_store().put etc.).

core.gleipnir.check — delegation false positive

def check(app_id: str, tool_name: str) -> tuple[bool, str]:
    return _default.check(app_id, tool_name)

Graph: unguarded_recursion=true, recursive=true.

willow.nuke.executerecursive=true, no self-call

Body is loops + filesystem/Postgres I/O only; no call to execute itself. Yet recursive=true (and high transitive_loop_depth propagation).

Expected

Self-recursion only when the call resolves to the same function/method binding — not bare name match on a different receiver (store.get, _default.check, etc.).

Impact

Hot-path queries like WHERE f.unguarded_recursion = true surface noise; agents may treat load-bearing store wrappers as recursion hazards. Same bare-name resolver class as fan-in inflation (#725).

Relation to #599

#599 fixed several super() / cross-receiver patterns. This report is the remaining delegation/store bucket on v0.8.1 after that close.

Confirmations

Activity

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

    bugSomething isn't workingparsing/qualityGraph extraction bugs, false positives, missing edgespriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions