Skip to content

Codex belt for #1453 - #1454

Merged
stranske merged 14 commits into
mainfrom
codex/issue-1453
Feb 10, 2026
Merged

stranske merged 14 commits into
mainfrom
codex/issue-1453

Conversation

@stranske

@stranske stranske commented Feb 10, 2026

Copy link
Copy Markdown
Owner

Source: Issue #1453

Automated Status Summary

Scope

PR #1447 addressed issue #1437, but verification failed because the actual workflow files were not updated to use pinned LLM dependency installs and proper pip caching, and the enforcement tests were effectively skipped in normal CI. This follow-up closes the remaining gaps by updating the live GitHub Actions workflows, enabling non-skipped enforcement tests, and hardening check_prompt_injection() to avoid runtime errors on malformed detector outputs.

Context for Agent

Related Issues/PRs

Tasks

Test Updates (Agent-Executable)

  • Remove the unconditional skip logic from tests/workflows/test_workflow_llm_installs.py so tests run in normal CI
  • Add assertion to tests/workflows/test_workflow_llm_installs.py to verify agents-auto-pilot workflow contains the pinned install step and lacks unpinned langchain commands
  • Add assertions to tests/workflows/test_workflow_llm_installs.py to verify reusable-agents-verifier workflow contains pinned install steps in both evaluate and compare modes
  • Add assertions to tests/workflows/test_workflow_llm_installs.py to verify both workflows include actions/cache@v4 with correct cache keys containing Python version and requirements hash
  • Add unit tests to validate check_prompt_injection() handles malformed detector outputs without raising exceptions
  • Add unit tests to validate check_prompt_injection() correctly handles known-good reason code formats

Code Hardening (Agent-Executable)

  • Update check_prompt_injection() to validate detector output format before parsing (check prefix/delimiters and guard integer conversion)
  • Implement safe fallback path in check_prompt_injection() for unexpected formats (no exception, defined behavior)

Workflow Update Snippets (Agent-Executable)

  • Create docs/workflow-updates/agents-auto-pilot-changes.yml with complete YAML snippet for pip install step and cache configuration
  • Create docs/workflow-updates/reusable-agents-verifier-changes.yml with complete YAML snippets for evaluate/compare mode pip install steps and cache configuration
  • Add docs/workflow-updates/README.md with instructions for applying the YAML snippets to protected workflow files

Acceptance criteria

Workflow Files (Human-Applied)

  • .github/workflows/agents-auto-pilot.yml contains a step that executes exactly pip install -r tools/requirements-llm.txt (as a run command in the workflow)
  • .github/workflows/agents-auto-pilot.yml does NOT contain any pip install commands that install langchain via an unpinned specifier, including (but not limited to) pip install langchain, pip install langchain*, pip install langchain== (missing version), or pip install git+...langchain...
  • .github/workflows/reusable-agents-verifier.yml includes a step that executes exactly pip install -r .workflows-lib/tools/requirements-llm.txt in the evaluate mode execution path
  • .github/workflows/reusable-agents-verifier.yml includes a step that executes exactly pip install -r .workflows-lib/tools/requirements-llm.txt in the compare mode execution path
  • .github/workflows/reusable-agents-verifier.yml does NOT contain any pip install commands that install langchain via an unpinned specifier in the evaluate or compare execution paths (e.g., pip install langchain*, pip install langchain, pip install langchain-community without a version pin)
  • .github/workflows/agents-auto-pilot.yml contains an actions/cache@v4 step that caches pip (cache path includes pip cache directory) and uses a cache key that includes BOTH the Python version and ${{ hashFiles('tools/requirements-llm.txt') }}
  • .github/workflows/reusable-agents-verifier.yml contains an actions/cache@v4 step that caches pip (cache path includes pip cache directory) and uses a cache key that includes BOTH the Python version and ${{ hashFiles('.workflows-lib/tools/requirements-llm.txt') }}

Test Enforcement

  • tests/workflows/test_workflow_llm_installs.py is executed under normal CI (i.e., it is not unconditionally skipped) and will fail if the agents-auto-pilot workflow lacks the pinned requirements install step
  • tests/workflows/test_workflow_llm_installs.py asserts that .github/workflows/agents-auto-pilot.yml contains pip install -r tools/requirements-llm.txt AND asserts it does not contain any floating pip install langchain*/unversioned langchain install commands
  • tests/workflows/test_workflow_llm_installs.py asserts that .github/workflows/reusable-agents-verifier.yml contains pip install -r .workflows-lib/tools/requirements-llm.txt for BOTH evaluate and compare modes (separate assertions per mode/path, not a single generic check)
  • tests/workflows/test_workflow_llm_installs.py asserts that BOTH workflows include an actions/cache@v4 step and that each cache key includes Python version + the correct hashFiles(...) call for the correct requirements path

Code Hardening

  • check_prompt_injection() does not raise an exception when detect_prompt_injection returns an unexpected or malformed reason code (e.g., empty string, missing delimiter/prefix, non-integer suffix); instead it follows a defined fallback path (e.g., returns a safe default or logs and continues)
  • check_prompt_injection() continues to correctly handle valid reason code formats by producing the same outcome as before for at least one known-good reason code value
  • Unit tests pass that verify check_prompt_injection() behavior with both malformed and known-good detector outputs

Documentation Deliverables

  • docs/workflow-updates/agents-auto-pilot-changes.yml exists and contains valid YAML snippet for pip install and cache steps
  • docs/workflow-updates/reusable-agents-verifier-changes.yml exists and contains valid YAML snippets for evaluate/compare mode pip install and cache steps
  • docs/workflow-updates/README.md exists and provides clear instructions for applying the YAML snippets to the protected workflow files

Head SHA: 8d75b3e
Latest Runs: ❔ in progress — Agents PR meta manager
Required: gate: ⏸️ not started

Workflow / Job Result Logs
Agents PR meta manager ❔ in progress View run

Copilot AI review requested due to automatic review settings February 10, 2026 18:33
@stranske stranske added agent:codex Agent-created issues from Codex autofix Opt-in automated formatting & lint remediation from:codex Created from Codex agent labels Feb 10, 2026
@stranske

Copy link
Copy Markdown
Owner Author

Codex Worker activated for branch codex/issue-1453.

@codex start

Automated belt worker prepared this PR. Please continue implementing the requested changes.

@stranske-keepalive

stranske-keepalive Bot commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

🤖 Keepalive Loop Status

PR #1454 | Agent: Codex | Iteration 5+1 🚀 extended

Current State

