From 9dac1d1df1e8d4cd8b370ae7b5876e182e6fa4c6 Mon Sep 17 00:00:00 2001 From: Christopher Kevin Date: Sat, 14 Nov 2026 23:55:40 +0000 Subject: [PATCH 1/2] fix(codex): recognize credential-prefixed native plugin launches Signed-off-by: Christopher Kevin --- CHANGELOG.md | 4 ++++ src/skillevaluator/tier3/harbor/native_agents.py | 7 +++++-- tests/tier3/test_native_launch_insertion.py | 12 ++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86317f39e..f2ce5952b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -249,6 +249,10 @@ All notable changes to SkillEvaluator are documented in this file. ### Fixed +- 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. - The Copilot CLI `CP-NO-FRONTMATTER` finding and the plugin component findings of `harness-check` no longer show internal test notes in their messages. - The behavior judge's FILE CHANGES evidence now covers Codex `apply_patch` diff --git a/src/skillevaluator/tier3/harbor/native_agents.py b/src/skillevaluator/tier3/harbor/native_agents.py index 5ffcd3885..43f83c77e 100644 --- a/src/skillevaluator/tier3/harbor/native_agents.py +++ b/src/skillevaluator/tier3/harbor/native_agents.py @@ -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 ... -- ``. - _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): diff --git a/tests/tier3/test_native_launch_insertion.py b/tests/tier3/test_native_launch_insertion.py index 08b5d27d4..7f666e9ac 100644 --- a/tests/tier3/test_native_launch_insertion.py +++ b/tests/tier3/test_native_launch_insertion.py @@ -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) From 88e81416fbcaaa59e2dce43dbdc7298f416d7956 Mon Sep 17 00:00:00 2001 From: Christopher Kevin Date: Sat, 14 Nov 2026 20:07:37 -0800 Subject: [PATCH 2/2] Keep only this change's changelog entry after merging main Signed-off-by: Christopher Kevin --- CHANGELOG.md | 59 ++++------------------------------------------------ 1 file changed, 4 insertions(+), 55 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a67dace14..5798d83d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -617,61 +621,6 @@ All notable changes to SkillEvaluator are documented in this file. the judge model's geography prefix to a bare name and using a full Bedrock ID as given. The reusable CI workflows do not take the variable. -- 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. -- The Copilot CLI `CP-NO-FRONTMATTER` finding and the plugin component findings - of `harness-check` no longer show internal test notes in their messages. -- The behavior judge's FILE CHANGES evidence now covers Codex `apply_patch` - calls. Codex passes its patch as a single `input` argument, which the write - evidence helpers did not read, so a Codex patch contributed no FILE CHANGES - entry and its contents survived only in the compact tool history -- the - section budgeted last, and so the first dropped when the bundle is trimmed. - The helpers now take the changed paths from the patch's `Add File`, - `Update File` and `Delete File` headers, naming every file a multi-file patch - touches rather than letting the first stand for the rest, and keep the patch - text itself as the write body. A headerless or malformed `input` is left - alone, so a shell source string is not reported as a file change. -- Automatic SkillSpector selection now verifies the pinned release on first use - and falls back to the verified managed wheel for a different or unverifiable - version. Discovery stays free of subprocesses, version probes omit provider - credentials and respect the caller timeout, and explicit executable overrides - remain available. Doctor reports the path and source selected by the probe. -- `health-check --tier 1` (and `doctor --tier 1`) labels a scanner that - SkillEvaluator provisions itself: `(uv tool run)` for SkillSpector and - `(managed)` for the downloaded Gitleaks binary. Before, the Gitleaks row - ended in `(from None)` and the SkillSpector row named - `SKILLEVALUATOR_SKILLSPECTOR_PATH` although no override was set. -- The comments-only consumer template now grants its required read and PR-comment - permissions only to the comment job, with no workflow-wide token permissions. -- The behavior evidence gate no longer keeps a score for an expectation that - names an observed artifact but also asks for something only the final answer - could show. "Writes `report.py` and explains why each column was dropped" was - treated as settled by the artifact alone, so a case kept a score whose second - half was never checked. Every clause of an expectation must now name a - checkable artifact of its own; one that does not keeps the gate, as a wholly - prose expectation already did. -- SARIF `artifactLocation.uri` values percent-encode a `%` in a file name as - `%25`. A file such as `a%20b.md` no longer shares the URI of `a b.md`, and - `100%.md` no longer produces an invalid URI. -- Reports no longer fail on Linux when a skill file name is not valid UTF-8 - (#525). Finding IDs, HTML issue keys, the written HTML, JSON, Markdown and - SARIF reports, the CI workflow scripts that re-render retained reports, and - generated `evals/evals.json` datasets accept the surrogate-escaped name - Python gives such a file. The SARIF `artifactLocation.uri` percent-encodes - the name's original bytes (`caf%E9.md`). -- SARIF `artifactLocation.uri` values stay valid for more paths. A - repository-relative path whose first segment contains a colon, such as - `notes:v2.md`, gets a `./` prefix so it no longer reads as a URI scheme. A - path outside the workspace is written as an absolute `file:` URI instead of - a bare file system path, and a symlink in the workspace that points outside - it keeps the link's repository-relative path. -- Accuracy and Behavior judge prompts clarify that explicit final-answer formats - apply to the entire final response, independently of correct values in tool - output or references. Scoring and thresholds are unchanged; an Accuracy format - failure alone can still score 0.8 and pass the default threshold. - - When the default report directory cannot be claimed, the error now gives the reason and the way out: `Cannot safely reserve default report output directory: (). Choose a report directory with