From 78c45dc4248eeb890587ed932b00a9d183ba99c9 Mon Sep 17 00:00:00 2001 From: mikim <1441941+mikim@users.noreply.github.com> Date: Thu, 20 Aug 2026 10:47:49 +0900 Subject: [PATCH] =?UTF-8?q?why-moved:=20=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EB=A0=8C=EB=8D=94=EA=B0=80=20=EC=83=89=EC=9D=B8=20=EC=A0=95?= =?UTF-8?q?=EC=B1=85=EC=9D=84=20index=20=EB=A1=9C=20=EB=90=98=EB=8F=8C?= =?UTF-8?q?=EB=A6=AC=EB=8D=98=20=EA=B2=83=20(#33=20=ED=9B=84=EC=86=8D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #33 을 프로덕션에 적용하고 검증하다가 잡았다. reindex 스크립트로 355건을 noindex 로 바꾼 직후, 그중 하나를 curl 로 열어 robots 메타를 확인했더니 "noindex, follow" 가 맞았는데 sitemap 에는 여전히 있었다. DB 를 보니 그 행이 다시 index_policy='index' 였다 — 내가 그 페이지를 연 것이 원인이었다. page.tsx 의 registerSeoPage 가 quality_score: 0.85 를 상수로 넘기고 index_policy 는 안 넘겼다. lib/seo-register.ts 는 index_policy 가 없으면 quality < SPARSE_THRESHOLD 로 판정하므로 0.85 는 항상 index 다. 즉 조용한 날 기사를 누가(크롤러 포함) 열기만 해도 색인 요청이 되살아났다. #33 에서 lib/why-moved.ts 의 생성 경로만 고치고 렌더 경로를 놓쳤다. 이제 페이지도 whyMovedIndexPolicy(article.pulses) 를 명시적으로 넘긴다. quality_score 도 0.85/0.3 으로 같이 맞춘다. 배포 순서가 중요하다: 이 수정이 라이브에 올라간 뒤에 reindex 를 다시 돌려야 한다. 반대로 하면 지금처럼 방문이 되돌린다. Co-Authored-By: Claude Opus 5 --- app/asset/[symbol]/why-moved/[date]/page.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/asset/[symbol]/why-moved/[date]/page.tsx b/app/asset/[symbol]/why-moved/[date]/page.tsx index e64b5ff..81963ea 100644 --- a/app/asset/[symbol]/why-moved/[date]/page.tsx +++ b/app/asset/[symbol]/why-moved/[date]/page.tsx @@ -102,13 +102,19 @@ export default async function WhyMovedPage({ params }: Props) { const assetLabel = entity?.label || symbol.toUpperCase(); + // The policy is the gate's, not a constant — and it must be passed + // explicitly here. registerSeoPage() defaults to 'index', so rendering a + // quiet-day article (a crawler fetching it is enough) silently promoted the + // row back to index and undid scripts/reindex-why-moved.ts. + const indexPolicy = whyMovedIndexPolicy(article.pulses); registerSeoPage({ path: `/asset/${canonicalSymbol}/why-moved/${date}`, page_type: "event", canonical_id: `${canonicalSymbol}-${date}`, title: article.title, meta_description: article.oneLine.slice(0, 200), - quality_score: 0.85, + index_policy: indexPolicy, + quality_score: indexPolicy === "index" ? 0.85 : 0.3, lastmod: article.generatedAt, });