n8n/packages/@n8n/task-runner-python/tests/fixtures
Mutasem Aldmour 09632b6711
fix(core): Address review feedback on the Python import policy
- Only treat imports as unrestricted when BOTH allowlists are wildcards, which is
  the condition the runner's own analyzer short-circuits on. With one wildcard the
  runner still checks the other category, and classifying a module needs Python's
  stdlib list, so the linter now abstains explicitly instead of implying the
  import is fine.
- Render the two allowlists as separate categories in the prompt and the lint
  message. Merging them presented a module filed under the wrong one as
  importable, though the runner rejects it.
- Stop claiming "this deployment allowlists nothing" when no policy was supplied.
  The sandbox CLI cannot see the configuration, and now says so.
- Report a wildcard combined with named modules as a misconfiguration rather than
  as a permissive allowlist. The runner refuses to start on it, so the previous
  reading told the builder its imports were fine when no Python could run at all.
- Only trust the policy in the build-time check when it is authoritative. In
  external runner mode the runner may be stricter than n8n thinks, so a
  non-authoritative policy must not silence a warning.
- Skip a stale `pythonCode` body on a node whose language is JavaScript.
- Replace a `toContain('re')` assertion that also matched "runner" in the
  surrounding prompt text, and correct the fixture's path to its Python checker.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 11:56:28 +02:00
..
allowlist-parsing.json fix(core): Address review feedback on the Python import policy 2026-08-27 11:56:28 +02:00
local_task_broker.py test(core): Dynamically allocate ports for Python integration tests (#20825) 2025-10-16 10:39:12 +02:00
task_runner_manager.py test(core): Dynamically allocate ports for Python integration tests (#20825) 2025-10-16 10:39:12 +02:00
test_constants.py test(core): Dynamically allocate ports for Python integration tests (#20825) 2025-10-16 10:39:12 +02:00