You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
0.1.2 TM11: init merges the brain PR on a companion it just created, so a public repository needs one merge #2417
Ticket TM11 of spec #2322 (0.1.2), one merge for a public repository too. Size: S.
What to build
For a public repository, openwiz init puts the brain in a private companion it creates, and proposes the brain files there in a pull request. With TM4's setting pull request in the code repository, the user merges twice. The default first fleet uses a demo repository, which may be public, so the 10 minutes (TM9) pays for the second merge.
The one change: when init creates the companion in this same apply, it also merges its own brain pull request on that companion, under the same explicit authorization, right after opening it and reading it back. The pull request stays as the visible proposal and record. An existing companion, a private repository's in-repository brain, and any repeat init keep today's behaviour: the pull request is opened for the user.
Contract first, in this ticket: setup-onboard.v1 gains the effect merge_pull_request (companion created in the same apply only), with first-hour.v1's effect fields, and the init result reports the brain pull request as merged. Everything else in the contract is unchanged.
Owned paths
contracts/setup-onboard.v1.md (shared: only the Visible proposals and Effects once lines)
contracts/setup-onboard.v1.schema.json (shared: only the effect kind list)
tools/install/setup/init.py
tools/install/tests/init/test_init.py
tools/install/tests/setup-onboard-contract/fixtures/cases.json (shared: one new case)
tools/install/tests/setup-onboard-contract/check.py (shared: only the effect checks)
crates/cli/src/init.rs (shared: only the effect label)
changes/2417.md
Relies on: nothing
Links
none
Acceptance criteria
With the fake GitHub, an apply on a public repository that creates its companion opens the brain pull request, reads it back and merges it, once, and reports merged and one merge_pull_request effect.
An existing companion, a private repository and a repeated init open the pull request for the user as today, with no merge.
The contract fixtures and checker accept the new case and still refuse a merge for any other case.
Proof
P4 (one setup PR, also for a public repository): test_init.py and the contract checker, red first.
launch-fleet: started (the 0.1.2 lead's direct start; Opus 5.5 Medium builder). Hand checks: open, only ready-for-agent, no claim, builder or pull request yet, no blockers, no owned-path clash with an open pull request.
agent: builder
state: done
harness: claude-code
model: claude-opus-5-5
skills: build-ticket@0.2.2
step: Fixed review R1 and R2 at 916e2ff and answered on the PR; CI running.
time: 2026-11-22T23:19:39Z
pr: #2420
Builder question: crates/cli/src/init.rs (the effect label)
Found: open pull request #2310 (#2289, 0.1.1 polish C) changes crates/cli/src/init.rs, including the create_label label line right next to where the new merge_pull_request label goes. The rule for this build is to leave alone any file an open 0.1.1 pull request is changing, and an adjacent-line edit would also conflict with it.
Without the label, openwiz init's text output (not --json) prints the new merge effect as a second "Open the brain's pull request" line, because the match falls through to that default. The JSON result, the contract and the checker are all correct.
Lead answer to the builder question above: option 1. Open the pull request now without crates/cli/src/init.rs, and say in it that its one effect-label line is still to come. After #2310 merges, merge main into the branch and add only that line, before the final review.
Builder question: supporting edit grant for tools/install/tests/init/fake_gh.py
The owned-paths CI check on #2420 fails on one path: tools/install/tests/init/fake_gh.py. That path isn't owned. I used fleet.md's standing kind 4 (synthetic answers to a test fake this change breaks, with no assertion change), but the check only accepts the standing kinds it knows (evidence, changelog) or an explicit F4 grant.
The edit: the fake gh now answers GET repos/{o}/{r}/pulls/{n} and PUT repos/{o}/{r}/pulls/{n}/merge, 16 added lines and nothing else. Init now reads back and merges the brain pull request. It supports tools/install/setup/init.py and test_init.py for acceptance criterion 1.
Options:
Grant it: a record-author comment with "F4 supporting edit granted" naming tools/install/tests/init/fake_gh.py.
I move those answers into test_init.py, which would wrap the fake with a second script. That's more code and a less honest fake.
My pick: 1. A grant can't come from the builder, so this needs the lead.
F4 supporting edit granted (planner), for #2417: tools/install/tests/init/fake_gh.py
Only the fake answers for reading back and merging a pull request (GET repos/{o}/{r}/pulls/{n} and PUT repos/{o}/{r}/pulls/{n}/merge), with no assertion change. Same pull request, #2420.
Builder question: widen the F4 grant on tools/install/tests/init/fake_gh.py for R1 and R2 of #2420
The fixes the review asks for tie the auto-merge to this operation's own confirmed creations. That means the companion's immutable repository id from its create reply (R2), and the pull request's head sha from its create reply (R1). Init then checks both before merging. Today the fake gh returns neither, so the fixes can't be tested.
The exact additions, synthetic answers only, with no assertion change:
A repository the fake creates gets a synthetic integer id, and the repository read returns it.
A pull request the fake creates stores a head sha. Its create reply and GET pulls/{n} return head.sha, and the merge call checks the pinned sha against it (today it compares with a constant).
Options:
Widen the grant to these answers on the same path.
Fix both without the id and sha: merge only after a create reply that this operation itself confirmed, without binding the repository and revision. That only partly meets the review's fix.
My pick: 1. I'm building against it meanwhile and won't push until a grant is recorded.
F4 supporting edit granted (planner), for #2417: tools/install/tests/init/fake_gh.py
Widens the earlier grant for R1 and R2 of #2420: synthetic answers only, with no assertion change. A repository the fake creates gets a synthetic integer id that its read returns; a pull request the fake creates stores a head sha that its create reply and its read return, and the merge call checks the pinned sha against it. Same pull request, #2420.
Activity
jparker2006 commentedon Nov 22, 2026
launch-fleet: started (the 0.1.2 lead's direct start; Opus 5.5 Medium builder). Hand checks: open, only ready-for-agent, no claim, builder or pull request yet, no blockers, no owned-path clash with an open pull request.
jparker2006 commentedon Nov 22, 2026
agent: builder
state: done
harness: claude-code
model: claude-opus-5-5
skills: build-ticket@0.2.2
step: Fixed review R1 and R2 at 916e2ff and answered on the PR; CI running.
time: 2026-11-22T23:19:39Z
pr: #2420
jparker2006 commentedon Nov 22, 2026
Builder question:
crates/cli/src/init.rs(the effect label)Found: open pull request #2310 (#2289, 0.1.1 polish C) changes
crates/cli/src/init.rs, including thecreate_labellabel line right next to where the newmerge_pull_requestlabel goes. The rule for this build is to leave alone any file an open 0.1.1 pull request is changing, and an adjacent-line edit would also conflict with it.Without the label,
openwiz init's text output (not--json) prints the new merge effect as a second "Open the brain's pull request" line, because the match falls through to that default. The JSON result, the contract and the checker are all correct.Options:
init.rs. Once #2289: 0.1.1 polish C: contract wording (fleet, fleet-tick, cli, install, open development) #2310 merges, mergemaininto the branch and add the one lineSome("merge_pull_request") => "Merge the brain's pull request",, before this pull request merges (it waits for the 0.1.1 cut anyway).init.rsto a follow-up ticket.init.rsnow and accept the conflict with #2289: 0.1.1 polish C: contract wording (fleet, fleet-tick, cli, install, open development) #2310.My pick: 1. The pull request I open now says that this line is still to come.
jparker2006 commentedon Nov 22, 2026
Lead answer to the builder question above: option 1. Open the pull request now without
crates/cli/src/init.rs, and say in it that its one effect-label line is still to come. After #2310 merges, merge main into the branch and add only that line, before the final review.jparker2006 commentedon Nov 22, 2026
Builder question: supporting edit grant for
tools/install/tests/init/fake_gh.pyThe
owned-pathsCI check on #2420 fails on one path:tools/install/tests/init/fake_gh.py. That path isn't owned. I used fleet.md's standing kind 4 (synthetic answers to a test fake this change breaks, with no assertion change), but the check only accepts the standing kinds it knows (evidence, changelog) or an explicit F4 grant.The edit: the fake
ghnow answersGET repos/{o}/{r}/pulls/{n}andPUT repos/{o}/{r}/pulls/{n}/merge, 16 added lines and nothing else. Init now reads back and merges the brain pull request. It supportstools/install/setup/init.pyandtest_init.pyfor acceptance criterion 1.Options:
tools/install/tests/init/fake_gh.py.test_init.py, which would wrap the fake with a second script. That's more code and a less honest fake.My pick: 1. A grant can't come from the builder, so this needs the lead.
jparker2006 commentedon Nov 22, 2026
F4 supporting edit granted (planner), for #2417:
tools/install/tests/init/fake_gh.pyOnly the fake answers for reading back and merging a pull request (
GET repos/{o}/{r}/pulls/{n}andPUT repos/{o}/{r}/pulls/{n}/merge), with no assertion change. Same pull request, #2420.jparker2006 commentedon Nov 22, 2026
Builder question: widen the F4 grant on
tools/install/tests/init/fake_gh.pyfor R1 and R2 of #2420The fixes the review asks for tie the auto-merge to this operation's own confirmed creations. That means the companion's immutable repository
idfrom its create reply (R2), and the pull request's headshafrom its create reply (R1). Init then checks both before merging. Today the fakeghreturns neither, so the fixes can't be tested.The exact additions, synthetic answers only, with no assertion change:
id, and the repository read returns it.sha. Its create reply andGET pulls/{n}returnhead.sha, and the merge call checks the pinnedshaagainst it (today it compares with a constant).Options:
idandsha: merge only after a create reply that this operation itself confirmed, without binding the repository and revision. That only partly meets the review's fix.My pick: 1. I'm building against it meanwhile and won't push until a grant is recorded.
jparker2006 commentedon Nov 22, 2026
F4 supporting edit granted (planner), for #2417:
tools/install/tests/init/fake_gh.pyWidens the earlier grant for R1 and R2 of #2420: synthetic answers only, with no assertion change. A repository the fake creates gets a synthetic integer id that its read returns; a pull request the fake creates stores a head sha that its create reply and its read return, and the merge call checks the pinned sha against it. Same pull request, #2420.
#2417: red: a resumed apply merges only the companion and proposal th…
#2417: green: merge only a companion and proposal this operation's ow…
#2417: init's text output names the merge_pull_request effect