完成50%

This commit is contained in:
2026-07-23 08:23:59 +08:00
parent 9b0ad62df4
commit f1edc6b533
218 changed files with 24318 additions and 5514 deletions
@@ -1,8 +1,31 @@
$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
$page = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g12-generation-poems.vue') -Raw -Encoding UTF8
foreach ($token in @('startGeneration', 'currentGeneration', 'characters.map(', 'maxlength="50"', 'stopMissingOldGeneration.value')) {
foreach ($token in @(
'MAX_GENERATION_COUNT',
'MAX_GENERATION_TEXT_LENGTH',
'MAX_GENERATION_POEM_INPUT_LENGTH',
'validateGenerationPoemText',
'findFirstGenerationGap',
'mergeGenerationPoemRows',
':maxlength="MAX_GENERATION_POEM_INPUT_LENGTH * 2"',
'disableMissing.value',
'const disableMissing = ref(false)',
'const POEM_RENDER_BATCH_SIZE = 50',
'const visiblePoemRows = computed',
'const loadMorePoems = () =>',
'v-for="item in visiblePoemRows"',
'GENERATION_POEM_STATUS.DISABLED',
'const activeRows = nextRows.filter',
'const firstGap = lastActiveGeneration === null',
'if (firstGap !== null)',
'overflow-wrap: anywhere',
'word-break: break-word'
)) {
if (-not $page.Contains($token)) { throw "G12 capacity contract missing: $token" }
}
foreach ($forbidden in @('stopMissingOldGeneration', 'MAX_GENERATION_POEM_LENGTH', 'query.startGeneration', 'query.currentGeneration', 'maxlength="50"', ':maxlength="MAX_GENERATION_POEM_INPUT_LENGTH"', ':maxlength="-1"')) {
if ($page.Contains($forbidden)) { throw "G12 retains an unsafe generation contract: $forbidden" }
}
if ($page -match '\.slice\(0,\s*4\)') { throw 'G12 must not truncate poem data to four generations' }
Write-Output 'G12-GENERATION-POEM-CAPACITY-CONTRACT PASS'