Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the same batch query is reused on a non-root reference,
Reference.get()currently rewrites the caller's operation paths. For example, an operation withref: 'item'at/apps/examplerequests/apps/example/itemon the first call and/apps/example/apps/example/itemon the second. Frozen operations also throw during request construction.Build the batch request from a new array of copied operations, extending each path with the existing helper. This preserves the caller's inputs, operation order and get options.
Regression coverage
Three offline tests cover repeated reads, unchanged inputs with all four operation types and options, and frozen inputs. The mock provider snapshots each request when it is sent so subsequent mutation cannot make the repeated-read test falsely pass.
Validation
Base:
developatc31ca771ac96cdd633e5fc4825dab8ae2ce0deb5.npm test -- --runInBand --runTestsByPath __tests__/ref.test.ts: all 3 tests fail before the fix and all 3 pass after it.npm run build: passed.git diff --check: passed.Tested with Node 24.19.0, TypeScript 5.4.5, Jest 29.7.0 and ts-jest 29.1.2. The baseline frozen Yarn install rejected the existing lockfile, so local validation used
npm install --ignore-scripts --package-lock=false --no-audit --no-fundagainst the develop manifest followed by the repository'snpm run postinstall. No manifest or lockfile changes are included. The full integration suite requiring a local blockchain and test_data.ts was not run.AI disclosure
Prepared and tested by Codex in ChatGPT Work on behalf of GitHub user tomeido. Submitted for human and maintainer review.