# Smoke test goal for parallel-agents-merge.dot

Smoke test the §6.10.3 merger pattern end-to-end. The point is
to exercise plan → 3 concurrent agents → join → merger →
verify with controlled, non-conflicting edits.

§6.3 `predecessor_branches` payload is not yet shipped — the
merger discovers branch refs via shell instead of getting them
in entry-edge context. The instructions below tell it how.

## Constraints

- Each parallel agent creates **exactly one new file** with
  exactly one line of content.
- No source-code changes; no shared file edits.
- All file paths are distinct → trivially conflict-free merge.

## Plan instructions (for the plan node)

Write `plan.md` containing exactly three sections titled
`## Section A`, `## Section B`, `## Section C`. Each section
contains one sentence:

- **Section A:** "Use the Write tool to create
  `smoke-notes/a.md` with the single line `Branch A smoke test`."
- **Section B:** "Use the Write tool to create
  `smoke-notes/b.md` with the single line `Branch B smoke test`."
- **Section C:** "Use the Write tool to create
  `smoke-notes/c.md` with the single line `Branch C smoke test`."

Nothing else in plan.md. No preamble, no commentary.

## Per-branch agent instructions

Each agent reads `plan.md`, finds its section, and follows the
single Write instruction. **Do not edit any other file.** After
the Write tool completes, your work is done — `report_outcome` is
not necessary; just stop.

## Merger instructions

The merger node enters via the join's `SUCCESS` edge. The
captured_output it receives is the concatenated, branch-name-
prefixed output from each parallel branch (`[a] ...`, `[b] ...`,
`[c] ...`). The branch refs themselves are at:

  refs/heads/attractor/run/<run-id>/branch/a
  refs/heads/attractor/run/<run-id>/branch/b
  refs/heads/attractor/run/<run-id>/branch/c

To find `<run-id>`:

  git branch --show-current
  # Output: attractor/run/<run-id>/worktree
  # Strip the prefix and suffix to get <run-id>.

For each branch in (a, b, c):

  git merge --no-edit refs/heads/attractor/run/<run-id>/branch/<name>

Each branch added a distinct file under `smoke-notes/`, so no
conflicts should arise. The default `--no-edit` accepts the
merge-commit message. If a merge unexpectedly conflicts,
`report_outcome("FAILURE", "merge conflict on <name>")` and the
fixup path handles it.

After all three merges, the worktree has three new files under
`smoke-notes/`.

## Verify (automatic)

The verify node runs `pytest && ruff check src tests && pyright`.
No source-code changes, so the baseline should hold and verify
should report SUCCESS first try.

## Definition of done

- `smoke-notes/a.md`, `smoke-notes/b.md`, `smoke-notes/c.md`
  exist in the worktree after merger commits.
- Verify reports SUCCESS.
- Run status: COMPLETED.

If any of the three merges fails or verify fails after merge,
the fixup loop runs (max_visits=3 on verify). Past that cap the
run ends INCOMPLETE — acceptable for a smoke test.
