Skip to content

jsweep: add Done Conditions to prevent runaway PR creation loop - #28322

Merged
pelikhan merged 3 commits into
mainfrom
copilot/deep-report-fix-jsweep-unbloater
Apr 24, 2026
Merged

pelikhan merged 3 commits into
mainfrom
copilot/deep-report-fix-jsweep-unbloater

Conversation

Copilot AI commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

The jsweep workflow exploded from 8 turns to 60 on 2026-04-24, consuming 4.64M tokens by repeatedly calling safeoutputs.create_pull_request without ever stopping — the prompt had no exit criteria after PR creation.

Note: max_turns is not applicable here since the copilot engine does not support that feature; the fix is prompt-level exit criteria.

Changes

.github/workflows/jsweep.md

  • Added ## Done Conditions section (inserted after Step 7) with explicit instructions:
    • STOP immediately after calling create_pull_request — do not loop back to Step 1
    • Do not call create_pull_request more than once per run
    • On PR creation failure: call noop and STOP (no retries beyond one)
  • Tightened the One file per run constraint to include an explicit stop after PR creation

pkg/workflow/jsweep_workflow_test.go

  • Added HasDoneConditions — validates the Done Conditions section exists with the stop instruction
  • Added OneFilePerRunStopsAfterPR — validates the one-file constraint includes the explicit stop

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://github.com/proxy/api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw rt/yaml (http block)
    • Triggering command: /usr/bin/gh gh repo view --json owner,name --jq .owner.login + "/" + .name 64/pkg/tool/linux_amd64/link GOINSECURE /bidi GOMODCACHE 64/pkg/tool/linutest@example.com rtcf�� util.test JmzP4TwGo ortcfg.link GOINSECURE %H %ct %D (http block)
  • https://github.com/proxy/api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://github.com/proxy/api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv printf '%s' "$1" sh /usr/bin/git ut2600770520/001git pMTTxllzq 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/git g_.a 1T9iaPhBz ck git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git 46/001/test-frongit GO111MODULE 86_64/sh git rev-�� --git-dir go /usr/bin/git .js' --ignore-panode GO111MODULE 64/pkg/tool/linuinstall git (http block)
  • https://github.com/proxy/api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv -test.paniconexit0 -test.v=true /usr/bin/git -test.timeout=10git -test.run=^Test -test.short=true--show-toplevel git init�� GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv /tmp/TestGuardPolicyTrustedUsersCompiledOutput3272681551/001 rev-parse /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://github.com/proxy/api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv 6635/001/stabili--workflow rg/x/text@v0.36.nonexistent-workflow-ci-test-67890 ache/go/1.25.8/x--limit GOINSECURE entropy 507136/b015/symabis ache/go/1.25.8/x64/pkg/tool/linu-tests env 507136/b239/_pkg_.a h5RJ/fhSiz4P0ozPJ9_2Hh5RJ 507136/b239=> GOINSECURE t/internal/catmsrev-parse GOMODCACHE /opt/hostedtoolcache/go/1.25.8/xtest@example.com (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel -tests /usr/bin/git sRemoteWithRealGtr sRemoteWithRealG\n .cfg git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linu-trimpath /usr/bin/git Onlymin-integritgit GO111MODULE ache/go/1.25.8/x--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git --bare --initial-branchrev-parse 1/x64/bin/node git rev-�� --show-toplevel 1/x64/bin/node /usr/bin/git /tmp/TestGuardPogit (http block)
  • https://github.com/proxy/api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� thImports3208426781/001 sgM1d_TR1DWb om/org2/repo2.git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv --symref origin ache/node/24.14.1/x64/bin/node -json GO111MODULE 64/bin/go ache/node/24.14.1/x64/bin/node 9254�� uts.branch remote /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://github.com/proxy/api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git 507136/b244/_pkggit DUdE/2oEXO76xEThcommit 507136/b244=> git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/xTest User /usr/bin/git itattributes-tesgit -trimpath 1/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git SameOutput161202git GO111MODULE /opt/hostedtoolc-m /usr/bin/git remo�� -v go /usr/bin/git -json GO111MODULE e/git-upload-pac--show-toplevel git (http block)
  • https://github.com/proxy/api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build610507136/b246/importcfg -pack /home/REDACTED/go/pkg/mod/golang.org/x/text@v0.36.0/message/catalog/catalog.go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env cli/install.sh..." GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://github.com/proxy/api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/git _.a @v1.1.3/cpu/arm/rev-parse 64/pkg/tool/linu--show-toplevel /usr/bin/git conf�� --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/gh ty-test.md glpNKSOQr 64/pkg/tool/linu--show-toplevel gh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/sh git (http block)
  • https://github.com/proxy/api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv /tmp/TestGuardPolicyMinIntegrityOnlyrepos_only_without_min-integrity3219093119/0remote.origin.urgit remote /usr/bin/git -json GO111MODULE 64/bin/go git -C /tmp/TestCompileUpdateDiscussionFieldEnforcement2719420138/001 remote /usr/bin/git -json GO111MODULE x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --get remote.origin.url /usr/bin/infocmp _.a tants.go 64/pkg/tool/linu--show-toplevel infocmp -1 xterm-color 64/pkg/tool/linux_amd64/compile /usr/bin/git 660692889/.githugit ri/jsonschema/v6rev-parse 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv -bool l /usr/bin/git -errorsas -ifaceassert -nilfunc git rev-�� --show-toplevel -tests /usr/bin/git yphen2297270614/git yphen2297270614/rev-parse modules/@npmcli/--show-toplevel git (http block)
  • https://github.com/proxy/api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv ons-test2095406614 remote ow-without-reaction.lock.yml -json GO111MODULE 64/bin/go git -C /tmp/gh-aw-test-runs/20260424-190406-35796/test-2929996195 rev-parse /usr/bin/git 1 GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv k/gh-aw/gh-aw/.github/workflows go 1/x64/bin/node -json GO111MODULE 64/bin/go 1/x64/bin/node -c git-upload-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen2297270614/git git-upload-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen2297270614/rev-parse /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://github.com/proxy/api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch --get-regexp .cfg 64/pkg/tool/linux_amd64/vet (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/git _.a GO111MODULE 64/pkg/tool/linu--show-toplevel /usr/bin/git remo�� -v 64/pkg/tool/linu-test.v=true /usr/bin/infocmp 2829806907/.githgit til.go 64/pkg/tool/linu--show-toplevel infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv add remote2 /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE tions/setup/node--show-toplevel git (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 go sv -json GO111MODULE 64/bin/go git t-28�� k/gh-aw/gh-aw/.github/workflows/agent-performance-analyzer.md go 0"}} -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv -aw/git/ref/tags/v1.2.3 go bject.type] | @tsv -json GO111MODULE 64/bin/go node /tmp�� /tmp/TestHashConsistency_GoAndJavaScript4046020046/001/test-inlined-imports-enabled-with-env-temgit go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv 4213494/b459/tty.test config ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet remote.origin.urgit h316920877/001' 64/bin/go ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv -bool -buildtags /usr/bin/infocmp -errorsas -ifaceassert -nilfunc infocmp -1 xterm-color -tests /usr/bin/git -json GO111MODULE /sh git (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name X4Ap2OrxA ache/go/1.25.8/x64/bin/go GOINSECURE util GOMODCACHE go env 1136099409/.github/workflows GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD bis 64/pkg/tool/linux_amd64/vet 64/s�� 64/src/runtime/ints.s 3Js0Ri3Dw ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name GO111MODULE tPath,Error,Dir,GoFiles,IgnoredGoFiles,IgnoredOtherFiles,CFiles,-nilfunc GOINSECURE GOMOD GOMODCACHE go env -json =main /opt/hostedtoolcache/uv/0.11.7/x86_64/node GOINSECURE GOMOD GOMODCACHE node (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name 0/message/catalog.go 64/pkg/tool/linux_amd64/compile GOINSECURE ha8_stub.o 64/src/internal/user.name 64/pkg/tool/linuTest User env _.a Bzwz7Kv-X ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-buildtags (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 5.0/deviceauth.go 64/pkg/tool/linux_amd64/compile GOINSECURE y.o 64/src/internal/--show-toplevel 64/pkg/tool/linux_amd64/compile env _.a sYAOo28ie 64/pkg/tool/linux_amd64/link GOINSECURE go-sdk/oauthex GOMODCACHE 64/pkg/tool/linux_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD erignore ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet env ithub/workflows GO111MODULE e/git-upload-pack GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name 0/feature/plural/common.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env _.a bBouUBHdz 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 5.0/internal/doc.go 64/pkg/tool/linux_amd64/compile GOINSECURE (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/cgo GOINSECURE GOMOD erignore ache/go/1.25.8/x64/pkg/tool/linux_amd64/cgo env -json GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD bis 64/src/math/floor_wasm.s env 1136099409 1Yg0zHCmd ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-dwarf=false (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE on GOMODCACHE 64/pkg/tool/linux_amd64/vet rtcf�� 84105910/custom/workflows g/types/doc.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet env -json GO111MODULE /home/REDACTED/go/bin/node GOINSECURE GOMOD GOMODCACHE node (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD bis pBvTgXO/G1KutSxXHjoE8hqd2SJr env -json EFuVqG1PQ ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE r_wasm.o 64/src/math/floo--show-toplevel 64/pkg/tool/linux_amd64/compile env g_.a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE h_wasm.o 64/src/math/big/--show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env faultBranchFromLsRemoteWithRealGitmain_branch1634141917/001 faultBranchFromLsRemoteWithRealGitmain_branch1634141917/002/work /home/REDACTED/.local/bin/node GOINSECURE GOMOD GOMODCACHE node (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE o 64/src/sync/atom--show-toplevel 64/pkg/tool/linux_amd64/link env 1136099409/.github/workflows 9xL6IaqNl x_amd64/compile GOINSECURE 9pTypfa9-CxeDX7trev-parse GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet rtcf�� -json uKJh7UXOD ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmain_branch1634141917/001' '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmain_branch1634141917/001' /opt/hostedtoolcache/go/1.25.8/x64/bin/node GOINSECURE GOMOD GOMODCACHE node (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE test.o 64/src/internal/--show-toplevel go env gk88dzu3u GO111MODULE eutil.test GOINSECURE GOMOD GOMODCACHE eutil.test (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 tOLMlgimq 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env e-analyzer.md GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-importcfg (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name GO111MODULE e/git-upload-pack GOINSECURE %H %ct %D (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path 383067292/001' 383067292/001' -importcfg /tmp/go-build1974213494/b419/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/fileutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/tar.go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE 64/pkg/tool/linu-dwarf=false env ithub/workflows sNGC5r73k ache/go/1.25.8/x-nolocalimports GOINSECURE pproxy GOMODCACHE ache/go/1.25.8/x/tmp/go-build1974213494/b466/_testmain.go (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build1974213494/b404/cli.test /tmp/go-build1974213494/b404/cli.test -test.testlogfile=/tmp/go-build1974213494/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true -nolocalimports -importcfg /tmp/go-build610507136/b180/importcfg -pack env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /tmp/go-build2631062300/b404/cli.test /tmp/go-build2631062300/b404/cli.test -test.testlogfile=/tmp/go-build2631062300/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel x_amd64/compile /usr/bin/git 0406-35796/test-git GO111MODULE x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git 0406-35796/test-ls HCmd/oMQac4bC0uy-lh res.lock.yml git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE k/gh-aw/gh-aw/ac--show-toplevel git rev-�� --show-toplevel go /usr/bin/git Onlymin-integritls GO111MODULE cal/bin/bash git (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv -json RR0X2oXnN ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile env 0/001/test-inlined-imports-enabled-with-body-content.md GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuremote1 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go ode_�� ty-test.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE es/.bin/sh GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json arm.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env Gitmain_branch1383067292/001' Gitmain_branch1383067292/001' x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://github.com/proxy/api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE SLlQ1ZG/V_z3kiodconfig (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env Gitmaster_branch4013967643/001' Gitmaster_branch4013967643/001' odules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://github.com/proxy/api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv g_.a vZBL1k16k ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE ole GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linurev-parse env 0/001/test-inlined-imports-enabled-with-env-template-expressions-in-body.md GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE fips140deps/goderev-parse GOMODCACHE ortcfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE es/.bin/node GOINSECURE GOMOD GOMODCACHE go ode_�� ay_c3244212408/001 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://github.com/proxy/api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link env ntdrain.test jPRjWWcxh ortcfg.link GOINSECURE GOMOD GOMODCACHE b4L7Ikj7IChhS-MVF4/opxEl9d6gxDxhg-XZsIZ/B--vCgKY599KyWunMvtm (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE sh -c /v1.0.0 GOPROXY sv l GOWORK 64/bin/go git (http block)
  • https://github.com/proxy/api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go env h ../../../.prettierignore GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://github.com/proxy/api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -json (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://github.com/proxy/api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch -json uKJh7UXOD ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile env rtcfg GO111MODULE .cfg GOINSECURE l GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuorigin (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch user.email test@example.com /usr/bin/git -json GO111MODULE node git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE layTitle git (http block)
  • invalid.example.invalid
    • Triggering command: /usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git e/git init�� ndor/bin/git git ode_modules/.bin/git =receive test@example.com--git-dir=/tmp/bare-incremental-QVKXw9 /git (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Add explicit done conditions section to jsweep.md to stop the agent from
looping back to find another file after creating a PR. The April 24 run
consumed 4.64M tokens over 60 turns (vs 8 baseline) by repeatedly calling
safeoutputs.create_pull_request without stopping.

Changes:
- Add ## Done Conditions section with explicit STOP-after-PR instruction
- Update One-file-per-run constraint to include explicit stop after PR creation
- Add HasDoneConditions and OneFilePerRunStopsAfterPR test cases
- Recompile workflow lock files

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/3fca5517-ed34-412f-ac31-e31c7c2e67b3

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix jsweep JavaScript Unbloater with max_turns and exit criteria jsweep: add Done Conditions to prevent runaway PR creation loop Apr 24, 2026
Copilot AI requested a review from gh-aw-bot April 24, 2026 19:10
@pelikhan
pelikhan marked this pull request as ready for review April 24, 2026 20:15
Copilot AI review requested due to automatic review settings April 24, 2026 20:15
@pelikhan
pelikhan merged commit 75491ff into main Apr 24, 2026
17 of 27 checks passed
@pelikhan
pelikhan deleted the copilot/deep-report-fix-jsweep-unbloater branch April 24, 2026 20:15

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions

github-actions Bot commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke CI completed successfully!

@github-actions

Copy link
Copy Markdown
Contributor

✅ smoke-ci: safeoutputs CLI comment + comment-memory run (24909857857)

Generated by Smoke CI for issue #28322 · ◷

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

CI lights the path\nGreen checks bloom at dawn\nQuiet bots still sing

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Generated by Smoke CI for issue #28322 · ◷

@github-actions github-actions Bot mentioned this pull request Apr 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 70/100

⚠️ Acceptable, with suggestions

Metric Value
New/modified tests analyzed 2
✅ Design tests (behavioral contracts) 2 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 0 (0%)
Duplicate test clusters 0
Test inflation detected No (ratio ≈ 1.54:1)
🚨 Coding-guideline violations None

Test Classification Details

Test File Classification Issues Detected
HasDoneConditions pkg/workflow/jsweep_workflow_test.go (subtest of TestJSweepWorkflowConfiguration) ✅ Design No error/edge-case assertions; config-only positive checks
OneFilePerRunStopsAfterPR pkg/workflow/jsweep_workflow_test.go (subtest of TestJSweepWorkflowConfiguration) ✅ Design Single positive string check; narrow scope

Flagged Tests — Requires Review

No tests are flagged for removal or major rework. The two new subtests enforce a genuine behavioral contract: the jsweep workflow prompt must include explicit "Done Conditions" to prevent the AI agent from looping back after creating a PR. This is meaningful signal — if these strings are absent the agent could spin indefinitely creating duplicate PRs.

💡 Improvement suggestion for HasDoneConditions and OneFilePerRunStopsAfterPR

Current state: Both tests only assert that required strings are present. There are no negative invariants checked (e.g., asserting that older "loop-back" phrases are absent).

Suggested improvement (optional): Add negative assertions similar to the existing pattern in the file, e.g.,:

if strings.Contains(mdContent, "continue to the next file") {
    t.Error("jsweep workflow should not instruct the agent to continue to the next file after PR creation")
}

This would make the edge-case ratio non-zero and improve the sentinel's confidence score on future runs.


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 2 tests — unit (//go:build !integration)
  • 🟨 JavaScript (*.test.cjs, *.test.js): 0 tests

Verdict

✅ Check passed. 0% of new tests are implementation tests (threshold: 30%). Both new subtests enforce a behavioral invariant (the presence of stop-loop done-conditions in the jsweep workflow prompt). No coding-guideline violations detected.


📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct
  • Give false assurance: they pass even when the system is wrong

Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.

References: §24909862854

🧪 Test quality analysis by Test Quality Sentinel · ● 445.4K · ◷

@github-actions github-actions Bot 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.

✅ Test Quality Sentinel: 70/100. Test quality is acceptable — 0% of new tests are implementation tests (threshold: 30%). Both new subtests enforce behavioral contracts (done-condition invariants to prevent runaway PR loops). No coding-guideline violations detected.

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.

[deep-report] Fix jsweep JavaScript Unbloater: add max_turns and explicit exit criteria to prevent runaway iteration

4 participants