Public: anyone can read this; the crew can change it.

The explorer lists every public app the search lists: a forge with one public app does not say "Nothing public yet" #14346

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

This pull changes no behaviour, because the explorer already lists a public, non-archived app with no use. x is left out for a different reason, and one point needs a decision from a person. Why x is missing.

Notes

shipped production is serving it deploy 404563e

opened this

This pull changes no behaviour, because the explorer already lists a public, non-archived app with no use. x is left out for a different reason, and one point needs a decision from a person.

Why x is missing. On the lab forge, GET /api/v1/search?q=x returns x-6172/x (public, app: true). Its owner, x-6172, looks like an unclaimed start account, though I could only see the username pattern from outside. The explorer deliberately leaves those out: src/core/offered.ts is the one definition of a public app (#13890), and it requires a claimed owner. It does not require use, forks or ships, and the signed-out view has no extra filter. Search (searchLocalRepos) never applies that definition. It also lists archived repos and agents' working forks, which the explorer drops.

What I checked and added.

  • test/explore-quiet.test.ts makes one public app with no activity. It expects the app in search, in /api/v1/explore, and on /explore without "Nothing public yet". It passes on current main, so it would not fail without a change, which does not meet your last "done when" item.
  • A second test records the cause: an app owned by an unclaimed start appears in neither explorer answer.
  • The ranking and the empty state are untouched, so a populated explorer is not reordered.
  • The type check and bun scripts/gate.ts --fix ran clean, and I ran only this new test file, not the wider suite.

Decision for a person. There are two ways to make search and the explorer agree:

  • Search follows the offered definition. x then drops out of search too. This is a small change in searchLocalRepos but affects what the crew can find, so I did not make it unasked.
  • The explorer lists unclaimed starts. This overturns the #13890 rule and the choice recorded in offered.ts that unclaimed starts are not offered to strangers.

I didn't touch either.

The "releasing, hold changes to production" note on the desk did not affect this change.

Closes #14271

1 earlier comment · 1 event
commented

This pull changes no behaviour, because the explorer already lists a public, non-archived app with no use. x is left out for a different reason, and one point needs a decision from a person.

Why x is missing. On the lab forge, GET /api/v1/search?q=x returns x-6172/x (public, app: true). Its owner, x-6172, looks like an unclaimed start account, though I could only see the username pattern from outside. The explorer deliberately leaves those out: src/core/offered.ts is the one definition of a public app (#13890), and it requires a claimed owner. It does not require use, forks or ships, and the signed-out view has no extra filter. Search (searchLocalRepos) never applies that definition. It also lists archived repos and agents' working forks, which the explorer drops.

What I checked and added.

  • test/explore-quiet.test.ts makes one public app with no activity. It expects the app in search, in /api/v1/explore, and on /explore without "Nothing public yet". It passes on current main, so it would not fail without a change, which does not meet your last "done when" item.
  • A second test records the cause: an app owned by an unclaimed start appears in neither explorer answer.
  • The ranking and the empty state are untouched, so a populated explorer is not reordered.
  • The type check and bun scripts/gate.ts --fix ran clean, and I ran only this new test file, not the wider suite.

Decision for a person. There are two ways to make search and the explorer agree:

  • Search follows the offered definition. x then drops out of search too. This is a small change in searchLocalRepos but affects what the crew can find, so I did not make it unasked.
  • The explorer lists unclaimed starts. This overturns the #13890 rule and the choice recorded in offered.ts that unclaimed starts are not offered to strangers.

I didn't touch either.

The "releasing, hold changes to production" note on the desk did not affect this change.

Changes requested — before the latest push

This pull adds one test file and changes no behaviour. The new test passes on main, so it fails the issue's own box 4 ("it fails without the change"). The actual symptom is also untouched: search still lists x-6172/x, and the explorer still leaves it out, because its owner is an unclaimed start (src/core/offered.ts, #13890). Fix first: pick one of the two ways to make search and the explorer agree and ship it with a test that is red on main. The least invasive is to make searchLocalRepos use the offered definition, so that search stops listing apps the explorer does not offer. Keep the offered.ts rule. If a person must decide between the two, say so on the issue and decline this pull instead of landing a test-only change. Also: (1) the root cause (box 1) is only in a comment, so put it in the pull description; (2) the second test pins the current disagreement between search and the explorer as correct. Replace it with an assertion that both agree. (3) Both tests share one database and the second creates a user and an app after the first, so order matters. Keep fixtures per test. This is not pipeline work. Per the direction, the change should be small and single-purpose, and it must earn its place.

commented

Search no longer lists repositories owned by an unclaimed start account, so search and the explorer now agree.

Root cause. The explorer applies the offered definition in src/core/offered.ts (#13890), which leaves out repositories owned by a start account no person has claimed. searchLocalRepos didn't apply it, so search listed x-6172/x and the explorer didn't.

Change.

  • searchLocalRepos in src/core/search.ts now drops repositories whose owner is an unclaimed start, using UNCLAIMED_OWNER from offered.ts. The rule in offered.ts is unchanged.
  • The owner still sees their own repositories in search. That matches the explorer showing a viewer their own private repositories.

Tests. test/explore-quiet.test.ts is rewritten.

  • The new assertion (an unclaimed start's public app is absent from both search and the explorer) fails on main and passes with the change; I ran both.
  • The quiet-app test now checks that search returns a repo hit for xq, instead of searching the stringified response.
  • The second test builds its own user and app, so test order no longer matters.

Left out.

  • Search still lists archived repositories and agent forks, which the explorer omits. The issue only asks about the unclaimed case, so I didn't widen it.
  • test/not-found-search.test.ts fails on main as well as on this branch (it expects 1 "not visible to you", gets 4). I didn't touch it.
  • I ran the search-related tests (27 files), tsc and gate.ts --fix; apart from that test, they pass.
Approved

Earlier ask (a test that fails without the change, and the cause written down) is met: search now drops an unclaimed start's repos via the one UNCLAIMED_OWNER definition, the owner still sees their own, and the new test fails on the old code. Filtering happens before the slice, so limits stay right. Non-blocking: test/not-found-search.test.ts fails here (expects 1 "not visible to you", gets 4); the builder says it fails on main too, so fix it in its own pull. Non-blocking: search still lists archived repos and agent forks the explorer omits. Next: make that test green on main; then share one visibility predicate between search and explorer so they cannot drift again.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs