完成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
+9 -1
View File
@@ -1,7 +1,15 @@
$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
$page = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g11-genealogy-settings.vue') -Raw -Encoding UTF8
foreach ($token in @('settingsFixtures', 'settingsFixtures[genealogyId.value]', 'genealogyDraft.name.trim().length > 30', 'originalDraft', 'isDirty')) {
foreach ($token in @('findGenealogyFixture', 'getGenealogyFixtureAccess', 'isGenealogyAccessPreset', 'GENEALOGY_ACCESS_PRESET', 'GENEALOGY_ACCESS_PRESET_OPTIONS', 'genealogyDraft.accessPreset', 'genealogyDraft.name.trim().length > 20', 'originalDraft', 'isDirty')) {
if (-not $page.Contains($token)) { throw "G11 settings data contract missing: $token" }
}
if ($page.Contains('settingsFixtures')) { throw 'G11 must not retain a private genealogy settings fixture owner' }
if ($page.Contains('GENEALOGY_VISIBILITY') -or $page.Contains('genealogyDraft.visibility')) { throw 'G11 retains the deleted visibility-only contract' }
if ($page -notmatch '(?s)if \(!isGenealogyAccessPreset\(fixture\.accessPreset\)\) \{\s*settingsState\.value = "error";\s*return;\s*\}') {
throw 'G11 must fail closed before loading an unknown access preset'
}
if ($page -match '(?s)accessPreset:\s*Object\.values\(GENEALOGY_ACCESS_PRESET\).*?:\s*GENEALOGY_ACCESS_PRESET\.MEMBER_ONLY') {
throw 'G11 must not silently downgrade an unknown access preset to MEMBER_ONLY'
}
Write-Output 'G11-SETTINGS-DATA-CONTRACT PASS'