Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ All notable changes to SkillEvaluator are documented in this file.
failed the member and bumped its `severity_counts`, but a catalog validates
each skill on its own, so nothing in that skill's output said what caused
either.
- Native Codex plugin loading now recognizes Harbor launches prefixed with
empty credential assignments, preserving credential isolation while running
plugin setup before the agent. These launches previously failed after the
task with a missing native-launch error.
- Folder validation preserves author and metadata ID advisories from passing
skills. Catalog summaries include duplicate ID severity counts and consistent
member verdicts, while explicitly labeling linked reports as single-skill
Expand Down
7 changes: 5 additions & 2 deletions src/skillevaluator/tier3/harbor/native_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,11 @@ def _skilleval_rewrite_launcher(self, launcher: str, match: re.Match[str]) -> st


class _NativeCodexMixin(_NativePluginLoadMixin):
# Harbor: ``...; codex exec --dangerously-bypass-approvals-and-sandbox ... -- <prompt>``.
_SKILLEVAL_LAUNCH_RE = re.compile(_COMMAND_START + r"codex[ \t]+exec\b")
# Harbor clears unselected fallback credentials with empty shell assignments
# before launching Codex. Keep them on the launch side of the setup group.
_SKILLEVAL_LAUNCH_RE = re.compile(
_COMMAND_START + r"(?:CODEX_API_KEY=[ \t]+)?(?:OPENAI_API_KEY=[ \t]+)?codex[ \t]+exec\b"
)


class _NativeOpenCodeMixin(_NativePluginLoadMixin):
Expand Down
12 changes: 12 additions & 0 deletions tests/tier3/test_native_launch_insertion.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,15 @@ def test_second_launch_in_one_run_fails() -> None:
agent.skilleval_native_command(CODEX, None)
with pytest.raises(NativeLaunchError):
agent.skilleval_native_command(CODEX, None)


@pytest.mark.parametrize("assignments", ["CODEX_API_KEY= ", "OPENAI_API_KEY= ", "CODEX_API_KEY= OPENAI_API_KEY= "])
def test_codex_native_setup_preserves_harbor_credential_clearing(assignments: str) -> None:
command = CODEX.replace("codex exec", assignments + "codex exec")
agent = _mixin(native_agents._NativeCodexMixin)
rewritten, _ = agent.skilleval_native_command(command, None)
assert agent._skilleval_native_started
assert rewritten == command.replace(assignments + "codex exec", SETUP + assignments + "codex exec")
assert subprocess.run(["sh", "-n", "-c", rewritten], check=False).returncode == 0
with pytest.raises(NativeLaunchError):
agent.skilleval_native_command(command, None)
Loading