-
Notifications
You must be signed in to change notification settings - Fork 0
Harden private crawler policy and overlay performance #1919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d1710b2
fix(performance): harden crawler and overlay safeguards
BigSimmo d59c7dd
Merge remote-tracking branch 'refs/remotes/origin/main' into codex/si…
BigSimmo 4566864
Merge branch 'main' into codex/sitemap-dom-fixes
BigSimmo 4076d80
Merge branch 'main' into codex/sitemap-dom-fixes
BigSimmo fc22f0f
fix: correct crawler policy
BigSimmo 5d7a240
fix: align crawler expectation
BigSimmo 084184d
test: preserve crawler metadata coverage
BigSimmo 17246d4
docs: record PR 1919 review
BigSimmo 9905661
docs: remove stale crawler description
BigSimmo 9986782
Merge main into sitemap DOM fixes
BigSimmo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...ords/78ad337f2fcd7b8a7fe6997dde55a64c29e794a34c2cb241ddbd3fa512a3b604.record.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| | 2026-08-13 | codex/sitemap-dom-fixes (PR #1919) | 4076d8034b61fbb3420efa398fab11d9e243b193 | PR #1919 heavy review and fix | Fixed crawler policy and added regression coverage; no other blocking finding | Focused contract and source checks passed | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,6 @@ | ||
| import type { MetadataRoute } from "next"; | ||
| import { PRIVATE_APP_ROBOTS_TXT } from "@/lib/crawler-policy"; | ||
|
|
||
| export default function robots(): MetadataRoute.Robots { | ||
| return { | ||
| rules: { | ||
| userAgent: "*", | ||
| disallow: ["/mockups/"], | ||
| }, | ||
| }; | ||
| return PRIVATE_APP_ROBOTS_TXT; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import type { Metadata, MetadataRoute } from "next"; | ||
|
|
||
| /** | ||
| * Clinical KB is a private application, not a public content catalogue. Keep its | ||
| * routes out of search results even when a crawler reaches a URL without first | ||
| * consulting robots.txt. | ||
| */ | ||
| export const PRIVATE_APP_ROBOTS_METADATA = { | ||
| index: false, | ||
| follow: false, | ||
| nocache: true, | ||
| googleBot: { | ||
| index: false, | ||
| follow: false, | ||
| noimageindex: true, | ||
| nosnippet: true, | ||
| }, | ||
| } satisfies Metadata["robots"]; | ||
|
|
||
| /** | ||
| * Let compliant crawlers fetch application routes so they can observe the global | ||
| * `noindex` metadata. Search exclusion is not access control; private content must | ||
| * remain protected by authentication. Do not advertise an XML sitemap. | ||
| */ | ||
| export const PRIVATE_APP_ROBOTS_TXT = { | ||
| rules: { | ||
| userAgent: "*", | ||
| allow: "/", | ||
| }, | ||
| } satisfies MetadataRoute.Robots; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import { expect, it } from "vitest"; | ||
|
|
||
| import robots from "../src/app/robots"; | ||
| import { PRIVATE_APP_ROBOTS_METADATA } from "../src/lib/crawler-policy"; | ||
|
|
||
| it("serves restrictive search metadata through crawlable routes", () => { | ||
| expect(robots()).toEqual({ rules: { userAgent: "*", allow: "/" } }); | ||
| expect(robots()).not.toHaveProperty("sitemap"); | ||
| expect(PRIVATE_APP_ROBOTS_METADATA).toMatchObject({ | ||
| index: false, | ||
| follow: false, | ||
| nocache: true, | ||
| googleBot: { | ||
| index: false, | ||
| follow: false, | ||
| noimageindex: true, | ||
| nosnippet: true, | ||
| }, | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.