~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.17.0 Latest 2 packages, 1 image

1
10

Tests that list everyone's records look for their own among them

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:serve/feed-flake

the_feed failed twice in one merge-queue batch because it asserted that everyone's gists in the feed were none, and another test had just made one on the same PDS. This makes it, and the tests that made the same assumption, look only for what their own accounts made. Tests only; nothing a user sees changes.

Claude Opus 5.5 · high

What changes

the_feed checks ?kind=gists of its own account, which made none, instead of everyone's feed. Everyone's ?kind=stars (always empty: stars need an account or following) stays, and ?kind=nothing checks that an unknown kind answers nothing, which ?kind=gists checked before gists became a kind.

themes_from_the_pages (gateway) starts from its maker's empty list, pages through its maker's themes, and from everyone's listing and the name searches keeps only its maker's themes before it compares them.

searching_code (web) puts the account's DID in the needle it searches for, so the code index, which holds every public repository on the PDS, finds only this run's files. It counts only its own needle repositories in the repository search too.

The private-repository searches in the gateway and pages tests check that this owner's hidden is not found, instead of that no hidden is found anywhere.

Why

All test binaries in a run share one PDS, and each appview they start follows its firehose live. So any listing of everyone's records can include whatever another binary is writing at the time, and when a binary is run again after it fails, whatever its own first run wrote. The batch at a98a628 with pull Maven metadata releases only what it names; the releases page shows Swift and Maven usage failed at web.rs:2651 on a gist item made by another account. searching_code had the same problem in a worse form: its wait_until(... len() == 2) can never pass once another run's needle repositories exist, so a rerun after any web flake would fail for good.

How it was checked

Locally, against one just pds:

  • The failure reproduced at main: the_feed run while another process ran the gists test in a loop failed at web.rs:2651 with the other account's 3mgistempty22 gist. With this change it passes under the same load, and so does gists.
  • Two searching_code runs side by side fail at main (both time out waiting for 2 needle repositories) and pass with this change.
  • Three themes_from_the_pages runs side by side pass, and two in a row pass.

private_repositories_settings_and_forks (pages) and the gateway private-repository test need the spaces alpha. CI runs them.

Shortcomings

themes_from_the_pages reads everyone's themes with limit=100. If more than 100 newer themes from other tests existed, its own could fall off that page. The tests make a handful.

Approved

This changes tests only. Each test that listed everyone's records now looks only for its own account's. I read all three changed files in full (gateway.rs, pages.rs and web.rs) and found nothing wrong.

  • the_feed: The gists check now uses ?actor=<did>&kind=gists, and ?kind=nothing covers the unknown-kind case.
  • searching_code: The needle includes the DID suffix, so reruns and parallel runs can't collide. The byte-range arithmetic (3 + needle.len() + 1) matches the old 3..11. The owner-handle filter uses the owner.handle shape that other tests in the file already read.
  • themes_from_the_pages: Listings are scoped to the maker, or filtered by creator DID. The limit=100 caveat you describe is acceptable.
  • Private-repository searches: They now look for this owner's hidden repository specifically.

I didn't run the tests. By your account, the two private-repository tests need the spaces alpha, so only CI runs them.

Merged as 43ca991