Skip to content

sync(upstream): merge upstream/main 6b73b3def into fork/dev - #368

Merged
patroza merged 9 commits into
fork/devfrom
sync/upstream-6b73b3def
Aug 7, 2026
Merged

sync(upstream): merge upstream/main 6b73b3def into fork/dev#368
patroza merged 9 commits into
fork/devfrom
sync/upstream-6b73b3def

Conversation

@omegent-app

@omegent-app omegent-app Bot commented Aug 7, 2026

Copy link
Copy Markdown

Adopts upstream through 6b73b3def, headlined by pingdotgg#5493 "paginate thread loading with
user-anchored turn windows"
— 2,093 insertions plus a keyset-index migration.

Important

Merge with a merge commit, not squash. Squashing collapses the second parent and discards
upstream's commits as ancestors — the thing that keeps "commits behind upstream" honest.

The candidate question, settled with evidence

pingdotgg#4018 (getThreadActivities) is superseded — upstream never merged it and ships
loadOlderTurns instead. And the check you suggested surfaced more: pingdotgg#3510 (mobile paging) is
partially superseded too
— its mobile scroll-up half is exactly the scaffolding this merge
removes, while its server bounded-replay half in OrchestrationEngine stays active.

Both are recorded in .github/upstream-candidates.json (superseded / partially-superseded,
with what replaced them and what remains).

The server RPC stays. Deployed mobile builds still call orchestration.getThreadActivities;
the RPC, schemas and window constant are kept as a marked compatibility surface. Remove once no
fleet mobile build predates this merge.

On "undo the candidate first": it would have shrunk the 24 textual conflicts, but not the real
blockers — those were upstream's new code meeting fork-added fields/services, which exist regardless.

What the resolutions actually involved

All 24 textual conflicts went to upstream. The expensive part was what git auto-merged wrong or
left dangling — found by typecheck and tests, never by conflict markers:

Where Defect Resolution
threads.ts upstream's applyItemLocked header welded onto the fork's batch-reducer body, referencing an out-of-scope variable and silently dropping upstream's synchronized branch fork batching layer removed (+2 tests); upstream body restored
threads.ts fork's load-once HTTP fallback guard lost reimplemented on upstream's model; its regression test passes
ws.ts fork reuseBaseBranch flow vs upstream pingdotgg#5556 no-origin fallback — neither alone compiled combined; upstream's new fallback test given the projection stub the fork's bootstrap wait requires
ProjectionSnapshotQuery upstream's windowed message SQL missing fork source_jsonevery windowed read failed decode; bounded query destructured 9 results from 7 queries column added; fork's queued-messages + pending-turn-start members restored
web/mobile UI prop/rename skews (selectedThreads, WorkspaceTarget, routeServerThreadShell, queue props) reconciled per owning side
migrations ledger fixtures drifted by upstream's 037 extended; fork 037 lives in t3_fork_sql_migrations, no collision

fork/tim

fork/tim touches threads.ts, ProjectionSnapshotQuery and contracts/orchestration — the same
surface — but no tim commit is merged upstream, so nothing tim-authored is superseded. Review
those diffs with tim provenance in mind; tim-derived behaviour with tests is green.

Verification

  • Full recursive typecheck clean across 17 packages.
  • 2,269 tests pass (2,281 collected), including upstream's 11 pagination and 7 windowed-detail
    tests, the fork's five bootstrap replay/reuse tests, and the terminal-failure and load-once
    regression tests. Single failure is the pre-existing CodexTextGeneration launch-args one,
    reproducible on unmerged fork/dev.
  • Adversarial reviews by grok-4.5 and gpt-5.6-sol over the git show --cc resolution
    surface: findings below.

Adversarial review findings & dispositions

grok-4.5 — 1 HIGH, 1 MED, all other categories explicitly clear:

Finding Disposition
HIGH — fork's bootstrap replay/reuse block dropped in ws.ts: worktreeAlreadyPrepared declared and read but never set; a replayed bootstrap would re-run git worktree add -b and fail on the existing branch; the five fork tests locking this in were deleted Fixed. Full replay/reuse block restored (projected-shell lookup → reuse existing worktree / recreate at the recorded branch), all five fork bootstrap tests re-inserted and passing alongside upstream's no-origin test. Restoring it also exposed that the merged code checked remoteExists before the reuse short-circuit — now evaluated lazily, so the reuse path never touches the remote
MEDMessagesTimeline.test.tsx lost the fork's positive load-control assertions; remaining test would pass with the control deleted Fixed. Positive assertions added for upstream's "Load earlier turns" / "Loading earlier turns…" header states

