Preserve restored query state in persisted snapshots
Preserve full persisted query state, including errors, counters, timestamps, and infinite pagination, during restoration and cache rebuilds.
query-persist-restored-query-state
Normalized profile
What this task asks for
Preserve full persisted query state, including errors, counters, timestamps, and infinite pagination, during restoration and cache rebuilds. A restored query should behave like a real cached query snapshot, not like a fresh successful fetch that only happens to reuse old data. Bulk restoration from fine-grained storage should preserve the same semantics when rebuilding the cache. The solution must add a new public helper exported from query-core named createPersisterRestoreResult. The helper must accept an object with the shape { data, state } and return a value that can be returned from the persister option used by prefetchQuery and query observers to indicate that a persisted snapshot was restored instead of freshly fetched. The restored query must end in fetchStatus set to idle, preserve status including error states, expose isRefetchError when data and error are both present, and retain the provided counters, timestamps, invalidation markers, and infinite-query pagination state. Bulk restoration from fine-grained storage must preserve the same guarantees when rebuilding more than one query from storage.
Intent
- feature implementation
- performance optimization
- configuration tuning
- data transformation
Work surfaces
- cache
- query layer
- configuration
Technology
- TanStack Query
Expected artifacts
- repository patch
What makes it difficult
- strict behavioral compatibility or exact-output validation
- changes span multiple components or interfaces
Published evidence
Model × harness outcomes
Counts are tied to these exact configurations. Harnesses are not treated as equivalent across benchmarks.
- Models
- 13
- Configurations
- 41
- Trials
- 164
Showing 41 of 41 configurations
| Model | Harness | Effort | Result | Passes |
|---|---|---|---|---|
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | low | All passed | 4/4 |
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | medium | Mixed | 3/4 |
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | high | Mixed | 3/4 |
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | xhigh | Mixed | 2/4 |
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | max | Mixed | 2/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | low | Mixed | 2/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | medium | All passed | 4/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | high | Mixed | 3/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | xhigh | Mixed | 1/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | max | Mixed | 2/4 |
| claude-sonnet-4-6anthropic | mini-swe-agentpublished configuration | high | Mixed | 2/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | low | All passed | 4/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | medium | Mixed | 3/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | high | Mixed | 2/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | xhigh | Mixed | 2/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | max | Mixed | 2/4 |
| gemini-3-1-pro-previewvertex_ai | mini-swe-agentpublished configuration | high | No passes | 0/4 |
| gemini-3-5-flashvertex_ai | mini-swe-agentpublished configuration | medium | Mixed | 1/4 |
| glm-5-2zai | mini-swe-agentpublished configuration | high | Mixed | 3/4 |
| glm-5-2zai | mini-swe-agentpublished configuration | max | All passed | 4/4 |
| gpt-5-4openai | mini-swe-agentpublished configuration | xhigh | Mixed | 2/4 |
| gpt-5-5openai | mini-swe-agentpublished configuration | low | Mixed | 3/4 |
| gpt-5-5openai | mini-swe-agentpublished configuration | medium | Mixed | 3/4 |
| gpt-5-5openai | mini-swe-agentpublished configuration | high | All passed | 4/4 |
| gpt-5-5openai | mini-swe-agentpublished configuration | xhigh | Mixed | 2/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | low | Mixed | 2/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | medium | All passed | 4/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | high | All passed | 4/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | xhigh | All passed | 4/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | max | All passed | 4/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | low | All passed | 4/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | medium | Mixed | 3/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | high | All passed | 4/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | xhigh | Mixed | 2/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | max | Mixed | 1/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | low | All passed | 4/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | medium | All passed | 4/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | high | Mixed | 3/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | xhigh | All passed | 4/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | max | Mixed | 1/4 |
| kimi-k2-7-codeopenrouter | mini-swe-agentpublished configuration | default | Mixed | 2/4 |