Skip to content

fix(application): look up unclaimed documents once per address - #657

Queued
ixuz wants to merge 1 commit into
mainfrom
fix/unclaimed-lookup
Queued

ixuz wants to merge 1 commit into
mainfrom
fix/unclaimed-lookup

Conversation

@ixuz

@ixuz ixuz commented Nov 8, 2026

Copy link
Copy Markdown
Member

What and why

The instance check and the per-deck check skip each deck's unclaimed documents in any spelling of their address. They did so by comparing every document of the instance with every unclaimed document of every deck, parsing both addresses each time, so the work grew with the square of the decks a catalog names and with their addresses' length.

  • The unclaimed documents are brought to the form a request sends once per check, keyed by pieces so a long address hashes in full, and each document of the instance is looked up once.
  • Every spelling of an unclaimed document is still skipped; the tests from the earlier spelling fix still pass.
  • A test counts the address parses over 100 and 1,000 decks and holds them to linear growth.
  • docs/validation.md says how the comparison is made.

Refs: GHSA-p55m-36p9-7298

The instance check and the per-deck check skip each deck's unclaimed
documents in any spelling of their address. They did so by comparing
every document of the instance with every unclaimed document of every
deck, parsing both addresses each time, so the work grew with the
square of the decks a catalog names and with their addresses' length.
A foreign instance listing many decks whose documents are unclaimed
could hold the tab's main thread for long on every open.

The unclaimed documents are now brought to the form a request sends
once per check, keyed by pieces so a long address hashes in full, and
each document of the instance is looked up once. Every spelling of an
unclaimed document is still skipped.

Refs: GHSA-p55m-36p9-7298
@ixuz ixuz added the bug Something isn't working label Nov 8, 2026
@ixuz
ixuz enabled auto-merge November 8, 2026 12:43
@ixuz
ixuz added this pull request to the merge queue Nov 8, 2026
Any commits made after this event will not be merged.
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 8, 2026
@ixuz
ixuz added this pull request to the merge queue Nov 8, 2026
Any commits made after this event will not be merged.

This branch has not been deployed

No deployments
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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant