fix(network): restore model-driven body fetch flow#57
fix(network): restore model-driven body fetch flow#57lynnswap wants to merge 7 commits intocodex/dom-graph-store-ssotfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9565d06356
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4452cc0444
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78a23bcf6b
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df5dc1184e
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| requiresReferenceAPI: hasReference, | ||
| requiresHandleAPI: hasHandle |
There was a problem hiding this comment.
Skip handle API repair when reference fallback is available
When a body has both a ref and a handle, performBodyFetch can successfully fall back to getBody(ref, ...) if getBodyForHandle is missing, but this call still declares requiresHandleAPI: hasHandle. In legacy bridge configurations where handle APIs are intentionally absent, that makes ensureBodyFetchAvailability run repair (reinjection + reconfigure) before every fetch even though reference fetch would already work, adding avoidable script churn and latency on normal body loads.
Useful? React with 👍 / 👎.
| case .fetching, .full, .failed: | ||
| return false |
There was a problem hiding this comment.
Allow retries after transient body-unavailable results
A bodyUnavailable result is made terminal because fetches mark the body failed and shouldFetch permanently rejects .failed states. Fresh evidence: the JS agent returns null for unauthorized control-token calls in network-agent-core.ts, and bootstrap/configure eval failures are logged-and-continued in the attach path, so attach-time token/bootstrap hiccups can surface as temporary bodyUnavailable; with this gate, those bodies remain stuck failed for the rest of the session because no subsequent selected-entry fetch can retry.
Useful? React with 👍 / 👎.
Purpose
Main changes
WINetworkModel, including attach-time follow-up for the current selectionNetworkBodyFetchResultplus body-fetch readiness probing, self-heal, and a one-time in-engine retry path inNetworkPageAgentandNetworkSessionTesting
mcp__XcodeBuildMCP__test_sim(WebInspectorEngineTests, iPhone 17, latest iOS)mcp__XcodeBuildMCP__test_sim(WebInspectorIntegrationTests, iPhone 17, latest iOS)mcp__XcodeBuildMCP__test_sim(WebInspectorUITests, iPhone 17, latest iOS)mcp__XcodeBuildMCP__test_sim(WebInspectorIntegrationLongTests, targeted AppKit toolbar expectation update; no executable tests on iOS simulator because the case is#if canImport(AppKit))codex-review --base origin/codex/dom-graph-store-ssotScreenshots