Skip to content

fix(app): stop Mind Map onboarding rebuild after failed reads - #23712

Merged
aryanorastar merged 1 commit into
mainfrom
fix/onboarding-graph-read-failure
Oct 26, 2026
Merged

aryanorastar merged 1 commit into
mainfrom
fix/onboarding-graph-read-failure

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Onboarding still treated a failed Mind Map read as an empty legacy account and sent a rebuild POST. This could turn a canonical read outage, invalid response or replaced account session into an unnecessary/rejected mutation. The optional prebuild now stops on read failure; the normal map view retains its read/retry path.

The orchestration moves from the widget to KnowledgeGraphApi.prebuildForOnboarding, which uses the existing production reader, rebuild and polling owners. Successful canonical reads and populated compatibility maps never rebuild. A positively absent canonical account can still use legacy rebuild; 409 remains terminal and a queued legacy rebuild retains bounded stability polling. No server guard, memory promotion, storage, auth policy or wire schema changes.

Refs #20481. The issue discussion by julio23jaz-dotcom also identified this catch-and-rebuild path. Builds on merged #20744 and #22078; #12878 is closed unmerged and is not a dependency. This finishes the reproduced failed-read onboarding gap, not a claim about every affected account's current graph.

Verification

  • Six regressions fail after a behavior-preserving extraction of the original catch-and-rebuild method; seven successful/legacy scenarios still pass. With the fix, all 13 pass through the real HTTP client against loopback (synthetic responses and the existing local auth gateway; no live identity provider).
  • Focused graph/API/widget/identity suite: 88 passed.
  • Analyzer ratchet: passed. Direct analysis reports only the existing avoid_print in unchanged stability polling; no new diagnostic.
  • Final diff reviewed; all 27 local manifest checks and the bounded pre-push gate passed. The local history-dependent 90-day class ratchet explicitly skipped on the shallow checkout; CI runs with full history. Exact-head CI is now complete with no failed or pending checks: 22 successful, 25 conditional skips and one neutral; the full Dart Analyze & Tests job passed. Merged as 372cfbcb56b5c69c787b4a1a8a1394ca1beb69ec on 2026-10-26.
  • make mobile-verify ARGS="fast --paths app/lib/backend/http/api/knowledge_graph_api.dart app/lib/pages/onboarding/wrapper.dart": both selected hermetic journeys passed (9 checks; source 43866f9f0032844e08902aa01f41ce390cc6ef14, clean).

The loopback flow exercises the entire changed orchestration boundary, including parsing, read failures, account replacement, no-write outcomes, terminal conflict and successful legacy polling. No UI layout, native or hardware behavior changes; no physical-device test is needed for this boundary.

Failure class

Failure-Class: new

FC-failed-probe-permits-mutating-recovery: a failed probe was caught and reinterpreted as permission to mutate. Why isn't this a shared primitive instead? It is: the API owner now holds the prebuild flow, and its loopback contract tests are the reusable prevention artifact rather than a widget-specific source check.

Release and customer follow-up

The code is merged; release the mobile update on iOS/Android. No additional backend deployment is required for this incremental fix. Existing canonical-read backend support from #22078 remains required and was previously verified deployed. Keep support tracking open until the affected users confirm their map loads and remains available after refresh/reopen on the released build. No customer data, assignment, deployment or account mutation was performed.

UI-Evidence: none

The widget only delegates its existing optional background request; no visible control or layout changes.

Product invariants affected

none; canonical read/mutation and promotion authority are preserved (INV-MEM-1, INV-MEM-4).

@aryanorastar
aryanorastar marked this pull request as ready for review October 26, 2026 11:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T11:28:28.863009Z 43866f9 Draft marked ready
ℹ️ 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.

@aryanorastar
aryanorastar merged commit 372cfbc into main Oct 26, 2026
46 checks passed
@aryanorastar
aryanorastar deleted the fix/onboarding-graph-read-failure branch October 26, 2026 11:25
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