From 25fd4cf89cd845fe7f2accfce49baacd5692815f Mon Sep 17 00:00:00 2001 From: xuans Date: Sun, 27 Sep 2026 17:22:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E6=95=9B=E6=AD=A3=E5=BC=8F=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E4=B8=BAWeb=E5=92=8C=E6=9C=8D=E5=8A=A1=E7=AB=AF?= =?UTF-8?q?=E5=B9=B6=E4=BF=9D=E7=95=99=E6=A1=8C=E9=9D=A2=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=BA=90=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 +++- backend/README.md | 6 +- .../internal/releasearchive/verify_test.go | 12 ++- build/README.md | 29 +++--- build/build-release.ps1 | 97 ++----------------- deploy/README.md | 8 +- desktop/README.md | 5 +- doc/Scert开发任务清单.md | 2 + doc/Scert整改任务执行清单.md | 19 +++- doc/全面审查测试与优化记录.md | 2 + doc/生产部署与运维说明.md | 2 + 11 files changed, 87 insertions(+), 112 deletions(-) diff --git a/README.md b/README.md index 134f146..240a5cf 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ Scert 是一个统一管理 SSL 证书、自动续期并部署到多台服务器的跨平台项目。 +## 正式交付范围 + +正式产品仅包含 Web 管理界面和 Windows/Linux 服务端。CLI 作为服务端运维入口,用于初始化、服务启动、运维诊断、数据库迁移、备份恢复、服务安装和卸载,不作为另一套业务管理界面。 + +`desktop/` 保留 Wails 历史源码,供参考和独立开发;桌面窗口、托盘、自动更新、桌面配置管理及桌面 UI 测试均不属于正式交付或验收范围。正式发布脚本不调用 Wails,也不需要 WebView2 或 GTK 开发依赖。 + ## 项目目录 - `backend`:Go 核心服务、CLI、数据库和 HTTP API。 @@ -12,9 +18,9 @@ Scert 是一个统一管理 SSL 证书、自动续期并部署到多台服务器 - 第一阶段使用 Let’s Encrypt + `go-acme/lego`。 - 第一阶段包含单域名、泛域名和多域名 SAN。 -- 支持 MySQL 5.7、MySQL 8.0 和 SQLite。 +- 数据库支持目标包含 SQLite、MySQL 和 PostgreSQL;版本边界及实机验证状态见 `doc/构建版本与数据库支持矩阵.md`,代码适配不等于真实实例验收通过。 - HTTPS 采用默认核心服务终止、高级反向代理终止的双模式设计。 -- CLI、Web 和桌面版共享核心服务、配置和数据。 +- Web 和运维 CLI 复用服务端核心、配置和数据。 ## 开发状态 @@ -22,10 +28,15 @@ Scert 是一个统一管理 SSL 证书、自动续期并部署到多台服务器 详细内容请先阅读: +- `doc/Scert整改合并优化清单.md`:当前整改需求基线。 +- `doc/Scert整改任务执行清单.md`:当前执行状态和验证证据。 +- `build/README.md`:正式构建和交付范围。 - `doc/SSL服务程序需求确认文档.md` - `doc/SSL服务程序技术架构设计文档.md` - `doc/Scert开发任务清单.md` +早期需求、架构和开发清单保留历史记录;与当前整改基线冲突的桌面目标不再执行。 + ## 首轮复审状态 -2026 年 8 月 26 日已完成首轮代码复审。基础骨架、SQLite、CLI、HTTP、前端生产构建和 Windows/Linux amd64 构建已通过;MySQL 5.7/8.0 真实实例测试因缺少明确连接参数保持阻塞。详细记录以 `doc/Scert开发任务清单.md` 的“二十七、首轮开发复审记录”为准。 \ No newline at end of file +2026 年 8 月 26 日已完成首轮代码复审。基础骨架、SQLite、CLI、HTTP、前端生产构建和 Windows/Linux amd64 构建已通过;MySQL 5.7/8.0 真实实例测试因缺少明确连接参数保持阻塞。详细记录以 `doc/Scert开发任务清单.md` 的“二十七、首轮开发复审记录”为准。 diff --git a/backend/README.md b/backend/README.md index ef0eb21..8b9914a 100644 --- a/backend/README.md +++ b/backend/README.md @@ -2,13 +2,15 @@ Scert 是面向 Windows 和 Linux 的 SSL 证书管理服务。当前代码已覆盖核心证书生命周期、DNS-01、自动续期、SSH 部署、通知、认证和 Web 管理流程。 +正式交付仅包含 Web 和服务端。CLI 限定为初始化、服务启动、运维诊断、数据库迁移、备份恢复、服务安装和卸载入口;历史 `domain` 命令保留兼容,不再扩展成另一套业务管理界面。Wails 历史实现不参与正式发布及测试门禁。 + ## 当前已实现 - Go 后端模块和 `scert` CLI 入口。 - JSON 配置生成、读取、校验和原子保存。 - Windows 与 Linux 默认目录模型。 -- SQLite 和 MySQL 数据库连接抽象。 -- SQLite/MySQL 首版迁移脚本。 +- SQLite、MySQL 和 PostgreSQL 数据库连接抽象。 +- 三种数据库的迁移脚本、嵌入检查和迁移历史保护;实际版本及验证边界见 `../doc/构建版本与数据库支持矩阵.md`。 - 域名基础模型与 Repository。 - 健康检查、状态和域名基础 API。 - 中文 CLI:`version`、`help`、`init`、`status`、`serve`、`domain list`、`domain add`。 diff --git a/backend/internal/releasearchive/verify_test.go b/backend/internal/releasearchive/verify_test.go index 6087417..1fd948d 100644 --- a/backend/internal/releasearchive/verify_test.go +++ b/backend/internal/releasearchive/verify_test.go @@ -142,15 +142,25 @@ func TestReleaseScriptUsesPathChecksAndIncludesLinuxHelper(t *testing.T) { t.Fatal(err) } for _, required := range []string{ - "go build -trimpath", "wails build -trimpath", "Test-ReleasePaths -Source $targetDirectory", + "go build -trimpath", "Test-ReleasePaths -Source $targetDirectory", `$checkedPaths = @($forbiddenPaths | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } | Select-Object -Unique)`, `-ForbiddenPaths $checkedPaths`, `-Package "./cmd/scert-nginx"`, `$binaries += "scert-nginx"`, + `-Package "./cmd/scert-storage"`, `$binaries += "scert-storage"`, `-Executable (@("install-linux.sh") + $binaries)`, `trimpath = $true`, `local_path_check = "passed"`, + `delivery_scope = @("web", "server")`, `desktop_requested = $false`, } { if !strings.Contains(string(data), required) { t.Errorf("发布脚本缺少必要约束:%s", required) } } + for _, forbidden := range []string{ + "wails build", "Invoke-DesktopBuild", "Get-HostDesktopTarget", "ScertDesktop", + `type = "desktop"`, "if (-not $SkipDesktop)", + } { + if strings.Contains(string(data), forbidden) { + t.Errorf("正式发布脚本仍包含桌面构建路径:%s", forbidden) + } + } } diff --git a/build/README.md b/build/README.md index c4032aa..74c5fc7 100644 --- a/build/README.md +++ b/build/README.md @@ -1,6 +1,6 @@ # Scert 发布构建 -`build-release.ps1` 默认构建 Windows amd64 和 Linux amd64 的核心服务与密码重置程序。当前主机能够直接构建的 Wails 桌面版也会同时写入对应平台目录,并记录到 `manifest.json`。 +`build-release.ps1` 默认构建 Windows amd64 和 Linux amd64 的服务端、运维辅助程序及 Web 静态资源。正式交付仅限 Web 和服务端:不调用 Wails,不打包桌面端,也不依赖桌面目录是否存在。 ```text build/release/ @@ -10,11 +10,14 @@ build/release/ │ ├── windows-amd64/ │ │ ├── scert.exe │ │ ├── scert-admin.exe -│ │ └── ScertDesktop.exe +│ │ ├── web/ +│ │ ├── install-windows.ps1 +│ │ └── SHA256SUMS │ └── linux-amd64/ │ ├── scert │ ├── scert-admin │ ├── scert-nginx +│ ├── scert-storage │ ├── web/ │ └── SHA256SUMS ├── Scert-20260915-V0.1.0-linux-amd64.tar.gz @@ -29,16 +32,16 @@ build/release/ powershell -ExecutionPolicy Bypass -File .\build\build-release.ps1 ``` -只构建 Windows 核心服务和桌面版: +只构建 Windows 服务端和 Web: ```powershell powershell -ExecutionPolicy Bypass -File .\build\build-release.ps1 -Target windows-amd64 ``` -只构建核心服务,不构建桌面版: +只构建 Linux 服务端和 Web: ```powershell -powershell -ExecutionPolicy Bypass -File .\build\build-release.ps1 -SkipDesktop +powershell -ExecutionPolicy Bypass -File .\build\build-release.ps1 -Target linux-amd64 ``` 指定输出目录: @@ -47,15 +50,17 @@ powershell -ExecutionPolicy Bypass -File .\build\build-release.ps1 -SkipDesktop powershell -ExecutionPolicy Bypass -File .\build\build-release.ps1 -OutputDirectory D:\release\Scert ``` -桌面版构建需要已安装 Wails v2、Go 和 Node.js。Wails 桌面版使用当前主机原生平台构建;Windows 主机不能直接完成 Linux GTK 桌面交叉构建,Linux 桌面产物需要在 Linux 主机上执行同一脚本。 +正式构建需要 Go、Node.js 和 npm,不要求 Wails、WebView2 或 GTK 开发依赖。具体版本见 `doc/构建版本与数据库支持矩阵.md`。桌面窗口、托盘、自动更新、桌面配置及桌面 UI 测试属于范围外;`desktop/` 历史源码保留供独立开发,不得混入正式包。 + +旧参数 `-SkipDesktop` 保留兼容并输出警告,无论是否传入或显式设为假,都不会构建桌面端。旧参数 `-DesktopDirectory` 在构建前直接报错,避免误以为指定目录仍能加入正式发布。 脚本仅创建新的发布目录。发布目录或对应归档已存在时,在构建前拒绝执行,不覆盖旧包。前端直接构建到本次发布目录中的 `web-build/`,不清空或覆盖已有 `frontend/dist/`。失败产生的目录保留供排查,再次构建请使用新的输出目录。 -`manifest.json` 记录源码提交、已跟踪文件是否未提交、实际 Go 工具链、目标平台、是否请求桌面端以及文件和归档的 SHA256。`source_dirty=true` 的包仅用于开发,正式发布必须从已复审提交构建。未跟踪本地产物不计入源码脏状态,也不会自动打包。 +`manifest.json` 记录源码提交、已跟踪文件是否未提交、实际 Go 工具链、目标平台和文件及归档的 SHA256。`delivery_scope` 固定为 `web`、`server`,兼容字段 `desktop_requested` 固定为 `false`。`source_dirty=true` 的包仅用于开发,正式发布必须从已复审提交构建。未跟踪本地产物不计入源码脏状态,也不会自动打包。 ## 本机路径保护 -核心服务、辅助程序和 Wails 桌面版统一使用 `-trimpath`。手动构建也必须保留此参数,例如 `go build -trimpath -o scert ./cmd/scert` 和 `wails build -trimpath -nopackage`。前端生产构建明确关闭源码映射。 +正式服务端和辅助程序统一使用 `-trimpath`。手动构建也必须保留此参数,例如 `go build -trimpath -o scert ./cmd/scert`。前端生产构建明确关闭源码映射。 归档前逐个读取 Go 二进制构建信息,确认 `-trimpath=true`;同时扫描发布目录全部文件,拒绝工作区、用户目录、Windows 的 Go/Node 安装目录、实际 Go 工具链、模块缓存、构建缓存、临时目录和输出目录路径残留。Linux 的通用 `/usr/bin` 等运行时目录不因安装工具而被禁用。检查覆盖正反斜杠、JSON 转义、UTF-8 和 UTF-16。发现残留或无法读取构建信息时停止归档,保留失败目录用于排查。 @@ -64,9 +69,11 @@ powershell -ExecutionPolicy Bypass -File .\build\build-release.ps1 -OutputDirect 仅构建本轮 Linux 服务候选包示例: ```powershell -powershell -ExecutionPolicy Bypass -File .\build\build-release.ps1 -Target linux-amd64 -SkipDesktop -OutputDirectory .\build\release-candidate-20260915 +powershell -ExecutionPolicy Bypass -File .\build\build-release.ps1 -Target linux-amd64 -OutputDirectory .\build\release-candidate-20260927 ``` -此命令不构建 Windows 或 Wails 桌面端,不代表跨平台发布验收。归档包含 `scert`、`scert-admin`、`scert-nginx`、Web 静态资源、安装器、systemd 模板、`nginx/` 策略模板和部署说明。解压后先运行 `sha256sum -c SHA256SUMS`,再按部署说明操作。`scert-nginx` 仅随包提供,普通安装器不会安装或启用它;启用前按 `nginx/Nginx辅助服务部署说明.md` 单独完成 root 策略、安全初始化、本地 socket、Nginx 接线和实机验收。 +此命令不构建 Windows,不代表跨平台发布验收。Linux 归档包含 `scert`、`scert-admin`、`scert-nginx`、`scert-storage`、Web 静态资源、安装器、systemd 模板、`nginx/` 策略模板和部署说明。解压后先运行 `sha256sum -c SHA256SUMS`,再按部署说明操作。`scert-nginx` 仅随包提供,普通安装器不会安装或启用它;启用前按 `nginx/Nginx辅助服务部署说明.md` 单独完成 root 策略、安全初始化、本地 socket、Nginx 接线和实机验收。 -构建通过不等于生产验收通过;真实 DNS、ACME、SSH、Windows Service、systemd、WebView2 和 HTTPS 仍需在授权环境复核。 +正式构建验收应检查两个平台的归档与 `manifest.json`:包含对应服务端、运维程序和 Web;不存在 `ScertDesktop`、桌面产物类型或 Wails 依赖;路径扫描及 SHA256 检查通过。不以桌面构建或 WebView2 测试作为门禁。 + +构建通过不等于生产验收通过;真实 DNS、ACME、SSH、Windows Service、systemd 和 HTTPS 仍需在授权环境复核。 diff --git a/build/build-release.ps1 b/build/build-release.ps1 index 8c040c7..297af7c 100644 --- a/build/build-release.ps1 +++ b/build/build-release.ps1 @@ -23,8 +23,11 @@ if ([string]::IsNullOrWhiteSpace($BackendDirectory)) { if ([string]::IsNullOrWhiteSpace($OutputDirectory)) { $OutputDirectory = Join-Path $scriptDirectory "release" } -if ([string]::IsNullOrWhiteSpace($DesktopDirectory)) { - $DesktopDirectory = Join-Path $scriptDirectory "..\desktop" +if ($PSBoundParameters.ContainsKey("DesktopDirectory")) { + throw "正式发布仅包含 Web 和服务端,不再接受 DesktopDirectory;历史桌面源码请在 desktop 目录单独开发。" +} +if ($PSBoundParameters.ContainsKey("SkipDesktop")) { + Write-Warning "SkipDesktop 仅用于兼容旧命令;正式发布始终排除桌面端,无需再传入此参数。" } if ([string]::IsNullOrWhiteSpace($DeployDirectory)) { $DeployDirectory = Join-Path $scriptDirectory "..\deploy" @@ -65,68 +68,6 @@ function Invoke-GoBuild { } } -function Get-HostDesktopTarget { - if ([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform( - [System.Runtime.InteropServices.OSPlatform]::Windows - )) { - return "windows-amd64" - } - if ([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform( - [System.Runtime.InteropServices.OSPlatform]::Linux - )) { - return "linux-amd64" - } - return "" -} - -function Invoke-DesktopBuild { - param( - [Parameter(Mandatory = $true)] - [string]$ProjectDirectory, - [Parameter(Mandatory = $true)] - [string]$TargetName, - [Parameter(Mandatory = $true)] - [string]$Destination - ) - - if (-not (Get-Command wails -ErrorAction SilentlyContinue)) { - throw "未找到 Wails CLI,请先安装 Wails v2." - } - if (-not (Test-Path -LiteralPath (Join-Path $ProjectDirectory "wails.json") -PathType Leaf)) { - throw "桌面项目中没有找到 wails.json:$ProjectDirectory" - } - - Write-Host "正在构建 $TargetName 的 Scert 桌面版……" - $desktopGoOS = $env:GOOS - $desktopGoArch = $env:GOARCH - $desktopCGOEnabled = $env:CGO_ENABLED - Push-Location $ProjectDirectory - try { - $env:GOOS = "" - $env:GOARCH = "" - if ($TargetName.StartsWith("linux-")) { - $env:CGO_ENABLED = "1" - } - & wails build -trimpath -nopackage -platform ($TargetName.Replace("-", "/")) -o "ScertDesktop" - if ($LASTEXITCODE -ne 0) { - throw "构建 $TargetName 的 Scert 桌面版失败。" - } - $builtExtension = if ($TargetName.StartsWith("windows-")) { ".exe" } else { "" } - $builtDirectory = Join-Path (Join-Path $ProjectDirectory "build") "bin" - $builtPath = Join-Path $builtDirectory ("ScertDesktop" + $builtExtension) - if (-not (Test-Path -LiteralPath $builtPath -PathType Leaf)) { - throw "Wails 构建完成但没有找到桌面产物:$builtPath" - } - Copy-Item -LiteralPath $builtPath -Destination $Destination -Force - } - finally { - Pop-Location - $env:GOOS = $desktopGoOS - $env:GOARCH = $desktopGoArch - $env:CGO_ENABLED = $desktopCGOEnabled - } -} - function Write-Utf8NoBom { param( [Parameter(Mandatory = $true)] @@ -261,7 +202,6 @@ function Test-ReleasePaths { $backend = Resolve-SafeDirectory -Path $BackendDirectory -Label "后端目录" $output = Resolve-SafeDirectory -Path $OutputDirectory -Label "输出目录" -$desktop = Resolve-SafeDirectory -Path $DesktopDirectory -Label "桌面项目目录" $deploy = Resolve-SafeDirectory -Path $DeployDirectory -Label "部署目录" $frontend = Resolve-SafeDirectory -Path (Join-Path $scriptDirectory "..\frontend") -Label "前端目录" @@ -348,7 +288,6 @@ $oldGoOS = $env:GOOS $oldGoArch = $env:GOARCH $oldCGOEnabled = $env:CGO_ENABLED $manifestArtifacts = [System.Collections.Generic.List[object]]::new() -$hostDesktopTarget = Get-HostDesktopTarget Push-Location $backend try { @@ -362,7 +301,7 @@ try { } $goEnvironment = ($goEnvironmentJSON -join "`n") | ConvertFrom-Json $forbiddenPaths = @( - (Split-Path -Parent $scriptDirectory), $backend, $desktop, $frontend, $deploy, $output, + (Split-Path -Parent $scriptDirectory), $backend, $frontend, $deploy, $output, $env:USERPROFILE, $env:HOME, [System.IO.Path]::GetTempPath(), $goEnvironment.GOROOT, $goEnvironment.GOMODCACHE, $goEnvironment.GOCACHE, $goEnvironment.GOTMPDIR ) + $goEnvironment.GOPATH.Split([System.IO.Path]::PathSeparator) @@ -408,27 +347,6 @@ try { Copy-Item -LiteralPath (Join-Path $deploy "install-windows.ps1") -Destination (Join-Path $targetDirectory "install-windows.ps1") } - if (-not $SkipDesktop) { - if ($item -eq $hostDesktopTarget) { - $desktopExtension = if ($goos -eq "windows") { ".exe" } else { "" } - $desktopPath = Join-Path $targetDirectory ("ScertDesktop" + $desktopExtension) - Invoke-DesktopBuild -ProjectDirectory $desktop -TargetName $item -Destination $desktopPath - $binaries += ("ScertDesktop" + $desktopExtension) - $file = Get-Item -LiteralPath $desktopPath - $hash = Get-FileHash -LiteralPath $desktopPath -Algorithm SHA256 - $manifestArtifacts.Add([ordered]@{ - target = $item - type = "desktop" - file = Get-RelativeReleasePath -BaseDirectory $releaseDirectory -Path $file.FullName - size = $file.Length - sha256 = $hash.Hash.ToLowerInvariant() - }) - } - else { - Write-Warning "当前主机不能直接构建 $item 的 Wails 桌面版;请在对应平台主机上执行同一脚本。" - } - } - $checkedPaths = @($forbiddenPaths | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } | Select-Object -Unique) Test-ReleasePaths -Source $targetDirectory -Binaries $binaries -ForbiddenPaths $checkedPaths Write-TargetChecksums -TargetDirectory $targetDirectory | Out-Null @@ -479,7 +397,8 @@ $manifest = [ordered]@{ trimpath = $true local_path_check = "passed" targets = @($Target) - desktop_requested = -not [bool]$SkipDesktop + delivery_scope = @("web", "server") + desktop_requested = $false generated_at = [DateTimeOffset]::UtcNow.ToString("o") artifacts = $manifestArtifacts } diff --git a/deploy/README.md b/deploy/README.md index 71c3d92..442a38e 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -1,4 +1,10 @@ -# Scert Linux 部署 +# Scert 服务端部署 + +## 正式范围 + +正式安装包仅包含 Web 管理界面、Windows/Linux 服务端及其运维辅助程序,不含 Wails 桌面端,不要求 WebView2 或 GTK。桌面源码仅作为历史参考保留。 + +CLI 用于初始化、服务启动、运维诊断、数据库迁移、备份恢复、服务安装和卸载;日常业务管理使用 Web。Windows 使用包内 `install-windows.ps1`,Linux 使用 `install-linux.sh`;发布入口及双平台包结构见仓库 `build/README.md`。下文是 Linux 部署步骤。 ## 安装包目录 diff --git a/desktop/README.md b/desktop/README.md index b0e70a5..e137728 100644 --- a/desktop/README.md +++ b/desktop/README.md @@ -1,5 +1,8 @@ # Scert 桌面版 +> 历史源码,非正式交付范围。自 2026 年 9 月 27 日整改起,正式产品仅包含 Web 和 Windows/Linux 服务端。 +> 本目录保留供参考及独立开发,不由 `build/build-release.ps1` 构建或打包。桌面窗口、托盘、自动更新、桌面配置管理和桌面 UI 测试均不属于正式验收门禁;以下说明仅适用于历史实现。 + 桌面版使用 Wails 2,将 Vue 管理页面嵌入桌面窗口,并在同一进程内复用 Scert Go 核心服务和 HTTP API。桌面版不会额外监听服务端口,也不会复制一套桌面专用业务页面。 ## 开发运行 @@ -11,7 +14,7 @@ npm.cmd --prefix .\frontend run build wails dev ``` -首次构建或发布构建会通过 `desktop/scripts/build-frontend.mjs` 构建根目录前端,并同步到桌面嵌入目录。 +手动进行桌面构建时,会通过 `desktop/scripts/build-frontend.mjs` 构建根目录前端,并同步到桌面嵌入目录;这不是正式发布入口。 ## 配置目录 diff --git a/doc/Scert开发任务清单.md b/doc/Scert开发任务清单.md index 94b4fc8..8f69685 100644 --- a/doc/Scert开发任务清单.md +++ b/doc/Scert开发任务清单.md @@ -1,5 +1,7 @@ # Scert 开发任务清单 +> 2026-09-27 范围调整:本文件保留早期开发历史,当前执行以《Scert整改合并优化清单》和《Scert整改任务执行清单》为准。正式交付仅为 Web 和 Windows/Linux 服务端;本文件中的 Wails 桌面窗口、托盘、桌面更新、桌面配置和桌面 UI 测试均退出正式开发及验收范围,不再作为未完成交付项。CLI 限定为初始化及服务运维,不另建业务管理界面。 + > 2026-09-15 最新进展:见 [发布加固与实机验收记录](发布加固与实机验收记录.md)。初始化事务、远程部署锁、回滚与 SSH 安全依赖已加固;Linux 候选已构建并通过隔离实机推送验收。管理端仍未完成初始化,正式 ACME、业务 reload、TLS/SNI 和浏览器全流程继续标记 `[!]`,不是生产放行。 > 文档用途:作为 Scert 项目后续开发、进度跟踪、阶段复审和验收的执行清单。 diff --git a/doc/Scert整改任务执行清单.md b/doc/Scert整改任务执行清单.md index 93496a2..37d5ae2 100644 --- a/doc/Scert整改任务执行清单.md +++ b/doc/Scert整改任务执行清单.md @@ -33,9 +33,9 @@ | 编号 | 状态 | 任务 | 当前问题 | 下一步交付 | 验证证据 | |---|---:|---|---|---|---| -| P0-01 | [~] | 明确产品范围 | Wails 目录和构建产物仍在仓库,正式范围尚未落地 | 更新 README、发布文档和构建入口,明确 Web、Windows/Linux 服务端为正式范围 | 范围审查、发布包文件清单 | +| P0-01 | [~] | 明确产品范围 | 已移除正式发布的 Wails 路径,历史源码保留;双平台实际包和 CLI 历史业务入口仍待复核 | 核查正式归档、兼容参数和运维 CLI 边界 | 范围审查、发布包文件清单 | | P0-02 | [~] | 建立完整任务清单 | 已覆盖 44 项,逐项依赖、涉及文件和具体实机步骤仍需补充 | 持续维护状态、证据和复审结果 | 本文件提交记录 | -| P0-03 | [~] | 整理源码、构建产物和部署产物 | 已跟踪桌面二进制和桌面 dist;忽略规则覆盖不完整 | 完成边界规则,复审后从 Git 索引移除生成物但保留本地文件 | `git ls-files`、`git check-ignore`、工作区复核 | +| P0-03 | [~] | 整理源码、构建产物和部署产物 | 已取消跟踪桌面二进制和 dist,补强忽略规则,本地文件保留 | 独立克隆验证正式发布和生成物边界,不再要求桌面构建 | `git ls-files`、`git check-ignore`、工作区复核 | | P0-04 | [~] | 统一开发和构建版本 | 模块实际使用 Go `1.26.6`,不存在此前误报的版本阻塞;历史文档仍需统一 | 统一模块、构建说明、锁文件和验收机版本记录 | 版本矩阵、构建日志 | | P0-05 | [!] | 确认数据库正式支持矩阵 | 三种数据库均有代码,但 README、文档和实机证据口径不完全一致 | 明确 SQLite、MySQL、PostgreSQL 的正式级别、版本和迁移回滚要求 | 三数据库迁移、备份恢复和连接测试 | | P0-06 | [~] | 建立统一领域模型 | 已有域名、证书、任务、服务器等实体,项目和部署关联仍需审查 | 补齐资源关系图、外键/归属和任务关联 | 模型文档、迁移检查、接口测试 | @@ -107,7 +107,7 @@ 1. 统一 Go 版本声明、构建环境和发布文档口径。 2. 确认 SQLite、MySQL、PostgreSQL 的正式支持级别,并补齐迁移/恢复验证矩阵。 -3. 复审并清理 Git 索引中的桌面生成物,保留必要源码和说明。 +3. 完成 Web/服务端正式发布范围及独立克隆验证;桌面生成物已取消跟踪,源码和本地文件保留。 4. 继续定位 SSH 公钥自动部署实机失败阶段,完成密码回退和密钥登录双路径验收。 5. 将生产验收门禁与当前远程部署、DNS、HTTPS 和 ACME 证据逐项对应。 ### 2026-09-27:自动化基线验证 @@ -128,7 +128,7 @@ - 已确认 `desktop/scripts/build-frontend.mjs` 从根目录 `frontend/dist` 重新构建并复制桌面资源。 - 已将 `desktop/desktop.exe` 和 `desktop/frontend/dist/index.html` 从 Git 索引移除;本地文件仍保留,未物理删除。 - `deploy/tests/install-linux-test.py` 保留为可复用测试代码。 -- 本项仍需在独立克隆中验证桌面构建入口和发布包内容后,才能标记为 `[✓]`。 +- 本项仍需在独立克隆中验证正式发布包和生成物边界;按 P0-01 的范围调整,不再以桌面构建作为正式门禁。 ### 2026-09-27:P0-04、P0-05、P2-07 版本和迁移保护 @@ -138,3 +138,14 @@ - `Migrate` 拒绝新版数据库和不连续的迁移历史,避免旧程序误用更新后的数据库。 - 数据库定向测试通过:五类异常历史拒绝后原数据不变;SQLite 从 0~9 版本升级并重复执行通过。 - 仅使用测试临时库,没有访问或清空外部业务数据库。三种数据库兼容性不能据此标记全部通过。 + +### 2026-09-27:P0-01 正式发布范围收敛 + +- 依赖:原始整改清单 P0-01,已推送的 `8b33282` 作为修改前检查点;未删除桌面源码或本地生成物。 +- 涉及文件:`build/build-release.ps1`、`backend/internal/releasearchive/verify_test.go`、根目录及各模块 README、生产和历史测试文档。 +- 正式发布已移除 Wails 调用和桌面打包;清单新增 `delivery_scope=[web,server]`,兼容字段 `desktop_requested=false`。 +- 旧参数 `SkipDesktop` 仅警告并兼容,显式设假也不能恢复桌面构建;传入 `DesktopDirectory` 在构建前报错。 +- 保留路径扫描、Go `-trimpath`、文件及归档 SHA256、拒绝覆盖旧输出、源码提交和脏状态记录。 +- 已通过 PowerShell 语法解析、`go test -count=1 -timeout=3m ./internal/releasearchive ./cmd/scert-release`、`git diff --check`。 +- 待执行:从干净提交构建 Windows/Linux 正式范围候选包,核对清单、归档内容和校验和;验证旧参数拒绝路径。此为构建层验证,不代表 Windows/Linux 实机安装验收。 +- 待复核:历史 `domain` CLI 兼容入口仍存在,需确认收敛方式;因此 P0-01 继续保持 `[~]`,不提前标记整个任务完成。 diff --git a/doc/全面审查测试与优化记录.md b/doc/全面审查测试与优化记录.md index af48ee0..0a02840 100644 --- a/doc/全面审查测试与优化记录.md +++ b/doc/全面审查测试与优化记录.md @@ -1,5 +1,7 @@ # 全面审查、测试与优化记录 +> 2026-09-27 范围调整:以下为历史审查证据。当前正式测试范围仅为 Web 和 Windows/Linux 服务端;历史桌面模块测试记录保留,但不再作为交付目标或生产门禁。当前任务状态见《Scert整改任务执行清单》。 + ## 一、范围与需求确认 日期:2026-09-15。本轮从北京时间 20:47 开始,承接“全面审查、测试、优化”的要求。 diff --git a/doc/生产部署与运维说明.md b/doc/生产部署与运维说明.md index 361fc83..b7cc0ac 100644 --- a/doc/生产部署与运维说明.md +++ b/doc/生产部署与运维说明.md @@ -1,5 +1,7 @@ # Scert 生产部署与运维说明 +> 2026-09-27 正式范围:仅交付 Web 和 Windows/Linux 服务端。Wails 历史源码不参与发布,桌面窗口、托盘、更新、桌面配置及 UI 测试不作为生产门禁。CLI 仅作为服务端运维工具;本文件的 Linux 部署步骤不代表 Windows Service 已验收。 + > 2026-09-15 云主机验收拓扑已更新:`47.108.78.12` 为管理机,`8.137.23.95` 仅为推送测试机。下文局域网地址是历史测试示例,不能用于本轮部署。最新包、实机证据、禁止修改范围及生产阻塞见 [发布加固与实机验收记录](发布加固与实机验收记录.md)。 ## 1. 文档范围