Skip to content

feat(seo): privacy-first profile indexability policy (#19) - #339

Open
rudra496 wants to merge 2 commits into
MergeFi:mainfrom
rudra496:feat/profile-indexability-policy
Open

feat(seo): privacy-first profile indexability policy (#19)#339
rudra496 wants to merge 2 commits into
MergeFi:mainfrom
rudra496:feat/profile-indexability-policy

Conversation

@rudra496

Copy link
Copy Markdown

Fixes #19

The policy (and why)

/reputation/[handle] renders a real GitHub identity beside lifetime earnings. The sitemap enumerated every handle and the pages had no robots directives — a public, crawlable earnings directory tied to real names, with no per-user control. Since no opt-in flag exists in the backend today, the only defensible default is noindex-by-default: profiles stay out of search results entirely until an explicit public-profile field lands (flagged in the PR as the cross-repo follow-up; when it does, only opted-in handles should re-enter the sitemap, chunked and cached).

What changed

  • sitemap.ts — drops the reputation enumeration; keeps public non-personal routes only. Gains revalidate = 3600 so crawler bursts stop hitting the backend per request. Comment block documents the re-entry path (opt-in handles only, generateSitemaps() chunking well before the 50k/50MB limits).
  • reputation/[handle]/page.tsxgenerateMetadata now sends robots: { index: false, follow: true } for existing profiles (links keep flowing so the bounty board's graph keeps value) and { index: false, follow: false } on the not-found path.
  • robots.ts — deliberately does NOT disallow /reputation: a disallow would prevent crawlers from reading the noindex directive while still letting the bare URL surface. Comment documents the reasoning.
  • Tests — 9 new: sitemap excludes profiles under any backend response, public routes always present, id-encoding stable; robots/sitemap consistency; both metadata paths assert the exact robots directives.

Bonus

next build is currently broken on main — 42fc033 left logout: jest.fn used as a type (TS2749), killing type-check for every fresh clone. Same one-line ReturnType<typeof jest.fn> repair included so this leaves the repo buildable.

Verification

  • npx jest: 259 passing / 7 failing — identical 7 to current main's pre-existing failures (WalletContext, ConnectPanel, NetworkBadge, Tabs, AuthContext, BountyCard suites; untouched here); +9 new tests all green
  • npx tsc --noEmit: clean
  • npm run build: succeeds

The sitemap enumerated every reputation handle and the profile pages
server-rendered lifetime earnings next to real GitHub identities with no
robots directives — one Google query away from tying a person to their
income.

Policy: profiles are noindex-by-default. sitemap.ts drops the reputation
enumeration entirely (documented: re-add only behind an explicit opt-in
flag, chunked via generateSitemaps and served from cache), the profile
page sends robots noindex/follow via generateMetadata, and robots.ts
stays deliberately permissive for /reputation since a disallow would
just hide the noindex directive from crawlers. Route gains
revalidate=3600 so crawler bursts stop hitting the backend per request.
Same one-liner as the Mindmint repair: ReturnType<typeof jest.fn>.
next build currently dies at type-check for every fresh clone.
Copilot AI lite review requested due to automatic review settings August 27, 2026 23:23
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

@rudra496 is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Define and enforce a privacy-conscious profile indexability policy for sitemap.ts

2 participants