Skip to content

frozen_issue_codes falsely reports a live multiline Python Issue call as removed #363

Description

@alpCaner

Found while reviewing

PR #352 at 1cab240df85d5896c5390697c069720ff2bb24d3 fails cargo test --locked --workspace on every native OS:

RESERVED ISSUE CODE `sdk.network-required` is gone:
python/tan/commands/sdk_cmd.py no longer contains
"Issue(\"sdk.network-required\", \"warning\", ...)" outside comments.

The emission is not gone. It is now a normal multiline Python call:

Issue(
    "sdk.network-required",
    "warning",
    ...
)

The source scanner keys on one formatting shape rather than Python syntax, so a line wrap turns a live registered code into a stale-code verdict.

Impact

  • Linux, Windows and macOS contract jobs all fail for a false reason.
  • Formatting becomes part of the wire-contract gate.
  • The tempting workaround—rewrapping production code to satisfy substring scanning—leaves the scanner unable to recognize other valid call shapes.

Acceptance criteria

  • Parse Python issue emissions structurally (AST or the existing emitted-code scanner), including multiline calls and named arguments.
  • Keep ignoring comments/docstrings and dynamically assembled codes according to the registry policy.
  • Add a regression fixture for this exact multiline Issue call.
  • cargo test --locked --workspace passes without changing the emission or removing the registry entry.

Related: #219, #224, PR #352.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingciCI workflows, gates and test wiringenvelope-contractThe {command,ok,exitCode,project,data,issues} contract consumed by alp-sdk-vscodepython-portRust-to-Python port of the tan command surface

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions