Repository navigation
Per-change resources and automatic conflict resolution - #90
Merged
Merged
Conversation
Changes running at the same time no longer share a temp folder or ports: every claimed change's commands and command-running sessions get their own TMPDIR, a block of ports checked free (LOOPSTRA_PORT_BASE/COUNT), and optionally per-slot tool caches (speed.own_caches). A conflict with main is now resolved instead of blocking: at review start, in the merge checks, and while a change waits for a person at the merge gate. The branch is squashed onto main, a new `resolve` step (strong) resolves the conflicts, and the resolution is tested and reviewed (the reviewer sees both sides and what was kept) before anything merges. Failures leave the branch as it was and write conflict.md. Resolution reviews do not use up max_rounds; stages.review.max_resolutions caps them. With merge.human: pr, only an approval given after a resolution counts. Design: docs/superpowers/specs/2026-10-27-conflict-free-concurrency-design.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A pull request waiting for a person is caught up from GitHub's copy first: main is synced and a person's commits on the pull request are taken in. - An approval counts only when given after the resolution was pushed (resolved-at is pending until then), and the wait says why. - Resolution commits may be empty; new files the resolve session's commands left are removed before saving; binary conflicts go to a person. - TMPDIR is a short folder in the system temp dir (Unix socket path limits). - merge-tree drops --quiet; the waiting check is cached by commit. - max_resolutions 0 or used up still writes conflict.md, with its own note. - catchUpTested replaces the duplicated catch-up-then-test blocks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes that run at the same time (
speed.max_parallel_changes) already had their own worktrees. This closes the two gaps that were left.Per-change resources
Every claimed change's commands, and the sessions that may run commands, now get:
TMPDIR/TMP/TEMPset to a short per-slot folder in the system temp dir. It is removed when the step ends, and leftovers are swept at the next tick.LOOPSTRA_PORT_BASEandLOOPSTRA_PORT_COUNT. Set withspeed.ports_per_change(10 by default, 0 for none) andspeed.ports_from(20000).speed.own_caches, off): XDG, npm, bun, yarn, pip and go. They are kept warm between changes.Automatic conflict resolution
A conflict with main used to block the change for an engineer. Now it is resolved in three places:
git merge-tree, git 2.38+). This covers both the local status gate and pull requests waiting for approval.How it works:
resolvestep (strongby default) gets both changes' intent and each conflict with both sides. The squash commit keeps people's credit withCo-authored-by.{{resolution}}). These rounds don't use upmax_rounds;stages.review.max_resolutions(3) caps them.conflict.mdrecords the files, both sides and the reason. Binary conflicts go to a person.merge.human: pr, only an approval given after the resolution was pushed counts, and the pull request's wait says so. Before resolving a waiting pull request, main is synced and a person's commits on it are taken in.Design:
docs/superpowers/specs/2026-10-27-conflict-free-concurrency-design.md. The calls made along the way are indocs/decisions.md.Testing
tests/unit/resources.test.tstests/unit/conflicts.test.ts: resolved, refused, markers left, cap, cap off, binary, waiting, review start, crash recovery, co-authorsapprovedAtparsingbun run checkis green (1877 pass). A high-effort/code-reviewfound 10 issues, all fixed in the second commit.🤖 Generated with Claude Code