Skip to content

Discovery foundations — scoped re-review, 2026-09-19

Verdict: all five findings ADDRESSED. No new actionable correctness finding identified in the fix edits. Final full OSS verification remains the controller's release gate; this verdict does not claim that the still-running full test command has completed.

Scope was limited to the five findings in 2026-09-19-discovery-review.md, their implementation/test changes, and the relevant export boundary. Read AGENTS.md and the fix agent's 2026-09-19-discovery-review-fixes.md. Reviewed current working-tree files, including the corrected DOM-fixture property assignments. Did not repeat the broad branch review or reassess the controller's documentation/UUID benchmark changes. Only this requested report was written; no code edits, staging, commits, browsers, production access, or subagents.

Verdicts

1. Mobile/window virtualization — ADDRESSED

discovery-grid.tsx:18 now uses the existing document-scroll contract, computes a document origin from the grid rectangle plus window.scrollY, and watches the mobile marker with a MutationObserver. Lines 46–48 enable only the appropriate window or element virtualizer. Marker changes after resize therefore transfer ownership; the old scroll owner no longer drives the active range.

Reviewed and independently ran the grid regressions. They cover 1,725 cards, fewer than 100 mounted cards, a 900px document origin, window scrolling and return to top, transitions in both directions, and events from the former owner. All passed. The previous 1,725-mounted-card failure is covered directly. No residual blocking concern in this fix; validation is jsdom, not physical-browser performance.

2. OSS stub/manifest/local route and script dependency — ADDRESSED

manifest.json:51 excludes the hosted discovery implementations/tests and the backfill test; the replacement list supplies a local discovery-feed stub. The worlds route imports its cursor error through that boundary, so the export no longer imports a removed session module or requires missing candidate-retrieval exports from the recommendation stub. worlds.ts:655 refuses /hub before authentication/ranking when the edition has no Hub feature.

Reviewed the local-route regression, covering cursor, legacy, and search requests with the rollout flag enabled. Independently ran the generated-export boundary test: 1 passed. It checks the actual generated prospective tracked tree, verifies the intended stub, removes hosted transport/tests and the missing-script dependency, and retains core embedding code/tests.

Correction to the original review's supporting rationale: the exporter's existing missing-import test pruning already removed the backfill test after its script was excluded (scripts/oss-export.mjs:210–257). That particular test import was not independently sufficient to prove an export compilation failure. The new explicit exclusion makes the dependency boundary intentional. The missing discovery exports/hosted-route boundary required the fixes above.

The inspected OSS log shows successful uncached typecheck/build stages; the full test run was still ongoing. Completion is left to the controller as requested, not treated as an unresolved code finding.

3. Dedicated discovery IP scope — ADDRESSED

worlds.ts:654 now uses ipRateLimitMiddleware(180, 60, "discovery"). Its key is separate from the existing auth/event bucket.

The real-router tests verify that 40 discovery requests leave all 40 auth requests available, then auth request 41 is rejected with Retry-After. The second test sends prior event traffic and verifies discovery's full 180-request allowance, rejecting request 181. Only the downstream auth handler is mocked; the actual route middleware runs. The fix report records these integration tests passing. No residual concern from the original bucket collision.

4. Dismiss/undo profile invalidation — ADDRESSED

Both successful mutation paths now await invalidateRecommendationProfile alongside their existing invalidations: feed-events.ts:155 and feed-events.ts:181. The existing invalidator clears all five profile scopes.

The cache-hit route fixture runs the actual loader, serialization/deserialization, SQL, ranking, authenticated route and invalidator. Its replacement Redis transport stores serialized values and explicitly records second-load cache hits; it does not substitute an uncached profile loader. Tests warm all/EN/ZH/ES/JA scopes, then check immediate translated-group exclusion after dismiss and immediate removal of cached exact/group exclusions after undo. The fix report records both passing. This directly covers both original scenarios; no remaining finding here.

5. Zero-visible-addition automatic pagination — ADDRESSED

rec-tab.tsx:152 deduplicates against the synchronous current-world ref and counts only newly appended rows passing the same current visibility predicate used by rendering. The visibility ref is updated on render so a pending response uses current local exclusions without restarting the feed. The counter increments for zero visible additions and resets for a visible addition; the sentinel still stops at three. Budget updates occur outside React state updater callbacks. Cursor/offset progress and manual continuation remain intact.

Independently ran the actual-component regressions. Duplicate-only legacy pages stop at four total requests (one visible plus three zero-addition pages); the manual action makes exactly one more request with offset 96. Hidden/favorite/Library-sibling pages share the same budget and preserve the next cursor. A unique visible card resets the budget. All passed. No new async or pagination regression identified in these edits.

Verification and remaining gates

  • Independently executed: focused grid, RecTab, and pagination-helper suites — 12 passed, 0 failed; generated OSS boundary — 1 passed, 0 failed. No broad test/build rerun.
  • Inspected evidence: related server log — 21 passed. These 21 are continuation/eligibility/rate-limit suites, not the newly added route fixtures. The fix report separately records 6 passing server integration tests, including dedicated-scope, cached-dismissal, local-edition, and retained 713-story traversal coverage. It also records 14 passing app tests when the two existing page-scroll tests are included.
  • Controller-owned completion: confirm final OSS verification and final hosted checks against the intended staged snapshot. I observed successful OSS typecheck/build stage summaries, but did not wait for or certify the entire full-suite result.
  • Unchanged pre-enable gate: the original Redis/session-admission/concurrent-origin load limits remain relevant. These five fixes do not establish Redis or production mobile capacity. Keep the documented limited-rollout/load gate; this is not an additional code finding or a request for future ML/measurement work.

The five original findings can be closed, subject to the controller completing the already-planned full verification.