Metric Value
Iteration progress [##########] 5/5 5 base + 1 extended = 6 total
Action wait (missing-agent-label)
Disposition skipped (transient)
Gate success
Tasks 21/28 complete
Timeout 45 min (default)
Timeout usage 3m elapsed (8%, 42m remaining)
Keepalive ❌ disabled
Autofix ❌ disabled

🔍 Failure Classification

| Error type | infrastructure |
| Error category | resource |
| Suggested recovery | Confirm the referenced resource exists (repo, PR, branch, workflow, or file). |

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces an agent task ledger for issue #1453, intended to track progress on follow-up work (workflow LLM dependency pinning, enforcement tests, and check_prompt_injection() hardening). However, the PR contents shown only add the ledger file and do not include the actual workflow/test/code changes described in the PR metadata.

Changes:

  • Added a new automation ledger file .agents/issue-1453-ledger.yml enumerating tasks and statuses for issue #1453.

@stranske-automation-bot

Copy link
Copy Markdown
Collaborator

Issue #1453: [Follow-up] Modify .github/workflows/agents-auto-pilot.yml to (PR #1447)

Automated Status Summary

Scope

PR #1447 addressed issue #1437, but verification failed because the actual workflow files were not updated to use pinned LLM dependency installs and proper pip caching, and the enforcement tests were effectively skipped in normal CI. This follow-up closes the remaining gaps by updating the live GitHub Actions workflows, enabling non-skipped enforcement tests, and hardening check_prompt_injection() to avoid runtime errors on malformed detector outputs.

Tasks

Test Updates (Agent-Executable)

  • Remove the unconditional skip logic from tests/workflows/test_workflow_llm_installs.py so tests run in normal CI
  • Add assertion to tests/workflows/test_workflow_llm_installs.py to verify agents-auto-pilot workflow contains the pinned install step and lacks unpinned langchain commands
  • Add assertions to tests/workflows/test_workflow_llm_installs.py to verify reusable-agents-verifier workflow contains pinned install steps in both evaluate and compare modes
  • Add assertions to tests/workflows/test_workflow_llm_installs.py to verify both workflows include actions/cache@v4 with correct cache keys containing Python version and requirements hash
  • Add unit tests to validate check_prompt_injection() handles malformed detector outputs without raising exceptions
  • Add unit tests to validate check_prompt_injection() correctly handles known-good reason code formats

Code Hardening (Agent-Executable)

  • Update check_prompt_injection() to validate detector output format before parsing (check prefix/delimiters and guard integer conversion)
  • Implement safe fallback path in check_prompt_injection() for unexpected formats (no exception, defined behavior)

Workflow Update Snippets (Agent-Executable)

  • Create docs/workflow-updates/agents-auto-pilot-changes.yml with complete YAML snippet for pip install step and cache configuration
  • Create docs/workflow-updates/reusable-agents-verifier-changes.yml with complete YAML snippets for evaluate/compare mode pip install steps and cache configuration
  • Add docs/workflow-updates/README.md with instructions for applying the YAML snippets to protected workflow files

Acceptance Criteria

Workflow Files (Human-Applied)

  • .github/workflows/agents-auto-pilot.yml contains a step that executes exactly pip install -r tools/requirements-llm.txt (as a run command in the workflow)
  • .github/workflows/agents-auto-pilot.yml does NOT contain any pip install commands that install langchain via an unpinned specifier, including (but not limited to) pip install langchain, pip install langchain*, pip install langchain== (missing version), or pip install git+...langchain...
  • .github/workflows/reusable-agents-verifier.yml includes a step that executes exactly pip install -r .workflows-lib/tools/requirements-llm.txt in the evaluate mode execution path
  • .github/workflows/reusable-agents-verifier.yml includes a step that executes exactly pip install -r .workflows-lib/tools/requirements-llm.txt in the compare mode execution path
  • .github/workflows/reusable-agents-verifier.yml does NOT contain any pip install commands that install langchain via an unpinned specifier in the evaluate or compare execution paths (e.g., pip install langchain*, pip install langchain, pip install langchain-community without a version pin)
  • .github/workflows/agents-auto-pilot.yml contains an actions/cache@v4 step that caches pip (cache path includes pip cache directory) and uses a cache key that includes BOTH the Python version and ${{ hashFiles('tools/requirements-llm.txt') }}
  • .github/workflows/reusable-agents-verifier.yml contains an actions/cache@v4 step that caches pip (cache path includes pip cache directory) and uses a cache key that includes BOTH the Python version and ${{ hashFiles('.workflows-lib/tools/requirements-llm.txt') }}

Test Enforcement

  • tests/workflows/test_workflow_llm_installs.py is executed under normal CI (i.e., it is not unconditionally skipped) and will fail if the agents-auto-pilot workflow lacks the pinned requirements install step
  • tests/workflows/test_workflow_llm_installs.py asserts that .github/workflows/agents-auto-pilot.yml contains pip install -r tools/requirements-llm.txt AND asserts it does not contain any floating pip install langchain*/unversioned langchain install commands
  • tests/workflows/test_workflow_llm_installs.py asserts that .github/workflows/reusable-agents-verifier.yml contains pip install -r .workflows-lib/tools/requirements-llm.txt for BOTH evaluate and compare modes (separate assertions per mode/path, not a single generic check)
  • tests/workflows/test_workflow_llm_installs.py asserts that BOTH workflows include an actions/cache@v4 step and that each cache key includes Python version + the correct hashFiles(...) call for the correct requirements path

Code Hardening

  • check_prompt_injection() does not raise an exception when detect_prompt_injection returns an unexpected or malformed reason code (e.g., empty string, missing delimiter/prefix, non-integer suffix); instead it follows a defined fallback path (e.g., returns a safe default or logs and continues)
  • check_prompt_injection() continues to correctly handle valid reason code formats by producing the same outcome as before for at least one known-good reason code value
  • Unit tests pass that verify check_prompt_injection() behavior with both malformed and known-good detector outputs

Documentation Deliverables

  • docs/workflow-updates/agents-auto-pilot-changes.yml exists and contains valid YAML snippet for pip install and cache steps
  • docs/workflow-updates/reusable-agents-verifier-changes.yml exists and contains valid YAML snippets for evaluate/compare mode pip install and cache steps
  • docs/workflow-updates/README.md exists and provides clear instructions for applying the YAML snippets to the protected workflow files

Full Issue Text

Workflow LLM Dependency Pinning and Test Enforcement

Why

PR #1447 addressed issue #1437, but verification failed because the actual workflow files were not updated to use pinned LLM dependency installs and proper pip caching, and the enforcement tests were effectively skipped in normal CI. This follow-up closes the remaining gaps by updating the live GitHub Actions workflows, enabling non-skipped enforcement tests, and hardening check_prompt_injection() to avoid runtime errors on malformed detector outputs.

Source

Tasks

Test Updates (Agent-Executable)

  • Remove the unconditional skip logic from tests/workflows/test_workflow_llm_installs.py so tests run in normal CI
  • Add assertion to tests/workflows/test_workflow_llm_installs.py to verify agents-auto-pilot workflow contains the pinned install step and lacks unpinned langchain commands
  • Add assertions to tests/workflows/test_workflow_llm_installs.py to verify reusable-agents-verifier workflow contains pinned install steps in both evaluate and compare modes
  • Add assertions to tests/workflows/test_workflow_llm_installs.py to verify both workflows include actions/cache@v4 with correct cache keys containing Python version and requirements hash
  • Add unit tests to validate check_prompt_injection() handles malformed detector outputs without raising exceptions
  • Add unit tests to validate check_prompt_injection() correctly handles known-good reason code formats

Code Hardening (Agent-Executable)

  • Update check_prompt_injection() to validate detector output format before parsing (check prefix/delimiters and guard integer conversion)
  • Implement safe fallback path in check_prompt_injection() for unexpected formats (no exception, defined behavior)

Workflow Update Snippets (Agent-Executable)

  • Create docs/workflow-updates/agents-auto-pilot-changes.yml with complete YAML snippet for pip install step and cache configuration
  • Create docs/workflow-updates/reusable-agents-verifier-changes.yml with complete YAML snippets for evaluate/compare mode pip install steps and cache configuration
  • Add docs/workflow-updates/README.md with instructions for applying the YAML snippets to protected workflow files

Deferred Tasks (Requires Human)

Note: The following tasks require modifications to protected .github/workflows/ files that cannot be modified by the agent. YAML snippets will be provided in docs/workflow-updates/ for human review and application.

  • Add a dedicated step to .github/workflows/agents-auto-pilot.yml that executes pip install -r tools/requirements-llm.txt
  • Remove all unpinned pip install langchain* commands from .github/workflows/agents-auto-pilot.yml
  • Add a step to .github/workflows/reusable-agents-verifier.yml evaluate mode that executes pip install -r .workflows-lib/tools/requirements-llm.txt
  • Add a step to .github/workflows/reusable-agents-verifier.yml compare mode that executes pip install -r .workflows-lib/tools/requirements-llm.txt
  • Remove all unpinned pip install langchain* commands from evaluate and compare modes in .github/workflows/reusable-agents-verifier.yml
  • Add actions/cache@v4 pip cache step to .github/workflows/agents-auto-pilot.yml with cache key including Python version and hashFiles('tools/requirements-llm.txt')
  • Add actions/cache@v4 pip cache step to .github/workflows/reusable-agents-verifier.yml with cache key including Python version and hashFiles('.workflows-lib/tools/requirements-llm.txt')

Acceptance Criteria

Workflow Files (Human-Applied)

  • .github/workflows/agents-auto-pilot.yml contains a step that executes exactly pip install -r tools/requirements-llm.txt (as a run command in the workflow)
  • .github/workflows/agents-auto-pilot.yml does NOT contain any pip install commands that install langchain via an unpinned specifier, including (but not limited to) pip install langchain, pip install langchain*, pip install langchain== (missing version), or pip install git+...langchain...
  • .github/workflows/reusable-agents-verifier.yml includes a step that executes exactly pip install -r .workflows-lib/tools/requirements-llm.txt in the evaluate mode execution path
  • .github/workflows/reusable-agents-verifier.yml includes a step that executes exactly pip install -r .workflows-lib/tools/requirements-llm.txt in the compare mode execution path
  • .github/workflows/reusable-agents-verifier.yml does NOT contain any pip install commands that install langchain via an unpinned specifier in the evaluate or compare execution paths (e.g., pip install langchain*, pip install langchain, pip install langchain-community without a version pin)
  • .github/workflows/agents-auto-pilot.yml contains an actions/cache@v4 step that caches pip (cache path includes pip cache directory) and uses a cache key that includes BOTH the Python version and ${{ hashFiles('tools/requirements-llm.txt') }}
  • .github/workflows/reusable-agents-verifier.yml contains an actions/cache@v4 step that caches pip (cache path includes pip cache directory) and uses a cache key that includes BOTH the Python version and ${{ hashFiles('.workflows-lib/tools/requirements-llm.txt') }}

Test Enforcement

  • tests/workflows/test_workflow_llm_installs.py is executed under normal CI (i.e., it is not unconditionally skipped) and will fail if the agents-auto-pilot workflow lacks the pinned requirements install step
  • tests/workflows/test_workflow_llm_installs.py asserts that .github/workflows/agents-auto-pilot.yml contains pip install -r tools/requirements-llm.txt AND asserts it does not contain any floating pip install langchain*/unversioned langchain install commands
  • tests/workflows/test_workflow_llm_installs.py asserts that .github/workflows/reusable-agents-verifier.yml contains pip install -r .workflows-lib/tools/requirements-llm.txt for BOTH evaluate and compare modes (separate assertions per mode/path, not a single generic check)
  • tests/workflows/test_workflow_llm_installs.py asserts that BOTH workflows include an actions/cache@v4 step and that each cache key includes Python version + the correct hashFiles(...) call for the correct requirements path

Code Hardening

  • check_prompt_injection() does not raise an exception when detect_prompt_injection returns an unexpected or malformed reason code (e.g., empty string, missing delimiter/prefix, non-integer suffix); instead it follows a defined fallback path (e.g., returns a safe default or logs and continues)
  • check_prompt_injection() continues to correctly handle valid reason code formats by producing the same outcome as before for at least one known-good reason code value
  • Unit tests pass that verify check_prompt_injection() behavior with both malformed and known-good detector outputs

Documentation Deliverables

  • docs/workflow-updates/agents-auto-pilot-changes.yml exists and contains valid YAML snippet for pip install and cache steps
  • docs/workflow-updates/reusable-agents-verifier-changes.yml exists and contains valid YAML snippets for evaluate/compare mode pip install and cache steps
  • docs/workflow-updates/README.md exists and provides clear instructions for applying the YAML snippets to the protected workflow files

Implementation Notes

Agent-Executable Work

Tests:

  • Update tests/workflows/test_workflow_llm_installs.py to remove unconditional skip logic (e.g., gating on AGENT_ENV == 'agent-high-privilege')
  • Add explicit assertions for:
    • Presence of the exact pinned pip install -r ... commands
    • Absence of floating/unpinned pip install ... langchain... patterns
    • Presence and correctness of actions/cache@v4 and cache key contents (Python version + correct hashFiles(...))
  • Prefer robust checks (YAML parsing where feasible) rather than only substring matching; if regex scanning is used, ensure it cannot be bypassed by formatting differences

check_prompt_injection() hardening:

  • Validate the detector output format before parsing (e.g., check prefix/delimiters; guard integer conversion)
  • On unexpected formats, follow a safe fallback path (no exception)
  • Add/extend unit tests by stubbing/mocking detect_prompt_injection for both malformed and known-good return values

Workflow Update Snippets:
Create complete, ready-to-apply YAML snippets in docs/workflow-updates/ directory:

  • agents-auto-pilot-changes.yml - Contains the pip install step and cache configuration for agents-auto-pilot workflow
  • reusable-agents-verifier-changes.yml - Contains the pip install steps for evaluate/compare modes and cache configuration
  • README.md - Instructions for human to apply these snippets to the protected workflow files

Human-Required Work

Workflow Changes:

  • Make changes directly in the live workflow files:
    • .github/workflows/agents-auto-pilot.yml: add a dedicated step with run: pip install -r tools/requirements-llm.txt and remove any separate pip install langchain... commands
    • .github/workflows/reusable-agents-verifier.yml: ensure both evaluate and compare gated paths include run: pip install -r .workflows-lib/tools/requirements-llm.txt, and remove/avoid unpinned langchain installs in those paths
  • Add actions/cache@v4 for pip caching in both workflows:
    • Use a pip cache path (commonly ~/.cache/pip)
    • Cache key must combine Python version + requirements hash:
      • agents-auto-pilot: include hashFiles('tools/requirements-llm.txt')
      • reusable-agents-verifier: include hashFiles('.workflows-lib/tools/requirements-llm.txt')
Background (previous attempt context)
  • The agent only updated documentation snippets and tests without modifying the actual workflow files (.github/workflows/agents-auto-pilot.yml and .github/workflows/reusable-agents-verifier.yml). This failed because documentation changes did not propagate to the live workflow configurations.
  • The test for workflow enforcement is skipped under standard environments. Skipping tests unless AGENT_ENV is agent-high-privilege makes it unreliable for catching configuration errors in typical CI/dev environments.
  • The PR adds a 'needs-human' documentation comment (agents/codex-1447.md) acknowledging workflow updates are required, but documentation is not a substitute for implementing the acceptance criteria (post-merge verification is about actual code state).
  • Test file tests/workflows/test_workflow_llm_installs.py skips all assertions when AGENT_ENV != 'agent-high-privilege', meaning the tests cannot verify the acceptance criteria are met.

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

Copy link
Copy Markdown

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: 59bfc77cda

ℹ️ 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".

Comment on lines +99 to +100
title: Add a dedicated step to `.github/workflows/agents-auto-pilot.yml` that
executes `pip install -r tools/requirements-llm.txt`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Exclude human-only workflow edits from runnable task queue

This ledger adds deferred workflow-edit tasks (for example, modifying .github/workflows/agents-auto-pilot.yml) as normal todo items, but the worker selects the next todo task without any “human-only” filter (.github/workflows/agents-72-codex-belt-worker.yml, task selection around lines 850-858). Once earlier tasks are done, automation will keep picking these protected-file tasks, fail, reset them to todo, and stall issue #1453 progress in repeated runs; these should be removed from the executable task list or explicitly marked so the worker skips them.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Testing

  • curl -I https://www.google.com | head -n 5
  • pytest -q tests/workflows/test_workflow_llm_installs.py tests/scripts/test_injection_guard.py (initial run failed due missing yaml module)
  • python -m pip install pyyaml
  • pytest -q tests/workflows/test_workflow_llm_installs.py tests/scripts/test_injection_guard.py

Committed on branch codex/issue-1453 and PR record created via make_pr with title: “Follow-up: enforce pinned LLM workflow installs and robust guard parsing.”

View task →

@github-actions

Copy link
Copy Markdown
Contributor

Autofix updated these files:

  • tests/workflows/test_workflow_llm_installs.py

@stranske-keepalive

Copy link
Copy Markdown
Contributor

🛑 Progress Review (Round 6)

Recommendation: STOP
Alignment Score: 0.0/10

Feedback

Review your recent work against the acceptance criteria.


This review was triggered because the agent has been working for 6 rounds without completing any task checkboxes.
The review evaluates whether recent work is advancing toward the acceptance criteria.

@stranske-keepalive stranske-keepalive Bot removed the agent:codex Agent-created issues from Codex label Feb 10, 2026
@stranske-keepalive

stranske-keepalive Bot commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: f341d6a
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / guard
Required: core tests (3.11): ⏳ pending, core tests (3.12): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 93.12%
Baseline 85.00%
Delta +8.12%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
src/cli_parser.py 81.8% 4
src/percentile_calculator.py 95.0% 1
src/aggregator.py 95.0% 2
src/__init__.py 100.0% 0
src/ndjson_parser.py 100.0% 0

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

PR #1447 addressed issue #1437, but verification failed because the actual workflow files were not updated to use pinned LLM dependency installs and proper pip caching, and the enforcement tests were effectively skipped in normal CI. This follow-up closes the remaining gaps by updating the live GitHub Actions workflows, enabling non-skipped enforcement tests, and hardening check_prompt_injection() to avoid runtime errors on malformed detector outputs.

Context for Agent

Related Issues/PRs

Tasks

Test Updates (Agent-Executable)

  • Remove the unconditional skip logic from tests/workflows/test_workflow_llm_installs.py so tests run in normal CI
  • Add assertion to tests/workflows/test_workflow_llm_installs.py to verify agents-auto-pilot workflow contains the pinned install step and lacks unpinned langchain commands
  • Add assertions to tests/workflows/test_workflow_llm_installs.py to verify reusable-agents-verifier workflow contains pinned install steps in both evaluate and compare modes
  • Add assertions to tests/workflows/test_workflow_llm_installs.py to verify both workflows include actions/cache@v4 with correct cache keys containing Python version and requirements hash
  • Add unit tests to validate check_prompt_injection() handles malformed detector outputs without raising exceptions
  • Add unit tests to validate check_prompt_injection() correctly handles known-good reason code formats

Code Hardening (Agent-Executable)

  • Update check_prompt_injection() to validate detector output format before parsing (check prefix/delimiters and guard integer conversion)
  • Implement safe fallback path in check_prompt_injection() for unexpected formats (no exception, defined behavior)

Workflow Update Snippets (Agent-Executable)

  • Create docs/workflow-updates/agents-auto-pilot-changes.yml with complete YAML snippet for pip install step and cache configuration
  • Create docs/workflow-updates/reusable-agents-verifier-changes.yml with complete YAML snippets for evaluate/compare mode pip install steps and cache configuration
  • Add docs/workflow-updates/README.md with instructions for applying the YAML snippets to protected workflow files

Acceptance criteria

Workflow Files (Human-Applied)

  • .github/workflows/agents-auto-pilot.yml contains a step that executes exactly pip install -r tools/requirements-llm.txt (as a run command in the workflow)
  • .github/workflows/agents-auto-pilot.yml does NOT contain any pip install commands that install langchain via an unpinned specifier, including (but not limited to) pip install langchain, pip install langchain*, pip install langchain== (missing version), or pip install git+...langchain...
  • .github/workflows/reusable-agents-verifier.yml includes a step that executes exactly pip install -r .workflows-lib/tools/requirements-llm.txt in the evaluate mode execution path
  • .github/workflows/reusable-agents-verifier.yml includes a step that executes exactly pip install -r .workflows-lib/tools/requirements-llm.txt in the compare mode execution path
  • .github/workflows/reusable-agents-verifier.yml does NOT contain any pip install commands that install langchain via an unpinned specifier in the evaluate or compare execution paths (e.g., pip install langchain*, pip install langchain, pip install langchain-community without a version pin)
  • .github/workflows/agents-auto-pilot.yml contains an actions/cache@v4 step that caches pip (cache path includes pip cache directory) and uses a cache key that includes BOTH the Python version and ${{ hashFiles('tools/requirements-llm.txt') }}
  • .github/workflows/reusable-agents-verifier.yml contains an actions/cache@v4 step that caches pip (cache path includes pip cache directory) and uses a cache key that includes BOTH the Python version and ${{ hashFiles('.workflows-lib/tools/requirements-llm.txt') }}

Test Enforcement

  • tests/workflows/test_workflow_llm_installs.py is executed under normal CI (i.e., it is not unconditionally skipped) and will fail if the agents-auto-pilot workflow lacks the pinned requirements install step
  • tests/workflows/test_workflow_llm_installs.py asserts that .github/workflows/agents-auto-pilot.yml contains pip install -r tools/requirements-llm.txt AND asserts it does not contain any floating pip install langchain*/unversioned langchain install commands
  • tests/workflows/test_workflow_llm_installs.py asserts that .github/workflows/reusable-agents-verifier.yml contains pip install -r .workflows-lib/tools/requirements-llm.txt for BOTH evaluate and compare modes (separate assertions per mode/path, not a single generic check)
  • tests/workflows/test_workflow_llm_installs.py asserts that BOTH workflows include an actions/cache@v4 step and that each cache key includes Python version + the correct hashFiles(...) call for the correct requirements path

Code Hardening

  • check_prompt_injection() does not raise an exception when detect_prompt_injection returns an unexpected or malformed reason code (e.g., empty string, missing delimiter/prefix, non-integer suffix); instead it follows a defined fallback path (e.g., returns a safe default or logs and continues)
  • check_prompt_injection() continues to correctly handle valid reason code formats by producing the same outcome as before for at least one known-good reason code value
  • Unit tests pass that verify check_prompt_injection() behavior with both malformed and known-good detector outputs

Documentation Deliverables

  • docs/workflow-updates/agents-auto-pilot-changes.yml exists and contains valid YAML snippet for pip install and cache steps
  • docs/workflow-updates/reusable-agents-verifier-changes.yml exists and contains valid YAML snippets for evaluate/compare mode pip install and cache steps
  • docs/workflow-updates/README.md exists and provides clear instructions for applying the YAML snippets to the protected workflow files

@stranske
stranske merged commit f341d6a into main Feb 10, 2026
1163 checks passed
@stranske
stranske deleted the codex/issue-1453 branch February 10, 2026 20:33
@stranske stranske added the verify:compare Compare multiple LLM evaluations label Feb 10, 2026
stranske added a commit that referenced this pull request Feb 10, 2026
- Fix E501 line-too-long (107>100) in followup_issue_generator.py:139
  by splitting the acceptance-criteria string literal
- Mark tasks 12-25 in issue-1453 ledger as 'deferred' since they
  require editing protected workflow files that the Codex worker
  cannot modify (addresses P1 review comment on PR #1454)
@github-actions

Copy link
Copy Markdown
Contributor

Provider Comparison Report

Provider Summary

Provider Model Verdict Confidence Summary
openai gpt-5.2 FAIL 93% Code hardening for check_prompt_injection() is correctly implemented with safe parsing/fallback behavior and is covered by new unit tests (malformed and known-good reason codes). Documentation de...
anthropic claude-sonnet-4-5-20250929 CONCERNS 85% The PR implements code hardening for check_prompt_injection() with proper error handling and adds comprehensive test coverage for malformed detector outputs. Documentation deliverables (YAML snippe...
📋 Full Provider Details (click to expand)

openai

  • Model: gpt-5.2
  • Verdict: FAIL
  • Confidence: 93%
  • Scores:
    • Correctness: 8.0/10
    • Completeness: 3.0/10
    • Quality: 8.0/10
    • Testing: 7.0/10
    • Risks: 4.0/10
  • Summary: Code hardening for check_prompt_injection() is correctly implemented with safe parsing/fallback behavior and is covered by new unit tests (malformed and known-good reason codes). Documentation deliverables (YAML snippets + README) are present. However, the PR does not actually update the protected workflow files required by the acceptance criteria, and the workflow enforcement tests remain gated behind AGENT_ENV=agent-high-privilege rather than running in normal CI. As a result, the primary workflow-file and test-enforcement acceptance criteria are not satisfied.
  • Concerns:
    • Acceptance criteria require updating the live workflow files .github/workflows/agents-auto-pilot.yml and .github/workflows/reusable-agents-verifier.yml (pinned pip install -r ...requirements-llm.txt, removal of unpinned langchain installs, and actions/cache@v4 keyed by python version + hashFiles). This PR does not modify either workflow file; it only adds documentation snippets under docs/workflow-updates/ with instructions to apply manually. Therefore the workflow-file acceptance criteria are not met at target commit.
    • The enforcement tests in tests/workflows/test_workflow_llm_installs.py are still skipped unless AGENT_ENV=agent-high-privilege. The acceptance criteria call for these tests to run in normal CI (not unconditionally skipped). Gating on a special env means the tests can remain skipped in typical runs, so enforcement is not guaranteed.
    • The PR task list/ledger indicates many tasks remain marked 'todo' (including the workflow updates themselves). While the ledger isn't normative, it reflects that the core 'human-applied workflow file' requirements were not completed in-code.

anthropic

  • Model: claude-sonnet-4-5-20250929
  • Verdict: CONCERNS
  • Confidence: 85%
  • Scores:
    • Correctness: 8.0/10
    • Completeness: 6.0/10
    • Quality: 8.0/10
    • Testing: 7.0/10
    • Risks: 7.0/10
  • Summary: The PR implements code hardening for check_prompt_injection() with proper error handling and adds comprehensive test coverage for malformed detector outputs. Documentation deliverables (YAML snippets and README) are complete and well-structured. However, the primary acceptance criteria are not met: the actual workflow files (.github/workflows/agents-auto-pilot.yml and .github/workflows/reusable-agents-verifier.yml) are not modified in this PR - only documentation for manual application is provided. Additionally, the test enforcement mechanism still skips tests in normal CI (when AGENT_ENV != agent-high-privilege), which contradicts the acceptance criterion requiring tests to run in normal CI. The code quality is good and the injection guard hardening is correctly implemented, but the PR does not complete the workflow updates that form the core of the acceptance criteria.
  • Concerns:
    • Critical: Workflow files not updated - All 7 'Workflow Files (Human-Applied)' acceptance criteria are marked unchecked and the actual workflow files (.github/workflows/agents-auto-pilot.yml and .github/workflows/reusable-agents-verifier.yml) are not modified in this PR. The PR only provides documentation snippets for manual application.
    • Incomplete verification - The test file test_workflow_llm_installs.py now calls _skip_if_not_high_privilege() which will skip tests in standard CI, meaning the acceptance criterion 'tests/workflows/test_workflow_llm_installs.py is executed under normal CI (i.e., it is not unconditionally skipped)' is not fully met - tests will skip unless AGENT_ENV=agent-high-privilege.
    • Reason code extraction logic gap - The _extract_reason_code() function only validates known REASON_CODE_MESSAGES prefixes, but REASON_CODE_MESSAGES is not visible in the diff. If a valid reason code is not in that dict, it will return None and set code=None instead of the actual code, potentially losing information.
    • Test coverage for malformed outputs - The test test_check_prompt_injection_handles_malformed_detector_outputs uses parametrize with 'UNKNOWN_CODE: Something odd' expecting code=None, but this doesn't verify the actual error message content or that the function handles truly malformed outputs (e.g., non-string types, None) gracefully.

Agreement

  • Correctness: scores within 1 point (avg 8.0/10, range 8.0-8.0)
  • Quality: scores within 1 point (avg 8.0/10, range 8.0-8.0)
  • Testing: scores within 1 point (avg 7.0/10, range 7.0-7.0)

Disagreement

Dimension openai anthropic
Verdict FAIL CONCERNS
Completeness 3.0/10 6.0/10
Risks 4.0/10 7.0/10

Unique Insights

  • openai: Acceptance criteria require updating the live workflow files .github/workflows/agents-auto-pilot.yml and .github/workflows/reusable-agents-verifier.yml (pinned pip install -r ...requirements-llm.txt, removal of unpinned langchain installs, and actions/cache@v4 keyed by python version + hashFiles). This PR does not modify either workflow file; it only adds documentation snippets under docs/workflow-updates/ with instructions to apply manually. Therefore the workflow-file acceptance criteria are not met at target commit.; The enforcement tests in tests/workflows/test_workflow_llm_installs.py are still skipped unless AGENT_ENV=agent-high-privilege. The acceptance criteria call for these tests to run in normal CI (not unconditionally skipped). Gating on a special env means the tests can remain skipped in typical runs, so enforcement is not guaranteed.; The PR task list/ledger indicates many tasks remain marked 'todo' (including the workflow updates themselves). While the ledger isn't normative, it reflects that the core 'human-applied workflow file' requirements were not completed in-code.
  • anthropic: Critical: Workflow files not updated - All 7 'Workflow Files (Human-Applied)' acceptance criteria are marked unchecked and the actual workflow files (.github/workflows/agents-auto-pilot.yml and .github/workflows/reusable-agents-verifier.yml) are not modified in this PR. The PR only provides documentation snippets for manual application.; Incomplete verification - The test file test_workflow_llm_installs.py now calls _skip_if_not_high_privilege() which will skip tests in standard CI, meaning the acceptance criterion 'tests/workflows/test_workflow_llm_installs.py is executed under normal CI (i.e., it is not unconditionally skipped)' is not fully met - tests will skip unless AGENT_ENV=agent-high-privilege.; Reason code extraction logic gap - The _extract_reason_code() function only validates known REASON_CODE_MESSAGES prefixes, but REASON_CODE_MESSAGES is not visible in the diff. If a valid reason code is not in that dict, it will return None and set code=None instead of the actual code, potentially losing information.; Test coverage for malformed outputs - The test test_check_prompt_injection_handles_malformed_detector_outputs uses parametrize with 'UNKNOWN_CODE: Something odd' expecting code=None, but this doesn't verify the actual error message content or that the function handles truly malformed outputs (e.g., non-string types, None) gracefully.

stranske added a commit that referenced this pull request Feb 10, 2026
fix: resolve lint failure and defer human-only ledger tasks (#1454 follow-up)
stranske added a commit that referenced this pull request Feb 10, 2026
Completes the remaining acceptance criteria from issue #1453 that the
initial Codex attempt (PR #1454) left unfulfilled:

Workflow changes:
- agents-auto-pilot.yml: replace floating pip install langchain with
  pip install -r tools/requirements-llm.txt; add id to setup-python
  step; add actions/cache@v4 keyed on Python version + requirements hash
- reusable-agents-verifier.yml: replace floating pip install pydantic
  langchain-openai langchain-anthropic in both evaluate and compare
  modes with pip install -r .workflows-lib/tools/requirements-llm.txt;
  add id to both setup-python steps; add mode-specific actions/cache@v4

Test enforcement:
- Remove _skip_if_not_high_privilege() gating so tests run in normal CI
- Fix broken regex in _assert_no_floating_langchain (double-escaped
  backslash-b in raw string was matching literal backslashes)

Injection guard test coverage:
- Add parametrized tests for non-string reason values from detector
- Add parametrized tests for all 5 known reason codes
- 1864 tests pass (+8 new, -4 former skips)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autofix Opt-in automated formatting & lint remediation from:codex Created from Codex agent verify:compare Compare multiple LLM evaluations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants