Skip to content

chore: condense the output of preflight runs#823

Open
mcncl wants to merge 1 commit intomainfrom
TE-5535/condensed_output
Open

chore: condense the output of preflight runs#823
mcncl wants to merge 1 commit intomainfrom
TE-5535/condensed_output

Conversation

@mcncl
Copy link
Copy Markdown
Contributor

@mcncl mcncl commented May 5, 2026

Description

preflight runs will consume a lot of tokens with the current way we report to the LLM, this attempts to fix that by reducing the information density.

Changes

  • in JSON output, only returns a payload which contains relevant information for an LLM to use in order to get information on which jobs have failed

Caveats

This is entirely open to change/improvement

Testing

  • Tests have run locally (with go test ./...)
  • Code is formatted (with go fmt ./...)

Example build_summary JSON now looks more like:

  {
    "type": "preflight_summary",
    "timestamp": "2026-04-08T12:49:28.246592+10:00",
    "preflight_id": "019d6afe-407e-742a-a532-9eaf247099c7",
    "pipeline": "buildkite/cli",
    "build_number": 185541,
    "build_url": "https://buildkite.com/buildkite/cli/builds/185541",
    "build_state": "failed",
    "failed_jobs": [
      {
        "id": "019d6afe-80b8-4f62-a0e4-8871e94b977e",
        "name": ":pipeline: Upload Pipeline",
        "command": "./.buildkite/pipeline.sh | buildkite-agent pipeline upload",
        "state": "failed",
        "exit_status": 128,
        "soft_failed": false,
        "retried": false
      }
    ],
    "duration_ns": 27448501500
  }

For a live job_failure event:

  {
    "type": "job_failure",
    "timestamp": "2026-04-08T12:49:27.390000+10:00",
    "preflight_id": "019d6afe-407e-742a-a532-9eaf247099c7",
    "pipeline": "buildkite/cli",
    "build_number": 185541,
    "build_url": "https://buildkite.com/buildkite/cli/builds/185541",
    "job": {
      "id": "019d6afe-80b8-4f62-a0e4-8871e94b977e",
      "name": ":pipeline: Upload Pipeline",
      "command": "./.buildkite/pipeline.sh | buildkite-agent pipeline upload",
      "state": "failed",
      "exit_status": 128,
      "soft_failed": false,
      "retried": false
    }
  }

Disclosures / Credits

Written by Codex. YOLO acceped by me.

@mcncl mcncl requested review from a team as code owners May 5, 2026 05:24
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