Skip to content

Store: failing tests for unresolved #6053 review threads - #6061

Merged
William Wong (compulim) merged 2 commits into
feat-new-storefrom
copilot/6053-failing-tests
Nov 20, 2026
Merged

William Wong (compulim) merged 2 commits into
feat-new-storefrom
copilot/6053-failing-tests

Conversation

Copilot AI commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Changelog Entry

None. This PR only adds tests (label no-changelog).

Description

This PR adds failing tests for the two review threads on #6053 that are still unresolved. It doesn't fix either issue. The branch is based on feat-new-store, so this PR should target that branch.

Specific Changes

  • FrozenNodeSet.ts:17: a string and a node reference with the same ID are treated as the same value (FrozenNodeSet.test.ts)

    • getEqualityKey() maps both '_:b' and { '@id': '_:b' } to '_:b'. union() and symmetricDifference() keep whichever comes first and drop the other.
    • The tests cover both insertion orders.
    new FrozenNodeSet(['_:a']).union(new Set(['_:b', { '@id': '_:b' }]));
    // Expected: [{ '@id': '_:a' }, '_:b', { '@id': '_:b' }]
    // Actual:   [{ '@id': '_:a' }, '_:b']
  • VersionedStorage.ts:491: an overlay iterator loses its place after commit() (VersionedStorage.test.ts)

    • After a commit, the iterator skips as many entries as it has already returned, counted from the start of the committed map. Deleting a key it has already passed shifts that count, so it skips too far.
    • Each case is checked against a literal expected list and against a native Map doing the same steps:
    Overlay [a, b, c]: read a, then… Expected rest Actual
    delete('a'), commit() b, c c
    delete('a'), set('a', 100), commit() b, c, a incorrect
  • I have added tests and executed them locally

  • I have added .changelog/<PR#>-<slug>.md

  • I have updated documentation

@compulim
William Wong (compulim) marked this pull request as ready for review November 20, 2026 02:03
@compulim
William Wong (compulim) merged commit b4af453 into feat-new-store Nov 20, 2026
1 check passed
@compulim
William Wong (compulim) deleted the copilot/6053-failing-tests branch November 20, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants