Skip to content

Python: state_danger misses subprocess.check_output; arch_globals misses global statements #8865

Closed

Description

@squid-protocol

What is wrong

Two more Python families that fall short of what they name, found by the new family-validity tool (#8864) on GitGalaxy's own 72,044 Python functions. Same class as #8857-#8861, filed once.

  1. state_danger (high-risk execution) misses subprocess.check_output and check_call. The rule lists subprocess.(call|Popen|run). check_output is called in 540 functions of the engine's own code and none score. Recall 0.56, precision 0.79 over 503 functions the oracle sees. Precision is below the bar too, so the over-count side needs a look as well.
  2. arch_globals misses global / nonlocal statements. The family reads os.environ, sys.argv, sys.path; a function that rebinds module state with global scores 0 (480 functions). Recall 0.51, precision 1.00 over 988 functions.

Reproduce

import subprocess

STATE = 0

def runs():
    return subprocess.check_output(["ls"])   # state_danger == 0, should be > 0

def mutates():
    global STATE
    STATE += 1                               # arch_globals == 0, should be > 0

Expected

state_danger > 0 for the check_output / check_call forms (and say in the PR what the precision side found). arch_globals > 0 for functions that declare global or nonlocal, if "globals" is meant to include rebinding module state: a definition call, so answer it in #8862 first.

Part of #8863. Time every keyword change (CPU seconds on keyword-rosetta and language-crucible); rosetta:rebless-owed if counts move; add the cases above as a test.

Activity

  1. added
    bug
    python
    core-engine
    on Nov 21, 2026
  2. squid-protocol commented on Nov 21, 2026

    @squid-protocol
    OwnerAuthor

    Claimed by promoter-bot host melek, lease renewed 2026-11-21T17:51Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:melek label.

  3. added a commit that references this issue on Nov 27, 2026
    557db06
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

    bugclaim:melekcore-enginepriority: mediumpython

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions