Skip to content

[NSOC'26][GSSOC'26]Fix data nesting corruption in FirestoreCache update method#414

Open
diksha78dev wants to merge 2 commits into
indresh404:mainfrom
diksha78dev:fix/issue-386
Open

[NSOC'26][GSSOC'26]Fix data nesting corruption in FirestoreCache update method#414
diksha78dev wants to merge 2 commits into
indresh404:mainfrom
diksha78dev:fix/issue-386

Conversation

@diksha78dev

Copy link
Copy Markdown
Contributor

Pull Request Template 🚀

Description

This PR resolves a data integrity bug in the custom in-memory FirestoreCache utility.
When updating a document, the update() method incorrectly spread the wrapper object { data, timestamp } instead of the inner document data. This resulted in corrupted cache entries that nested the document under data.data and broke subsequent get() operations.

Motivation: Restore data consistency for cached user profiles and optimize memory caching behavior.

Related Issue

Closes #386

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Screenshots / Videos (if applicable)

Not applicable (logical cache layer bug fix).

Testing Done

  • Command run: npm run test
  • Command run: npm run lint
  • Command run: npm run build
  • Visual verification on local dev server (http://localhost:5173)

Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings or console errors.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

Contributor Declaration

  • I confirm that this contribution is made under the rules of GSSoC 2026 and NSoC 2026.
  • I confirm that I have been assigned the related issue by a maintainer before opening this PR.
  • I have read the Contributing Guidelines and Code of Conduct.

@diksha78dev diksha78dev requested a review from indresh404 as a code owner June 8, 2026 16:39
@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ranker-hub Ready Ready Preview, Comment Jun 8, 2026 5:23pm

@github-actions github-actions Bot added backend Backend/Firebase related changes bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request frontend Frontend related changes (HTML/CSS/JS/React) gssoc GirlScript Summer of Code gssoc26 GirlScript Summer of Code 2026 nsoc NSoC NSoC'26 NSoC 2026 pending-review PR is pending review labels Jun 8, 2026
@divyagsharma2006-blip

Copy link
Copy Markdown
Collaborator

hi @diksha78dev solve the conflits

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

Labels

backend Backend/Firebase related changes bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request frontend Frontend related changes (HTML/CSS/JS/React) gssoc GirlScript Summer of Code gssoc26 GirlScript Summer of Code 2026 nsoc NSoC NSoC'26 NSoC 2026 pending-review PR is pending review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: [Functional Bug] Nested Object Corruption in Memory Cache

2 participants