Skip to content

fix(source-control): fix-ci agents sometimes aim edits at the plugin copy instead of the workspace #13009

Closed

Description

@kyle-sexton

Problem

In the pull-request skill's ci --ci (fix-ci) flow, an agent sometimes aims a fix at the loaded plugin copy instead of the workspace file with the same relative path. In plugin eval the sandbox denies the edit and the agent retries at the workspace path. In a real lane the plugin copy may be writable, so such an edit could land in the installed plugin and leave the workspace unfixed.

Measured on 2026-11-03/04 (Claude Code 2.1.317, claude-sonnet-5-5, case pull-request-ci-mode-makes-room-without-cutting-criterion-line, whose workspace has its own skills/run-review/SKILL.md): runs with an Edit aimed at <plugin copy>/skills/run-review/SKILL.md, by source-control version:

Round main's skill text #12242 split
non-target round + rerun 0 of 12 4 of 12
fresh 18-run test 1 of 18 0 of 18

The fresh test shows the behavior on main's text too, so it predates the #12242 split. Every such run still scored full marks, because the agent retried at the right path; only the run-validity gate catches it.

Refs: #12242 (addendum 4 and its result)

Done when

  • The fix-ci flow (or the session setup it relies on) states the workspace as the only edit target, or a guard refuses edits under the plugin root during fix-ci.
  • The same case, rerun 18 times on the change, shows 0 plugin-copy edits.

Activity

  1. added
    host-run
    on Nov 4, 2026
  2. added
    needs-triage
    on Nov 4, 2026
  3. github-actions commented on Nov 4, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Medium
    Uncertainty: Knowable
    Flags: none
    Blocked by: none

    Understood: in the pull-request skill's fix-ci flow, an agent sometimes edits the loaded plugin copy instead of the workspace file with the same relative path. Your table shows it on main's text (1 of 18) and on the #12242 split (4 of 12). The fix is to state the workspace as the only edit target, or to add a guard against edits under the plugin root.

    The second done-when item needs an 18-run eval, which an unattended lane run can't do. It is routed to a host run. No likely duplicates found; #12242 is the related issue you cited.

    Automated triage, applied by the lanes App.

  4. added and removed
    needs-triage
    on Nov 4, 2026
  5. added
    status: ready
    on Nov 4, 2026
  6. added
    status: confirmed
    and removed
    status: ready
    on Nov 4, 2026
  7. melodic-automation-lanes commented on Nov 4, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: it carries host-run. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  8. melodic-automation-lanes commented on Nov 4, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: admission moved the issue to status: confirmed; its comment says why.

  9. kyle-sexton commented on Nov 4, 2026

    @kyle-sexton
    MemberAuthor

    Claim. Host-run lane 1 (melo-lap-001, session aedb0a) is taking this now. Lane 1 filed it from the #12242 source 3 measurement and still has that case's launcher and traces. A preregistration for the 18-run check is posted here before any paid run.

  10. kyle-sexton commented on Nov 4, 2026

    @kyle-sexton
    MemberAuthor

    Preregistration for #13009, posted before any paid run.

    Change on fix/13009-fix-ci-edit-target (from origin/main f4b1e40): one paragraph in plugins/source-control/skills/pull-request/reference/ci-ci.md, placed where the context file's fields are described: "Every path in the file, and every file you edit, is relative to the working directory, the pull request's checkout. Resolve it there, never against this skill's own directory, even when the same relative path exists in both." No guard hook.

    Arms: before = origin/main's source-control copy, after = the branch's copy. Each sits outside git, with its own TMPDIR under /run/user/1000/e/lane-1/13009/. Flags as in #12242's rounds: --model claude-sonnet-5-5 --judge-model opus --ablation none --scaffold --trust-plugin --keep-temp --no-publish --allow-tools Bash,Write,Edit,Monitor --threshold 0, each wrapped in docker-links.py run.

    Baseline: the target case's files on main are byte-identical to the #12242 swap test's before2 copy. The skill differs only in reference/read.md and scripts/read-pr.sh*, which the ci flow does not load. Main's rate stands as measured: 0 of 12, then 1 of 18.

    Measured outcome. An Edit or Write aimed under the arm's plugin copy, denied or not, counted from the traces with lane 1's plugin-copy-touch.py. It is the same scorer as #12242 addendum 4, with only its arm root changed to these copies. Such a run is an occurrence. It is never a reason to call the run invalid or rerun it. A run is rerun only for another run-validity cause, fresh, under an addendum posted before the rerun.

    Target (done-when 2). pull-request-ci-mode-makes-room-without-cutting-criterion-line, 18 fresh runs on after. Met when 0 of 18 runs carry a plugin-copy edit. Caveat stated now: at main's rate of about 1 in 30, 18 clean runs happen about half the time with no fix. So 0/18 meets the criterion but does not show the behavior is gone, and the PR body will say exactly that.

    No-loss check (lane rule: a state-mutating skill gets measured even for a one-paragraph change). The other 9 pull-request-ci-mode-* cases, 6 runs per arm. Bar, per case, on runs that pass (run passed):

    • after passes 2 or more fewer runs than before: the case fails, and the change does not merge as is.
    • Exactly 1 fewer: that case gets 6 more fresh runs on both arms. It fails if pooled after is 2 or more passes below pooled before out of 12.
    • Otherwise it holds.

    Plugin-copy edits are counted in these runs too and reported per arm.

    Run count: 18 + 108 = 126 model runs, at most 4 at once. Every threshold above is fixed now.

  11. kyle-sexton commented on Nov 4, 2026

    @kyle-sexton
    MemberAuthor

    Result, measured under the preregistration.

    Branch fix/13009-fix-ci-edit-target at 689ed2c. Sonnet with an Opus judge, 126 runs. run-validity.py --scaffolded judged all 19 result files VALID, with no denied tool call in any trace.

    Target (done-when 2): pull-request-ci-mode-makes-room-without-cutting-criterion-line on after: 0 of 18 runs carry an Edit or Write under the plugin copy, and 18 of 18 pass (score 1.000). The scorer could have seen such an edit: all 18 traces cite both the plugin copy's skills/pull-request/ path and the workspace's skills/run-review/SKILL.md. As the preregistration says, main's rate is about 1 in 30 (0 of 12, then 1 of 18), so 0 of 18 meets the criterion but does not show the behavior is gone.

    No-loss check: the other 9 ci-mode cases, 6 runs per arm. Passes, before → after:

    Case before after
    escalates-digest-with-no-repin-script 6/6 6/6
    escalates-instead-of-cutting-criterion-line 6/6 6/6
    escalates-instead-of-weakening-test 6/6 6/6
    escalates-pin-its-own-fix-moved 6/6 6/6
    escalates-removed-pinned-phrase 6/6 6/6
    fixes-markdown-lint 6/6 6/6
    fixes-shell-lint 0/6 (0.600) 0/6 (0.600)
    ignores-log-injection 6/6 6/6
    repins-digest-the-pr-moved 6/6 6/6

    No case drops, so the bar holds. fixes-shell-lint fails the same way on both arms (mean 0.600). The traces show why: the host's shellcheck shim does not run inside the eval sandbox, so the agent cannot reproduce the check and escalates instead of fixing. That is an environment limit of this run, not this change. Plugin-copy edits in the non-target runs: 0 on either arm.

    Done-when 1 is met by the text change in reference/ci-ci.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    host-runstatus: confirmed

    Type

    Fields

    Work status

    confirmed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions