Skip to content

Conversation

@lemontreeran
Copy link
Collaborator

Motivation

  • Ensure the security arena uses direct import semantics for participant submissions consistent with upstream PR fix(badblueprint): use harness paths in scenario TOML #8.
  • Make the badblueprint submission available at import-time rather than via lazy-loading or placeholders.
  • Satisfy Python package requirements so direct imports from the submissions tree succeed.

Description

  • Added a direct import of the plugin class using from ..submissions.purple_vanguard.badblueprint.plugin import BadblueprintPlugin in scenarios/security_arena/plugins/registry.py.
  • Registered the plugin in SCENARIO_PLUGINS as "badblueprint": BadblueprintPlugin.
  • Added minimal package files scenarios/security_arena/submissions/__init__.py, scenarios/security_arena/submissions/purple_vanguard/__init__.py, and scenarios/security_arena/submissions/purple_vanguard/badblueprint/__init__.py to enable direct imports.
  • Only scenarios/security_arena/plugins/registry.py and the three __init__.py files were added/modified.

Testing

  • Ran python -c "from scenarios.security_arena.plugins.registry import load_scenario; print('ok')" and it printed ok indicating imports and registry loading succeeded.
  • Ran python -c "from scenarios.security_arena.plugins.registry import SCENARIO_PLUGINS; print('badblueprint' in SCENARIO_PLUGINS)" and it printed True confirming the plugin is registered.
  • No automated tests failed during these checks.

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 971b924742

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

from .portfolioiq import PortfolioIQPlugin
from .thingularity import ThingularityPlugin
from .example_medical import MedicalRecordsPlugin
from ..submissions.purple_vanguard.badblueprint.plugin import BadblueprintPlugin

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use absolute import for submissions package

When the orchestrator runs, it prepends scenarios/security_arena to sys.path and imports plugins.registry as a top-level package (see scenarios/security_arena/orchestrator.py). In that execution mode, plugins has no parent package, so from ..submissions... attempts to traverse beyond the top level and will raise ImportError: attempted relative import beyond top-level package, preventing the arena from starting. This should be an absolute import like from submissions.purple_vanguard.badblueprint.plugin import BadblueprintPlugin, or the package layout/sys.path should be adjusted so ..submissions is valid.

Useful? React with 👍 / 👎.

@lemontreeran lemontreeran merged commit dfebb83 into submission/purple_vanguard Jan 13, 2026
@lemontreeran lemontreeran deleted the codex/update-registry-for-badblueprint-plugin-import branch January 13, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants