From 62b3066e8ddde864eaec3672abca1570c96f0b68 Mon Sep 17 00:00:00 2001 From: codexy Date: Tue, 3 Nov 2026 10:27:18 +0900 Subject: [PATCH] chore: remove AI training notices and dedicated enforcement --- .github/COMMIT-HYGIENE.md | 4 -- .github/ai-notice.json | 17 ------ .github/scripts/apply-ai-notice.mjs | 40 ------------- .github/scripts/check-ai-notice.py | 92 ----------------------------- .github/workflows/ai-use-notice.yml | 19 ------ AI-TRAINING-NOTICE.md | 11 ---- README.md | 2 - README_EN.md | 2 - package.json | 7 +-- site/ai-training-notice.txt | 11 ---- 10 files changed, 3 insertions(+), 202 deletions(-) delete mode 100644 .github/ai-notice.json delete mode 100644 .github/scripts/apply-ai-notice.mjs delete mode 100644 .github/scripts/check-ai-notice.py delete mode 100644 .github/workflows/ai-use-notice.yml delete mode 100644 AI-TRAINING-NOTICE.md delete mode 100644 site/ai-training-notice.txt diff --git a/.github/COMMIT-HYGIENE.md b/.github/COMMIT-HYGIENE.md index 915ede7..c5be824 100644 --- a/.github/COMMIT-HYGIENE.md +++ b/.github/COMMIT-HYGIENE.md @@ -5,7 +5,3 @@ - Public introductions must not describe the maintainer's active tokens, authentication mode, account configuration or secret inventory. Necessary contributor configuration uses placeholders and generic environment variable names in a dedicated guide; preserve legitimate product security documentation. - Before every commit, inspect the exact staged diff and run `python3 .github/scripts/check-public-docs.py --staged`. Fix findings before committing; never bypass the check or print matched secret content. CI uses the same blocking check. - Preserve unrelated changes. A discovered real credential must be removed from tracking and rotated by its owner; never claim that deleting a file revokes it or removes prior Git history. - -## AI training and data collection notice - -Apply the repository's bilingual AI-TRAINING-NOTICE.md consistently to maintained websites, apps, demos, documentation, images and distributed packages. Keep a visible notice in a shared web footer/legal area and native app settings/about; include the notice file in package and app artifacts. Do not stamp user-generated exports or claim ownership of third-party content. Preserve existing licenses, public/private visibility and user-authorized AI features. Web builds must retain training-crawler opt-outs without changing ordinary search policy. Run `.github/scripts/check-ai-notice.py` and confirm final build/package contents before publication. New/imported projects inherit this policy through the workspace installer. This is a rights-holder notice and voluntary crawler preference, not a guarantee against noncompliant scraping. diff --git a/.github/ai-notice.json b/.github/ai-notice.json deleted file mode 100644 index 76cb969..0000000 --- a/.github/ai-notice.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "assets": [ - "AI-TRAINING-NOTICE.md" - ], - "surfaces": [ - "scripts/build-site.mjs" - ], - "robots": [], - "packages": [ - "package.json" - ], - "outputs": [ - "site-dist", - "dist" - ], - "uiPolicy": "source-only" -} diff --git a/.github/scripts/apply-ai-notice.mjs b/.github/scripts/apply-ai-notice.mjs deleted file mode 100644 index 7f6b77f..0000000 --- a/.github/scripts/apply-ai-notice.mjs +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env node -/** Carry the rights-holder notice into generated web and package artifacts. */ -import { readFile, writeFile, readdir, access, mkdir } from 'node:fs/promises'; -import { dirname, join, relative } from 'node:path'; -import { fileURLToPath } from 'node:url'; -const root = fileURLToPath(new URL('../../', import.meta.url)); -const config = JSON.parse(await readFile(join(root, '.github/ai-notice.json'), 'utf8')); -if (config.exempt) { console.log('Profile repository is exempt from the shared AI notice.'); process.exit(0); } -const notice = await readFile(join(root, 'AI-TRAINING-NOTICE.md'), 'utf8'); -const bots = ['GPTBot', 'ClaudeBot', 'Google-Extended', 'Applebot-Extended', 'CCBot']; -const robotBlock = '\n# AI training and training-data collection opt-out\n' + bots.map(bot => `User-agent: ${bot}\nDisallow: /\n`).join('\n'); -async function exists(path) { try { await access(path); return true; } catch { return false; } } -const ignored = new Set(['node_modules', '.git', 'vendor', 'fixtures', 'sandbox', 'runner', 'worker']); -async function walk(directory) { - for (const entry of await readdir(directory, { withFileTypes: true })) { - const file = join(directory, entry.name); - if (entry.isDirectory() && !ignored.has(entry.name)) await walk(file); - if (!entry.isFile() || !entry.name.endsWith('.html')) continue; - let html = await readFile(file, 'utf8'); - if (!/]/i.test(html)) continue; - // Remove the former shared footer when processing an older build output. - html = html.replace(/]*data-ai-training-notice[^>]*>[\s\S]*?<\/details>/gi, '') - .replace(/]*href=["'][^"']*ai-training-notice\.css["'][^>]*>/gi, ''); - await writeFile(file, html); - await writeFile(join(dirname(file), 'ai-training-notice.txt'), notice); - } -} -let count = 0; -for (const output of config.outputs ?? []) { - const directory = join(root, output); - if (!await exists(directory)) continue; - await writeFile(join(directory, 'ai-training-notice.txt'), notice); - const robots = join(directory, 'robots.txt'); - let text = await exists(robots) ? await readFile(robots, 'utf8') : 'User-agent: *\nAllow: /\n'; - if (!text.includes('# AI training and training-data collection opt-out')) text = text.trimEnd() + '\n' + robotBlock; - await writeFile(robots, text); - await walk(directory); - count++; -} -console.log(`AI notice retained in ${count} generated output root(s).`); diff --git a/.github/scripts/check-ai-notice.py b/.github/scripts/check-ai-notice.py deleted file mode 100644 index e2f1113..0000000 --- a/.github/scripts/check-ai-notice.py +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env python3 -"""Verify the source/distribution notice and voluntary training-crawler preferences.""" -from pathlib import Path -import json -import re -import sys -from urllib.robotparser import RobotFileParser - -root = Path(__file__).resolve().parents[2] -config = json.loads((root / '.github/ai-notice.json').read_text()) - -if config.get('exempt'): - violations = [] - for path in root.glob('README*.md'): - text = path.read_text() - if any(marker in text for marker in ['', 'AI-TRAINING-NOTICE.md', 'collection for AI training', 'AI 학습용 수집']): - violations.append(path.name) - if (root / 'AI-TRAINING-NOTICE.md').exists(): - violations.append('AI-TRAINING-NOTICE.md') - print('Profile notice exemption check: ' + str(len(violations)) + ' failure(s).') - sys.exit(bool(violations)) -failures = [] -notice_path = root / 'AI-TRAINING-NOTICE.md' -notice = notice_path.read_text() if notice_path.exists() else '' -for phrase in ['사전 서면 동의', 'prior written consent', 'does not amend existing', 'user-created content']: - if phrase not in notice: - failures.append('Root notice is missing its scope, consent or license clarification') -for path in root.glob('README*.md'): - if 'AI-TRAINING-NOTICE.md' not in path.read_text(): - failures.append(str(path.relative_to(root)) + ': notice link missing') -for filename in config.get('assets', []): - path = root / filename - if not path.exists() or path.read_text() != notice: - failures.append(filename + ': full notice asset missing or out of sync') -for filename in config.get('surfaces', []): - path = root / filename - if not path.exists(): - failures.append(filename + ': configured source missing') - continue - text = path.read_text() - if not filename.lower().endswith('.md') and any(marker in text for marker in [ - 'data-ai-training-notice', 'AiTrainingNotice', 'AI training notice', - ]): - failures.append(filename + ': product UI must not display the shared AI notice') - -robots_sources = '\n'.join((root / filename).read_text() for filename in config.get('robots', []) if (root / filename).exists()) -bots = ['GPTBot', 'ClaudeBot', 'Google-Extended', 'Applebot-Extended', 'CCBot'] -for filename in config.get('robots', []): - path = root / filename - if not path.exists(): - failures.append(filename + ': robots source missing') - continue - if filename.endswith('robots.txt'): - parser = RobotFileParser() - parser.parse(path.read_text().splitlines()) - for bot in bots: - if parser.can_fetch(bot, '/'): - failures.append(filename + ': training crawler opt-out missing for ' + bot) -if config.get('robots') and not all(bot in robots_sources for bot in bots): - failures.append('Generated robots source does not retain every configured training-crawler control') -for filename in config.get('packages', []): - path = root / filename - package = json.loads(path.read_text()) - if 'AI-TRAINING-NOTICE.md' not in package.get('files', []): - failures.append(filename + ': package files omit the notice') - if not (path.parent / 'AI-TRAINING-NOTICE.md').exists(): - failures.append(filename + ': distributed notice missing') -if '--built' in sys.argv: - outputs = config.get('outputs', []) - if outputs and not any((root / output).exists() for output in outputs): - failures.append('declared build output missing: build at least one configured artifact before publication') - for output in config.get('outputs', []): - path = root / output - if not path.exists(): - continue - if not (path / 'ai-training-notice.txt').exists(): - failures.append(output + ': built notice missing') - for html in path.rglob('*.html'): - if 'data-ai-training-notice' in html.read_text(): - failures.append(str(html.relative_to(root)) + ': built UI contains the shared AI notice') - parser = RobotFileParser() - robots = path / 'robots.txt' - if not robots.exists(): - failures.append(output + ': built robots missing') - else: - parser.parse(robots.read_text().splitlines()) - if any(parser.can_fetch(bot, '/') for bot in bots): - failures.append(output + ': built training-crawler opt-out missing') -for failure in failures: - print('AI notice check: ' + failure) -print(f'AI notice check: {len(failures)} failure(s).') -sys.exit(bool(failures)) diff --git a/.github/workflows/ai-use-notice.yml b/.github/workflows/ai-use-notice.yml deleted file mode 100644 index 11ee216..0000000 --- a/.github/workflows/ai-use-notice.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: AI use notice -on: - pull_request: - push: - branches: [main] -permissions: - contents: read -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true -jobs: - notice: - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - run: python3 .github/scripts/check-ai-notice.py diff --git a/AI-TRAINING-NOTICE.md b/AI-TRAINING-NOTICE.md deleted file mode 100644 index 135771e..0000000 --- a/AI-TRAINING-NOTICE.md +++ /dev/null @@ -1,11 +0,0 @@ -# AI training and data collection notice / AI 학습·수집 반대 고지 - -이 프로젝트의 관리자는 자신이 권리를 보유한 코드, 문서, 웹사이트, 앱, 데모, 패키지, 이미지와 기타 콘텐츠를 사전 서면 동의 없이 AI·머신러닝 모델의 학습·미세조정 또는 학습용 데이터셋 구축을 위해 수집·저장·이용하는 것에 명시적으로 반대합니다. 해당 목적의 이용 전 권리자의 서면 동의를 받으세요. - -The maintainer expressly objects to collecting, storing or using maintainer-controlled code, documentation, websites, apps, demos, packages, images and other content for AI or machine-learning training, fine-tuning or training datasets without prior written consent. Obtain the rights holder's written consent before such use. - -이 고지는 권리자의 의사 표시입니다. 기존 오픈소스·콘텐츠 라이선스를 수정하거나 이미 부여된 권리 및 법령상 허용되는 이용을 제한하지 않습니다. 제삼자 자료와 사용자가 작성한 콘텐츠에는 각 권리자의 조건이 적용됩니다. 서비스 이용자가 요청한 개별 AI 기능의 실행과 학습용 무단 수집은 구분합니다. - -This notice states the rights holder's preference. It does not amend existing software or content licenses, restrict rights already granted, or override uses permitted by law. Third-party materials and user-created content remain subject to their own rights and terms. User-authorized AI features are distinct from unauthorized collection for training. - -robots.txt expresses crawler preferences; it does not guarantee compliance or remove previously collected data. diff --git a/README.md b/README.md index 3ae906b..41d64fc 100644 --- a/README.md +++ b/README.md @@ -175,5 +175,3 @@ check는 파일을 수정하지 않고 누락·변경·오래된 결과를 발 The demo is built from the actual analyzer and generator and shows query, mutation and infinite-query option output. It does not call a live API. Both languages have visible explanatory content, canonical/hreflang, structured data, a sitemap and robots rules. Vercel builds run the package tests before publishing; GitHub integration deploys main to production and pull requests to previews. [Deployment and SEO](docs/SEO.md). The demo serves SUITE from its own `/fonts/` assets (license included), with a render-blocking stylesheet and an early font preload. The initial generated example is already in HTML; `demo.js` only attaches interaction handlers and does not replace the first screen. - -AI 학습·미세조정 및 학습용 데이터 수집에 대한 권리자 의사는 [AI 이용 고지 / AI use notice](AI-TRAINING-NOTICE.md)를 참고하세요. diff --git a/README_EN.md b/README_EN.md index c4e6678..a82def1 100644 --- a/README_EN.md +++ b/README_EN.md @@ -173,5 +173,3 @@ An independent community tool, not an official React or TanStack project. [한국어 데모](https://react-query-helper.vercel.app/) · [English demo](https://react-query-helper.vercel.app/en/) The demo is built from the actual analyzer and generator and shows query, mutation and infinite-query option output. It does not call a live API. Both languages have visible explanatory content, canonical/hreflang, structured data, a sitemap and robots rules. Vercel builds run the package tests before publishing; GitHub integration deploys main to production and pull requests to previews. [Deployment and SEO](docs/SEO.md). - -AI 학습·미세조정 및 학습용 데이터 수집에 대한 권리자 의사는 [AI 이용 고지 / AI use notice](AI-TRAINING-NOTICE.md)를 참고하세요. diff --git a/package.json b/package.json index c40abea..ad417c4 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,7 @@ "files": [ "dist", "README_EN.md", - "CHANGELOG.md", - "AI-TRAINING-NOTICE.md" + "CHANGELOG.md" ], "bin": { "react-query-helper": "dist/cli.js" @@ -63,13 +62,13 @@ }, "sideEffects": false, "scripts": { - "build": "node scripts/build.mjs && node .github/scripts/apply-ai-notice.mjs", + "build": "node scripts/build.mjs", "dev": "npm run build && node dist/cli.js watch", "generate": "npm run build && node dist/cli.js generate", "test": "npm run build && node --test test/*.test.mjs && tsc -p test/tsconfig.json && tsc -p test/tsconfig.register.json", "prepack": "npm run build", "smoke": "node scripts/smoke.mjs", - "build:site": "npm run build && node scripts/build-site.mjs && node .github/scripts/apply-ai-notice.mjs" + "build:site": "npm run build && node scripts/build-site.mjs" }, "devDependencies": { "@tanstack/react-query": "^5.102.8", diff --git a/site/ai-training-notice.txt b/site/ai-training-notice.txt deleted file mode 100644 index 135771e..0000000 --- a/site/ai-training-notice.txt +++ /dev/null @@ -1,11 +0,0 @@ -# AI training and data collection notice / AI 학습·수집 반대 고지 - -이 프로젝트의 관리자는 자신이 권리를 보유한 코드, 문서, 웹사이트, 앱, 데모, 패키지, 이미지와 기타 콘텐츠를 사전 서면 동의 없이 AI·머신러닝 모델의 학습·미세조정 또는 학습용 데이터셋 구축을 위해 수집·저장·이용하는 것에 명시적으로 반대합니다. 해당 목적의 이용 전 권리자의 서면 동의를 받으세요. - -The maintainer expressly objects to collecting, storing or using maintainer-controlled code, documentation, websites, apps, demos, packages, images and other content for AI or machine-learning training, fine-tuning or training datasets without prior written consent. Obtain the rights holder's written consent before such use. - -이 고지는 권리자의 의사 표시입니다. 기존 오픈소스·콘텐츠 라이선스를 수정하거나 이미 부여된 권리 및 법령상 허용되는 이용을 제한하지 않습니다. 제삼자 자료와 사용자가 작성한 콘텐츠에는 각 권리자의 조건이 적용됩니다. 서비스 이용자가 요청한 개별 AI 기능의 실행과 학습용 무단 수집은 구분합니다. - -This notice states the rights holder's preference. It does not amend existing software or content licenses, restrict rights already granted, or override uses permitted by law. Third-party materials and user-created content remain subject to their own rights and terms. User-authorized AI features are distinct from unauthorized collection for training. - -robots.txt expresses crawler preferences; it does not guarantee compliance or remove previously collected data.