Skip to content

Sync to v0.1.2-nightly.20261021.3457 conflicts - #168

Merged
tomkaczocha merged 459 commits into
mainfrom
t3/factory-issue-167
Oct 21, 2026
Merged

tomkaczocha merged 459 commits into
mainfrom
t3/factory-issue-167

Conversation

@rawphp

@rawphp rawphp commented Oct 21, 2026 •

Copy link
Copy Markdown

Closes #167

Merging upstream's v0.1.2-nightly.20261021.3457 into main conflicted in 16 files, so the daily sync stopped. This branch does that merge by hand and records the tag in factory/UPSTREAM.

Most conflicts came from upstream pruning low-value tests (pingdotgg#22557, pingdotgg#22589, pingdotgg#22592, pingdotgg#22593) that the fork had edited to expect its own identity values. The rule I used: when the fork's copy of a deleted test only renamed identity values, upstream's deletion wins. When the fork's test checks that the fork stays apart from upstream (profile folders, the upstream launcher link, URL schemes, the launchd label), it stays. Imports that upstream dropped are put back where needed. bootService.ts keeps the fork's launchd label under upstream's new exports. server.ts keeps FactoryLayer next to upstream's new idle compaction worker.

Issues the merge exposed, each fixed in its own commit:

  • Upstream's new serverOwnership.ts finds an older boot service by BOOT_SERVICE_PLIST_FILE, which is the fork's label. Its tests planted upstream's com.t3tools.t3code.service plist, so two darwin cases failed and the others passed without reaching the label check. The tests now import the constants.
  • The deletions removed the only tests on the packaged app's fork appId, product name, mac URL schemes and appUserModelId. Two small fork-only tests bring them back. Each fails when the upstream value is put back.
  • factory/t3/events.contract.test.ts timed out on every run. Its forked consumer subscribed after run A's first status. It now launches a probe run that fails fast and waits for the probe's id before launching A. Passed 30 runs in a row.
  • The fork's "has no update feed" test was already red on main. Upstream now sets publish: null on purpose, and the test asserts that.

The branch is t3/factory-issue-167, the factory's worktree branch, not sync/<tag>.

Contract

  • done: the branch is origin/main merged --no-ff with v0.1.2-nightly.20261021.3457. All 16 conflicts are resolved and keep the fork's seams and identity. factory/UPSTREAM names the tag and e64766c56ac6fc1678e6107052feb0047a35337f. factory/scripts/check.sh exits 0. Draft PR.
  • out: apps/web/src/routeTree.gen.ts (no conflict, not regenerated). Fork behavior changes beyond carrying the existing seams. Three DesktopLinuxUrlHandler tests that fail the same way on origin/main on macOS (case-insensitive file system).
  • risk: data. The fork must not touch the developer's upstream T3 Code state.
  • test: factory/scripts/check.sh → pass. The 16 touched test files plus serverRuntimeState.test.ts → pass, except the three macOS-only DesktopLinuxUrlHandler failures that origin/main has too.

Acceptance criteria

  • Merge of main and the tag: merge 6002e58f2 has parents c4114b83a (origin/main) and e64766c56 (the tag)
  • Conflicts resolved: git show --remerge-diff 6002e58f2, and no conflict markers remain
  • Route tree: did not conflict, so regenerate-routes.sh was not needed
  • factory/UPSTREAM: v0.1.2-nightly.20261021.3457 e64766c56ac6fc1678e6107052feb0047a35337f
  • Pull request: this draft

Gate

  • factory/scripts/check.sh → exit 0, at 7fe5a0a9d

Models

  • maker: claude-opus-5-5 (this session)
  • checker: claude-opus-5-5 via host (no models block in .dw/config.yml, so Tom's roster applies)

Review

  • door: two-way. Reverting the merge commit restores main. Merging installs nothing, since the fork binary is built and installed by hand.
  • risk: high. Upstream identity leaking back into the fork could reach the developer's live upstream T3 state.
  • cycles: 2. Cycle 1: 2/5 (1 blocker, 3 actions after combining). Cycle 2: 5/5 (0/0).
  • fixed: blind-reader-1, correctness-1, maintainability-1 and traceability-1 (one bug: serverRuntimeState.test.ts used upstream's label). maintainability-2 (stale SEAMS entry). testing-1 and blind-reader-2 (dropped fork-identity guards). testing-2 (toPull did not open the subscription).
  • settled: none
  • dropped: cycle 1: adversarial 2, traceability 2, maintainability 1. Cycle 2: traceability 1, blind-reader 2, testing 2. All were already on origin/main or outside this issue.
  • incomplete: none
  • mutation: killed 5, survived 0, unreached 0 (launchd label back to upstream, FactoryLayer dropped from server.ts, mac schemes back to t3code, appUserModelId back to com.t3tools.t3code, product name traced by the testing seat)
  • leftovers: the nits blind-reader-3 and testing-3 were fixed with a comment. Upstream added lint rules in this range (test(lint): ban per-test timeouts and unreasoned skips pingdotgg/t3code#22560 and others) that vp check enforces, and the factory-ci Lint job failed on 197 errors in fork code: 147 prefer-effect-fn, 24 require-disposable-render, 12 no-wall-clock-in-tests, 8 no-real-time-wait-in-tests, 3 no-test-timeout-or-unreasoned-skip, 3 no-frame-waits-in-browser-tests. Three follow-up commits fix them: refactor(factory): reusable Effect functions use Effect.fn, test(factory): server and mobile tests stop reading the wall clock, sleeping and overriding timeouts, test(factory): web browser tests render through the disposable helper. The web change also revived factoryEnvironment.browser.test.tsx, whose 21 tests had failed to import since Factory page filters by environment and repo #165. factory/scripts/check.sh passes at the new head.

Lessons

  • A merge with an auto-merged consumer. Symptom: reviewing only the conflict hunks missed a cleanly merged upstream test that broke against a seam the resolution kept. Cause: a new upstream file consumed a constant whose value the fork overrides. Default: after resolving a sync, grep the tag's new and changed files for the upstream literal of every seam value the resolution kept, and run their tests, before review.

Commits

  • 6002e58f2 sync: v0.1.2-nightly.20261021.3457: Make (the merge)
  • b685ee746 test: an unconfigured update feed is an explicit null publish: Make (red on main as well)
  • f2636e9db test: the events contract opens its subscription before the first launch: Gate fix
  • bfe0a4b37 test: upstream's boot service ownership tests use the fork's launchd label: Check cycle 1
  • fa48cc20c test: guard the packaged app's fork id, name, URL schemes and app user model id: Check cycle 1
  • 7b3c754e3 fix: the events contract waits for a probe run instead of trusting toPull: Check cycle 1
  • 7fe5a0a9d test: say how the events contract's second consumer can still be late: Check cycle 2 nit

Files

  • factory/UPSTREAM: names the new tag
  • factory/SEAMS: adds serverRuntimeState.test.ts, drops DesktopEarlyElectronStartup.test.ts (now identical to upstream)
  • apps/server/src/server.ts, apps/server/src/cloud/bootService.ts: conflict resolutions that keep the fork's seams
  • the 14 conflicted test files: resolved under the rule above
  • apps/server/src/serverRuntimeState.test.ts: fork label through the exported constants
  • scripts/build-desktop-artifact.test.ts, apps/desktop/src/app/DesktopEnvironment.test.ts: fork identity guards
  • apps/server/src/factory/t3/events.contract.test.ts: probe run before A

Opus 5.5 in Claude Code (factory session).

akbarakma and others added 30 commits October 20, 2026 04:55
pingdotgg#18332)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…mote (pingdotgg#17340)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…names (pingdotgg#18389)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…es (pingdotgg#19938)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…19974)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ingdotgg#19701)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#19499)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
… in a prompt (pingdotgg#19485)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gg#7894)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gdotgg#19300)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…g#19195)

Co-authored-by: dan <dan@bw-hq-linuxws01.bellwetherit.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…otgg#21114)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…pingdotgg#18552)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ge (pingdotgg#18603)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…tgg#20046)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…ingdotgg#19154)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gg#21007)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ingdotgg#19706)

Co-authored-by: Ronak Guliani <ronakguliani@microsoft.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ls (pingdotgg#20382)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…15623)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…or screen (pingdotgg#20999)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Joaquin Alfian <joaquinalfian@Joaquins-MacBook-Pro.local>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…0037)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
flamboh and others added 22 commits October 20, 2026 18:28
…g#22588)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…tgg#22589)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…#22591)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…rts (pingdotgg#22602)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…gg#22613)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Merges upstream's v0.1.2-nightly.20261021.3457 into main by hand.

Upstream pruned low-value tests in this range. Where the fork had only
renamed identity values in a deleted test, the deletion wins. Fork tests
that assert the fork stays apart from upstream (profile folders, launcher
link, URL schemes, launchd label) are kept, with the imports upstream
dropped put back. electron-launcher no longer exports
resolveMacBundleInfoPlistStrings, so the fork's launcher tests read the
display name through resolveMacLauncherPaths. bootService.ts keeps the
fork's launchd label under upstream's new exports, and server.ts carries
FactoryLayer beside upstream's idle compaction worker.

Issue: #167
Upstream now sets publish to null so electron-builder cannot infer a
GitHub feed from GH_TOKEN. The fork's test still expected the property to
be missing and failed on main as well as on the merge.

Issue: #167
On v0.1.2-nightly.20261021.3457 the forked consumer subscribed after A's
run.created, so it saw four of A's five status changes and timed out
waiting for the fifth, every run. Stream.toPull opens the subscription in
the test's own fiber before anything is launched.

Issue: #167
…label

serverOwnership.ts, new in this sync, finds an older boot service through
BOOT_SERVICE_PLIST_FILE and BOOT_SERVICE_LAUNCHD_LABEL, which carry the
fork's label. Its tests planted upstream's com.t3tools.t3code.service
plist, so the two darwin refusal cases failed and the allow cases never
reached the label check. The tests now take both from bootService.ts.

SEAMS gains that test and drops DesktopEarlyElectronStartup.test.ts,
which the merge left identical to upstream.

Issue: #167
…r model id

The merge took upstream's deletion of the tests whose fork copies were
the only checks on these values. One small test each puts them back:
createBuildConfig's appId, productName and mac protocols, the nightly
product name, and DesktopEnvironment's default appUserModelId. Each
fails when upstream's value is put back in the code.

Issue: #167
…Pull

Stream.toPull does not open the subscription: Channel.unwrap reads the
start position on the first pull, inside the forked consumer, so the
previous fix only moved the race. The test now launches a run that fails
fast and waits for its id, which shows the stream is live, before it
launches A. The probe's later status may interleave and is skipped.

Issue: #167
@rawphp
rawphp marked this pull request as ready for review October 21, 2026 10:30
@rawphp

rawphp commented Oct 21, 2026

Copy link
Copy Markdown
Author

Factory gate: passed (attempt 1, run by the factory in a fresh checkout of the pull request's head 7fe5a0a merged with the base branch tip c4114b8)

Command Exit Time
factory/scripts/check.sh 0 206.8 s

…leeping and overriding timeouts

Upstream's new lint rules reject Date.now() reads, real-clock polls and
per-test timeouts in tests. Polls for subprocess side effects wait with
vi.waitFor; clock reads come from a fixed or injected clock; the two
20 s and one 120 s overrides go, since the project ceiling is 120 s. The
install health-check test observes the script's post-failure sleep
through a PATH shim instead of sleeping itself.
Upstream's require-disposable-render and no-frame-waits rules reject
react-dom/client roots, React's act, lifecycle hooks and vi.useFakeTimers
in browser tests. The fork helper now sits on apps/web/test/render.tsx and
each test acquires its fixture with using. The router mocks spread the
real module so the helper can load; that also revives the 21 tests in
factoryEnvironment.browser.test.tsx, which had failed to import since the
page started reading its search params.
Upstream's prefer-effect-fn rule flags a function whose body is one
Effect.gen. The 147 fork sites now use Effect.fn with a Module.name span,
pipe combinators passed as extra builder arguments, and Effect.fn.Return
where callers need the declared type.
@rawphp

rawphp commented Oct 21, 2026

Copy link
Copy Markdown
Author

Factory gate: passed again (attempt 2, run by the factory in a fresh checkout of the pull request's head 96fd413 merged with the base branch tip c4114b8)

Command Exit Time
factory/scripts/check.sh 0 198.0 s

@tomkaczocha
tomkaczocha merged commit 9f68f45 into main Oct 21, 2026
2 checks passed
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.

Sync to v0.1.2-nightly.20261021.3457 conflicts