Skip to content

fix: deduplicate concurrent Solid document loads - #349

Open
SharonStrats wants to merge 1 commit into
stagingfrom
fix/429
Open

SharonStrats wants to merge 1 commit into
stagingfrom
fix/429

Conversation

@SharonStrats

Copy link
Copy Markdown
Contributor

Prompt: Share simultaneous plain document loads in solid-logic so startup callers reuse one in-flight request, including loads that rdflib upgrades internally after an authentication transition.

Do not share forced, option-bearing, or batch loads, and clear entries when requests settle so explicit refreshes and retries retain their existing behavior. Add regression coverage for concurrent sharing, failed-load retries, and excluded load modes.

Copilot AI 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.

🟡 Changes recommended

Pending loads can cross identity transitions and expose a previous identity’s response, while recursive batch loading can incorrectly join requests that should remain excluded.

2 open issues
What changed in this PR

This PR adds in-flight document-load sharing to SolidLogic, aiming to reduce duplicate startup requests, including loads rdflib internally forces after authentication transitions.

Changes:

  • Adds a document-keyed pending-request map with cleanup after success or failure.
  • Installs the sharing wrapper when creating the store’s fetcher.
  • Adds tests for concurrent sharing, retries, settled requests, and excluded load modes.
File Description
test/​shareConcurrentLoads.test.ts Adds coverage for sharing, cleanup, retries, and exclusions.
src/​util/​shareConcurrentLoads.ts Implements the concurrent-load sharing wrapper.
src/​logic/​solidLogic.ts Integrates the wrapper into store initialization.

Review effort: Balanced

Comment thread src/util/shareConcurrentLoads.ts Resolved
Comment thread src/util/shareConcurrentLoads.ts Resolved
Prompt: Share simultaneous plain document loads in solid-logic so startup callers
reuse one in-flight request, including loads that rdflib upgrades internally
after an authentication transition.

Do not share forced, option-bearing, or batch loads, and clear entries when
requests settle so explicit refreshes and retries retain their existing
behavior. Add regression coverage for concurrent sharing, failed-load retries,
and excluded load modes.

Co-authored-by: GPT-5.6 Luna <gpt-5.6-luna@openai.com>
@SharonStrats SharonStrats self-assigned this Oct 30, 2026
@SharonStrats SharonStrats added the bug Something isn't working label Oct 30, 2026
@SharonStrats SharonStrats moved this to In review in SolidOS NLNet UI Oct 30, 2026

@timea-solid timea-solid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

complicated matter. I wonder if it is needed at this level. Can we test without this first?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants