Skip to content

Triage runner does not execute pre_script from harness configuration #847

Description

@guyoron1

Problem

The triage agent runner does not execute the pre_script field from harness configuration. A per-repo triage harness using base composition declares pre_script: scripts/custom-pre-triage.sh, and that script exits 1 — but the triage agent proceeds to run normally.

This was discovered while verifying the base-composition dispatch fix from fullsend-ai#5693 (closing fullsend-ai#5045). The dispatch enumeration now correctly handles base: fields, so the triage harness is found and dispatched. However, the triage runner path does not invoke the pre_script before starting the agent.

Evidence

  • Harness: .fullsend/harness/triage.yaml with pre_script: scripts/custom-pre-triage.sh
  • Script: scripts/custom-pre-triage.sh contains echo "hello world" followed by exit 1
  • Expected: triage aborts due to non-zero pre_script exit
  • Actual: triage runs to completion and posts a triage comment

Context

  • Issue Remove redundant pre-code.sh / pre-fix.sh calls from reusable workflows fullsend-ai/fullsend#4718 documents that reusable-code.yml and reusable-fix.yml call pre-scripts both inline (in the workflow YAML) and via run.go:760-773. The triage runner path appears to lack equivalent pre_script execution.
  • The run.go pre_script handling (lines 760-773) may not be reached by the triage agent's execution path, or the triage reusable workflow does not invoke fullsend run in a way that triggers pre_script execution.

Expected behavior

When a triage harness declares pre_script, the runner should execute it before starting the triage agent. If the script exits non-zero, triage should abort (matching code/fix behavior).

Validation criteria

  1. A triage harness with pre_script pointing to a script that exits 1 should cause the triage run to fail/abort
  2. A triage harness with pre_script pointing to a script that exits 0 should allow triage to proceed normally
  3. pre_script from base-composed harnesses should be respected the same as inline declarations

Metadata

Metadata

Assignees

No one assigned

    Labels

    benchmark-pathBPath B benchmark issuespr-openAn open PR already addresses this issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions