Skip to content

feat(sqlite): name every op in the boot log and split the identity boot bucket (0249)#345

Merged
crs48 merged 8 commits into
mainfrom
claude/compassionate-bouman-148ffa
Jun 29, 2026
Merged

feat(sqlite): name every op in the boot log and split the identity boot bucket (0249)#345
crs48 merged 8 commits into
mainfrom
claude/compassionate-bouman-148ffa

Conversation

@crs48

@crs48 crs48 commented Jun 29, 2026

Copy link
Copy Markdown
Owner

The cold-open stall keeps escaping diagnosis because the two decisive numbers
are never captured: which SQL the ~15 s execMs op is, and how the ~9 s
"identity" boot phase actually breaks down. Add both.

  • Worker op log now carries the op's whitespace-collapsed, param-free SQL text
    (SchedulerOpReport.detail + an optional schedule() arg), so a long
    execMs line names the exact statement instead of the generic query label.
  • Boot timeline splits the opaque sqlite:schema → identity:ready span into
    probe (cold COUNT(*)), storageOpen, identityCheck, and identityResume
    via three new marks, so the dominant sub-phase is attributable; the coarse
    identity segment is kept for back-compat and the perf panel reflects the
    split.

Additive and behind xnet:boot:debug; no behaviour change.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Signed-off-by: xNet Test test@xnet.dev

xNet Test and others added 7 commits June 29, 2026 07:39
…ot bucket (0249)

The cold-open stall keeps escaping diagnosis because the two decisive numbers
are never captured: which SQL the ~15 s `execMs` op is, and how the ~9 s
"identity" boot phase actually breaks down. Add both.

- Worker op log now carries the op's whitespace-collapsed, param-free SQL text
  (`SchedulerOpReport.detail` + an optional `schedule()` arg), so a long
  `execMs` line names the exact statement instead of the generic `query` label.
- Boot timeline splits the opaque `sqlite:schema → identity:ready` span into
  `probe` (cold COUNT(*)), `storageOpen`, `identityCheck`, and `identityResume`
  via three new marks, so the dominant sub-phase is attributable; the coarse
  `identity` segment is kept for back-compat and the perf panel reflects the
  split.

Additive and behind `xnet:boot:debug`; no behaviour change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: xNet Test <test@xnet.dev>
…plit the 9s identity bucket) (0249)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: xNet Test <test@xnet.dev>
…th (0249 F1)

probeStoreColdStart runs SELECT COUNT(*) FROM nodes — the first read on the cold
OPFS DB — and it was awaited ahead of identity/store/connect purely to feed the
"restoring from hub" affordance, which has a safe default. Fire it and forget it;
mark sqlite:probe immediately so the boot timeline's probe segment is ~0, proving
the cold read is no longer on the critical path. The affordance is now reactive:
recordColdStartProbe notifies subscribers and useRestoringFromHub reads via
useSyncExternalStore, so it still appears when the probe resolves after paint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: xNet Test <test@xnet.dev>
… mark (0249)

Adds a bridge:first-result boot phase + bridgeFirst segment (store:ready → first
LIVE landing result across the bridge) and a markBridgeFirstResult() helper. With
the instant shell painting from a snapshot, firstPaint no longer carries the cold
read, so this segment is the number that still does — localizing the previously
untraced ~5s secondary gap. The perf panel reads the new mark too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: xNet Test <test@xnet.dev>
…0249 F2)

The first query on a cold OPFS DB faults its working set synchronously on the
single SQLite worker (~15s in the capture), so the landing surface couldn't paint
until it finished even though the data is local. Keep a tiny localStorage snapshot
of the last-50 rows per landing schema (id/title/updatedAt) — read synchronously
on the main thread, NOT behind the cold worker — and paint from it immediately,
then switch to live data and write the snapshot through. The home surface adopts
it for pages/databases/canvases via a thin useInstantRows overlay. localStorage
read/write is quota-safe, idempotent, and never throws.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: xNet Test <test@xnet.dev>
I1/I2 (op-naming + identity-bucket split), F1 (probe off the awaited path), the
secondary-gap tracer, and F2 (instant-shell snapshot) are implemented. The doc
stays [_]: I3 (a fresh xnet:boot:debug capture) and the hub redeploy are
operational, and F3/F4 are explicitly gated on what that capture shows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: xNet Test <test@xnet.dev>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: xNet Test <test@xnet.dev>
@crs48 crs48 temporarily deployed to pr-345 June 29, 2026 15:35 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

🖼️ UI changes in this PR

Interactions

🎬 Create a page and use the editor

Create a page and use the editor

▶ Watch MP4

Auto-captured by CI · run. Informational — not a blocking check.

github-actions Bot added a commit that referenced this pull request Jun 29, 2026
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #345.

github-actions Bot added a commit that referenced this pull request Jun 29, 2026
@crs48 crs48 temporarily deployed to pr-345 June 29, 2026 15:44 — with GitHub Actions Inactive
github-actions Bot added a commit that referenced this pull request Jun 29, 2026
github-actions Bot added a commit that referenced this pull request Jun 29, 2026
@crs48 crs48 merged commit b2dfd37 into main Jun 29, 2026
16 of 17 checks passed
@crs48 crs48 deleted the claude/compassionate-bouman-148ffa branch June 29, 2026 15:50
github-actions Bot added a commit that referenced this pull request Jun 29, 2026
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.

1 participant