Skip to content

fix: add AWF container cleanup before threat detection step in news workflows#960

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/debug-opposition-motions-workflow
Closed

fix: add AWF container cleanup before threat detection step in news workflows#960
Copilot wants to merge 2 commits intomainfrom
copilot/debug-opposition-motions-workflow

Conversation

Copy link
Contributor

Copilot AI commented Mar 9, 2026

News workflow lock files run two AWF (Agent Workflow Firewall) invocations in the same job: the main agent execution and a subsequent threat detection pass. The second invocation fails because Docker containers (awf-api-proxy, awf-squid) from the first invocation are not cleaned up, causing a naming conflict.

Note: the agent's actual work completed successfully — PR #935 was created with all 14 language articles. Only the threat detection infrastructure step failed.

Changes

  • Added a Clean up AWF containers from previous execution step before the threat detection AWF invocation in all 10 news workflow lock files
  • Step runs docker rm -f on known AWF containers and docker network rm on the AWF network
  • Uses continue-on-error: true to be no-op when containers don't exist
- name: Clean up AWF containers from previous execution
  if: always() && steps.detection_guard.outputs.run_detection == 'true'
  continue-on-error: true
  run: |
    docker rm -f awf-api-proxy awf-squid awf-agent 2>/dev/null || true
    docker network rm awf-network 2>/dev/null || true

Affected files

All 10 news-*.lock.yml workflows — identical patch to each.

Note

These lock files are auto-generated by gh aw compile. This is a targeted manual patch since the AWF compiler (v0.56.1) does not emit cleanup between its two invocations. A future recompile will overwrite these changes; ideally the fix lands upstream in gh-aw.

Original prompt

This section details on the original issue you should resolve

<issue_title>[aw] News: Opposition Motions failed</issue_title>
<issue_description>### Workflow Failure

Workflow: News: Opposition Motions
Branch: main
Run: https://github.com/Hack23/riksdagsmonitor/actions/runs/22841105636
Pull Request: #935

Action Required

Option 1: Assign this issue to Copilot

Assign this issue to Copilot using the agentic-workflows sub-agent to automatically debug and fix the workflow failure.

Option 2: Manually invoke the agent

Debug this workflow failure using your favorite Agent CLI and the agentic-workflows prompt.

Generated from News: Opposition Motions

  • expires on Mar 16, 2026, 7:11 AM UTC

Comments on the Issue (you are @copilot in this section)

Custom agent used: agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…ecution

The news workflow failures were caused by AWF Docker container naming
conflicts between the main agent execution and the subsequent threat
detection execution. The containers (awf-api-proxy, awf-squid) from the
first AWF invocation were not being cleaned up before the second
invocation, causing "container name already in use" errors.

This adds a cleanup step to all 10 news workflow lock files that removes
leftover AWF containers before the threat detection step runs.

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot AI changed the title [WIP] Debug workflow failure for opposition motions fix: add AWF container cleanup before threat detection step in news workflows Mar 9, 2026
@pethers pethers closed this Mar 9, 2026
@pethers pethers deleted the copilot/debug-opposition-motions-workflow branch March 9, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw] News: Opposition Motions failed

2 participants