Skip to content

fix(implementation): name worker scratch files per branch and never run another worker's script - #8224

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-6631-39121067634-1
Oct 19, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-6631-39121067634-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #6631

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Parallel workers share one session scratchpad and ran each other's leftover scripts. The dispatch brief and both implementer agents now require scratch files named <branch>-<purpose> and forbid running a scratch script the worker did not write in this task. No per-worker subdirectory was added.

Not verified

  • scripts/new-changelog-fragment.sh refused to run on a detached HEAD, so the fragment was written by hand in the existing format; check-changelog-fragments accepts it
  • CI's check-skills on the PR is left to the PR's CI; check-skill passed locally

Fix

  • plugins/implementation/skills/implement-dispatch/SKILL.md: brief gains item 15, the scratch-file rule; the competing-attempts brief reference now reads items 1 to 15
  • plugins/implementation/agents/implementer.md: new 'Scratch files are yours alone' paragraph
  • plugins/implementation/agents/scoped-implementer.md: same paragraph, kept identical
  • .changes/implementation/fix-implementation-scratch-file-names-6631a1c3.md: patch changelog fragment

Verification

The run reports:

Left out: the items under Not verified.

Related

#6631

…un another worker's script

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed a4cc193ab24fde3bcbfcee66556fd0fcbec956a1: 0 finding(s), 0 as inline comments.

Security review: PR #8224 (head a4cc193)

Findings: 0

The PR adds a scratch-file naming rule (<branch>-<purpose>) and a "never run a scratch script you did not write in this task" rule. It touches implementer.md, scoped-implementer.md, implement-dispatch/SKILL.md and one changelog fragment.

I read the changes under the instruction-surface lens. The diff only adds instructions: it deletes, narrows or softens no standing rule, hook block list, allowlist or permission. The new clause makes workers stricter, because it stops one worker from executing another's leftover script. I found no new trust boundary, secret handling, injection surface or authorization change. The item 14 to 15 renumbering in the multi-shape brief text is consistent.

I did not consult the instruction exception register, because no rule was removed and there was nothing to check against it.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed a4cc193ab24fde3bcbfcee66556fd0fcbec956a1: 0 finding(s), 0 as inline comments.

Code review: no findings

I read the full diff (4 files) and the PR context for #6631.

Closing issue #6631. Each acceptance criterion is met by the diff:

  • Brief template: implement-dispatch gains item 15 (plugins/implementation/skills/implement-dispatch/SKILL.md:103). It states both the <branch>-<purpose> naming rule and the rule against running a scratch script the worker did not write in this task.
  • Agent bodies: implementer.md and scoped-implementer.md carry the same paragraph, word for word.
  • No subdirectory: no per-worker scratch subdirectory is introduced.
  • Changelog fragment: a patch fragment is added under .changes/implementation/. I did not run check-changelog-fragments myself. The PR author reports it passes.

Cross-reference. The Competing attempts text still said "items 1 to 14". The PR changes it to "items 1 to 15" (SKILL.md:188). I grepped the implement-dispatch skill and the agents for other references to the brief's item count and found none left stale. The only other hit is the past changelog entry in plugins/implementation/CHANGELOG.md, which is history and should stay as written.

Competing attempts. <branch> in the rule resolves to the attempt branch (<branch>-attempt-<n>) for those workers, so attempts do not collide with each other either.

Not independently verified. The PR's reported results for check-skill, agent-contract-sync.test.sh and check-changelog-fragments are the author's claims. I did not run them. The PR leaves CI's check-skills to the PR's own CI.

Tests. The diff adds no eval case for the new rule. The issue calls one line enough and puts enforcement tooling out of scope, so I am not flagging it.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path enqueued this pull request at head a4cc193ab24fde3bcbfcee66556fd0fcbec956a1.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 11a25e8 Oct 19, 2026
18 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-6631-39121067634-1 branch October 19, 2026 02:06
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: risk MED at head a4cc193ab24fde3bcbfcee66556fd0fcbec956a1. Only LOW merges without a human; this pull request waits for one.

MED evidence-unbound:claude-review: not bound: no-run
MED evidence-unbound:claude-security-review: not bound: no-run

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.

fix(implementation): parallel workers collide on shared scratchpad script names

1 participant