Skip to content

Reduce repeated startup reads and trace cached graph stages - #158

Open
RCmerci wants to merge 6 commits into
mainfrom
devin/1794197992-journal-cold-start-diagnostics
Open

RCmerci wants to merge 6 commits into
mainfrom
devin/1794197992-journal-cold-start-diagnostics

Conversation

@RCmerci

@RCmerci RCmerci commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Cached Lambda RTC launches showed overlapping catalog fetches. request_catalog_reconciliation shares an in-flight Fetch_catalog only within the exact account/presentation/lifecycle scope; explicit refresh remains independent. Coalesced newer authentication survives token-flight revocation through one structured-cancellation retry; ordinary authentication errors remain visible.

Add default-off startup spans through SwiftUI/App construction, native services, local attach/restore and feed publications. Capture mach_absolute_time() at the first source statement before diagnostic flag/Foundation initialization, preserving main_enter and emitting the saved main_raw timestamp afterward. Logging remains off by default, with one unconditional clock read. The runbook distinguishes saved timestamps, process birth, exec, callbacks, displayed frames and overlapping spans.

In paginate_children, retain structural membership/digest selection for all candidates, but hydrate only selected children through the existing logical_block_at path. Lazily create a non-indexed hydration cache rather than collecting every child's full datoms and rebuilding the global ident index per preview; overlay/tombstone/revision/cursor semantics remain intact.

Final-input validation

At 0a684de472337353722de58813c8ab0c7508d63d, full dune build @all app/native_embed.exe.o, dune runtest --force, maintained Release Apple build and diff hygiene pass. Final CI (build-and-test, WIP) is green. Independent read-only reviews found no confirmed issue in retained raw-entry/DB changes; final database SHA256 matches reviewed 0e39bfa. The pure reducer regression covers catalog coalescing, completion, account/lifecycle boundaries and bounded cancellation retry. spec-dev-tool reports a clean source boundary and the same six format errors in unchanged decision documents.

The smaller-first-root-prefix experiment failed existing visibility/native-mount regressions and was reverted with a new commit; no tests were changed to accept it. Final code retains the existing first-prefix semantics.

Real cached-graph controls: no demonstrated latency improvement

Three baseline launches (eefb2d6, native 8989f98) followed by three final launches (0a684de, native 0e39bfa) retained the same real Lambda RTC account, cached graph and Keychain on the iPhone 17 / iOS 27.0 Simulator. Baseline and final have the same Swift entry; the only production OCaml difference is selected-child hydration. Ordinary installs preserved identity/content; each trial verified old-process absence and a new PID. Numerical controls used no screenshot polling, sampling or concurrent builds; recording was separate. The sequential, nonrandomized design does not support causal speedup/regression claims.

Boundary Baseline (3) Final (3)
First incremental feed publication, median 161.50 ms 159.89 ms
Complete feed publication, median 1040.28 ms 1069.36 ms
Feed publications per scan 17 17
Process birth → saved main_raw, range 1.520–1.539 s 1.568–1.696 s
Saved main_raw → old main_enter, range 0.772–0.825 ms 0.636–0.931 ms

First-feed timestamps are scan-to-publication, not launch-to-visible-pixels; the UI accepts complete=false. No causal first-frame or feed speedup is established. Raw-entry measurements show that diagnostic initialization cannot explain the earlier 1.266–1.319 s birth→main-marker interval. The remaining window still lacks a runtime owner; it is not a measured dyld-function duration or proof of OCaml startup cost. Static fixup/native-symbol counts are leads, not milliseconds. Earlier xctrace and DYLD statistics attempts produced no usable attribution. Three initial observer-configuration failures without process-birth results were excluded explicitly, not selected by performance.

Default-off smoke captured 113 console lines with zero startup/feed/unlock diagnostics. Separate real-graph UI verification passed cached content recovery, Current / Ready / Open, empty outbox and responsive Options. The standard recording verifies old PID 13591 absent before new PID 13958 restored content and returned from Options. The same-build Diagnostics screenshot is from the preceding PID 13591 verification, not a fresh Diagnostics assertion for PID 13958.

Final annotated process-cold UI recording

Same-build Current Ready Open and empty outbox, UUID redacted

Final installed executable SHA256: ee0228f2d4ec51832238f2eac87d4ba80b7a18d7e7adab99304c3b323a41f72e, matching the final manifest. Experimental host-restamp remains cross_abi_validated=false. No cache/Keychain reset, graph switch, sign-out, repair or fixture substituted for these controls. Precise exec→main, first pixels, individual loader costs, real-device performance/ABI, offline/reboot and forced cancellation/cross-account abnormal UI remain untested.

Earlier catalog acceptance at 8989f98 observed one successful catalog request per cached launch (maximum in-flight 1, baseline 2/1/2), without a causal first-frame speedup claim. The earlier graph-close CI failure remains unexplained; current green CI does not establish that failure as flaky or pre-existing.

Open in Devin Desktop: https://app.devin.ai/desktop/session/7a5eed6555b64cd682e8abd3905c930f?variant=devin
Requested by: @RCmerci


🟢 Devin Review found nothing to fix · View findings · Follow Devin's work

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T04:39:02.822790Z 8989f98 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@devin-ai-integration devin-ai-integration Bot changed the title Coalesce startup catalog reconciliation and trace cached graph stages Reduce repeated startup reads and trace cached graph stages Nov 9, 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