gpt-5.6-sol — 4 HIGH, 3 MED, 1 LOW claimed; each verified against the tree:

Finding Disposition
HIGHsetDeleted() on terminal subscription failure runs outside applyLock, racing older-page merges; every other history rewrite is serialized by that lock Confirmed weld, fixed. Upstream only calls setDeleted from inside applyItemLocked; the fork's terminal path now takes the lock too
HIGH — fork's 500-activity truncation applied to upstream's turn-windowed snapshot: rows dropped mid-window are unreachable (loading earlier turns fetches earlier windows, never the middle of this one) Confirmed, fixed. Cap + hasMoreActivities now apply only to the legacy unbounded snapshot, where the compat activities-page RPC can recover them; windowed snapshots return the full window
HIGHnextLatestTurnId computed but ignored in ProjectionPipeline, expression duplicated in the upsert Confirmed (severity: cosmetic), fixed. Variable now used
HIGH — older-page cursor read before historyEpoch, neither under applyLock Out of scope. That region is upstream's own code, byte-identical to 6b73b3def — a candidate for an upstream issue, not a resolution defect
MED — upstream's loadingServerThread/activeServerThread computed but never consumed; hideEmptyPlaceholder lost the threadDetailLoading guard, so a loading thread could flash the genuine-empty placeholder Confirmed welds, fixed. activeServerThread now drives isServerThread/activeThread/threadError as upstream intended, and the placeholder guard is restored
MED — mobile activeThreadBusy threaded into screens but never read Confirmed dangling, removed. Upstream's consumers (send-button "Queue" label + queued-count note) are superseded by the fork's sendEntersSteeringQueue (same running/starting predicate) and queue chips; the dead threading is deleted rather than double-wired
MED — fork's live-event batching (groupedWithin) lost Intentional. The batch reducer was a weld casualty either way (it silently dropped upstream's synchronized branch); upstream's epoch/semaphore apply model plus windowed initial snapshots replaces the render-storm bound it provided. If large-thread churn resurfaces, batching gets rebuilt against the new model, not welded onto it
LOW — timeline tests assert rendered strings, not interaction semantics Accepted. These are SSR-markup existence tests by design; interaction is covered at the ChatView level

Both reviews independently cleared the SQL/decode surface (source_json, queued messages, pending turn start, keyset ORDER) and found no state-machine races beyond the setDeleted weld above.

Co-authored by @patroza

opened by Patrick Roza in chat thread Discord · Discord · T3

@omegent-app
omegent-app Bot force-pushed the sync/upstream-6b73b3def branch 3 times, most recently from c2f2623 to 2735b47 Compare August 7, 2026 05:34
Eight commits, headlined by pingdotgg#5493 "paginate thread loading with user-anchored
turn windows" -- 2093 insertions plus a keyset index migration.

Candidate #29 ("perf: import bounded web thread history", upstream pingdotgg#4018) is
confirmed superseded: upstream never merged pingdotgg#4018 and ships loadOlderTurns
instead. The candidate is removed from web, mobile and client-runtime --
olderThreadActivities.ts deleted, ChatView and the mobile composer/feed/screens
rewired to upstream's loadEarlier model. The SERVER half stays: deployed mobile
builds still call orchestration.getThreadActivities, so the RPC, its schemas and
the activity window constant are retained as a compatibility surface and marked
as such.

All 24 textual conflicts resolved to upstream. The expensive work was what git
auto-merged wrong or left dangling, found by typecheck and tests, not markers:

- threads.ts: upstream's applyItemLocked header welded onto the fork's batch
  reducer body, referencing an out-of-scope identifier and silently dropping
  upstream's synchronized branch. The fork's batching layer (groupedWithin,
  reduceThreadStreamItems, eventBatchSize) is removed with its two tests; the
  fork's load-once HTTP fallback guard is reimplemented on upstream's model and
  its regression test passes again.
- ws.ts: the fork's reuseBaseBranch worktree flow and upstream's pingdotgg#5556
  no-origin fallback are combined; neither side alone compiled.
- ProjectionSnapshotQuery: upstream's new windowed message query lacked the
  fork's source_json column, failing decode on every windowed read; the bounded
  detail query destructured nine results from seven queries -- the fork's
  queued-messages and pending-turn-start members are restored.
- BranchToolbar/SidebarV2/MessagesTimeline/ChatView: prop and rename skews
  reconciled; fork surface-existence assertion updated for the new feed call.
- Migration ledger fixtures extended for upstream migration 037, which lands in
  the upstream namespace and does not collide with the fork's renumbered 037.
- Upstream's new tests adapted to fork-required fields (queuedMessages,
  pendingTurnStart) and the fork's projection-wait in bootstrap.

Verified: full recursive typecheck clean across 17 packages; 2264 tests pass
including upstream's 11 pagination and 7 windowed-detail tests. The single
failure (CodexTextGeneration structured output) predates this merge.

fork/tim touches threads.ts, ProjectionSnapshotQuery and contracts; no tim
commit is merged upstream, so review those diffs with tim provenance in mind.

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
@omegent-app
omegent-app Bot force-pushed the sync/upstream-6b73b3def branch from 2735b47 to a19d3ea Compare August 7, 2026 05:53
@omegent-app
omegent-app Bot marked this pull request as ready for review August 7, 2026 05:54
@patroza
patroza merged commit 54187a4 into fork/dev Aug 7, 2026
4 of 8 checks passed
omegent-app Bot added a commit that referenced this pull request Aug 7, 2026
Adopts the ten upstream commits after #368: timeline live-follow (pingdotgg#5566),
reconnect-loop handling during server stalls (pingdotgg#5561), plans folded into chat
(pingdotgg#5558/pingdotgg#5551), plus server settle/reconnect fixes and the transfer-budget CI
test (pingdotgg#5350).

The fork's "keep the open WebSocket lease when a foreground liveness probe
fails" is replaced by upstream's probe model. Both target reconnect churn during
server stalls; upstream splits the wake reasons (probe vs reconnect), adds
tolerance windows and a first-attempt ladder skip. Keeping both was incoherent:
the auto-merge left the fork's swallow in front of upstream's wakeProbeFailed
path, making it dead code. The fork's diagnostics log, labelled ping-timeout
errors and followNetworkStatus resume handling are kept around it.

Welds found by typecheck and tests, not by conflict markers:
- ChatView and ThreadFeed each ended up with two follow-state variables, the
  fork's superseded one still being written; converged on upstream's.
- findSidebarProposedPlan was dropped from session-logic while ChatView still
  called it; restored.
- Two timeline row-union members merged into one malformed member.
- The fork's pre-latch ThreadFeed handlers survived as duplicates alongside
  upstream's; removed, with the fork's unread-activity dot rebuilt on the latch.
- resolveOlderHistoryAutoLoad, left over from the superseded pagination
  candidate, was referenced only by its own tests; removed with them.
- Upstream's transfer-budget test opened a socket without the fork's omegent-t3
  product handshake, so the environment rejected it.

Plan sidebar wiring is removed with the surface upstream deleted; the fork's
settle-independent follow-up composer gate is kept.

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
omegent-app Bot added a commit that referenced this pull request Aug 7, 2026
Adopts the ten upstream commits after #368: timeline live-follow (pingdotgg#5566),
reconnect-loop handling during server stalls (pingdotgg#5561), plans folded into chat
(pingdotgg#5558/pingdotgg#5551), plus server settle/reconnect fixes and the transfer-budget CI
test (pingdotgg#5350).

The fork's "keep the open WebSocket lease when a foreground liveness probe
fails" is replaced by upstream's probe model. Both target reconnect churn during
server stalls; upstream splits the wake reasons (probe vs reconnect), adds
tolerance windows and a first-attempt ladder skip. Keeping both was incoherent:
the auto-merge left the fork's swallow in front of upstream's wakeProbeFailed
path, making it dead code. The fork's diagnostics log, labelled ping-timeout
errors and followNetworkStatus resume handling are kept around it.

Welds found by typecheck and tests, not by conflict markers:
- ChatView and ThreadFeed each ended up with two follow-state variables, the
  fork's superseded one still being written; converged on upstream's.
- findSidebarProposedPlan was dropped from session-logic while ChatView still
  called it; restored.
- Two timeline row-union members merged into one malformed member.
- The fork's pre-latch ThreadFeed handlers survived as duplicates alongside
  upstream's; removed, with the fork's unread-activity dot rebuilt on the latch.
- resolveOlderHistoryAutoLoad, left over from the superseded pagination
  candidate, was referenced only by its own tests; removed with them.
- Upstream's transfer-budget test opened a socket without the fork's omegent-t3
  product handshake, so the environment rejected it.

Plan sidebar wiring is removed with the surface upstream deleted; the fork's
settle-independent follow-up composer gate is kept.

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
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.

2 participants