Skip to content

Allow bash for impact-analyzer so it does not hang unattended - #4

Merged
blues-man merged 1 commit into
mainfrom
allow-bash-for-impact-analyzer
Oct 9, 2026
Merged

blues-man merged 1 commit into
mainfrom
allow-bash-for-impact-analyzer

Conversation

@blues-man

Copy link
Copy Markdown
Collaborator

Problem

impact-analyzer is configured with bash: { "*": "ask" }, but that agent only ever runs headless — the SDLC Trigger Impact Analyzer job template starts it through the OpenCode server API and returns immediately. There is nobody to answer the prompt.

Reproduced on a live tenant (8vjv7) today. The remediation chain ran perfectly up to the agent:

Step Result
Nexus caches jackson-databind:2.18.0.rhlw-00010 component event fired
SDLC Start Orchestrator successful
AO → SDLC Query TPA successful, blast radius matched wire-transfer-svc
AO → SDLC Trigger Impact Analyzer successful
OpenCode impact-analyzer stuck, no MR after 6+ min
evaluated permission=bash pattern="echo \"$GITLAB_URL\" \"$GITLAB_PAT\""
          action.permission=bash action.pattern=* action.action=ask
asking   id=per_122f45715001OdugUaVT9K6LpT permission=bash

Because the job template starts the agent asynchronously, AAP reports successful and the whole pipeline looks green while nothing happens.

Why the chart can't fix it

bootstrap-tenant already sets a top-level "permission": "allow" via OPENCODE_CONFIG_CONTENT for precisely this reason. It has no effect here: agent-level permission overrides the global one, and /app/opencode.json is loaded after the env config.

Change

One line — impact-analyzer's bash."*" from ask to allow, matching mr-verifier, which already uses "*": "allow" and does not hang.

The explicit gitlab_api.py entries are left in place as documentation of the calls the agent is expected to make. Containment for this agent stays where it actually is: the per-tenant sandbox namespace and its RBAC.

impact-analyzer sets bash "*": "ask". That agent only ever runs
headless, launched by the SDLC Trigger Impact Analyzer job template via
the OpenCode server API, so there is nobody to answer the prompt. On
tenant 8vjv7 the run stopped 86s in on

  evaluated permission=bash pattern="echo \"$GITLAB_URL\" \"$GITLAB_PAT\""
            action.pattern=* action.action=ask

and never produced a merge request. The AAP job still reported
successful, because it starts the agent asynchronously -- so the whole
chain looks green while nothing happens.

The chart already sets a top-level "permission": "allow" for exactly
this reason, but agent-level permission wins over the global one and
/app/opencode.json is loaded after OPENCODE_CONFIG_CONTENT, so the
chart cannot reach it.

mr-verifier already uses "*": "allow"; this brings impact-analyzer in
line. The explicit gitlab_api.py entries stay as documentation of the
calls the agent is expected to make. Containment stays with the
per-tenant sandbox namespace and RBAC, not with the bash prompt.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@blues-man
blues-man merged commit aad125a into main Oct 9, 2026
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.

1 participant