60%
This commit is contained in:
@@ -13,48 +13,49 @@ function Read-RequiredFile {
|
||||
return Get-Content -Raw -Encoding UTF8 -LiteralPath $path
|
||||
}
|
||||
|
||||
function Assert-Contains {
|
||||
param([string]$Content, [string]$Label, [string]$Expected)
|
||||
if (-not $Content.Contains($Expected)) {
|
||||
$script:issues.Add("$Label missing: $Expected")
|
||||
}
|
||||
}
|
||||
|
||||
function Assert-DoesNotContain {
|
||||
param([string]$Content, [string]$Label, [string]$Forbidden)
|
||||
if ($Content.Contains($Forbidden)) {
|
||||
$script:issues.Add("$Label must not claim unsupported remote ownership: $Forbidden")
|
||||
}
|
||||
}
|
||||
|
||||
$page = Read-RequiredFile 'pages/genealogy/g03-create-genealogy.vue'
|
||||
$api = Read-RequiredFile 'utils/api.js'
|
||||
$flowContract = Read-RequiredFile 'tests/g03-create-flow-contract.ps1'
|
||||
$flowRuntime = Read-RequiredFile 'tests/g03-create-flow-runtime-smoke.js'
|
||||
|
||||
# Apifox only declares two independent writes. There is no recoverable atomic
|
||||
# bootstrap or result-query operation, so G03 remains an explicit local preview.
|
||||
Assert-Contains $page 'G03 page' 'flow-success-dialog__copy'
|
||||
Assert-Contains $page 'G03 page' 'createLocalGenealogyPreview'
|
||||
Assert-Contains $page 'G03 page' 'updateLocalGenealogyPreviewAncestor'
|
||||
Assert-Contains $page 'G03 page' 'removeLocalGenealogyPreview'
|
||||
Assert-Contains $flowContract 'G03 flow contract' 'createLocalGenealogyPreview'
|
||||
Assert-Contains $flowRuntime 'G03 runtime smoke' 'local-created-'
|
||||
|
||||
foreach ($forbidden in @(
|
||||
'createGenealogyBootstrapCoordinator',
|
||||
'genealogy-bootstrap-operations',
|
||||
'Idempotency-Key',
|
||||
'/genealogy/app/region/search',
|
||||
'requestStrict(',
|
||||
'appApi.'
|
||||
foreach ($required in @(
|
||||
'appApi.createGenealogy',
|
||||
'finishPage("G01", {}, {',
|
||||
'entityId: created.id',
|
||||
'requestController: createController'
|
||||
)) {
|
||||
Assert-DoesNotContain $page 'G03 page' $forbidden
|
||||
if (-not $page.Contains($required)) { $issues.Add("G03 real create page missing: $required") }
|
||||
}
|
||||
foreach ($required in @(
|
||||
"url: '/genealogy/app/genealogies'",
|
||||
'normalizeCreatedGenealogy',
|
||||
'requestStrict({'
|
||||
)) {
|
||||
if (-not $api.Contains($required)) { $issues.Add("G03 real create API missing: $required") }
|
||||
}
|
||||
foreach ($required in @(
|
||||
'G03-CREATE-FLOW-CONTRACT PASS',
|
||||
'G03-CREATE-FLOW-RUNTIME-SMOKE PASS'
|
||||
)) {
|
||||
$source = if ($required -like '*RUNTIME*') { $flowRuntime } else { $flowContract }
|
||||
if (-not $source.Contains($required)) { $issues.Add("G03 verification missing: $required") }
|
||||
}
|
||||
foreach ($forbidden in @(
|
||||
'createLocalGenealogyPreview',
|
||||
'updateLocalGenealogyPreview',
|
||||
'removeLocalGenealogyPreview',
|
||||
'local-created-',
|
||||
'setTimeout(',
|
||||
'genealogies.unshift(created)'
|
||||
)) {
|
||||
if ($page.Contains($forbidden) -or $api.Contains($forbidden)) {
|
||||
$issues.Add("G03 must not retain a local preview path: $forbidden")
|
||||
}
|
||||
}
|
||||
|
||||
if ($issues.Count -gt 0) {
|
||||
Write-Output 'G03-BOOTSTRAP-CLIENT-RELEASE BLOCKED'
|
||||
foreach ($issue in $issues) { Write-Output "- $issue" }
|
||||
Write-Output '- Keep the two-step visual preview local until Apifox supplies a recoverable create/result contract with a stable lexical genealogyId.'
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user